diff options
author | unknown <serg@serg.mylan> | 2003-07-04 12:55:46 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-07-04 12:55:46 +0200 |
commit | ef6a0249d3a4627b27332492e8fb87a7442b4e74 (patch) | |
tree | e20c94280bf60ba8ced8e667772b4945f6dd0bc0 | |
parent | 379959da394b0cc66dc18f1c0f0c49f80b3fe957 (diff) | |
parent | 77fbdad6b4aa964a39755c099e01995f7322bb7a (diff) | |
download | mariadb-git-ef6a0249d3a4627b27332492e8fb87a7442b4e74.tar.gz |
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
sql/sql_handler.cc:
Auto merged
-rw-r--r-- | mysql-test/r/handler.result | 2 | ||||
-rw-r--r-- | mysql-test/t/handler.test | 2 | ||||
-rw-r--r-- | sql/sql_handler.cc | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index 525fd1a4495..1973797ae79 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -151,4 +151,6 @@ insert into t1 values (1), (2), (3); handler t1 open; handler t1 read a=(W); Unknown column 'W' in 'field list' +handler t1 read a=(a); +Wrong arguments to HANDLER ... READ drop table t1; diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index b1902c213bf..39ceab7ab22 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -88,5 +88,7 @@ insert into t1 values (1), (2), (3); handler t1 open; --error 1054 handler t1 read a=(W); +--error 1210 +handler t1 read a=(a); drop table t1; diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index d8e2479d6fb..42cfcb51377 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -195,6 +195,11 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, { if (item->fix_fields(thd, tables)) goto err; + if (item->used_tables() & ~RAND_TABLE_BIT) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"HANDLER ... READ"); + goto err; + } item->save_in_field(key_part->field, 1); key_len+=key_part->store_length; } |