mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
handler+alter table
mysql-test/r/handler.result: alter table test mysql-test/t/handler.test: alter table test sql/sql_handler.cc: bugfix
This commit is contained in:
@ -130,7 +130,11 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
||||
select_limit+=offset_limit;
|
||||
send_fields(thd,list,1);
|
||||
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
MYSQL_LOCK *lock=mysql_lock_tables(thd,&tables->table,1);
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
if (!lock)
|
||||
goto err0; // mysql_lock_tables() printed error message already
|
||||
|
||||
for (uint num_rows=0; num_rows < select_limit; )
|
||||
{
|
||||
@ -238,6 +242,7 @@ ok:
|
||||
return 0;
|
||||
err:
|
||||
mysql_unlock_tables(thd,lock);
|
||||
err0:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user