summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/include/ps_modify.inc5
-rw-r--r--mysql-test/r/ps_2myisam.result4
-rw-r--r--mysql-test/r/ps_3innodb.result4
-rw-r--r--mysql-test/r/ps_4heap.result4
-rw-r--r--mysql-test/r/ps_5merge.result8
-rw-r--r--mysql-test/r/ps_6bdb.result4
-rw-r--r--mysql-test/r/ps_7ndb.result1
-rw-r--r--mysql-test/t/ps_7ndb.test2
-rw-r--r--sql/sql_prepare.cc1
9 files changed, 24 insertions, 9 deletions
diff --git a/mysql-test/include/ps_modify.inc b/mysql-test/include/ps_modify.inc
index 9cf11709e69..eb6820934f3 100644
--- a/mysql-test/include/ps_modify.inc
+++ b/mysql-test/include/ps_modify.inc
@@ -322,8 +322,11 @@ select a,b from t1 where a >= 1000 order by a ;
delete from t1 where a >= 1000 ;
## replace
---error 1295
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
+execute stmt1;
+execute stmt1;
+execute stmt1;
+
## multi table statements
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 40b2516f0b9..efb12561950 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -1581,7 +1581,9 @@ a b
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
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
------ multi table tests ------
delete from t1 ;
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 11669b131a7..cb096882d13 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -1564,7 +1564,9 @@ a b
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
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
------ multi table tests ------
delete from t1 ;
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index a3837650e0e..ac9946ef070 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -1565,7 +1565,9 @@ a b
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
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
------ multi table tests ------
delete from t1 ;
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 619b59e4e3d..15e707959ca 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -1607,7 +1607,9 @@ a b
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
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
------ multi table tests ------
delete from t1 ;
@@ -4615,7 +4617,9 @@ a b
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
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
------ multi table tests ------
delete from t1 ;
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index 5c23a574f51..3dd9c200510 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -1564,7 +1564,9 @@ a b
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
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
------ multi table tests ------
delete from t1 ;
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index cf567750b85..85e51df776f 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -1543,7 +1543,6 @@ a b
1000 x1000_1
delete from t1 where a >= 1000 ;
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
------ multi table tests ------
delete from t1 ;
diff --git a/mysql-test/t/ps_7ndb.test b/mysql-test/t/ps_7ndb.test
index af669a26400..22370a7f3ac 100644
--- a/mysql-test/t/ps_7ndb.test
+++ b/mysql-test/t/ps_7ndb.test
@@ -339,8 +339,8 @@ select a,b from t1 where a >= 1000 order by a ;
delete from t1 where a >= 1000 ;
## replace
---error 1295
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
+--error 1031
## multi table statements
--disable_query_log
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index bccf517466d..b5e12c4d208 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1442,6 +1442,7 @@ static int send_prepare_results(Prepared_statement *stmt, bool text_protocol)
break;
case SQLCOM_INSERT_SELECT:
+ case SQLCOM_REPLACE_SELECT:
res= mysql_test_insert_select(stmt, tables);
break;