summaryrefslogtreecommitdiff
path: root/sql/sql_do.cc
diff options
context:
space:
mode:
authorunknown <bell@laptop.sanja.is.com.ua>2003-10-08 11:19:09 +0300
committerunknown <bell@laptop.sanja.is.com.ua>2003-10-08 11:19:09 +0300
commit0f81ecf5014ed0bfdbdf9a89054565ffa6b093c9 (patch)
tree2be56b9d61879e50e7e3330de2083b06e9ef9ebc /sql/sql_do.cc
parent21e2957d8a576e905205555c0094f17211f1bed4 (diff)
downloadmariadb-git-0f81ecf5014ed0bfdbdf9a89054565ffa6b093c9.tar.gz
fixed error handling in SET and DO operators (BUG#1484)
mysql-test/r/subselect.result: test for BUG#1484 mysql-test/t/subselect.test: layout fix test for BUG#1484 sql/set_var.cc: value evaluating can fail (because of subqueries for example) => we should check result of operartion and prevent assigning incorrect value sql/sql_do.cc: DO should ignore all errors
Diffstat (limited to 'sql/sql_do.cc')
-rw-r--r--sql/sql_do.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_do.cc b/sql/sql_do.cc
index f25c4632e1e..25a8359f3d2 100644
--- a/sql/sql_do.cc
+++ b/sql/sql_do.cc
@@ -29,6 +29,7 @@ int mysql_do(THD *thd, List<Item> &values)
DBUG_RETURN(-1);
while ((value = li++))
value->val_int();
+ thd->clear_error(); // DO always is OK
send_ok(thd);
DBUG_RETURN(0);
}