mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #40877: multi statement execution fails in 5.1.30
Implemented the server infrastructure for the fix: 1. Added a function LEX_STRING *thd_query_string(THD) to return a LEX_STRING structure instead of char *. This is the function that must be called in innodb instead of thd_query() 2. Did some encapsulation in THD : aggregated thd_query and thd_query_length into a LEX_STRING and made accessor and mutator methods for easy code updating. 3. Updated the server code to use the new methods where applicable.
This commit is contained in:
@ -409,7 +409,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
|
||||
*/
|
||||
result= FALSE;
|
||||
/* Still, we need to log the query ... */
|
||||
stmt_query.append(thd->query, thd->query_length);
|
||||
stmt_query.append(thd->query(), thd->query_length());
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
@ -918,7 +918,7 @@ bool Table_triggers_list::drop_trigger(THD *thd, TABLE_LIST *tables,
|
||||
List_iterator<LEX_STRING> it_connection_cl_name(connection_cl_names);
|
||||
List_iterator<LEX_STRING> it_db_cl_name(db_cl_names);
|
||||
|
||||
stmt_query->append(thd->query, thd->query_length);
|
||||
stmt_query->append(thd->query(), thd->query_length());
|
||||
|
||||
while ((name= it_name++))
|
||||
{
|
||||
|
Reference in New Issue
Block a user