From: Date: October 24 2006 2:19pm Subject: bk commit into 4.1 tree (holyfoot:1.2535) BUG#23427 List-Archive: http://lists.mysql.com/commits/14249 X-Bug: 23427 Message-Id: <20061024121907.71F04A0806B@deer.myoffice.izhnet.ru> Below is the list of changes that have just been committed into a local 4.1 repository of hf. When hf does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-10-24 17:19:02+05:00, holyfoot@stripped +3 -0 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@stripped, 2006-10-24 17:19:00+05:00, holyfoot@stripped +0 -6 member moved to the THD structure libmysqld/lib_sql.cc@stripped, 2006-10-24 17:19:00+05:00, holyfoot@stripped +5 -5 now we use THD member here sql/sql_class.h@stripped, 2006-10-24 17:19:00+05:00, holyfoot@stripped +6 -0 current_stmt member added for the embedded server # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: holyfoot # Host: deer.(none) # Root: /home/hf/work/current_stmt/my41-current_stmt --- 1.143/include/mysql.h 2006-10-24 17:19:07 +05:00 +++ 1.144/include/mysql.h 2006-10-24 17:19:07 +05:00 @@ -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 { --- 1.289/sql/sql_class.h 2006-10-24 17:19:07 +05:00 +++ 1.290/sql/sql_class.h 2006-10-24 17:19:07 +05:00 @@ -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 --- 1.128/libmysqld/lib_sql.cc 2006-10-24 17:19:07 +05:00 +++ 1.129/libmysqld/lib_sql.cc 2006-10-24 17:19:07 +05:00 @@ -94,7 +94,7 @@ emb_advanced_command(MYSQL *mysql, enum 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 *l 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),