summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2006-11-02 11:01:53 -0700
committerunknown <malff/marcsql@weblab.(none)>2006-11-02 11:01:53 -0700
commit384407aaeb37dafe4826c31006cd47c611da0da2 (patch)
tree6858415854d15b55cafbf65946d71a1878a9459b /mysql-test/t
parent83d5beec5d93b950684a88d64657ef771ed9008d (diff)
downloadmariadb-git-384407aaeb37dafe4826c31006cd47c611da0da2.tar.gz
Bug#21114 (Foreign key creation fails to table with name format)
Due to the complexity of this change, everything is documented in WL#3565 This patch is the third iteration, it takes into account the comments received to date. mysql-test/r/func_math.result: Improved test coverage mysql-test/r/view.result: Name collision, x() is a geometry native in function mysql-test/t/func_math.test: Improved test coverage mysql-test/t/view.test: Name collision, x() is a geometry native in function sql/item_create.cc: Revised the create_func implementation sql/item_create.h: Revised the create_func implementation sql/item_geofunc.h: Explicit Item allocation in the thread memory pool. sql/lex.h: Removed function parsing from the lexical parser sql/lex_symbol.h: Removed function parsing from the lexical parser sql/mysql_priv.h: Server initialization and shutdown sql/mysqld.cc: Server initialization and shutdown sql/share/errmsg.txt: New error messages sql/sql_yacc.yy: Removed function parsing from the lexical parser tests/mysql_client_test.c: Spaces are no longer significant for function calls mysql-test/include/parser_bug21114.inc: New tests mysql-test/r/parser.result: New tests mysql-test/r/parser_bug21114_innodb.result: New tests mysql-test/t/parser.test: New tests mysql-test/t/parser_bug21114_innodb.test: New tests
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/func_math.test5
-rw-r--r--mysql-test/t/parser.test510
-rw-r--r--mysql-test/t/parser_bug21114_innodb.test422
-rw-r--r--mysql-test/t/view.test6
4 files changed, 940 insertions, 3 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index 4041c267134..09aa5751301 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -34,6 +34,11 @@ select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6)
explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);
select degrees(pi()),radians(360);
+select format(atan(-2, 2), 6);
+select format(atan(pi(), 0), 6);
+select format(atan2(-2, 2), 6);
+select format(atan2(pi(), 0), 6);
+
#
# Bug #2338 Trignometric arithmatic problems
#
diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test
new file mode 100644
index 00000000000..11af7c691d8
--- /dev/null
+++ b/mysql-test/t/parser.test
@@ -0,0 +1,510 @@
+#
+# This file contains tests covering the parser
+#
+
+#=============================================================================
+# LEXICAL PARSER (lex)
+#=============================================================================
+
+SET @save_sql_mode=@@sql_mode;
+
+#
+# Documenting the current behavior, to detect incompatible changes.
+# In each cases:
+# - no error is the correct result
+# - an error is the expected result with the current implementation,
+# and is a limitation.
+
+set SQL_MODE='';
+
+create table ADDDATE(a int);
+drop table ADDDATE;
+create table ADDDATE (a int);
+drop table ADDDATE;
+
+--error ER_PARSE_ERROR
+create table BIT_AND(a int);
+create table BIT_AND (a int);
+drop table BIT_AND;
+
+--error ER_PARSE_ERROR
+create table BIT_OR(a int);
+create table BIT_OR (a int);
+drop table BIT_OR;
+
+--error ER_PARSE_ERROR
+create table BIT_XOR(a int);
+create table BIT_XOR (a int);
+drop table BIT_XOR;
+
+--error ER_PARSE_ERROR
+create table CAST(a int);
+create table CAST (a int);
+drop table CAST;
+
+--error ER_PARSE_ERROR
+create table COUNT(a int);
+create table COUNT (a int);
+drop table COUNT;
+
+--error ER_PARSE_ERROR
+create table CURDATE(a int);
+create table CURDATE (a int);
+drop table CURDATE;
+
+--error ER_PARSE_ERROR
+create table CURTIME(a int);
+create table CURTIME (a int);
+drop table CURTIME;
+
+--error ER_PARSE_ERROR
+create table DATE_ADD(a int);
+create table DATE_ADD (a int);
+drop table DATE_ADD;
+
+--error ER_PARSE_ERROR
+create table DATE_SUB(a int);
+create table DATE_SUB (a int);
+drop table DATE_SUB;
+
+--error ER_PARSE_ERROR
+create table EXTRACT(a int);
+create table EXTRACT (a int);
+drop table EXTRACT;
+
+--error ER_PARSE_ERROR
+create table GROUP_CONCAT(a int);
+create table GROUP_CONCAT (a int);
+drop table GROUP_CONCAT;
+
+--error ER_PARSE_ERROR
+create table GROUP_UNIQUE_USERS(a int);
+create table GROUP_UNIQUE_USERS (a int);
+drop table GROUP_UNIQUE_USERS;
+
+--error ER_PARSE_ERROR
+create table MAX(a int);
+create table MAX (a int);
+drop table MAX;
+
+--error ER_PARSE_ERROR
+create table MID(a int);
+create table MID (a int);
+drop table MID;
+
+--error ER_PARSE_ERROR
+create table MIN(a int);
+create table MIN (a int);
+drop table MIN;
+
+--error ER_PARSE_ERROR
+create table NOW(a int);
+create table NOW (a int);
+drop table NOW;
+
+--error ER_PARSE_ERROR
+create table POSITION(a int);
+create table POSITION (a int);
+drop table POSITION;
+
+create table SESSION_USER(a int);
+drop table SESSION_USER;
+create table SESSION_USER (a int);
+drop table SESSION_USER;
+
+--error ER_PARSE_ERROR
+create table STD(a int);
+create table STD (a int);
+drop table STD;
+
+--error ER_PARSE_ERROR
+create table STDDEV(a int);
+create table STDDEV (a int);
+drop table STDDEV;
+
+--error ER_PARSE_ERROR
+create table STDDEV_POP(a int);
+create table STDDEV_POP (a int);
+drop table STDDEV_POP;
+
+--error ER_PARSE_ERROR
+create table STDDEV_SAMP(a int);
+create table STDDEV_SAMP (a int);
+drop table STDDEV_SAMP;
+
+create table SUBDATE(a int);
+drop table SUBDATE;
+create table SUBDATE (a int);
+drop table SUBDATE;
+
+--error ER_PARSE_ERROR
+create table SUBSTR(a int);
+create table SUBSTR (a int);
+drop table SUBSTR;
+
+--error ER_PARSE_ERROR
+create table SUBSTRING(a int);
+create table SUBSTRING (a int);
+drop table SUBSTRING;
+
+--error ER_PARSE_ERROR
+create table SUM(a int);
+create table SUM (a int);
+drop table SUM;
+
+--error ER_PARSE_ERROR
+create table SYSDATE(a int);
+create table SYSDATE (a int);
+drop table SYSDATE;
+
+create table SYSTEM_USER(a int);
+drop table SYSTEM_USER;
+create table SYSTEM_USER (a int);
+drop table SYSTEM_USER;
+
+--error ER_PARSE_ERROR
+create table TRIM(a int);
+create table TRIM (a int);
+drop table TRIM;
+
+--error ER_PARSE_ERROR
+create table UNIQUE_USERS(a int);
+create table UNIQUE_USERS (a int);
+drop table UNIQUE_USERS;
+
+--error ER_PARSE_ERROR
+create table VARIANCE(a int);
+create table VARIANCE (a int);
+drop table VARIANCE;
+
+--error ER_PARSE_ERROR
+create table VAR_POP(a int);
+create table VAR_POP (a int);
+drop table VAR_POP;
+
+--error ER_PARSE_ERROR
+create table VAR_SAMP(a int);
+create table VAR_SAMP (a int);
+drop table VAR_SAMP;
+
+set SQL_MODE='IGNORE_SPACE';
+
+create table ADDDATE(a int);
+drop table ADDDATE;
+create table ADDDATE (a int);
+drop table ADDDATE;
+
+--error ER_PARSE_ERROR
+create table BIT_AND(a int);
+--error ER_PARSE_ERROR
+create table BIT_AND (a int);
+
+--error ER_PARSE_ERROR
+create table BIT_OR(a int);
+--error ER_PARSE_ERROR
+create table BIT_OR (a int);
+
+--error ER_PARSE_ERROR
+create table BIT_XOR(a int);
+--error ER_PARSE_ERROR
+create table BIT_XOR (a int);
+
+--error ER_PARSE_ERROR
+create table CAST(a int);
+--error ER_PARSE_ERROR
+create table CAST (a int);
+
+--error ER_PARSE_ERROR
+create table COUNT(a int);
+--error ER_PARSE_ERROR
+create table COUNT (a int);
+
+--error ER_PARSE_ERROR
+create table CURDATE(a int);
+--error ER_PARSE_ERROR
+create table CURDATE (a int);
+
+--error ER_PARSE_ERROR
+create table CURTIME(a int);
+--error ER_PARSE_ERROR
+create table CURTIME (a int);
+
+--error ER_PARSE_ERROR
+create table DATE_ADD(a int);
+--error ER_PARSE_ERROR
+create table DATE_ADD (a int);
+
+--error ER_PARSE_ERROR
+create table DATE_SUB(a int);
+--error ER_PARSE_ERROR
+create table DATE_SUB (a int);
+
+--error ER_PARSE_ERROR
+create table EXTRACT(a int);
+--error ER_PARSE_ERROR
+create table EXTRACT (a int);
+
+--error ER_PARSE_ERROR
+create table GROUP_CONCAT(a int);
+--error ER_PARSE_ERROR
+create table GROUP_CONCAT (a int);
+
+--error ER_PARSE_ERROR
+create table GROUP_UNIQUE_USERS(a int);
+--error ER_PARSE_ERROR
+create table GROUP_UNIQUE_USERS (a int);
+
+--error ER_PARSE_ERROR
+create table MAX(a int);
+--error ER_PARSE_ERROR
+create table MAX (a int);
+
+--error ER_PARSE_ERROR
+create table MID(a int);
+--error ER_PARSE_ERROR
+create table MID (a int);
+
+--error ER_PARSE_ERROR
+create table MIN(a int);
+--error ER_PARSE_ERROR
+create table MIN (a int);
+
+--error ER_PARSE_ERROR
+create table NOW(a int);
+--error ER_PARSE_ERROR
+create table NOW (a int);
+
+--error ER_PARSE_ERROR
+create table POSITION(a int);
+--error ER_PARSE_ERROR
+create table POSITION (a int);
+
+create table SESSION_USER(a int);
+drop table SESSION_USER;
+create table SESSION_USER (a int);
+drop table SESSION_USER;
+
+--error ER_PARSE_ERROR
+create table STD(a int);
+--error ER_PARSE_ERROR
+create table STD (a int);
+
+--error ER_PARSE_ERROR
+create table STDDEV(a int);
+--error ER_PARSE_ERROR
+create table STDDEV (a int);
+
+--error ER_PARSE_ERROR
+create table STDDEV_POP(a int);
+--error ER_PARSE_ERROR
+create table STDDEV_POP (a int);
+
+--error ER_PARSE_ERROR
+create table STDDEV_SAMP(a int);
+--error ER_PARSE_ERROR
+create table STDDEV_SAMP (a int);
+
+create table SUBDATE(a int);
+drop table SUBDATE;
+create table SUBDATE (a int);
+drop table SUBDATE;
+
+--error ER_PARSE_ERROR
+create table SUBSTR(a int);
+--error ER_PARSE_ERROR
+create table SUBSTR (a int);
+
+--error ER_PARSE_ERROR
+create table SUBSTRING(a int);
+--error ER_PARSE_ERROR
+create table SUBSTRING (a int);
+
+--error ER_PARSE_ERROR
+create table SUM(a int);
+--error ER_PARSE_ERROR
+create table SUM (a int);
+
+--error ER_PARSE_ERROR
+create table SYSDATE(a int);
+--error ER_PARSE_ERROR
+create table SYSDATE (a int);
+
+create table SYSTEM_USER(a int);
+drop table SYSTEM_USER;
+create table SYSTEM_USER (a int);
+drop table SYSTEM_USER;
+
+--error ER_PARSE_ERROR
+create table TRIM(a int);
+--error ER_PARSE_ERROR
+create table TRIM (a int);
+
+--error ER_PARSE_ERROR
+create table UNIQUE_USERS(a int);
+--error ER_PARSE_ERROR
+create table UNIQUE_USERS (a int);
+
+--error ER_PARSE_ERROR
+create table VARIANCE(a int);
+--error ER_PARSE_ERROR
+create table VARIANCE (a int);
+
+--error ER_PARSE_ERROR
+create table VAR_POP(a int);
+--error ER_PARSE_ERROR
+create table VAR_POP (a int);
+
+--error ER_PARSE_ERROR
+create table VAR_SAMP(a int);
+--error ER_PARSE_ERROR
+create table VAR_SAMP (a int);
+
+SET @@sql_mode=@save_sql_mode;
+
+#=============================================================================
+# SYNTACTIC PARSER (bison)
+#=============================================================================
+
+#
+#
+# Bug#21114 (Foreign key creation fails to table with name format)
+#
+
+# Test coverage with edge conditions
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select pi(3.14);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select tan();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select tan(1, 2);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select makedate(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select makedate(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime(1, 2);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime(1, 2, 3, 4);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select atan();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select atan2(1, 2, 3);
+
+select benchmark(10, 1+1);
+
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select benchmark(5+5, 2);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select concat();
+select concat("foo");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select concat_ws();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select concat_ws("foo");
+
+set @pwd="my password";
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select encode("secret", @pwd);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select decode("encoded-secret", @pwd);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select encrypt();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select encrypt(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select des_encrypt("p1", "p2", "not expected");
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select des_decrypt("p1", "p2", "not expected");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select elt();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select elt(1);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set("p1");
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set("p1", "p2");
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set("p1", "p2", "p3", "p4", "p5", "p6");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select field();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select field("p1");
+
+set @dec=2;
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select format(pi(), @dec);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select from_unixtime();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select from_unixtime(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select unix_timestamp(1, 2);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select greatest();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select greatest(12);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select last_insert_id(1, 2);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select least();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select least(12);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select locate();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select locate(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select locate(1, 2, 3, 4);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select log();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select log(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select make_set();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select make_set(1);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select master_pos_wait();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select master_pos_wait(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select master_pos_wait(1, 2, 3, 4);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select rand(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select round(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select yearweek();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select yearweek(1, 2, 3);
+
diff --git a/mysql-test/t/parser_bug21114_innodb.test b/mysql-test/t/parser_bug21114_innodb.test
new file mode 100644
index 00000000000..d2101e2a28d
--- /dev/null
+++ b/mysql-test/t/parser_bug21114_innodb.test
@@ -0,0 +1,422 @@
+-- source include/have_innodb.inc
+
+let $engine_type=InnoDb;
+
+#
+# Bug#21114 (Foreign key creation fails to table with name format)
+#
+
+# Testing with the full log for only a few functions,
+# including FORMAT for witch the bug was reported.
+
+let $verbose=1;
+
+let $FCT=ABS;
+-- source include/parser_bug21114.inc
+let $FCT=FIELD;
+-- source include/parser_bug21114.inc
+let $FCT=FORMAT;
+-- source include/parser_bug21114.inc
+
+# Ignoring the result of SHOW CREATE (this generates too much noise)
+# Tests will fail if the create table statement can not be parsed
+
+let verbose=0;
+
+let $FCT=ACOS;
+-- source include/parser_bug21114.inc
+let $FCT=ADDDATE;
+-- source include/parser_bug21114.inc
+let $FCT=ADDTIME;
+-- source include/parser_bug21114.inc
+let $FCT=AES_DECRYPT;
+-- source include/parser_bug21114.inc
+let $FCT=AES_ENCRYPT;
+-- source include/parser_bug21114.inc
+let $FCT=AREA;
+-- source include/parser_bug21114.inc
+let $FCT=ASBINARY;
+-- source include/parser_bug21114.inc
+let $FCT=ASIN;
+-- source include/parser_bug21114.inc
+let $FCT=ASTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=ASWKB;
+-- source include/parser_bug21114.inc
+let $FCT=ASWKT;
+-- source include/parser_bug21114.inc
+let $FCT=ATAN;
+-- source include/parser_bug21114.inc
+let $FCT=ATAN2;
+-- source include/parser_bug21114.inc
+let $FCT=BENCHMARK;
+-- source include/parser_bug21114.inc
+let $FCT=BIN;
+-- source include/parser_bug21114.inc
+let $FCT=BIT_COUNT;
+-- source include/parser_bug21114.inc
+let $FCT=BIT_LENGTH;
+-- source include/parser_bug21114.inc
+let $FCT=CEIL;
+-- source include/parser_bug21114.inc
+let $FCT=CEILING;
+-- source include/parser_bug21114.inc
+let $FCT=CENTROID;
+-- source include/parser_bug21114.inc
+let $FCT=CHARACTER_LENGTH;
+-- source include/parser_bug21114.inc
+let $FCT=CHAR_LENGTH;
+-- source include/parser_bug21114.inc
+let $FCT=COERCIBILITY;
+-- source include/parser_bug21114.inc
+let $FCT=COMPRESS;
+-- source include/parser_bug21114.inc
+let $FCT=CONCAT;
+-- source include/parser_bug21114.inc
+let $FCT=CONCAT_WS;
+-- source include/parser_bug21114.inc
+let $FCT=CONNECTION_ID;
+-- source include/parser_bug21114.inc
+let $FCT=CONV;
+-- source include/parser_bug21114.inc
+let $FCT=CONVERT_TZ;
+-- source include/parser_bug21114.inc
+let $FCT=COS;
+-- source include/parser_bug21114.inc
+let $FCT=COT;
+-- source include/parser_bug21114.inc
+let $FCT=CRC32;
+-- source include/parser_bug21114.inc
+let $FCT=CROSSES;
+-- source include/parser_bug21114.inc
+let $FCT=DATEDIFF;
+-- source include/parser_bug21114.inc
+let $FCT=DATE_FORMAT;
+-- source include/parser_bug21114.inc
+let $FCT=DAYNAME;
+-- source include/parser_bug21114.inc
+let $FCT=DAYOFMONTH;
+-- source include/parser_bug21114.inc
+let $FCT=DAYOFWEEK;
+-- source include/parser_bug21114.inc
+let $FCT=DAYOFYEAR;
+-- source include/parser_bug21114.inc
+let $FCT=DECODE;
+-- source include/parser_bug21114.inc
+let $FCT=DEGREES;
+-- source include/parser_bug21114.inc
+let $FCT=DES_DECRYPT;
+-- source include/parser_bug21114.inc
+let $FCT=DES_ENCRYPT;
+-- source include/parser_bug21114.inc
+let $FCT=DIMENSION;
+-- source include/parser_bug21114.inc
+let $FCT=DISJOINT;
+-- source include/parser_bug21114.inc
+let $FCT=ELT;
+-- source include/parser_bug21114.inc
+let $FCT=ENCODE;
+-- source include/parser_bug21114.inc
+let $FCT=ENCRYPT;
+-- source include/parser_bug21114.inc
+let $FCT=ENDPOINT;
+-- source include/parser_bug21114.inc
+let $FCT=ENVELOPE;
+-- source include/parser_bug21114.inc
+let $FCT=EQUALS;
+-- source include/parser_bug21114.inc
+let $FCT=EXP;
+-- source include/parser_bug21114.inc
+let $FCT=EXPORT_SET;
+-- source include/parser_bug21114.inc
+let $FCT=EXTERIORRING;
+-- source include/parser_bug21114.inc
+let $FCT=EXTRACTVALUE;
+-- source include/parser_bug21114.inc
+let $FCT=FIND_IN_SET;
+-- source include/parser_bug21114.inc
+let $FCT=FLOOR;
+-- source include/parser_bug21114.inc
+let $FCT=FOUND_ROWS;
+-- source include/parser_bug21114.inc
+let $FCT=FROM_DAYS;
+-- source include/parser_bug21114.inc
+let $FCT=FROM_UNIXTIME;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMCOLLFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMCOLLFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMETRYCOLLECTIONFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMETRYCOLLECTIONFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMETRYFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMETRYFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMETRYN;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMETRYTYPE;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=GEOMFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=GET_LOCK;
+-- source include/parser_bug21114.inc
+let $FCT=GLENGTH;
+-- source include/parser_bug21114.inc
+let $FCT=GREATEST;
+-- source include/parser_bug21114.inc
+let $FCT=HEX;
+-- source include/parser_bug21114.inc
+let $FCT=IFNULL;
+-- source include/parser_bug21114.inc
+let $FCT=INET_ATON;
+-- source include/parser_bug21114.inc
+let $FCT=INET_NTOA;
+-- source include/parser_bug21114.inc
+let $FCT=INSTR;
+-- source include/parser_bug21114.inc
+let $FCT=INTERIORRINGN;
+-- source include/parser_bug21114.inc
+let $FCT=INTERSECTS;
+-- source include/parser_bug21114.inc
+let $FCT=ISCLOSED;
+-- source include/parser_bug21114.inc
+let $FCT=ISEMPTY;
+-- source include/parser_bug21114.inc
+let $FCT=ISNULL;
+-- source include/parser_bug21114.inc
+let $FCT=ISSIMPLE;
+-- source include/parser_bug21114.inc
+let $FCT=IS_FREE_LOCK;
+-- source include/parser_bug21114.inc
+let $FCT=IS_USED_LOCK;
+-- source include/parser_bug21114.inc
+let $FCT=LAST_DAY;
+-- source include/parser_bug21114.inc
+let $FCT=LAST_INSERT_ID;
+-- source include/parser_bug21114.inc
+let $FCT=LCASE;
+-- source include/parser_bug21114.inc
+let $FCT=LEAST;
+-- source include/parser_bug21114.inc
+let $FCT=LENGTH;
+-- source include/parser_bug21114.inc
+let $FCT=LINEFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=LINEFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=LINESTRINGFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=LINESTRINGFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=LN;
+-- source include/parser_bug21114.inc
+let $FCT=LOAD_FILE;
+-- source include/parser_bug21114.inc
+let $FCT=LOCATE;
+-- source include/parser_bug21114.inc
+let $FCT=LOG;
+-- source include/parser_bug21114.inc
+let $FCT=LOG10;
+-- source include/parser_bug21114.inc
+let $FCT=LOG2;
+-- source include/parser_bug21114.inc
+let $FCT=LOWER;
+-- source include/parser_bug21114.inc
+let $FCT=LPAD;
+-- source include/parser_bug21114.inc
+let $FCT=LTRIM;
+-- source include/parser_bug21114.inc
+let $FCT=MAKEDATE;
+-- source include/parser_bug21114.inc
+let $FCT=MAKETIME;
+-- source include/parser_bug21114.inc
+let $FCT=MAKE_SET;
+-- source include/parser_bug21114.inc
+let $FCT=MASTER_POS_WAIT;
+-- source include/parser_bug21114.inc
+let $FCT=MBRCONTAINS;
+-- source include/parser_bug21114.inc
+let $FCT=MBRDISJOINT;
+-- source include/parser_bug21114.inc
+let $FCT=MBREQUAL;
+-- source include/parser_bug21114.inc
+let $FCT=MBRINTERSECTS;
+-- source include/parser_bug21114.inc
+let $FCT=MBROVERLAPS;
+-- source include/parser_bug21114.inc
+let $FCT=MBRTOUCHES;
+-- source include/parser_bug21114.inc
+let $FCT=MBRWITHIN;
+-- source include/parser_bug21114.inc
+let $FCT=MD5;
+-- source include/parser_bug21114.inc
+let $FCT=MLINEFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=MLINEFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=MONTHNAME;
+-- source include/parser_bug21114.inc
+let $FCT=MPOINTFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=MPOINTFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=MPOLYFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=MPOLYFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=MULTILINESTRINGFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=MULTILINESTRINGFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=MULTIPOINTFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=MULTIPOINTFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=MULTIPOLYGONFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=MULTIPOLYGONFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=NAME_CONST;
+-- source include/parser_bug21114.inc
+let $FCT=NULLIF;
+-- source include/parser_bug21114.inc
+let $FCT=NUMGEOMETRIES;
+-- source include/parser_bug21114.inc
+let $FCT=NUMINTERIORRINGS;
+-- source include/parser_bug21114.inc
+let $FCT=NUMPOINTS;
+-- source include/parser_bug21114.inc
+let $FCT=OCT;
+-- source include/parser_bug21114.inc
+let $FCT=OCTET_LENGTH;
+-- source include/parser_bug21114.inc
+let $FCT=ORD;
+-- source include/parser_bug21114.inc
+let $FCT=OVERLAPS;
+-- source include/parser_bug21114.inc
+let $FCT=PERIOD_ADD;
+-- source include/parser_bug21114.inc
+let $FCT=PERIOD_DIFF;
+-- source include/parser_bug21114.inc
+let $FCT=PI;
+-- source include/parser_bug21114.inc
+let $FCT=POINTFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=POINTFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=POINTN;
+-- source include/parser_bug21114.inc
+let $FCT=POLYFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=POLYFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=POLYGONFROMTEXT;
+-- source include/parser_bug21114.inc
+let $FCT=POLYGONFROMWKB;
+-- source include/parser_bug21114.inc
+let $FCT=POW;
+-- source include/parser_bug21114.inc
+let $FCT=POWER;
+-- source include/parser_bug21114.inc
+let $FCT=QUOTE;
+-- source include/parser_bug21114.inc
+let $FCT=RADIANS;
+-- source include/parser_bug21114.inc
+let $FCT=RAND;
+-- source include/parser_bug21114.inc
+let $FCT=RELEASE_LOCK;
+-- source include/parser_bug21114.inc
+let $FCT=REVERSE;
+-- source include/parser_bug21114.inc
+let $FCT=ROUND;
+-- source include/parser_bug21114.inc
+let $FCT=ROW_COUNT;
+-- source include/parser_bug21114.inc
+let $FCT=RPAD;
+-- source include/parser_bug21114.inc
+let $FCT=RTRIM;
+-- source include/parser_bug21114.inc
+let $FCT=SEC_TO_TIME;
+-- source include/parser_bug21114.inc
+let $FCT=SESSION_USER;
+-- source include/parser_bug21114.inc
+let $FCT=SHA;
+-- source include/parser_bug21114.inc
+let $FCT=SHA1;
+-- source include/parser_bug21114.inc
+let $FCT=SIGN;
+-- source include/parser_bug21114.inc
+let $FCT=SIN;
+-- source include/parser_bug21114.inc
+let $FCT=SLEEP;
+-- source include/parser_bug21114.inc
+let $FCT=SOUNDEX;
+-- source include/parser_bug21114.inc
+let $FCT=SPACE;
+-- source include/parser_bug21114.inc
+let $FCT=SQRT;
+-- source include/parser_bug21114.inc
+let $FCT=SRID;
+-- source include/parser_bug21114.inc
+let $FCT=STARTPOINT;
+-- source include/parser_bug21114.inc
+let $FCT=STRCMP;
+-- source include/parser_bug21114.inc
+let $FCT=STR_TO_DATE;
+-- source include/parser_bug21114.inc
+let $FCT=SUBDATE;
+-- source include/parser_bug21114.inc
+let $FCT=SUBSTRING_INDEX;
+-- source include/parser_bug21114.inc
+let $FCT=SUBTIME;
+-- source include/parser_bug21114.inc
+let $FCT=SYSTEM_USER;
+-- source include/parser_bug21114.inc
+let $FCT=TAN;
+-- source include/parser_bug21114.inc
+let $FCT=TIMEDIFF;
+-- source include/parser_bug21114.inc
+let $FCT=TIME_FORMAT;
+-- source include/parser_bug21114.inc
+let $FCT=TIME_TO_SEC;
+-- source include/parser_bug21114.inc
+let $FCT=TOUCHES;
+-- source include/parser_bug21114.inc
+let $FCT=TO_DAYS;
+-- source include/parser_bug21114.inc
+let $FCT=UCASE;
+-- source include/parser_bug21114.inc
+let $FCT=UNCOMPRESS;
+-- source include/parser_bug21114.inc
+let $FCT=UNCOMPRESSED_LENGTH;
+-- source include/parser_bug21114.inc
+let $FCT=UNHEX;
+-- source include/parser_bug21114.inc
+let $FCT=UNIX_TIMESTAMP;
+-- source include/parser_bug21114.inc
+let $FCT=UPDATEXML;
+-- source include/parser_bug21114.inc
+let $FCT=UPPER;
+-- source include/parser_bug21114.inc
+let $FCT=UUID;
+-- source include/parser_bug21114.inc
+let $FCT=VERSION;
+-- source include/parser_bug21114.inc
+let $FCT=WEEKDAY;
+-- source include/parser_bug21114.inc
+let $FCT=WEEKOFYEAR;
+-- source include/parser_bug21114.inc
+let $FCT=WITHIN;
+-- source include/parser_bug21114.inc
+let $FCT=X;
+-- source include/parser_bug21114.inc
+let $FCT=Y;
+-- source include/parser_bug21114.inc
+let $FCT=YEARWEEK;
+-- source include/parser_bug21114.inc
+
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 2446bedfc14..86cd5994346 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -698,11 +698,11 @@ drop function `f``1`;
#
# tested problem when function name length close to ALIGN_SIZE
#
-create function x () returns int return 5;
-create view v1 as select x ();
+create function a() returns int return 5;
+create view v1 as select a();
select * from v1;
drop view v1;
-drop function x;
+drop function a;
#
# VIEW with collation