diff options
author | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-10-24 17:19:02 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-10-24 17:19:02 +0500 |
commit | 92224b8726b7eb8ace3bf4fa0284c25c476242cc (patch) | |
tree | 15b5251cf1b2339c2a889b5a6e552e9e9e6fcd1d | |
parent | a2a77ea2974b1d21621186f21d822772a9b064b1 (diff) | |
download | mariadb-git-92224b8726b7eb8ace3bf4fa0284c25c476242cc.tar.gz |
Bug #23427 (incompatible ABI change)
the incompatibility was caused by current_stmt member added to the MYSQL
structure.
It's possible to move it to THD structure instead which saves ABI
include/mysql.h:
member moved to the THD structure
libmysqld/lib_sql.cc:
now we use THD member here
sql/sql_class.h:
current_stmt member added for the embedded server
-rw-r--r-- | include/mysql.h | 6 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 10 | ||||
-rw-r--r-- | sql/sql_class.h | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/include/mysql.h b/include/mysql.h index 143f6752c46..89e861864df 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -270,12 +270,6 @@ typedef struct st_mysql from mysql_stmt_close if close had to cancel result set of this object. */ my_bool *unbuffered_fetch_owner; - /* - In embedded server it points to the statement that is processed - in the current query. We store some results directly in statement - fields then. - */ - struct st_mysql_stmt *current_stmt; } MYSQL; typedef struct st_mysql_res { diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 1a3e10f08a8..64bc37fb40d 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -94,7 +94,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, mysql->affected_rows= ~(my_ulonglong) 0; mysql->field_count= 0; net->last_errno= 0; - mysql->current_stmt= stmt; + thd->current_stmt= stmt; thd->store_globals(); // Fix if more than one connect /* @@ -644,8 +644,8 @@ bool Protocol::send_fields(List<Item> *list, uint flag) DBUG_RETURN(0); field_count= list->elements; - field_alloc= mysql->current_stmt ? &mysql->current_stmt->mem_root : - &mysql->field_alloc; + field_alloc= thd->current_stmt ? &thd->current_stmt->mem_root : + &mysql->field_alloc; if (!(client_field= mysql->fields= (MYSQL_FIELD *)alloc_root(field_alloc, sizeof(MYSQL_FIELD) * field_count))) @@ -751,8 +751,8 @@ bool Protocol_prep::write() { MYSQL *mysql= thd->mysql; - if (mysql->current_stmt) - data= &mysql->current_stmt->result; + if (thd->current_stmt) + data= &thd->current_stmt->result; else { if (!(data= (MYSQL_DATA*) my_malloc(sizeof(MYSQL_DATA), diff --git a/sql/sql_class.h b/sql/sql_class.h index cc90de2a6ea..ed161de55de 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -686,6 +686,12 @@ public: char *extra_data; ulong extra_length; String query_rest; + /* + In embedded server it points to the statement that is processed + in the current query. We store some results directly in statement + fields then. + */ + struct st_mysql_stmt *current_stmt; #endif NET net; // client connection descriptor MEM_ROOT warn_root; // For warnings and errors |