mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
merge (update of 51-bugteam, during testing for pushing...)
This commit is contained in:
@ -45,7 +45,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
||||
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;";
|
||||
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 '' at line 1
|
||||
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;*";
|
||||
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 ';*' at line 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 '*' at line 1
|
||||
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';";
|
||||
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 '/*!98765' AND b = 'bar'' at line 1
|
||||
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';*";
|
||||
|
@ -284,6 +284,74 @@ Field Type Null Key Default Extra
|
||||
DROP TABLE table_25930_a;
|
||||
DROP TABLE table_25930_b;
|
||||
SET @@sql_mode=@save_sql_mode;
|
||||
DROP PROCEDURE IF EXISTS p26030;
|
||||
select "non terminated"$$
|
||||
non terminated
|
||||
non terminated
|
||||
select "terminated";$$
|
||||
terminated
|
||||
terminated
|
||||
select "non terminated, space" $$
|
||||
non terminated, space
|
||||
non terminated, space
|
||||
select "terminated, space"; $$
|
||||
terminated, space
|
||||
terminated, space
|
||||
select "non terminated, comment" /* comment */$$
|
||||
non terminated, comment
|
||||
non terminated, comment
|
||||
select "terminated, comment"; /* comment */$$
|
||||
terminated, comment
|
||||
terminated, comment
|
||||
select "stmt 1";select "stmt 2 non terminated"$$
|
||||
stmt 1
|
||||
stmt 1
|
||||
stmt 2 non terminated
|
||||
stmt 2 non terminated
|
||||
select "stmt 1";select "stmt 2 terminated";$$
|
||||
stmt 1
|
||||
stmt 1
|
||||
stmt 2 terminated
|
||||
stmt 2 terminated
|
||||
select "stmt 1";select "stmt 2 non terminated, space" $$
|
||||
stmt 1
|
||||
stmt 1
|
||||
stmt 2 non terminated, space
|
||||
stmt 2 non terminated, space
|
||||
select "stmt 1";select "stmt 2 terminated, space"; $$
|
||||
stmt 1
|
||||
stmt 1
|
||||
stmt 2 terminated, space
|
||||
stmt 2 terminated, space
|
||||
select "stmt 1";select "stmt 2 non terminated, comment" /* comment */$$
|
||||
stmt 1
|
||||
stmt 1
|
||||
stmt 2 non terminated, comment
|
||||
stmt 2 non terminated, comment
|
||||
select "stmt 1";select "stmt 2 terminated, comment"; /* comment */$$
|
||||
stmt 1
|
||||
stmt 1
|
||||
stmt 2 terminated, comment
|
||||
stmt 2 terminated, comment
|
||||
select "stmt 1"; select "space, stmt 2"$$
|
||||
stmt 1
|
||||
stmt 1
|
||||
space, stmt 2
|
||||
space, stmt 2
|
||||
select "stmt 1";/* comment */select "comment, stmt 2"$$
|
||||
stmt 1
|
||||
stmt 1
|
||||
comment, stmt 2
|
||||
comment, stmt 2
|
||||
DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() BEGIN SELECT 1; END; CALL p26030()
|
||||
$$
|
||||
1
|
||||
1
|
||||
DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030()
|
||||
$$
|
||||
1
|
||||
1
|
||||
DROP PROCEDURE p26030;
|
||||
select pi(3.14);
|
||||
ERROR 42000: Incorrect parameter count in the call to native function 'pi'
|
||||
select tan();
|
||||
|
@ -85,9 +85,9 @@ NULL
|
||||
NULL
|
||||
NULL
|
||||
prepare stmt6 from 'select 1; select2';
|
||||
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 '; select2' at line 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 'select2' at line 1
|
||||
prepare stmt6 from 'insert into t1 values (5,"five"); select2';
|
||||
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 '; select2' at line 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 'select2' at line 1
|
||||
explain prepare stmt6 from 'insert into t1 values (5,"five"); select2';
|
||||
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 'from 'insert into t1 values (5,"five"); select2'' at line 1
|
||||
create table t2
|
||||
|
@ -6,6 +6,11 @@
|
||||
# LEXICAL PARSER (lex)
|
||||
#=============================================================================
|
||||
|
||||
#
|
||||
# Maintainer: these tests are for the lexical parser, so every character,
|
||||
# even whitespace or comments, is significant here.
|
||||
#
|
||||
|
||||
SET @save_sql_mode=@@sql_mode;
|
||||
|
||||
#
|
||||
@ -387,6 +392,48 @@ DROP TABLE table_25930_b;
|
||||
|
||||
SET @@sql_mode=@save_sql_mode;
|
||||
|
||||
#
|
||||
# Bug#26030 (Parsing fails for stored routine w/multi-statement execution
|
||||
# enabled)
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP PROCEDURE IF EXISTS p26030;
|
||||
--enable_warnings
|
||||
|
||||
delimiter $$;
|
||||
|
||||
select "non terminated"$$
|
||||
select "terminated";$$
|
||||
select "non terminated, space" $$
|
||||
select "terminated, space"; $$
|
||||
select "non terminated, comment" /* comment */$$
|
||||
select "terminated, comment"; /* comment */$$
|
||||
|
||||
# Multi queries can not be used in --ps-protocol test mode
|
||||
--disable_ps_protocol
|
||||
|
||||
select "stmt 1";select "stmt 2 non terminated"$$
|
||||
select "stmt 1";select "stmt 2 terminated";$$
|
||||
select "stmt 1";select "stmt 2 non terminated, space" $$
|
||||
select "stmt 1";select "stmt 2 terminated, space"; $$
|
||||
select "stmt 1";select "stmt 2 non terminated, comment" /* comment */$$
|
||||
select "stmt 1";select "stmt 2 terminated, comment"; /* comment */$$
|
||||
|
||||
select "stmt 1"; select "space, stmt 2"$$
|
||||
select "stmt 1";/* comment */select "comment, stmt 2"$$
|
||||
|
||||
DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() BEGIN SELECT 1; END; CALL p26030()
|
||||
$$
|
||||
|
||||
DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030()
|
||||
$$
|
||||
|
||||
--enable_ps_protocol
|
||||
|
||||
delimiter ;$$
|
||||
DROP PROCEDURE p26030;
|
||||
|
||||
#=============================================================================
|
||||
# SYNTACTIC PARSER (bison)
|
||||
#=============================================================================
|
||||
|
Reference in New Issue
Block a user