summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-07-04 12:55:25 +0200
committerunknown <serg@serg.mylan>2003-07-04 12:55:25 +0200
commit4b50f4f252bf28b628475339e320d7a927c90459 (patch)
tree0cec1a9632e1bc29824b46691ea0b522bf930735 /sql/sql_handler.cc
parenta29adff6b881576a9a470235f1ad14eaf471c79d (diff)
downloadmariadb-git-4b50f4f252bf28b628475339e320d7a927c90459.tar.gz
handler should be used with constant expressions only (or rand)
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index c80c0444cb5..42cfcb51377 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -194,7 +194,12 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
for (key_len=0 ; (item=it_ke++) ; key_part++)
{
if (item->fix_fields(thd, tables))
- return -1;
+ 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;
}