1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Cleanup: now that we have Lex_input_stream, finish the transition

by moving yet another relevant flag to it from struct LEX.


mysql-test/r/ps.result:
  Update result.
mysql-test/r/ps_1general.result:
  Update result.
mysql-test/t/ps.test:
  New error code.
mysql-test/t/ps_1general.test:
  New error code.
sql/sql_lex.cc:
  Move stmt_prepare_mode to Lex_input_stream.
sql/sql_lex.h:
  Move stmt_prepare_mode to class Lex_input_stream
sql/sql_prepare.cc:
  Move stmt_prepare_mode to Lex_input_stream
sql/sql_yacc.yy:
  Remove dead code.
This commit is contained in:
unknown
2007-05-11 17:26:12 +04:00
parent 30184f9624
commit a0567199b1
8 changed files with 25 additions and 37 deletions

View File

@@ -26,11 +26,11 @@ ERROR HY000: Unknown prepared statement handler (no_such_statement) given to DEA
execute stmt1;
ERROR HY000: Incorrect arguments to EXECUTE
prepare stmt2 from 'prepare nested_stmt from "select 1"';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"select 1"' at line 1
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt2 from 'execute stmt1';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt1' at line 1
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt2 from 'deallocate prepare z';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'z' at line 1
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt3 from 'insert into t1 values (?,?)';
set @arg1=5, @arg2='five';
execute stmt3 using @arg1, @arg2;

View File

@@ -391,11 +391,11 @@ drop table t5 ;
deallocate prepare stmt_do ;
deallocate prepare stmt_set ;
prepare stmt1 from ' prepare stmt2 from '' select 1 '' ' ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' select 1 '' at line 1
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt1 from ' execute stmt2 ' ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt2' at line 1
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt1 from ' deallocate prepare never_prepared ' ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'never_prepared' at line 1
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt4 from ' use test ' ;
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt3 from ' create database mysqltest ';

View File

@@ -33,13 +33,13 @@ deallocate prepare no_such_statement;
execute stmt1;
# Nesting ps commands is not allowed:
--error 1064
--error ER_UNSUPPORTED_PS
prepare stmt2 from 'prepare nested_stmt from "select 1"';
--error 1064
--error ER_UNSUPPORTED_PS
prepare stmt2 from 'execute stmt1';
--error 1064
--error ER_UNSUPPORTED_PS
prepare stmt2 from 'deallocate prepare z';
# PS insert

View File

@@ -416,11 +416,11 @@ deallocate prepare stmt_do ;
deallocate prepare stmt_set ;
## nonsense like prepare of prepare,execute or deallocate
--error 1064
--error ER_UNSUPPORTED_PS
prepare stmt1 from ' prepare stmt2 from '' select 1 '' ' ;
--error 1064
--error ER_UNSUPPORTED_PS
prepare stmt1 from ' execute stmt2 ' ;
--error 1064
--error ER_UNSUPPORTED_PS
prepare stmt1 from ' deallocate prepare never_prepared ' ;
## switch the database connection