diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-07-12 22:20:46 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-07-12 22:20:46 +0200 |
commit | c6fdb92ca829fed893d9e7324e80b1450de16087 (patch) | |
tree | 39fbccb1aea1a6a4234fe134a419f51a23232e61 | |
parent | f12ebed0a46d3051bbc76d62a8cd73b2b572364b (diff) | |
parent | 4e19aa386493fcf0613049b47cbb9b151e2d3e8d (diff) | |
download | mariadb-git-c6fdb92ca829fed893d9e7324e80b1450de16087.tar.gz |
Merge branch '5.5' into 10.0
-rw-r--r-- | libmysqld/lib_sql.cc | 6 | ||||
-rw-r--r-- | mysql-test/r/ps_1general.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/funcs_1/datadict/processlist_priv.inc | 2 | ||||
-rw-r--r-- | mysql-test/t/ps_1general.test | 7 |
4 files changed, 16 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index a5fef8ecdd0..281ac26ce91 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -341,6 +341,12 @@ static int emb_stmt_execute(MYSQL_STMT *stmt) THD *thd; my_bool res; + if (stmt->param_count && !stmt->bind_param_done) + { + set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate, NULL); + DBUG_RETURN(1); + } + int4store(header, stmt->stmt_id); header[4]= (uchar) stmt->flags; thd= (THD*)stmt->mysql->thd; diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index 9981156bc5f..a1bcf734b31 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -788,3 +788,5 @@ execute stmt1; 1 drop prepare stmt1; drop table t1; +select ?+1; +Got one of the listed errors diff --git a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc index 2114e6f3126..d70402b9cec 100644 --- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc +++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc @@ -153,7 +153,7 @@ connection default; let $wait_timeout= 10; let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST -WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1'; +WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1' AND state=''; --source include/wait_condition.inc --replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" "" eval SHOW CREATE TABLE $table; diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test index 22cad56a8e4..0fa339229d1 100644 --- a/mysql-test/t/ps_1general.test +++ b/mysql-test/t/ps_1general.test @@ -933,3 +933,10 @@ drop table t1; # Matthias # End of 4.1 tests + +# +# MDEV-10318 unset params in --ps --embedded +# +--error ER_PARSE_ERROR,2031 +select ?+1; + |