summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-01-03 14:31:54 +0000
committerunknown <serg@serg.mysql.com>2002-01-03 14:31:54 +0000
commit0abc68fbeb74832503634a208b21c756b510c392 (patch)
treef07049a38866d086e8e06f6f39532c740952a186 /sql/sql_handler.cc
parentdc4bbdb75efbcf2ce603c1cec46695f6ead6c8f0 (diff)
downloadmariadb-git-0abc68fbeb74832503634a208b21c756b510c392.tar.gz
handler+alter table
mysql-test/r/handler.result: alter table test mysql-test/t/handler.test: alter table test sql/sql_handler.cc: bugfix
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index f7effdc67e6..0c6b5599519 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -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;
}