Annotation of sql/mysql/parser3mysql.C, revision 1.63
1.1 parser 1: /** @file
2: Parser MySQL driver.
3:
1.61 moko 4: Copyright (c) 2001-2019 Art. Lebedev Studio (http://www.artlebedev.com)
1.1 parser 5:
1.7 paf 6: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1 parser 7:
1.36 misha 8: 2001-07-30 using MySQL 3.23.22b
1.3 paf 9:
1.36 misha 10: 2001-11-06 numrows on "HP-UX istok1 B.11.00 A 9000/869 448594332 two-user license"
1.3 paf 11: 3.23.42 & 4.0.0.alfa never worked, both subst & .sl version returned 0
1.1 parser 12: */
13:
14: #include "config_includes.h"
15:
16: #include "pa_sql_driver.h"
17:
1.63 ! moko 18: volatile const char * IDENT_PARSER3MYSQL_C="$Id: parser3mysql.C,v 1.62 2020/01/18 20:54:42 moko Exp $" IDENT_PA_SQL_DRIVER_H;
1.40 moko 19:
1.1 parser 20: #define NO_CLIENT_LONG_LONG
21: #include "mysql.h"
22: #include "ltdl.h"
23:
24: #define MAX_STRING 0x400
25: #define MAX_NUMBER 20
26:
1.62 moko 27: #ifdef _MSC_VER
1.1 parser 28: # define snprintf _snprintf
1.2 parser 29: # define strcasecmp _stricmp
1.1 parser 30: #endif
31:
1.34 misha 32: static char *lsplit(char *string, char delim){
1.32 misha 33: if(string) {
1.34 misha 34: if(char *v=strchr(string, delim)){
1.1 parser 35: *v=0;
36: return v+1;
37: }
1.32 misha 38: }
39: return 0;
1.1 parser 40: }
41:
1.34 misha 42: static char *lsplit(char **string_ref, char delim){
1.32 misha 43: char *result=*string_ref;
1.2 parser 44: char *next=lsplit(*string_ref, delim);
1.32 misha 45: *string_ref=next;
46: return result;
1.2 parser 47: }
48:
1.34 misha 49: static char* rsplit(char* string, char delim){
50: if(string){
51: if(char* v=strrchr(string, delim)){
1.26 paf 52: *v=0;
53: return v+1;
54: }
1.32 misha 55: }
56: return NULL;
1.26 paf 57: }
58:
1.34 misha 59: static void toupper_str(char *out, const char *in, size_t size){
1.19 paf 60: while(size--)
61: *out++=(char)toupper(*in++);
62: }
63:
1.38 misha 64: inline static bool is_column_transcode_required(enum_field_types type) {
65: switch(type) {
66: case MYSQL_TYPE_NULL:
67:
1.45 moko 68: #ifdef FIELD_TYPE_NEWDECIMAL
69: case MYSQL_TYPE_NEWDECIMAL:
70: #endif
1.38 misha 71: case MYSQL_TYPE_DECIMAL:
72: case MYSQL_TYPE_FLOAT:
73: case MYSQL_TYPE_DOUBLE:
74:
75: case MYSQL_TYPE_TINY:
76: case MYSQL_TYPE_SHORT:
77: case MYSQL_TYPE_LONG:
78: case MYSQL_TYPE_LONGLONG:
79: case MYSQL_TYPE_INT24:
1.45 moko 80: #ifdef FIELD_TYPE_BIT
1.38 misha 81: case MYSQL_TYPE_BIT:
1.45 moko 82: #endif
1.38 misha 83:
84: case MYSQL_TYPE_DATE:
85: case MYSQL_TYPE_NEWDATE:
86: case MYSQL_TYPE_TIME:
87: case MYSQL_TYPE_DATETIME:
88: case MYSQL_TYPE_YEAR:
89: case MYSQL_TYPE_TIMESTAMP:
90:
91: case MYSQL_TYPE_BLOB:
92: case MYSQL_TYPE_TINY_BLOB:
93: case MYSQL_TYPE_MEDIUM_BLOB:
94: case MYSQL_TYPE_LONG_BLOB:
95: return false;
96: break;
1.49 moko 97: default:
98: return true;
1.38 misha 99: }
100: }
101:
1.53 moko 102: inline static char* strdup(SQL_Driver_services& services, char* str, size_t length) {
1.38 misha 103: char *strm=(char*)services.malloc_atomic(length+1);
104: memcpy(strm, str, length);
105: strm[length]=0;
1.53 moko 106: return strm;
1.38 misha 107: }
108:
1.14 paf 109: struct Connection {
1.16 paf 110: SQL_Driver_services* services;
1.15 paf 111:
1.14 paf 112: MYSQL* handle;
1.33 misha 113: const char* client_charset;
1.14 paf 114: bool autocommit;
115: };
116:
1.29 misha 117:
1.1 parser 118: /**
119: MySQL server driver
120: */
121: class MySQL_Driver : public SQL_Driver {
122: public:
123:
1.29 misha 124: MySQL_Driver() : SQL_Driver() {}
125:
1.1 parser 126: /// get api version
127: int api_version() { return SQL_DRIVER_API_VERSION; }
1.33 misha 128:
1.1 parser 129: /// initialize driver by loading sql dynamic link library
1.4 paf 130: const char *initialize(char *dlopen_file_spec) {
1.1 parser 131: return dlopen_file_spec?
132: dlink(dlopen_file_spec):"client library column is empty";
133: }
1.33 misha 134:
1.1 parser 135: /** connect
1.23 paf 136: @param url
1.2 parser 137: format: @b user:pass@host[:port]|[/unix/socket]/database?
1.47 moko 138: charset=value& // transcode by server with command 'SET NAMES value'
1.32 misha 139: ClientCharset=charset& // transcode by parser
1.2 parser 140: timeout=3&
1.32 misha 141: compress=0&
142: named_pipe=1&
1.33 misha 143: autocommit=1&
1.35 misha 144: multi_statements=0 // allows more then one statement in one query
1.52 moko 145: 4.1+ accept not 'cp1251_koi8' but 'cp1251', 'utf8' and much more
1.33 misha 146: it is usable for transcoding using sql server
1.1 parser 147: */
1.52 moko 148: void connect(char *url, SQL_Driver_services& services, void **connection_ref /*< output: Connection* */){
1.23 paf 149: char *user=url;
1.26 paf 150: char *s=rsplit(user, '@');
1.1 parser 151: char *host=0;
152: char *unix_socket=0;
153: if(s && s[0]=='[') { // unix socket
154: unix_socket=1+s;
155: s=lsplit(unix_socket, ']');
156: } else { // IP
157: host=s;
158: }
159: char *db=lsplit(s, '/');
160: char *pwd=lsplit(user, ':');
161: char *error_pos=0;
1.2 parser 162: char *options=lsplit(db, '?');
1.33 misha 163: char *charset=0;
1.34 misha 164: int client_flag=CLIENT_MULTI_RESULTS;
1.1 parser 165:
1.33 misha 166: Connection& connection=*(Connection *)services.malloc(sizeof(Connection));
167: *connection_ref=&connection;
1.15 paf 168: connection.services=&services;
1.32 misha 169: connection.handle=mysql_init(NULL);
1.52 moko 170: connection.client_charset=0;
1.14 paf 171: connection.autocommit=true;
1.2 parser 172:
1.53 moko 173: while(1){
174: char *next_host=lsplit(host, ',');
175: char *host_options=next_host && options ? strdup(services, options, strlen(options)) : options;
176:
177: char *port_cstr=lsplit(host, ':');
178: int port=port_cstr?strtol(port_cstr, &error_pos, 0):0;
179:
180: while(host_options){
181: char *key=lsplit(&host_options, '&');
182: if(key && *key){
1.32 misha 183: if(char *value=lsplit(key, '=')){
1.33 misha 184: if(strcmp(key, "ClientCharset")==0){ // transcoding with parser
1.21 paf 185: toupper_str(value, value, strlen(value));
1.33 misha 186: connection.client_charset=value;
1.32 misha 187: } else if(strcasecmp(key, "charset")==0){ // transcoding with server
1.33 misha 188: charset=value;
1.32 misha 189: } else if(strcasecmp(key, "timeout")==0){
1.2 parser 190: unsigned int timeout=(unsigned int)atoi(value);
1.14 paf 191: if(mysql_options(connection.handle, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&timeout)!=0)
192: services._throw(mysql_error(connection.handle));
1.32 misha 193: } else if(strcasecmp(key, "compress")==0){
1.2 parser 194: if(atoi(value))
1.14 paf 195: if(mysql_options(connection.handle, MYSQL_OPT_COMPRESS, 0)!=0)
196: services._throw(mysql_error(connection.handle));
1.32 misha 197: } else if(strcasecmp(key, "named_pipe")==0){
1.2 parser 198: if(atoi(value))
1.33 misha 199: if(mysql_options(connection.handle, MYSQL_OPT_NAMED_PIPE, 0)!=0)
1.14 paf 200: services._throw(mysql_error(connection.handle));
1.39 misha 201: } else if(strcasecmp(key, "local_infile")==0){
202: if(atoi(value))
203: if(mysql_options(connection.handle, MYSQL_OPT_LOCAL_INFILE, 0)!=0)
204: services._throw(mysql_error(connection.handle));
1.32 misha 205: } else if(strcasecmp(key, "autocommit")==0){
1.31 misha 206: if(atoi(value)==0)
1.14 paf 207: connection.autocommit=false;
1.34 misha 208: } else if(strcasecmp(key, "multi_statements")==0){
209: if(atoi(value)!=0)
210: client_flag=CLIENT_MULTI_STATEMENTS;
1.54 moko 211: } else if(strcasecmp(key, "config_file")==0){
212: if(mysql_options(connection.handle, MYSQL_READ_DEFAULT_FILE, value)!=0)
213: services._throw(mysql_error(connection.handle));
214: } else if(strcasecmp(key, "config_group")==0){
215: if(mysql_options(connection.handle, MYSQL_READ_DEFAULT_GROUP, value)!=0)
216: services._throw(mysql_error(connection.handle));
1.2 parser 217: } else
218: services._throw("unknown connect option" /*key*/);
1.53 moko 219: } else
1.2 parser 220: services._throw("connect option without =value" /*key*/);
221: }
222: }
223:
1.53 moko 224: if(mysql_real_connect(connection.handle, host, user, pwd, db, port, unix_socket, client_flag))
225: break;
226:
227: if(!next_host)
228: services._throw(mysql_error(connection.handle));
229:
230: host=next_host;
1.33 misha 231: }
1.1 parser 232:
1.33 misha 233: if(charset){
1.47 moko 234: char statement[MAX_STRING+1]="SET NAMES ";
1.33 misha 235: strncat(statement, charset, MAX_STRING);
236: _exec(connection, statement);
1.1 parser 237: }
238:
1.14 paf 239: if(!connection.autocommit)
1.33 misha 240: _exec(connection, "SET AUTOCOMMIT=0");
1.1 parser 241: }
1.14 paf 242:
243: void disconnect(void *aconnection) {
244: Connection& connection=*static_cast<Connection*>(aconnection);
245: mysql_close(connection.handle);
1.17 paf 246: connection.handle=0;
1.1 parser 247: }
1.32 misha 248:
1.15 paf 249: void commit(void *aconnection) {
1.14 paf 250: Connection& connection=*static_cast<Connection*>(aconnection);
251: if(!connection.autocommit)
1.33 misha 252: _exec(connection, "COMMIT");
1.14 paf 253: }
1.32 misha 254:
1.15 paf 255: void rollback(void *aconnection) {
1.14 paf 256: Connection& connection=*static_cast<Connection*>(aconnection);
257: if(!connection.autocommit)
1.33 misha 258: _exec(connection, "ROLLBACK");
1.14 paf 259: }
260:
1.15 paf 261: bool ping(void *aconnection) {
1.14 paf 262: Connection& connection=*static_cast<Connection*>(aconnection);
263: return mysql_ping(connection.handle)==0;
1.1 parser 264: }
265:
1.37 moko 266: // charset here is services.request_charset(), not connection.client_charset
267: // thus we can't use the sql server quoting support
268: const char* quote(void *aconnection, const char *str, unsigned int length) {
269: const char* from;
270: const char* from_end=str+length;
271:
272: size_t quoted=0;
273:
274: for(from=str; from<from_end; from++){
275: switch (*from) {
276: case 0:
277: case '\n':
278: case '\r':
279: case '\032':
280: case '\\':
281: case '\'':
282: case '"':
283: quoted++;
284: }
285: }
286:
287: if(!quoted)
288: return str;
289:
1.15 paf 290: Connection& connection=*static_cast<Connection*>(aconnection);
1.37 moko 291: char *result=(char*)connection.services->malloc_atomic(length + quoted + 1);
292: char *to = result;
293:
294: for(from=str; from<from_end; from++){
295: char escape;
296: switch (*from) {
297: case 0:
298: escape= '0';
299: break;
300: case '\n':
301: escape= 'n';
302: break;
303: case '\r':
304: escape= 'r';
305: break;
306: case '\032':
307: escape= 'Z';
308: break;
309: case '\\':
310: case '\'':
311: case '"':
312: escape= *from;
313: break;
314: default:
315: *to++=*from;
316: continue;
317: }
318: *to++= '\\';
319: *to++= escape;
320: }
321:
322: *to=0;
1.13 paf 323: return result;
1.1 parser 324: }
1.33 misha 325:
1.24 paf 326: void query(void *aconnection,
1.33 misha 327: const char *astatement,
328: size_t placeholders_count, Placeholder* placeholders,
329: unsigned long offset, unsigned long limit,
330: SQL_Driver_query_event_handlers& handlers
331: ){
1.14 paf 332: Connection& connection=*static_cast<Connection*>(aconnection);
1.15 paf 333: SQL_Driver_services& services=*connection.services;
1.1 parser 334: MYSQL_RES *res=NULL;
1.24 paf 335:
336: if(placeholders_count>0)
1.62 moko 337: services._throw("bind variables not supported yet");
1.1 parser 338:
1.33 misha 339: bool transcode_needed=_transcode_required(connection);
340:
1.38 misha 341: size_t statement_size=0;
342:
343: if(transcode_needed) {
344: statement_size=strlen(astatement);
345: // transcode query from $request:charset to ?ClientCharset
1.56 moko 346: services.transcode(astatement, statement_size, astatement, statement_size, services.request_charset(), connection.client_charset);
1.19 paf 347: }
348:
1.1 parser 349: const char *statement;
1.38 misha 350: if(offset || limit!=SQL_NO_LIMIT) {
351: if(!statement_size)
352: statement_size=strlen(astatement);
1.13 paf 353: char *statement_limited=(char *)services.malloc_atomic(
1.33 misha 354: statement_size+MAX_NUMBER*2+8/* LIMIT #,#*/+1);
1.1 parser 355: char *cur=statement_limited;
356: memcpy(cur, astatement, statement_size); cur+=statement_size;
1.33 misha 357: cur+=sprintf(cur, " LIMIT ");
1.1 parser 358: if(offset)
1.42 moko 359: cur+=snprintf(cur, MAX_NUMBER, "%lu,", offset);
1.33 misha 360: if(limit!=SQL_NO_LIMIT)
1.41 moko 361: cur+=snprintf(cur, MAX_NUMBER, "%lu", limit);
1.1 parser 362: statement=statement_limited;
363: } else
364: statement=astatement;
365:
1.14 paf 366: if(mysql_query(connection.handle, statement))
1.33 misha 367: _throw(connection, mysql_error(connection.handle));
1.38 misha 368:
1.58 moko 369: int next_result;
370: do {
371:
372: if(res=mysql_store_result(connection.handle)){
1.1 parser 373:
1.58 moko 374: size_t column_count=mysql_num_fields(res);
375: if(!column_count) // old client
376: column_count=mysql_field_count(connection.handle);
377:
378: if(!column_count){
379: mysql_free_result(res);
380: services._throw("result contains no columns");
381: }
1.38 misha 382:
1.58 moko 383: SQL_Error sql_error;
1.38 misha 384:
1.60 moko 385: #define CHECK(afailed) \
386: if(afailed) { \
387: mysql_free_result(res); \
1.59 moko 388: services._throw(sql_error); \
389: }
1.9 paf 390:
1.60 moko 391: #define DO_FETCH_FIELDS(transcode_column_name) \
392: for(size_t i=0; i<column_count; i++) { \
393: if(MYSQL_FIELD *field = mysql_fetch_field(res)){ \
394: size_t length=field->name_length; \
395: const char* str=strdup(services, field->name, length); \
396: transcode_column_name \
397: CHECK(handlers.add_column(sql_error, str, length)); \
398: } else { \
399: /* seen broken client, that reported "44" column count for "select 2+2" */ \
400: column_count=i; \
401: break; \
402: } \
403: }
404:
405: #define DO_FETCH_ROWS(transcode_cell_value) \
406: while(MYSQL_ROW mysql_row=mysql_fetch_row(res)) { \
407: CHECK(handlers.add_row(sql_error)); \
408: unsigned long *lengths=mysql_fetch_lengths(res); \
409: for(size_t i=0; i<column_count; i++) { \
410: const char* str=0; \
411: size_t length=lengths[i]; \
412: if(length) { \
413: str=strdup(services, mysql_row[i], length); \
414: transcode_cell_value \
415: } \
416: CHECK(handlers.add_row_cell(sql_error, str, length)); \
417: } \
418: }
1.38 misha 419:
1.58 moko 420: if(transcode_needed) {
1.62 moko 421: #ifdef _MSC_VER
422: bool* transcode_column = (bool*)services.malloc_atomic(column_count*sizeof(bool));
423: #else
1.58 moko 424: bool transcode_column[column_count];
1.62 moko 425: #endif
1.58 moko 426: DO_FETCH_FIELDS(
427: transcode_column[i] = is_column_transcode_required(field->type);
428: // transcode column's name from ?ClientCharset to $request:charset
429: services.transcode(str, length, str, length, connection.client_charset, services.request_charset());
430: )
431: CHECK(handlers.before_rows(sql_error));
432: DO_FETCH_ROWS(
433: // transcode cell's value from ?ClientCharset to $request:charset
434: if(transcode_column[i])
435: services.transcode(str, length, str, length, connection.client_charset, services.request_charset());
436: )
1.62 moko 437: #ifdef _MSC_VER
438: services.realloc(transcode_column,0);
439: #endif
1.58 moko 440: } else {
441: // without transcoding
1.63 ! moko 442: DO_FETCH_FIELDS({})
1.58 moko 443: CHECK(handlers.before_rows(sql_error));
1.63 ! moko 444: DO_FETCH_ROWS({})
1.58 moko 445: }
1.59 moko 446:
1.58 moko 447: mysql_free_result(res);
448:
449: } else {
450: if(mysql_field_count(connection.handle))
451: _throw(connection, mysql_error(connection.handle));
452: // empty result: insert|delete|update|...
453: }
454:
455: next_result = mysql_next_result(connection.handle);
456: if (next_result > 0)
457: _throw(connection, mysql_error(connection.handle));
458: } while (next_result == 0);
1.1 parser 459: }
460:
1.33 misha 461: private:
462: void _exec(Connection& connection, const char* statement) {
463: if(mysql_query(connection.handle, statement))
464: _throw(connection, mysql_error(connection.handle));
465: (*mysql_store_result)(connection.handle); // throw out the result [don't need but must call]
466: }
467:
468: void _throw(Connection& connection, const char* aerr_msg) {
469: size_t length=strlen(aerr_msg);
470: if(length && _transcode_required(connection)) {
1.56 moko 471: connection.services->transcode(aerr_msg, length, aerr_msg, length, connection.client_charset, connection.services->request_charset());
1.33 misha 472: }
473: connection.services->_throw(aerr_msg);
474: }
475:
476: bool _transcode_required(Connection& connection){
477: return (connection.client_charset && strcmp(connection.client_charset, connection.services->request_charset())!=0);
478: }
479:
1.1 parser 480: private: // mysql client library funcs
481:
1.52 moko 482: typedef MYSQL* (STDCALL *t_mysql_init)(MYSQL *); t_mysql_init mysql_init;
483:
484: typedef void (STDCALL *t_mysql_server_end)(); t_mysql_server_end mysql_server_end;
485:
486: typedef int (STDCALL *t_mysql_options)(MYSQL *mysql, enum mysql_option option, const char *arg); t_mysql_options mysql_options;
1.29 misha 487:
1.1 parser 488: typedef MYSQL_RES* (STDCALL *t_mysql_store_result)(MYSQL *); t_mysql_store_result mysql_store_result;
1.52 moko 489:
490: typedef int (STDCALL *t_mysql_query)(MYSQL *, const char *q); t_mysql_query mysql_query;
491:
492: typedef char* (STDCALL *t_mysql_error)(MYSQL *); t_mysql_error mysql_error;
1.1 parser 493: static char* STDCALL subst_mysql_error(MYSQL *mysql) { return (mysql)->net.last_error; }
494:
1.52 moko 495: typedef MYSQL* (STDCALL *t_mysql_real_connect)(MYSQL *, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned int clientflag); t_mysql_real_connect mysql_real_connect;
496:
497: typedef void (STDCALL *t_mysql_close)(MYSQL *); t_mysql_close mysql_close;
498:
499: typedef int (STDCALL *t_mysql_ping)(MYSQL *); t_mysql_ping mysql_ping;
500:
501: typedef unsigned long (STDCALL *t_mysql_escape_string)(char *to,const char *from, unsigned long from_length); t_mysql_escape_string mysql_escape_string;
502:
503: typedef void (STDCALL *t_mysql_free_result)(MYSQL_RES *result); t_mysql_free_result mysql_free_result;
504:
1.1 parser 505: typedef unsigned long* (STDCALL *t_mysql_fetch_lengths)(MYSQL_RES *result); t_mysql_fetch_lengths mysql_fetch_lengths;
506:
1.52 moko 507: typedef MYSQL_ROW (STDCALL *t_mysql_fetch_row)(MYSQL_RES *result); t_mysql_fetch_row mysql_fetch_row;
508: typedef MYSQL_FIELD* (STDCALL *t_mysql_fetch_field)(MYSQL_RES *result); t_mysql_fetch_field mysql_fetch_field;
509:
510: typedef unsigned int (STDCALL *t_mysql_num_fields)(MYSQL_RES *); t_mysql_num_fields mysql_num_fields;
511: typedef unsigned int (STDCALL *t_mysql_field_count)(MYSQL *); t_mysql_field_count mysql_field_count;
1.58 moko 512: typedef unsigned int (STDCALL *t_mysql_next_result)(MYSQL *); t_mysql_next_result mysql_next_result;
1.52 moko 513:
514: static unsigned int STDCALL subst_mysql_num_fields(MYSQL_RES *res) { return res->field_count; }
515: static unsigned int STDCALL subst_mysql_field_count(MYSQL *mysql) { return mysql->field_count; }
1.58 moko 516: static unsigned int STDCALL subst_mysql_next_result(MYSQL *mysql) { return -1; }
1.1 parser 517:
518: private: // mysql client library funcs linking
519:
520: const char *dlink(const char *dlopen_file_spec) {
1.43 moko 521: if(lt_dlinit()){
522: if(const char* result=lt_dlerror())
523: return result;
524: return "can not prepare to dynamic loading";
525: }
1.25 paf 526:
1.33 misha 527: lt_dlhandle handle=lt_dlopen(dlopen_file_spec);
528:
529: if(!handle){
530: if(const char* result=lt_dlerror())
531: return result;
1.1 parser 532: return "can not open the dynamic link module";
1.25 paf 533: }
1.1 parser 534:
1.29 misha 535: #define GLINK(name) \
536: name=(t_##name)lt_dlsym(handle, #name);
537:
1.1 parser 538: #define DSLINK(name, action) \
1.29 misha 539: GLINK(name) \
1.1 parser 540: if(!name) \
541: action;
542:
543: #define DLINK(name) DSLINK(name, return "function " #name " was not found")
544: #define SLINK(name) DSLINK(name, name=subst_##name)
545:
546: DLINK(mysql_init);
1.29 misha 547: GLINK(mysql_server_end);
1.2 parser 548: DLINK(mysql_options);
1.1 parser 549: DLINK(mysql_store_result);
550: DLINK(mysql_query);
551: SLINK(mysql_error);
552: DLINK(mysql_real_connect);
553: DLINK(mysql_close);
554: DLINK(mysql_ping);
555: DLINK(mysql_escape_string);
556: DLINK(mysql_free_result);
557: DLINK(mysql_fetch_lengths);
558: DLINK(mysql_fetch_row);
1.44 moko 559: DLINK(mysql_fetch_field);
1.1 parser 560: SLINK(mysql_num_fields);
561: SLINK(mysql_field_count);
1.58 moko 562: SLINK(mysql_next_result);
1.1 parser 563: return 0;
564: }
565:
566: };
567:
568: extern "C" SQL_Driver *SQL_DRIVER_CREATE() {
1.29 misha 569: static MySQL_Driver Driver;
570: return &Driver;
1.1 parser 571: }
E-mail: