mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Enable REPLACE ... SELECT in prepared statements.
This commit is contained in:
@@ -322,8 +322,11 @@ select a,b from t1 where a >= 1000 order by a ;
|
|||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
|
|
||||||
## replace
|
## replace
|
||||||
--error 1295
|
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## multi table statements
|
## multi table statements
|
||||||
|
@@ -1581,7 +1581,9 @@ a b
|
|||||||
1200 x1000_1updatedupdated
|
1200 x1000_1updatedupdated
|
||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
test_sequence
|
test_sequence
|
||||||
------ multi table tests ------
|
------ multi table tests ------
|
||||||
delete from t1 ;
|
delete from t1 ;
|
||||||
|
@@ -1564,7 +1564,9 @@ a b
|
|||||||
1200 x1000_1updatedupdated
|
1200 x1000_1updatedupdated
|
||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
test_sequence
|
test_sequence
|
||||||
------ multi table tests ------
|
------ multi table tests ------
|
||||||
delete from t1 ;
|
delete from t1 ;
|
||||||
|
@@ -1565,7 +1565,9 @@ a b
|
|||||||
1200 x1000_1updatedupdated
|
1200 x1000_1updatedupdated
|
||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
test_sequence
|
test_sequence
|
||||||
------ multi table tests ------
|
------ multi table tests ------
|
||||||
delete from t1 ;
|
delete from t1 ;
|
||||||
|
@@ -1607,7 +1607,9 @@ a b
|
|||||||
1200 x1000_1updatedupdated
|
1200 x1000_1updatedupdated
|
||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
test_sequence
|
test_sequence
|
||||||
------ multi table tests ------
|
------ multi table tests ------
|
||||||
delete from t1 ;
|
delete from t1 ;
|
||||||
@@ -4615,7 +4617,9 @@ a b
|
|||||||
1200 x1000_1updatedupdated
|
1200 x1000_1updatedupdated
|
||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
test_sequence
|
test_sequence
|
||||||
------ multi table tests ------
|
------ multi table tests ------
|
||||||
delete from t1 ;
|
delete from t1 ;
|
||||||
|
@@ -1564,7 +1564,9 @@ a b
|
|||||||
1200 x1000_1updatedupdated
|
1200 x1000_1updatedupdated
|
||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
|
execute stmt1;
|
||||||
test_sequence
|
test_sequence
|
||||||
------ multi table tests ------
|
------ multi table tests ------
|
||||||
delete from t1 ;
|
delete from t1 ;
|
||||||
|
@@ -1543,7 +1543,6 @@ a b
|
|||||||
1000 x1000_1
|
1000 x1000_1
|
||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
|
||||||
test_sequence
|
test_sequence
|
||||||
------ multi table tests ------
|
------ multi table tests ------
|
||||||
delete from t1 ;
|
delete from t1 ;
|
||||||
|
@@ -339,8 +339,8 @@ select a,b from t1 where a >= 1000 order by a ;
|
|||||||
delete from t1 where a >= 1000 ;
|
delete from t1 where a >= 1000 ;
|
||||||
|
|
||||||
## replace
|
## replace
|
||||||
--error 1295
|
|
||||||
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
|
||||||
|
--error 1031
|
||||||
|
|
||||||
## multi table statements
|
## multi table statements
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
|
@@ -1442,6 +1442,7 @@ static int send_prepare_results(Prepared_statement *stmt, bool text_protocol)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SQLCOM_INSERT_SELECT:
|
case SQLCOM_INSERT_SELECT:
|
||||||
|
case SQLCOM_REPLACE_SELECT:
|
||||||
res= mysql_test_insert_select(stmt, tables);
|
res= mysql_test_insert_select(stmt, tables);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user