dbd/mysql/dbd_mysql.h

Fri, 29 Jun 2012 17:45:37 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 29 Jun 2012 17:45:37 +0100
changeset 45
7c968f66bccd
parent 33
6c64c45e7d8f
permissions
-rw-r--r--

MySQL: Avoid allocating the full column size to receive results, for variable-length types check result size before allocation (thanks Florob)

#ifdef _MSC_VER  /* all MS compilers define this (version) */
	#include <windows.h> 
#endif


#include <mysql.h>
#include <dbd/common.h>

#define DBD_MYSQL_CONNECTION	"DBD.MySQL.Connection"
#define DBD_MYSQL_STATEMENT	"DBD.MySQL.Statement"

/*
 * connection object implementation
 */
typedef struct _connection {
    MYSQL *mysql;
} connection_t;

/*
 * statement object implementation
 */
typedef struct _statement {
    MYSQL *mysql;
    MYSQL_STMT *stmt;
    MYSQL_RES *metadata; /* result dataset metadata */
} statement_t;

mercurial