mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge from mysql-5.0.66-release
This commit is contained in:
59
mysql-test/t/parser.test
Normal file
59
mysql-test/t/parser.test
Normal file
@ -0,0 +1,59 @@
|
||||
#
|
||||
# This file contains tests covering the parser
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# LEXICAL PARSER (lex)
|
||||
#=============================================================================
|
||||
|
||||
#
|
||||
# Maintainer: these tests are for the lexical parser, so every character,
|
||||
# even whitespace or comments, is significant here.
|
||||
#
|
||||
|
||||
#
|
||||
# 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;
|
||||
|
||||
#============================================================================r
|
||||
# SYNTACTIC PARSER (bison)
|
||||
#=============================================================================
|
||||
|
@ -84,3 +84,31 @@ select length(a) from t1;
|
||||
alter table t1 modify a varchar(255);
|
||||
select length(a) from t1;
|
||||
|
||||
#
|
||||
# Bug#35658 (An empty binary value leads to mysqld crash)
|
||||
#
|
||||
|
||||
select 0b01000001;
|
||||
|
||||
select 0x41;
|
||||
|
||||
select b'01000001';
|
||||
|
||||
select x'41', 0+x'41';
|
||||
|
||||
select N'abc', length(N'abc');
|
||||
|
||||
select N'', length(N'');
|
||||
|
||||
select '', length('');
|
||||
|
||||
select b'', 0+b'';
|
||||
|
||||
select x'', 0+x'';
|
||||
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
select 0x;
|
||||
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
select 0b;
|
||||
|
||||
|
Reference in New Issue
Block a user