From 18ce758819212e1f835b2e4c8e0c74dc7b7e21ce Mon Sep 17 00:00:00 2001 From: "antony@ppcg5.local" <> Date: Tue, 6 Feb 2007 15:19:01 -0800 Subject: [PATCH 1/2] thd_lib_detected moved so that it is correctly declared as a data section symbol and not a common symbol on gcc 4.0.1 on darwin 8.8.0 PowerPC MacOS X 10.4.8 --- mysys/my_pthread.c | 1 - mysys/my_thr_init.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index b9da9d4817a..49aab9230e8 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -29,7 +29,6 @@ #define SCHED_POLICY SCHED_OTHER #endif -uint thd_lib_detected; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 67ab1e4a38a..abacc7bc004 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -47,6 +47,8 @@ pthread_mutexattr_t my_fast_mutexattr; pthread_mutexattr_t my_errorcheck_mutexattr; #endif +uint thd_lib_detected; + #ifdef NPTL_PTHREAD_EXIT_BUG /* see my_pthread.h */ /* From a3c3cda915e6a854728ba53354cde8614278ecc5 Mon Sep 17 00:00:00 2001 From: "antony@ppcg5.local" <> Date: Wed, 7 Feb 2007 14:22:19 -0800 Subject: [PATCH 2/2] Bug#12204 "CONNECTION is a reserved keyword" Allow connection to be used as an ordinary identifier Tests included. --- mysql-test/r/keywords.result | 13 +++++++++++++ mysql-test/t/keywords.test | 22 ++++++++++++++++++++++ sql/sql_yacc.yy | 1 + 3 files changed, 36 insertions(+) diff --git a/mysql-test/r/keywords.result b/mysql-test/r/keywords.result index 88a0ab8abd5..c14ae584c86 100644 --- a/mysql-test/r/keywords.result +++ b/mysql-test/r/keywords.result @@ -16,3 +16,16 @@ select events.binlog from events; binlog 1 drop table events; +create table t1 (connection int, b int); +create procedure p1() +begin +declare connection int; +select max(t1.connection) into connection from t1; +select concat("max=",connection) 'p1'; +end| +insert into t1 (connection) values (1); +call p1(); +p1 +max=1 +drop procedure p1; +drop table t1; diff --git a/mysql-test/t/keywords.test b/mysql-test/t/keywords.test index de0159a950e..46933a230ee 100644 --- a/mysql-test/t/keywords.test +++ b/mysql-test/t/keywords.test @@ -19,3 +19,25 @@ select events.binlog from events; drop table events; # End of 4.1 tests + + +# +# Bug#12204 - CONNECTION should not be a reserved word +# + +create table t1 (connection int, b int); +delimiter |; +create procedure p1() +begin + declare connection int; + select max(t1.connection) into connection from t1; + select concat("max=",connection) 'p1'; +end| +delimiter ;| +insert into t1 (connection) values (1); +call p1(); +drop procedure p1; +drop table t1; + + +# End of 5.0 tests diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b4147d2905c..37c591b4f4a 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7926,6 +7926,7 @@ keyword_sp: | COMPACT_SYM {} | COMPRESSED_SYM {} | CONCURRENT {} + | CONNECTION_SYM {} | CONSISTENT_SYM {} | CUBE_SYM {} | DATA_SYM {}