mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
After merge fix and a safety fix for handler
sql/sql_handler.cc: Move lock tables before conditions as lock tables may reopen tables sql/sql_trigger.cc: After merge fix
This commit is contained in:
@ -414,6 +414,13 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
||||
}
|
||||
tables->table=table;
|
||||
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
lock= mysql_lock_tables(thd, &tables->table, 1, 0, ¬_used);
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
|
||||
if (!lock)
|
||||
goto err0; // mysql_lock_tables() printed error message already
|
||||
|
||||
if (cond && ((!cond->fixed &&
|
||||
cond->fix_fields(thd, &cond)) || cond->check_cols(1)))
|
||||
goto err0;
|
||||
@ -427,13 +434,6 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
||||
}
|
||||
}
|
||||
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
lock= mysql_lock_tables(thd, &tables->table, 1, 0, ¬_used);
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
|
||||
if (!lock)
|
||||
goto err0; // mysql_lock_tables() printed error message already
|
||||
|
||||
if (insert_fields(thd, &thd->lex->select_lex.context,
|
||||
tables->db, tables->alias, &it, 0))
|
||||
goto err0;
|
||||
|
Reference in New Issue
Block a user