mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fix for Bug #3307 "FLUSH TABLES sometimes breaks prepared statement
table resolution". Added members to Item_ident for storing original db, table and field names since those that set later from Field have shorter life-time than required by prep. stmt. So we need to restore original names in Item_ident::cleanup(). Also now using special construnctor for creation of Item_field from Field object that ensures that table and field name have big enough life-time. "Fix" for bug #2050 "10 to 1 performance drop with server 4.1.1" Clean ups in implementation of caching of field number in table. Added caching of table in which field is found in find_field_in_tables().
This commit is contained in:
@@ -2194,7 +2194,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
|
||||
DBUG_RETURN(-1);
|
||||
while ((column = column_iter++))
|
||||
{
|
||||
int unused_field_idx= -1;
|
||||
uint unused_field_idx= NO_CACHED_FIELD_INDEX;
|
||||
if (!find_field_in_table(thd,table,column->column.ptr(),
|
||||
column->column.length(),0,0,
|
||||
&unused_field_idx))
|
||||
|
||||
Reference in New Issue
Block a user