mariadb: refresh local patches to avoid fuzz warnings
PATCH 1/1 mariadb: refresh local patches to avoid fuzz warnings
From: Denys Dmytriyenko <[email protected]>
--- .../mariadb/0001-disable-ucontext-on-musl.patch | 6 +- .../mysql/mariadb/change-cc-to-cc-version.patch | 17 +- .../mariadb/configure.cmake-fix-valgrind.patch | 10 +- .../mysql/mariadb/fix-a-building-failure.patch | 13 +- .../mysql/mariadb/fix-cmake-module-path.patch | 66226 ++++++++++++++++++- .../mysql/mariadb/fix-mysqlclient-r-version.patch | 30 +- .../mysql/mariadb/remove-bad-path.patch | 17 +- 7 files changed, 66273 insertions(+), 46 deletions(-)
meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch +2 -4
@@ -1,4 +1,4 @@ -From 5bc3e7ef9700d12054e0125a126f1bb093f01ef9 Mon Sep 17 00:00:00 2001 +From 48d3da164a14d59f09e2b8c7ef73343859ae5d32 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sun, 26 Mar 2017 14:30:33 -0700 Subject: [PATCH] disable ucontext on musl
@@ -6,6 +6,7 @@ Subject: [PATCH] disable ucontext on musl musl does not have *contex() APIs even though it has ucontext.h header Signed-off-by: Khem Raj <[email protected]> + --- include/my_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -23,6 +24,3 @@ index dd44103..9b28c17 100644 #define MY_CONTEXT_USE_UCONTEXT #else #define MY_CONTEXT_DISABLE --- -2.12.1 -
meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch +13 -4
@@ -1,4 +1,8 @@ -mariadb: replace the CC with CC_VERSION and CXX with CXX_VERSION +From 9f3e0d8c8fc874bc13e1a34f92c8df6b31914e83 Mon Sep 17 00:00:00 2001 +From: Yue Tao <[email protected]> +Date: Wed, 28 Sep 2016 22:49:11 -0400 +Subject: [PATCH] mariadb: replace the CC with CC_VERSION and CXX with + CXX_VERSION mysqlbug.sh is a bug report script. It makes a report with the build information, including gcc version. The CC is the local path of gcc, which is useless for bug
@@ -9,9 +13,14 @@ Upstream-Status: Pending Signed-off-by: Yue Tao <[email protected]> Signed-off-by: Wenzong Fan <[email protected]> ================================ -diff --git a/scripts/mysqlbug.sh.old b/scripts/mysqlbug.sh -index e9df210..d4b8d53 100644 ---- a/scripts/mysqlbug.sh.old + +--- + scripts/mysqlbug.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh +index e9df210..7177915 100644 +--- a/scripts/mysqlbug.sh +++ b/scripts/mysqlbug.sh @@ -24,8 +24,8 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@" COMPILATION_COMMENT="@COMPILATION_COMMENT@"
meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch +4 -6
@@ -1,4 +1,4 @@ -From 5effba0d7d47071a3f1bca56823190d5a95bb1a6 Mon Sep 17 00:00:00 2001 +From eda09f35a23a2580f1e6f9667387e1d198a7cca7 Mon Sep 17 00:00:00 2001 From: Jackie Huang <[email protected]> Date: Wed, 12 Nov 2014 03:09:10 -0500 Subject: [PATCH] configure.cmake: fix valgrind
@@ -15,15 +15,16 @@ PACKAGECONFIG to decide if valgrind is needed or not. Upstream-Status: Inappropriate [oe specific] Signed-off-by: Jackie Huang <[email protected]> + --- configure.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.cmake b/configure.cmake -index 0bd7bbe..51a098f 100644 +index 4051b55..01410ad 100644 --- a/configure.cmake +++ b/configure.cmake -@@ -1047,10 +1047,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) +@@ -1057,10 +1057,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) IF(WITH_VALGRIND) SET(HAVE_valgrind 1)
@@ -36,6 +37,3 @@ index 0bd7bbe..51a098f 100644 #-------------------------------------------------------------------- # Check for IPv6 support --- -2.0.0 -
meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch +7 -6
@@ -1,4 +1,7 @@ -[PATCH] fix a building failure +From b36d327b12a3e2f7b712b22fdd4e69f941bdd01d Mon Sep 17 00:00:00 2001 +From: Roy Li <[email protected]> +Date: Wed, 6 May 2015 11:05:40 +0800 +Subject: [PATCH] [PATCH] fix a building failure Upstream-Status: Inappropriate [configuration]
@@ -6,15 +9,16 @@ building failed since native does not generate import_executables.cmake In fact, our building system will export the needed commands Signed-off-by: Roy Li <[email protected]> + --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index c1ce1c5..83b3a7e 100644 +index 11103c8..7557a00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -350,11 +350,6 @@ MYSQL_CHECK_READLINE() +@@ -352,11 +352,6 @@ MYSQL_CHECK_READLINE() CHECK_JEMALLOC()
@@ -26,6 +30,3 @@ index c1ce1c5..83b3a7e 100644 # # Setup maintainer mode options by the end. Platform checks are # not run with the warning options as to not perturb fragile checks --- -1.9.1 -
meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch +66221 -5
2,895 lines not on this page · raw message
meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch +13 -17
Lines of this file are not shown. View the raw message.
meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch +13 -4
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
Quoted 9 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
Signed-off-by Denys Dmytriyenko <[email protected]>--- .../mariadb/0001-disable-ucontext-on-musl.patch | 6 +- .../mysql/mariadb/change-cc-to-cc-version.patch | 17 +- .../mariadb/configure.cmake-fix-valgrind.patch | 10 +- .../mysql/mariadb/fix-a-building-failure.patch | 13 +- .../mysql/mariadb/fix-cmake-module-path.patch | 66226 ++++++++++++++++++-
Please disregard this one - it seems to break native version...
Quoted 66,523 lines
.../mysql/mariadb/fix-mysqlclient-r-version.patch | 30 +- .../mysql/mariadb/remove-bad-path.patch | 17 +- 7 files changed, 66273 insertions(+), 46 deletions(-)meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch +2
-4@@ -1,4 +1,4 @@ -From 5bc3e7ef9700d12054e0125a126f1bb093f01ef9 Mon Sep 17 00:00:00 2001 +From 48d3da164a14d59f09e2b8c7ef73343859ae5d32 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sun, 26 Mar 2017 14:30:33 -0700 Subject: [PATCH] disable ucontext on musl@@ -6,6 +6,7 @@ Subject: [PATCH] disable ucontext on musl musl does not have *contex() APIs even though it has ucontext.h header Signed-off-by: Khem Raj <[email protected]> + --- include/my_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)@@ -23,6 +24,3 @@ index dd44103..9b28c17 100644 #define MY_CONTEXT_USE_UCONTEXT #else #define MY_CONTEXT_DISABLE --- -2.12.1 -meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch +13
-4@@ -1,4 +1,8 @@ -mariadb: replace the CC with CC_VERSION and CXX with CXX_VERSION +From 9f3e0d8c8fc874bc13e1a34f92c8df6b31914e83 Mon Sep 17 00:00:00 2001 +From: Yue Tao <[email protected]> +Date: Wed, 28 Sep 2016 22:49:11 -0400 +Subject: [PATCH] mariadb: replace the CC with CC_VERSION and CXX with + CXX_VERSION mysqlbug.sh is a bug report script. It makes a report with the build information, including gcc version. The CC is the local path of gcc, which is useless for bug@@ -9,9 +13,14 @@ Upstream-Status: Pending Signed-off-by: Yue Tao <[email protected]> Signed-off-by: Wenzong Fan <[email protected]> ================================ -diff --git a/scripts/mysqlbug.sh.old b/scripts/mysqlbug.sh -index e9df210..d4b8d53 100644 ---- a/scripts/mysqlbug.sh.old + +--- + scripts/mysqlbug.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh +index e9df210..7177915 100644 +--- a/scripts/mysqlbug.sh +++ b/scripts/mysqlbug.sh @@ -24,8 +24,8 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@" COMPILATION_COMMENT="@COMPILATION_COMMENT@"meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch +4
-6@@ -1,4 +1,4 @@ -From 5effba0d7d47071a3f1bca56823190d5a95bb1a6 Mon Sep 17 00:00:00 2001 +From eda09f35a23a2580f1e6f9667387e1d198a7cca7 Mon Sep 17 00:00:00 2001 From: Jackie Huang <[email protected]> Date: Wed, 12 Nov 2014 03:09:10 -0500 Subject: [PATCH] configure.cmake: fix valgrind@@ -15,15 +15,16 @@ PACKAGECONFIG to decide if valgrind is needed or not. Upstream-Status: Inappropriate [oe specific] Signed-off-by: Jackie Huang <[email protected]> + --- configure.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.cmake b/configure.cmake -index 0bd7bbe..51a098f 100644 +index 4051b55..01410ad 100644 --- a/configure.cmake +++ b/configure.cmake -@@ -1047,10 +1047,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) +@@ -1057,10 +1057,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) IF(WITH_VALGRIND) SET(HAVE_valgrind 1)@@ -36,6 +37,3 @@ index 0bd7bbe..51a098f 100644 #-------------------------------------------------------------------- # Check for IPv6 support --- -2.0.0 -meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch +7
-6@@ -1,4 +1,7 @@ -[PATCH] fix a building failure +From b36d327b12a3e2f7b712b22fdd4e69f941bdd01d Mon Sep 17 00:00:00 2001 +From: Roy Li <[email protected]> +Date: Wed, 6 May 2015 11:05:40 +0800 +Subject: [PATCH] [PATCH] fix a building failure Upstream-Status: Inappropriate [configuration]@@ -6,15 +9,16 @@ building failed since native does not generate import_executables.cmake In fact, our building system will export the needed commands Signed-off-by: Roy Li <[email protected]> + --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index c1ce1c5..83b3a7e 100644 +index 11103c8..7557a00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -350,11 +350,6 @@ MYSQL_CHECK_READLINE() +@@ -352,11 +352,6 @@ MYSQL_CHECK_READLINE() CHECK_JEMALLOC()@@ -26,6 +30,3 @@ index c1ce1c5..83b3a7e 100644 # # Setup maintainer mode options by the end. Platform checks are # not run with the warning options as to not perturb fragile checks --- -1.9.1 -meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch +66221
-5@@ -1,4 +1,7 @@ -Avoid CMAKE_MODULE_PATH being overwritten +From 8bd396589ffe0e68181e92995a27cd30acd4f8a8 Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <[email protected]> +Date: Fri, 8 Aug 2014 15:16:40 +0100 +Subject: [PATCH] Avoid CMAKE_MODULE_PATH being overwritten OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless we set it after setting the project name.@@ -7,9 +10,133 @@ Signed-off-by: Paul Eggleton <[email protected]> Upstream-Status: Inappropriate [working around OE-Core bug] ---- mariadb/CMakeLists.txt 2014-07-17 11:01:07.676353047 +0100 -+++ mariadb/CMakeLists.txt 2014-07-17 11:01:31.299353107 +0100 -@@ -28,8 +28,6 @@ +--- + CMakeLists.txt | 4 +- + Docs/INFO_SRC | 8 + + dbug/user.r | 1121 + + sql/sql_yacc.cc | 37809 +++++++++++++++++++ + sql/sql_yacc.h | 1348 + + storage/maria/unittest/ma_test_all-t | 766 + + storage/ndb/ndbapi-examples/Makefile | 27 + + .../ndb/ndbapi-examples/mgmapi_logevent/Makefile | 24 + + .../ndb/ndbapi-examples/mgmapi_logevent2/Makefile | 24 + + storage/ndb/ndbapi-examples/ndbapi_async/Makefile | 24 + + storage/ndb/ndbapi-examples/ndbapi_async1/Makefile | 23 + + storage/ndb/ndbapi-examples/ndbapi_event/Makefile | 24 + + .../ndb/ndbapi-examples/ndbapi_retries/Makefile | 23 + + storage/ndb/ndbapi-examples/ndbapi_scan/Makefile | 24 + + storage/ndb/ndbapi-examples/ndbapi_simple/Makefile | 24 + + .../ndbapi-examples/ndbapi_simple_dual/Makefile | 24 + + .../ndbapi-examples/ndbapi_simple_index/Makefile | 24 + + storage/ndb/src/common/logger/listtest/Makefile | 14 + + storage/ndb/src/common/logger/loggertest/Makefile | 16 + + .../ndb/src/common/mgmcommon/printConfig/Makefile | 16 + + .../ndb/src/common/transporter/basictest/Makefile | 15 + + .../src/common/transporter/failoverSCI/Makefile | 18 + + .../ndb/src/common/transporter/perftest/Makefile | 15 + + .../ndb/src/common/transporter/priotest/Makefile | 15 + + .../common/transporter/priotest/prioSCI/Makefile | 17 + + .../common/transporter/priotest/prioSHM/Makefile | 13 + + .../common/transporter/priotest/prioTCP/Makefile | 13 + + storage/ndb/src/common/util/filetest/Makefile | 14 + + .../ndb/src/common/util/testConfigValues/Makefile | 12 + + .../ndb/src/common/util/testProperties/Makefile | 9 + + .../src/common/util/testSimpleProperties/Makefile | 12 + + storage/ndb/src/cw/test/socketclient/Makefile | 24 + + storage/ndb/src/cw/util/Makefile | 10 + + .../src/kernel/blocks/dbdih/printSysfile/Makefile | 12 + + .../src/kernel/blocks/ndbfs/AsyncFileTest/Makefile | 27 + + .../kernel/blocks/ndbfs/MemoryChannelTest/Makefile | 13 + + storage/ndb/src/kernel/vm/al_test/Makefile | 12 + + storage/ndb/src/kernel/vm/testCopy/Makefile | 9 + + storage/ndb/src/kernel/vm/testDataBuffer/Makefile | 10 + + storage/ndb/src/kernel/vm/testLongSig/Makefile | 9 + + .../kernel/vm/testSimplePropertiesSection/Makefile | 10 + + storage/ndb/src/mgmapi/test/Makefile | 13 + + storage/ndb/src/mgmclient/test_cpcd/Makefile | 17 + + storage/ndb/src/mgmsrv/mkconfig/Makefile | 13 + + storage/ndb/src/ndbapi/signal-sender/Makefile | 19 + + storage/ndb/test/newtonapi/basic_test/Makefile | 25 + + .../ndb/test/newtonapi/basic_test/basic/Makefile | 14 + + .../test/newtonapi/basic_test/bulk_read/Makefile | 14 + + .../test/newtonapi/basic_test/ptr_binding/Makefile | 14 + + storage/ndb/test/newtonapi/perf_test/Makefile | 14 + + storage/ndb/test/odbc/SQL99_test/Makefile | 26 + + storage/ndb/test/odbc/client/Makefile | 95 + + storage/ndb/test/odbc/dm-iodbc/Makefile | 38 + + storage/ndb/test/odbc/dm-unixodbc/Makefile | 39 + + storage/ndb/test/odbc/driver/Makefile | 30 + + storage/ndb/test/odbc/test_compiler/Makefile | 21 + + .../ft-index/third_party/xz-4.999.9beta/configure | 23074 +++++++++++ + .../third_party/xz-4.999.9beta/dos/Makefile | 255 + + .../third_party/xz-4.999.9beta/windows/Makefile | 308 + + storage/tokudb/tests/Makefile | 53 + + 60 files changed, 65736 insertions(+), 2 deletions(-) + create mode 100644 Docs/INFO_SRC + create mode 100644 dbug/user.r + create mode 100644 sql/sql_yacc.cc + create mode 100644 sql/sql_yacc.h + create mode 100755 storage/maria/unittest/ma_test_all-t + create mode 100644 storage/ndb/ndbapi-examples/Makefile + create mode 100644 storage/ndb/ndbapi-examples/mgmapi_logevent/Makefile + create mode 100644 storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_async/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_async1/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_event/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_retries/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_scan/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_simple/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_simple_dual/Makefile + create mode 100644 storage/ndb/ndbapi-examples/ndbapi_simple_index/Makefile + create mode 100644 storage/ndb/src/common/logger/listtest/Makefile + create mode 100644 storage/ndb/src/common/logger/loggertest/Makefile + create mode 100644 storage/ndb/src/common/mgmcommon/printConfig/Makefile + create mode 100644 storage/ndb/src/common/transporter/basictest/Makefile + create mode 100644 storage/ndb/src/common/transporter/failoverSCI/Makefile + create mode 100644 storage/ndb/src/common/transporter/perftest/Makefile + create mode 100644 storage/ndb/src/common/transporter/priotest/Makefile + create mode 100644 storage/ndb/src/common/transporter/priotest/prioSCI/Makefile + create mode 100644 storage/ndb/src/common/transporter/priotest/prioSHM/Makefile + create mode 100644 storage/ndb/src/common/transporter/priotest/prioTCP/Makefile + create mode 100644 storage/ndb/src/common/util/filetest/Makefile + create mode 100644 storage/ndb/src/common/util/testConfigValues/Makefile + create mode 100644 storage/ndb/src/common/util/testProperties/Makefile + create mode 100644 storage/ndb/src/common/util/testSimpleProperties/Makefile + create mode 100644 storage/ndb/src/cw/test/socketclient/Makefile + create mode 100644 storage/ndb/src/cw/util/Makefile + create mode 100644 storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile + create mode 100644 storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/Makefile + create mode 100644 storage/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/Makefile + create mode 100644 storage/ndb/src/kernel/vm/al_test/Makefile + create mode 100644 storage/ndb/src/kernel/vm/testCopy/Makefile + create mode 100644 storage/ndb/src/kernel/vm/testDataBuffer/Makefile + create mode 100644 storage/ndb/src/kernel/vm/testLongSig/Makefile + create mode 100644 storage/ndb/src/kernel/vm/testSimplePropertiesSection/Makefile + create mode 100644 storage/ndb/src/mgmapi/test/Makefile + create mode 100644 storage/ndb/src/mgmclient/test_cpcd/Makefile + create mode 100644 storage/ndb/src/mgmsrv/mkconfig/Makefile + create mode 100644 storage/ndb/src/ndbapi/signal-sender/Makefile + create mode 100644 storage/ndb/test/newtonapi/basic_test/Makefile + create mode 100644 storage/ndb/test/newtonapi/basic_test/basic/Makefile + create mode 100644 storage/ndb/test/newtonapi/basic_test/bulk_read/Makefile + create mode 100644 storage/ndb/test/newtonapi/basic_test/ptr_binding/Makefile + create mode 100644 storage/ndb/test/newtonapi/perf_test/Makefile + create mode 100644 storage/ndb/test/odbc/SQL99_test/Makefile + create mode 100644 storage/ndb/test/odbc/client/Makefile + create mode 100644 storage/ndb/test/odbc/dm-iodbc/Makefile + create mode 100644 storage/ndb/test/odbc/dm-unixodbc/Makefile + create mode 100644 storage/ndb/test/odbc/driver/Makefile + create mode 100644 storage/ndb/test/odbc/test_compiler/Makefile + create mode 100755 storage/tokudb/ft-index/third_party/xz-4.999.9beta/configure + create mode 100644 storage/tokudb/ft-index/third_party/xz-4.999.9beta/dos/Makefile + create mode 100644 storage/tokudb/ft-index/third_party/xz-4.999.9beta/windows/Makefile + create mode 100644 storage/tokudb/tests/Makefile + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6ab17eb..11103c8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,8 +38,6 @@ ENDIF() MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")@@ -18,7 +145,7 @@ Upstream-Status: Inappropriate [working around OE-Core bug] # Distinguish between community and non-community builds, with the # default being a community build. This does not impact the feature # set that will be compiled in; it's merely provided as a hint to -@@ -77,6 +75,8 @@ +@@ -87,6 +85,8 @@ ELSE() ENDIF() PROJECT(${MYSQL_PROJECT_NAME})@@ -27,3 +154,66092 @@ Upstream-Status: Inappropriate [working around OE-Core bug] IF(BUILD_CONFIG) INCLUDE( ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) +diff --git a/Docs/INFO_SRC b/Docs/INFO_SRC +new file mode 100644 +index 0000000..7887ce5 +--- /dev/null ++++ b/Docs/INFO_SRC +@@ -0,0 +1,8 @@ ++commit: 59fca5806af65c8379a993f9e604cb0b20a76e2b ++date: 2017-07-18 19:50:11 +0200 ++build-date: 2017-07-18 20:33:21 +0000 ++short: 59fca58 ++branch: HEAD ++ ++ ++MySQL source 5.5.57 +diff --git a/dbug/user.r b/dbug/user.r +new file mode 100644 +index 0000000..8d8a9ce +--- /dev/null ++++ b/dbug/user.r +@@ -0,0 +1,1121 @@ ++.\" @(#)user.r 1.13 10/29/86 ++.\" ++.\" 2004-10-29: documented features implemented since 10/29/86 ++.\" formatting cleanup ++.\" - Sergei Golubchik ++.\" ++.\" DBUG (Macro Debugger Package) nroff source ++.\" ++.\" nroff -mm user.r >user.t ++.\" groff -mm user.r >user.ps ++.\" ++.\" =================================================== ++.\" ++.\" === Some sort of black magic, but I forget... ++.tr ~ ++.\" === Hyphenation control (1 = on) ++.\".nr Hy 1 ++.\" === Force all first level headings to start on new page ++.nr Ej 1 ++.\" === Set for breaks after headings for levels 1-3 ++.nr Hb 3 ++.\" === Set for space after headings for levels 1-3 ++.nr Hs 3 ++.\" === Set standard indent for one/half inch ++.nr Si 10 ++.\" === Set page header ++.PH "/DBUG User Manual//\*(DT/" ++.\" === Set page footer ++.PF "// - % - //" ++.\" === Set page offset ++.\".po 0.60i ++.\" === Set line length ++.\".ll 6.5i ++.TL ++.warn 0 ++D B U G ++.P 0 ++C Program Debugging Package ++.P 0 ++by ++.AU "Fred Fish" ++.AF "" ++.SA 1 ++.\" === All paragraphs indented. ++.nr Pt 1 ++.AS 1 ++This document introduces ++.I dbug , ++a macro based C debugging ++package which has proven to be a very flexible and useful tool ++for debugging, testing, and porting C programs. ++ ++.P ++All of the features of the ++.I dbug ++package can be enabled or disabled dynamically at execution time. ++This means that production programs will run normally when ++debugging is not enabled, and eliminates the need to maintain two ++separate versions of a program. ++ ++.P ++Many of the things easily accomplished with conventional debugging ++tools, such as symbolic debuggers, are difficult or impossible with this ++package, and vice versa. ++Thus the ++.I dbug ++package should ++.I not ++be thought of as a replacement or substitute for ++other debugging tools, but simply as a useful ++.I addition ++to the ++program development and maintenance environment. ++ ++.AE ++.MT 4 ++.SK ++.B ++INTRODUCTION ++.R ++ ++.P ++Almost every program development environment worthy of the name ++provides some sort of debugging facility. ++Usually this takes the form of a program which is capable of ++controlling execution of other programs and examining the internal ++state of other executing programs. ++These types of programs will be referred to as external debuggers ++since the debugger is not part of the executing program. ++Examples of this type of debugger include the ++.B adb ++and ++.B sdb ++debuggers provided with the ++.B UNIX\*F ++.FS ++UNIX is a trademark of AT&T Bell Laboratories. ++.FE ++operating system. ++ ++.P ++One of the problems associated with developing programs in an environment ++with good external debuggers is that developed programs tend to have ++little or no internal instrumentation. ++This is usually not a problem for the developer since he is, ++or at least should be, intimately familiar with the internal organization, ++data structures, and control flow of the program being debugged. ++It is a serious problem for maintenance programmers, who ++are unlikely to have such familiarity with the program being ++maintained, modified, or ported to another environment. ++It is also a problem, even for the developer, when the program is ++moved to an environment with a primitive or unfamiliar debugger, ++or even no debugger. ++ ++.P ++On the other hand, ++.I dbug ++is an example of an internal debugger. ++Because it requires internal instrumentation of a program, ++and its usage does not depend on any special capabilities of ++the execution environment, it is always available and will ++execute in any environment that the program itself will ++execute in. ++In addition, since it is a complete package with a specific ++user interface, all programs which use it will be provided ++with similar debugging capabilities. ++This is in sharp contrast to other forms of internal instrumentation ++where each developer has their own, usually less capable, form ++of internal debugger. ++In summary, ++because ++.I dbug ++is an internal debugger it provides consistency across operating ++environments, ++and because it is available to all developers it provides ++consistency across all programs in the same environment. ++ ++.P ++The ++.I dbug ++package imposes only a slight speed penalty on executing ++programs, typically much less than 10 percent, and a modest size ++penalty, typically 10 to 20 percent. ++By defining a specific C preprocessor symbol both of these ++can be reduced to zero with no changes required to the ++source code. ++ ++.P ++The following list is a quick summary of the capabilities ++of the ++.I dbug ++package. ++Each capability can be individually enabled or disabled ++at the time a program is invoked by specifying the appropriate ++command line arguments. ++.SP 1 ++.ML o 1i ++.LI ++Execution trace showing function level control flow in a ++semi-graphically manner using indentation to indicate nesting ++depth. ++.LI ++Output the values of all, or any subset of, key internal variables. ++.LI ++Limit actions to a specific set of named functions. ++.LI ++Limit function trace to a specified nesting depth. ++.LI ++Label each output line with source file name and line number. ++.LI ++Label each output line with name of current process. ++.LI ++Push or pop internal debugging state to allow execution with ++built in debugging defaults. ++.LI ++Redirect the debug output stream to standard output (stdout) ++or a named file. ++The default output stream is standard error (stderr). ++The redirection mechanism is completely independent of ++normal command line redirection to avoid output conflicts. ++.LE ++ ++.SK ++.B ++PRIMITIVE DEBUGGING TECHNIQUES ++.R ++ ++.P ++Internal instrumentation is already a familiar concept ++to most programmers, since it is usually the first debugging ++technique learned. ++Typically, "print\ statements" are inserted in the source ++code at interesting points, the code is recompiled and executed, ++and the resulting output is examined in an attempt to determine ++where the problem is. ++ ++The procedure is iterative, with each iteration yielding more ++and more output, and hopefully the source of the problem is ++discovered before the output becomes too large to deal with ++or previously inserted statements need to be removed. ++Figure 1 is an example of this type of primitive debugging ++technique. ++.DS I N ++.SP 2 ++\fC ++.so example1.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 1 ++.ce ++Primitive Debugging Technique ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++Eventually, and usually after at least several iterations, the ++problem will be found and corrected. ++At this point, the newly inserted print statements must be ++dealt with. ++One obvious solution is to simply delete them all. ++Beginners usually do this a few times until they have to ++repeat the entire process every time a new bug pops up. ++The second most obvious solution is to somehow disable ++the output, either through the source code comment facility, ++creation of a debug variable to be switched on or off, or by using the ++C preprocessor. ++Figure 2 is an example of all three techniques. ++.DS I N ++.SP 2 ++\fC ++.so example2.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 2 ++.ce ++Debug Disable Techniques ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++Each technique has its advantages and disadvantages with respect ++to dynamic vs static activation, source code overhead, recompilation ++requirements, ease of use, program readability, etc. ++Overuse of the preprocessor solution quickly leads to problems with ++source code readability and maintainability when multiple ++.B #ifdef ++symbols are to be defined or undefined based on specific types ++of debug desired. ++The source code can be made slightly more readable by suitable indentation ++of the ++.B #ifdef ++arguments to match the indentation of the code, but ++not all C preprocessors allow this. ++The only requirement for the standard ++.B UNIX ++C preprocessor is for the '#' character to appear ++in the first column, but even this seems ++like an arbitrary and unreasonable restriction. ++Figure 3 is an example of this usage. ++.DS I N ++.SP 2 ++\fC ++.so example3.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 3 ++.ce ++More Readable Preprocessor Usage ++.ll +5 ++.SP 2 ++.DE ++ ++.SK ++.B ++FUNCTION TRACE EXAMPLE ++.R ++ ++.P ++We will start off learning about the capabilities of the ++.I dbug ++package by using a simple minded program which computes the ++factorial of a number. ++In order to better demonstrate the function trace mechanism, this ++program is implemented recursively. ++Figure 4 is the main function for this factorial program. ++.DS I N ++.SP 2 ++\fC ++.so main.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 4 ++.ce ++Factorial Program Mainline ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++The ++.B main ++function is responsible for processing any command line ++option arguments and then computing and printing the factorial of ++each non-option argument. ++.P ++First of all, notice that all of the debugger functions are implemented ++via preprocessor macros. ++This does not detract from the readability of the code and makes disabling ++all debug compilation trivial (a single preprocessor symbol, ++.B DBUG_OFF , ++forces the macro expansions to be null). ++.P ++Also notice the inclusion of the header file ++.B dbug.h ++from the local header file directory. ++(The version included here is the test version in the dbug source ++distribution directory). ++This file contains all the definitions for the debugger macros, which ++all have the form ++.B DBUG_XX...XX . ++ ++.P ++The ++.B DBUG_ENTER ++macro informs that debugger that we have entered the ++function named ++.B main . ++It must be the very first "executable" line in a function, after ++all declarations and before any other executable line. ++The ++.B DBUG_PROCESS ++macro is generally used only once per program to ++inform the debugger what name the program was invoked with. ++The ++.B DBUG_PUSH ++macro modifies the current debugger state by ++saving the previous state and setting a new state based on the ++control string passed as its argument. ++The ++.B DBUG_PRINT ++macro is used to print the values of each argument ++for which a factorial is to be computed. ++The ++.B DBUG_RETURN ++macro tells the debugger that the end of the current ++function has been reached and returns a value to the calling ++function. ++All of these macros will be fully explained in subsequent sections. ++.P ++To use the debugger, the factorial program is invoked with a command ++line of the form: ++.DS CB N ++\fCfactorial -#d:t 1 2 3 ++.DE ++The ++.B main ++function recognizes the "-#d:t" string as a debugger control ++string, and passes the debugger arguments ("d:t") to the ++.I dbug ++runtime support routines via the ++.B DBUG_PUSH ++macro. ++This particular string enables output from the ++.B DBUG_PRINT ++macro with the 'd' flag and enables function tracing with the 't' flag. ++The factorial function is then called three times, with the arguments ++"1", "2", and "3". ++Note that the DBUG_PRINT takes exactly ++.B two ++arguments, with the second argument (a format string and list ++of printable values) enclosed in parentheses. ++.P ++Debug control strings consist of a header, the "-#", followed ++by a colon separated list of debugger arguments. ++Each debugger argument is a single character flag followed ++by an optional comma separated list of arguments specific ++to the given flag. ++Some examples are: ++.DS CB N ++\fC ++-#d:t:o ++-#d,in,out:f,main:F:L ++.DE ++Note that previously enabled debugger actions can be disabled by the ++control string "-#". ++ ++.P ++The definition of the factorial function, symbolized as "N!", is ++given by: ++.DS CB N ++N! = N * N-1 * ... 2 * 1 ++.DE ++Figure 5 is the factorial function which implements this algorithm ++recursively. ++Note that this is not necessarily the best way to do factorials ++and error conditions are ignored completely. ++.DS I N ++.SP 2 ++\fC ++.so factorial.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 5 ++.ce ++Factorial Function ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++One advantage (some may not consider it so) to using the ++.I dbug ++package is that it strongly encourages fully structured coding ++with only one entry and one exit point in each function. ++Multiple exit points, such as early returns to escape a loop, ++may be used, but each such point requires the use of an ++appropriate ++.B DBUG_RETURN ++or ++.B DBUG_VOID_RETURN ++macro. ++ ++.P ++To build the factorial program on a ++.B UNIX ++system, compile and ++link with the command: ++.DS CB N ++\fCcc -o factorial main.c factorial.c -ldbug ++.DE ++The "-ldbug" argument tells the loader to link in the ++runtime support modules for the ++.I dbug ++package. ++Executing the factorial program with a command of the form: ++.DS CB N ++\fCfactorial 1 2 3 4 5 ++.DE ++generates the output shown in figure 6. ++.DS I N ++.SP 2 ++\fC ++.so output1.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 6 ++.ce ++\fCfactorial 1 2 3 4 5 ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++Function level tracing is enabled by passing the debugger ++the 't' flag in the debug control string. ++Figure 7 is the output resulting from the command ++"factorial\ -#t:o\ 2\ 3". ++.DS I N ++.SP 2 ++\fC ++.so output2.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 7 ++.ce ++\fCfactorial -#t:o 2 3 ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++Each entry to or return from a function is indicated by '>' for the ++entry point and '<' for the exit point, connected by ++vertical bars to allow matching points to be easily found ++when separated by large distances. ++ ++.P ++This trace output indicates that there was an initial call ++to factorial from main (to compute 2!), followed by ++a single recursive call to factorial to compute 1!. ++The main program then output the result for 2! and called the ++factorial function again with the second argument, 3. ++Factorial called itself recursively to compute 2! and 1!, then ++returned control to main, which output the value for 3! and exited. ++ ++.P ++Note that there is no matching entry point "main>" for the ++return point "<main" because at the time the ++.B DBUG_ENTER ++macro was reached in main, tracing was not enabled yet. ++It was only after the macro ++.B DBUG_PUSH ++was executing that tracing became enabled. ++This implies that the argument list should be processed as early as ++possible since all code preceding the first call to ++.B DBUG_PUSH ++is ++essentially invisible to ++.I dbug ++(this can be worked around by ++inserting a temporary ++.B DBUG_PUSH(argv[1]) ++immediately after the ++.B DBUG_ENTER("main") ++macro. ++ ++.P ++One last note, ++the trace output normally comes out on the standard error. ++Since the factorial program prints its result on the standard ++output, there is the possibility of the output on the terminal ++being scrambled if the two streams are not synchronized. ++Thus the debugger is told to write its output on the standard ++output instead, via the 'o' flag character. ++Note that no 'o' implies the default (standard error), a 'o' ++with no arguments means standard output, and a 'o' ++with an argument means used the named file. ++i.e, "factorial\ -#t:o,logfile\ 3\ 2" would write the trace ++output in "logfile". ++Because of ++.B UNIX ++implementation details, programs usually run ++faster when writing to stdout rather than stderr, though this ++is not a prime consideration in this example. ++ ++.SK ++.B ++USE OF DBUG_PRINT MACRO ++.R ++ ++.P ++The mechanism used to produce "printf" style output is the ++.B DBUG_PRINT ++macro. ++ ++.P ++To allow selection of output from specific macros, the first argument ++to every ++.B DBUG_PRINT ++macro is a ++.I dbug ++keyword. ++When this keyword appears in the argument list of the 'd' flag in ++a debug control string, as in "-#d,keyword1,keyword2,...:t", ++output from the corresponding macro is enabled. ++The default when there is no 'd' flag in the control string is to ++enable output from all ++.B DBUG_PRINT ++macros. ++ ++.P ++Typically, a program will be run once, with no keywords specified, ++to determine what keywords are significant for the current problem ++(the keywords are printed in the macro output line). ++Then the program will be run again, with the desired keywords, ++to examine only specific areas of interest. ++ ++.P ++The second argument to a ++.B DBUG_PRINT ++macro is a standard printf style ++format string and one or more arguments to print, all ++enclosed in parentheses so that they collectively become a single macro ++argument. ++This is how variable numbers of printf arguments are supported. ++Also note that no explicit newline is required at the end of the format string. ++As a matter of style, two or three small ++.B DBUG_PRINT ++macros are preferable ++to a single macro with a huge format string. ++Figure 8 shows the output for default tracing and debug. ++.DS I N ++.SP 2 ++\fC ++.so output3.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 8 ++.ce ++\fCfactorial -#d:t:o 3 ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++The output from the ++.B DBUG_PRINT ++macro is indented to match the trace output ++for the function in which the macro occurs. ++When debugging is enabled, but not trace, the output starts at the left ++margin, without indentation. ++ ++.P ++To demonstrate selection of specific macros for output, figure ++9 shows the result when the factorial program is invoked with ++the debug control string "-#d,result:o". ++.DS I N ++.SP 2 ++\fC ++.so output4.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 9 ++.ce ++\fCfactorial -#d,result:o 4 ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++It is sometimes desirable to restrict debugging and trace actions ++to a specific function or list of functions. ++This is accomplished with the 'f' flag character in the debug ++control string. ++Figure 10 is the output of the factorial program when run with the ++control string "-#d:f,factorial:F:L:o". ++The 'F' flag enables printing of the source file name and the 'L' ++flag enables printing of the source file line number. ++.DS I N ++.SP 2 ++\fC ++.so output5.r ++\fR ++.SP 2 ++.ll -5 ++.ce ++Figure 10 ++.ce ++\fCfactorial -#d:f,factorial:F:L:o 3 ++.ll +5 ++.SP 2 ++.DE ++ ++.P ++The output in figure 10 shows that the "find" macro is in file ++"factorial.c" at source line 8 and the "result" macro is in the same ++file at source line 12. ++ ++.SK ++.B ++SUMMARY OF MACROS ++.R ++ ++.P ++This section summarizes the usage of all currently defined macros ++in the ++.I dbug ++package. ++The macros definitions are found in the user include file ++.B dbug.h ++from the standard include directory. ++ ++.SP 2 ++.BL 20 ++.LI DBUG_ENTER\ ++Used to tell the runtime support module the name of the function being ++entered. The argument must be of type "pointer to character". The ++DBUG_ENTER macro must precede all executable lines in the function ++just entered, and must come after all local declarations. Each ++DBUG_ENTER macro must have a matching DBUG_RETURN or DBUG_VOID_RETURN ++macro at the function exit points. DBUG_ENTER macros used without a ++matching DBUG_RETURN or DBUG_VOID_RETURN macro will cause warning ++messages from the ++.I dbug ++package runtime support module. ++.SP 1 ++EX:\ \fCDBUG_ENTER\ ("main");\fR ++.SP 1 ++.LI DBUG_RETURN\ ++Used at each exit point of a function containing a DBUG_ENTER macro at ++the entry point. The argument is the value to return. Functions ++which return no value (void) should use the DBUG_VOID_RETURN macro. ++It is an error to have a DBUG_RETURN or DBUG_VOID_RETURN macro in a ++function which has no matching DBUG_ENTER macro, and the compiler will ++complain if the macros are actually used (expanded). ++.SP 1 ++EX:\ \fCDBUG_RETURN\ (value);\fR ++.br ++EX:\ \fCDBUG_VOID_RETURN;\fR ++.SP 1 ++.LI DBUG_PROCESS\ ++Used to name the current process being executed. ++A typical argument for this macro is "argv[0]", though ++it will be perfectly happy with any other string. ++Im multi-threaded environment threads may have different names. ++.SP 1 ++EX:\ \fCDBUG_PROCESS\ (argv[0]);\fR ++.SP 1 ++.LI DBUG_PUSH\ ++Sets a new debugger state by pushing the current ++.I dbug ++state onto an internal stack and setting up the new state using the ++debug control string passed as the macro argument. The most common ++usage is to set the state specified by a debug control string ++retrieved from the argument list. If the control string is ++.I incremental, ++the new state is a copy of the old state, modified by the control ++string. ++.SP 1 ++EX:\ \fCDBUG_PUSH\ (\&(argv[i][2]));\fR ++.br ++EX:\ \fCDBUG_PUSH\ ("d:t");\fR ++.br ++EX:\ \fCDBUG_PUSH\ ("");\fR ++.SP 1 ++.LI DBUG_POP\ ++Restores the previous debugger state by popping the state stack. ++Attempting to pop more states than pushed will be ignored and no ++warning will be given. The DBUG_POP macro has no arguments. ++.SP 1 ++EX:\ \fCDBUG_POP\ ();\fR ++.SP 1 ++.LI DBUG_SET\ ++Modifies the current debugger state on top of the stack or pushes ++a new state if the current is set to the initial settings, using ++the debug control string passed as the macro argument. Unless ++.I incremental ++control string is used (see below), it's equivalent to a combination of ++DBUG_POP and DBUG_PUSH. ++.SP 1 ++EX:\ \fCDBUG_SET\ ("d:t");\fR ++.br ++EX:\ \fCDBUG_SET\ ("+d,info");\fR ++.br ++EX:\ \fCDBUG_SET\ ("+t:-d");\fR ++.SP 1 ++.LI DBUG_FILE\ ++The DBUG_FILE macro is used to do explicit I/O on the debug output ++stream. It is used in the same manner as the symbols "stdout" and ++"stderr" in the standard I/O package. ++.SP 1 ++EX:\ \fCfprintf\ (DBUG_FILE,\ "Doing\ my\ own\ I/O!\\n");\fR ++.SP 1 ++.LI DBUG_EXECUTE\ ++The DBUG_EXECUTE macro is used to execute any arbitrary C code. The ++first argument is the debug keyword, used to trigger execution of the ++code specified as the second argument. This macro must be used ++cautiously because, like the DBUG_PRINT macro, it is automatically ++selected by default whenever the 'd' flag has no argument list (i.e., ++a "-#d:t" control string). ++.SP 1 ++EX:\ \fCDBUG_EXECUTE\ ("status",\ print_status\ ());\fR ++.SP 1 ++.LI DBUG_EXECUTE_IF\ ++Works like DBUG_EXECUTE macro, but the code is ++.B not ++executed "by default", if the keyword is not explicitly listed in ++the 'd' flag. Used to conditionally execute "dangerous" actions, e.g ++to crash the program testing how recovery works, or to introduce an ++artificial delay checking for race conditions. ++.SP 1 ++EX:\ \fCDBUG_EXECUTE_IF\ ("crashme",\ DBUG_ABORT()\ ());\fR ++.SP 1 ++.LI DBUG_EVALUATE\ ++The DBUG_EVALUATE macro is similar to DBUG_EXECUTE, but it can be used in ++the expression context. The first argument is the debug keyword that is used to ++choose whether the second (keyword is enabled) or the third (keyword is not ++enabled) argument is evaluated. When ++.I dbug ++is compiled off, the third argument is evaluated. ++.SP 1 ++EX:\fC ++.br ++ printf("Info-debug is %s", ++.br ++ DBUG_EVALUATE\ ("info", "ON", "OFF"));\fR ++.SP 1 ++.LI DBUG_EVALUATE_IF\ ++Works like DBUG_EVALUATE macro, but the second argument is ++.B not ++evaluated, if the keyword is not explicitly listed in ++the 'd' flag. Like DBUG_EXECUTE_IF this could be used to conditionally execute ++"dangerous" actions. ++.SP 1 ++EX:\fC ++.br ++ if (prepare_transaction () || ++.br ++ DBUG_EVALUATE ("crashme", (DBUG_ABORT(), 0), 0) || ++.br ++ commit_transaction () )\fR ++.SP 1 ++.LI DBUG_PRINT\ ++Used to do printing via the "fprintf" library function on the current ++debug stream, DBUG_FILE. The first argument is a debug keyword, the ++second is a format string and the corresponding argument list. Note ++that the format string and argument list are all one macro argument ++and ++.B must ++be enclosed in parentheses. ++.SP 1 ++EX:\ \fCDBUG_PRINT\ ("eof",\ ("end\ of\ file\ found"));\fR ++.br ++EX:\ \fCDBUG_PRINT\ ("type",\ ("type\ is\ %x", type));\fR ++.br ++EX:\ \fCDBUG_PRINT\ ("stp",\ ("%x\ ->\ %s", stp, stp\ ->\ name));\fR ++.SP 1 ++.LI DBUG_DUMP\ ++Used to dump a memory block in hex via the "fprintf" library function ++on the current debug stream, DBUG_FILE. The first argument is a debug ++keyword, the second is a pointer to a memory to dump, the third is a ++number of bytes to dump. ++.SP 1 ++EX: \fCDBUG_DBUG\ ("net",\ packet,\ len);\fR ++.SP 1 ++.LI DBUG_LOCK_FILE\ ++Used in multi-threaded environment to lock DBUG_FILE stream. ++It can be used, for example, in functions that need to write something to a ++debug stream more than in one fprintf() call and want to ensure that no other ++thread will write something in between. ++.SP 1 ++EX:\fC ++.br ++ DBUG_LOCK_FILE; ++.br ++ fprintf (DBUG_FILE, "a=["); ++.br ++ for (int i=0; i < a_length; i++) ++.br ++ fprintf (DBUG_FILE, "0x%03x ", a[i]); ++.br ++ fprintf (DBUG_FILE, "]"); ++.br ++ DBUG_UNLOCK_FILE;\fR ++.SP 1 ++.LI DBUG_UNLOCK_FILE\ ++Unlocks DBUG_FILE stream, that was locked with a DBUG_LOCK_FILE. ++.LI DBUG_ASSERT\ ++This macro just does a regular assert(). The difference is that it will be ++disabled by DBUG_OFF togeher with the ++.I dbug ++library. So there will be no need to disable asserts separately with NDEBUG. ++.SP 1 ++EX:\ \fCDBUG_ASSERT(\ a\ >\ 0\ );\fR ++.SP 1 ++.LI DBUG_ABORT\ ++This macro could be used instead of abort(). It flushes DBUG_FILE stream ++to ensure that no ++.I dbug ++output is lost and then calls abort(). ++.SP 1 ++.LI DBUG_EXPLAIN\ ++Generates control string corresponding to the current debug state. ++The macro takes two arguments - a buffer to store the result string ++into and its length. The macro (which could be used as a function) ++returns 1 if the control string didn't fit into the buffer and was ++truncated and 0 otherwise. ++.SP 1 ++EX:\fC ++.br ++ char buf[256]; ++.br ++ DBUG_EXPLAIN( buf, sizeof(buf) );\fR ++.SP 1 ++.LI DBUG_SET_INITIAL\ ++.LI DBUG_EXPLAIN_INITIAL\ ++.br ++These two macros are identical to DBUG_SET and DBUG_EXPLAIN, but they ++operate on the debug state that any new thread starts from. ++Modifying ++.I initial ++value does not affect threads that are already running. Obviously, ++these macros are only useful in the multi-threaded environment. ++.LE ++ ++.SK ++.B ++DEBUG CONTROL STRING ++.R ++ ++.P ++The debug control string is used to set the state of the debugger ++via the ++.B DBUG_PUSH ++or ++.B DBUG_SET ++macros. Control string consists of colon separated flags. Colons ++that are part of ':\\', ':/', or '::' are not considered flag ++separators. A flag may take an argument or a list of arguments. ++If a control string starts from a '+' sign it works ++.I incrementally, ++that is, it can modify existing state without overriding it. Every ++flag may be preceded by a '+' or '-' to enable or disable a ++corresponding option in the debugger state or to add or remove ++arguments to the list. This section summarizes the currently available ++debugger options and the flag characters which enable or disable them. ++Argument lists enclosed in '[' and ']' are optional. ++.SP 2 ++.BL 22 ++.LI a[,file] ++Redirect the debugger output stream and append it to the specified ++file. The default output stream is stderr. A null argument list ++causes output to be redirected to stdout. ++.SP 1 ++EX: \fCa,C:\\tmp\\log\fR ++.LI A[,file] ++Like 'a[,file]' but ensure that data are written after each write ++(this typically implies flush or close/reopen). It helps to get ++a complete log file in case of crashes. This mode is implicit in ++multi-threaded environment. ++.LI d[,keywords] ++Enable output from macros with specified keywords. ++Every keyword can be a ++.I glob(7) ++pattern. ++An empty list of keywords implies that all keywords are selected. ++.LI D[,time] ++Delay for specified time after each output line, to let output drain. ++Time is given in tenths of a second (value of 10 is one second). ++Default is zero. ++.LI f[,functions] ++Limit debugger actions to the specified list of functions. ++Every function can be a ++.I glob(7) ++pattern. ++An empty list of functions implies that all functions are selected. ++Every function in the list may optionally be followed by a '/' - ++this will implicitly select all the functions down the call stack. ++.SP 1 ++EX: \fCf,func1,func2/:-f,func3,func4/\fR ++.SP 1 ++This would enable debugger in functions 'func1()', 'func2()' and all ++functions called from it (directly or indirectly). But not in ++functions 'func3()' or 'func4()' and all functions called from ++it. ++.LI F ++Mark each debugger output line with the name of the source file ++containing the macro causing the output. ++.LI i ++Mark each debugger output line with the PID (or thread ID) of the ++current process. ++.LI L ++Mark each debugger output line with the source file line number of ++the macro causing the output. ++.LI n ++Mark each debugger output line with the current function nesting depth. ++.LI N ++Sequentially number each debugger output line starting at 1. ++This is useful for reference purposes when debugger output is ++interspersed with program output. ++.LI o[,file] ++Like 'a[,file]' but overwrite old file, do not append. ++.LI O[,file] ++Like 'A[,file]' but overwrite old file, do not append. ++.LI p[,processes] ++Limit debugger actions to the specified processes. ++Every name can be a ++.I glob(7) ++pattern. ++An empty list ++implies all processes. This is useful for processes which run child ++processes. Note that each debugger output line can be marked with the ++name of the current process via the 'P' flag. The process name must ++match the argument passed to the ++.B DBUG_PROCESS ++macro. ++.LI P ++Mark each debugger output line with the name of the current process. ++Most useful when used with a process which runs child processes that ++are also being debugged. Note that the parent process must arrange ++for the debugger control string to be passed to the child processes. ++.LI r ++Used in conjunction with the ++.B DBUG_PUSH ++macro to reset the current ++indentation level back to zero. ++Most useful with ++.B DBUG_PUSH ++macros used to temporarily alter the ++debugger state. ++.LI S ++When compiled with ++.I safemalloc ++this flag invokes "sanity" memory checks (for overwrites/underwrites) ++on each ++.B DBUG_ENTER ++and ++.B DBUG_RETURN. ++.LI t[,N] ++Enable function control flow tracing. ++The maximum nesting depth is specified by N, and defaults to ++200. ++.LI T ++Mark each debugger output line with the current timestamp. ++The value is printed with microsecond resolution, as returned by ++.I gettimeofday() ++system call. The actual resolution is OS- and hardware-dependent. ++.LE ++ ++.SK ++.B ++MULTI-THREADED DEBUGGING ++.R ++ ++.P ++When ++.I dbug ++is used in a multi-threaded environment there are few differences from a single-threaded ++case to keep in mind. This section tries to summarize them. ++.SP 2 ++.BL 5 ++.LI ++Every thread has its own stack of debugger states. ++.B DBUG_PUSH ++and ++.B DBUG_POP ++affect only the thread that executed them. ++.LI ++At the bottom of the stack for all threads there is the common ++.I initial ++state. Changes to this state (for example, with ++.B DBUG_SET_INITIAL ++macro) affect all new threads and all running threads that didn't ++.B DBUG_PUSH ++yet. ++.LI ++Every thread can have its own name, that can be set with ++.B DBUG_PROCESS ++macro. Thus, "-#p,name1,name2" can be used to limit the output to specific threads. ++.LI ++When printing directly to ++.B DBUG_FILE ++it may be necessary to prevent other threads from writing something between two parts ++of logically indivisible output. It is done with ++.B DBUG_LOCK_FILE ++and ++.B DBUG_UNLOCK_FILE ++macors. See the appropriate section for examples. ++.LI ++"-#o,file" and "-#O,file" are treated as "-#a,file" and "-#A,file" respectively. That is ++all writes to a file are always followed by a flush. ++.LI ++"-#i" prints not a PID but a thread id in the form of "T@nnn" ++.LE ++ ++.SK ++.B ++ ++HINTS AND MISCELLANEOUS ++.R ++ ++.P ++One of the most useful capabilities of the ++.I dbug ++package is to compare the executions of a given program in two ++different environments. ++This is typically done by executing the program in the environment ++where it behaves properly and saving the debugger output in a ++reference file. ++The program is then run with identical inputs in the environment where ++it misbehaves and the output is again captured in a reference file. ++The two reference files can then be differentially compared to ++determine exactly where execution of the two processes diverges. ++ ++.P ++A related usage is regression testing where the execution of a current ++version is compared against executions of previous versions. ++This is most useful when there are only minor changes. ++ ++.P ++It is not difficult to modify an existing compiler to implement ++some of the functionality of the ++.I dbug ++package automatically, without source code changes to the ++program being debugged. ++In fact, such changes were implemented in a version of the ++Portable C Compiler by the author in less than a day. ++However, it is strongly encouraged that all newly ++developed code continue to use the debugger macros ++for the portability reasons noted earlier. ++The modified compiler should be used only for testing existing ++programs. ++ ++.SK ++.B ++CAVEATS ++.R ++ ++.P ++The ++.I dbug ++package works best with programs which have "line\ oriented" ++output, such as text processors, general purpose utilities, etc. ++It can be interfaced with screen oriented programs such as ++visual editors by redefining the appropriate macros to call ++special functions for displaying the debugger results. ++Of course, this caveat is not applicable if the debugger output ++is simply dumped into a file for post-execution examination. ++ ++.P ++Programs which use memory allocation functions other than ++.B malloc ++will usually have problems using the standard ++.I dbug ++package. ++The most common problem is multiply allocated memory. ++.SP 2 ++.\" .DE nroff dident like this. davida 900108 ++.CS ++ ++.\" vim:filetype=nroff +diff --git a/sql/sql_yacc.cc b/sql/sql_yacc.cc +new file mode 100644 +index 0000000..9234796 +--- /dev/null ++++ b/sql/sql_yacc.cc +@@ -0,0 +1,37809 @@ ++/* A Bison parser, made by GNU Bison 3.0.2. */ ++ ++/* Bison implementation for Yacc-like parsers in C ++ ++ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see <http://www.gnu.org/licenses/>. */ ++ ++/* As a special exception, you may create a larger work that contains ++ part or all of the Bison parser skeleton and distribute that work ++ under terms of your choice, so long as that work isn't itself a ++ parser generator using the skeleton or a modified version thereof ++ as a parser skeleton. Alternatively, if you modify or redistribute ++ the parser skeleton itself, you may (at your option) remove this ++ special exception, which will cause the skeleton and the resulting ++ Bison output files to be licensed under the GNU General Public ++ License without this special exception. ++ ++ This special exception was added by the Free Software Foundation in ++ version 2.2 of Bison. */ ++ ++/* C LALR(1) parser skeleton written by Richard Stallman, by ++ simplifying the original so-called "semantic" parser. */ ++ ++/* All symbols defined below should begin with yy or YY, to avoid ++ infringing on user name space. This should be done even for local ++ variables, as they might otherwise be expanded by user macros. ++ There are some unavoidable exceptions within include files to ++ define necessary library symbols; they are noted "INFRINGES ON ++ USER NAME SPACE" below. */ ++ ++/* Identify Bison output. */ ++#define YYBISON 1 ++ ++/* Bison version. */ ++#define YYBISON_VERSION "3.0.2" ++ ++/* Skeleton name. */ ++#define YYSKELETON_NAME "yacc.c" ++ ++/* Pure parsers. */ ++#define YYPURE 1 ++ ++/* Push parsers. */ ++#define YYPUSH 0 ++ ++/* Pull parsers. */ ++#define YYPULL 1 ++ ++ ++/* Substitute the variable and function names. */ ++#define yyparse MYSQLparse ++#define yylex MYSQLlex ++#define yyerror MYSQLerror ++#define yydebug MYSQLdebug ++#define yynerrs MYSQLnerrs ++ ++ ++/* Copy the first part of user declarations. */ ++#line 25 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:339 */ ++ ++#define YYLIP (& thd->m_parser_state->m_lip) ++#define YYPS (& thd->m_parser_state->m_yacc) ++ ++#define MYSQL_YACC ++#define YYINITDEPTH 100 ++#define YYMAXDEPTH 3200 /* Because of 64K stack */ ++#define Lex (thd->lex) ++ ++#define Select Lex->current_select ++#include "sql_priv.h" ++#include "unireg.h" // REQUIRED: for other includes ++#include "sql_parse.h" /* comp_*_creator */ ++#include "sql_table.h" /* primary_key_name */ ++#include "sql_partition.h" /* mem_alloc_error, partition_info, HASH_PARTITION */ ++#include "sql_acl.h" /* *_ACL */ ++#include "password.h" /* my_make_scrambled_password_323, my_make_scrambled_password */ ++#include "sql_class.h" /* Key_part_spec, enum_filetype, Diag_condition_item_name */ ++#include "slave.h" ++#include "lex_symbol.h" ++#include "item_create.h" ++#include "sp_head.h" ++#include "sp_pcontext.h" ++#include "sp_rcontext.h" ++#include "sp.h" ++#include "sql_alter.h" // Alter_table*_statement ++#include "sql_truncate.h" // Truncate_statement ++#include "sql_admin.h" // Analyze/Check..._table_stmt ++#include "sql_partition_admin.h" // Alter_table_*_partition_stmt ++#include "sql_signal.h" ++#include "event_parse_data.h" ++#include "create_options.h" ++#include <myisam.h> ++#include <myisammrg.h> ++#include "keycaches.h" ++#include "set_var.h" ++ ++/* this is to get the bison compilation windows warnings out */ ++#ifdef _MSC_VER ++/* warning C4065: switch statement contains 'default' but no 'case' labels */ ++#pragma warning (disable : 4065) ++#endif ++ ++int yylex(void *yylval, void *yythd); ++ ++#define yyoverflow(A,B,C,D,E,F) \ ++ { \ ++ ulong val= *(F); \ ++ if (my_yyoverflow((B), (D), &val)) \ ++ { \ ++ yyerror(thd, (char*) (A)); \ ++ return 2; \ ++ } \ ++ else \ ++ { \ ++ *(F)= (YYSIZE_T)val; \ ++ } \ ++ } ++ ++#define MYSQL_YYABORT \ ++ do \ ++ { \ ++ LEX::cleanup_lex_after_parse_error(thd); \ ++ YYABORT; \ ++ } while (0) ++ ++#define MYSQL_YYABORT_UNLESS(A) \ ++ if (!(A)) \ ++ { \ ++ my_parse_error(ER(ER_SYNTAX_ERROR));\ ++ MYSQL_YYABORT; \ ++ } ++ ++/* ++ Work around for broken code generated by bison 1.875. ++ ++ The code generated by bison 1.875a and later, bison 2.1 and bison 2.2 is ok. ++ With bison 1.875 however, the generated code contains: ++<pre> ++ yyerrlab1: ++ #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) ++ __attribute__ ((__unused__)) ++ #endif ++</pre> ++ This usage of __attribute__ is illegal, so we remove it. ++ See the following references for details: ++ http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00014.html ++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14273 ++*/ ++ ++#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) ++#undef __attribute__ ++#define __attribute__(X) ++#endif ++ ++ ++#ifndef DBUG_OFF ++#define YYDEBUG 1 ++#else ++#define YYDEBUG 0 ++#endif ++ ++/** ++ @brief Push an error message into MySQL error stack with line ++ and position information. ++ ++ This function provides semantic action implementers with a way ++ to push the famous "You have a syntax error near..." error ++ message into the error stack, which is normally produced only if ++ a parse error is discovered internally by the Bison generated ++ parser. ++*/ ++ ++void my_parse_error(const char *s) ++{ ++ THD *thd= current_thd; ++ Lex_input_stream *lip= & thd->m_parser_state->m_lip; ++ ++ const char *yytext= lip->get_tok_start(); ++ if (!yytext) ++ yytext= ""; ++ ++ /* Push an error into the error stack */ ++ ErrConvString err(yytext, strlen(yytext), thd->variables.character_set_client); ++ my_printf_error(ER_PARSE_ERROR, ER(ER_PARSE_ERROR), MYF(0), s, ++ err.ptr(), lip->yylineno); ++} ++ ++/** ++ @brief Bison callback to report a syntax/OOM error ++ ++ This function is invoked by the bison-generated parser ++ when a syntax error, a parse error or an out-of-memory ++ condition occurs. This function is not invoked when the ++ parser is requested to abort by semantic action code ++ by means of YYABORT or YYACCEPT macros. This is why these ++ macros should not be used (use MYSQL_YYABORT/MYSQL_YYACCEPT ++ instead). ++ ++ The parser will abort immediately after invoking this callback. ++ ++ This function is not for use in semantic actions and is internal to ++ the parser, as it performs some pre-return cleanup. ++ In semantic actions, please use my_parse_error or my_error to ++ push an error into the error stack and MYSQL_YYABORT ++ to abort from the parser. ++*/ ++ ++void MYSQLerror(THD *thd, const char *s) ++{ ++ /* ++ Restore the original LEX if it was replaced when parsing ++ a stored procedure. We must ensure that a parsing error ++ does not leave any side effects in the THD. ++ */ ++ LEX::cleanup_lex_after_parse_error(thd); ++ ++ /* "parse error" changed into "syntax error" between bison 1.75 and 1.875 */ ++ if (strcmp(s,"parse error") == 0 || strcmp(s,"syntax error") == 0) ++ s= ER(ER_SYNTAX_ERROR); ++ my_parse_error(s); ++} ++ ++ ++#ifndef DBUG_OFF ++void turn_parser_debug_on() ++{ ++ /* ++ MYSQLdebug is in sql/sql_yacc.cc, in bison generated code. ++ Turning this option on is **VERY** verbose, and should be ++ used when investigating a syntax error problem only. ++ ++ The syntax to run with bison traces is as follows : ++ - Starting a server manually : ++ mysqld --debug-dbug="d,parser_debug" ... ++ - Running a test : ++ mysql-test-run.pl --mysqld="--debug-dbug=d,parser_debug" ... ++ ++ The result will be in the process stderr (var/log/master.err) ++ */ ++ ++ extern int yydebug; ++ yydebug= 1; ++} ++#endif ++ ++static bool is_native_function(THD *thd, const LEX_STRING *name) ++{ ++ if (find_native_function_builder(thd, *name)) ++ return true; ++ ++ if (is_lex_native_function(name)) ++ return true; ++ ++ return false; ++} ++ ++ ++/** ++ Helper action for a case statement (entering the CASE). ++ This helper is used for both 'simple' and 'searched' cases. ++ This helper, with the other case_stmt_action_..., is executed when ++ the following SQL code is parsed: ++<pre> ++CREATE PROCEDURE proc_19194_simple(i int) ++BEGIN ++ DECLARE str CHAR(10); ++ ++ CASE i ++ WHEN 1 THEN SET str="1"; ++ WHEN 2 THEN SET str="2"; ++ WHEN 3 THEN SET str="3"; ++ ELSE SET str="unknown"; ++ END CASE; ++ ++ SELECT str; ++END ++</pre> ++ The actions are used to generate the following code: ++<pre> ++SHOW PROCEDURE CODE proc_19194_simple; ++Pos Instruction ++0 set str@1 NULL ++1 set_case_expr (12) 0 i@0 ++2 jump_if_not 5(12) (case_expr@0 = 1) ++3 set str@1 _latin1'1' ++4 jump 12 ++5 jump_if_not 8(12) (case_expr@0 = 2) ++6 set str@1 _latin1'2' ++7 jump 12 ++8 jump_if_not 11(12) (case_expr@0 = 3) ++9 set str@1 _latin1'3' ++10 jump 12 ++11 set str@1 _latin1'unknown' ++12 stmt 0 "SELECT str" ++</pre> ++ ++ @param lex the parser lex context ++*/ ++ ++void case_stmt_action_case(LEX *lex) ++{ ++ lex->sphead->new_cont_backpatch(NULL); ++ ++ /* ++ BACKPATCH: Creating target label for the jump to ++ "case_stmt_action_end_case" ++ (Instruction 12 in the example) ++ */ ++ ++ lex->spcont->push_label((char *)"", lex->sphead->instructions()); ++} ++ ++/** ++ Helper action for a case expression statement (the expr in 'CASE expr'). ++ This helper is used for 'searched' cases only. ++ @param lex the parser lex context ++ @param expr the parsed expression ++ @return 0 on success ++*/ ++ ++int case_stmt_action_expr(LEX *lex, Item* expr) ++{ ++ sp_head *sp= lex->sphead; ++ sp_pcontext *parsing_ctx= lex->spcont; ++ int case_expr_id= parsing_ctx->register_case_expr(); ++ sp_instr_set_case_expr *i; ++ ++ if (parsing_ctx->push_case_expr_id(case_expr_id)) ++ return 1; ++ ++ i= new sp_instr_set_case_expr(sp->instructions(), ++ parsing_ctx, case_expr_id, expr, lex); ++ ++ sp->add_cont_backpatch(i); ++ return sp->add_instr(i); ++} ++ ++/** ++ Helper action for a case when condition. ++ This helper is used for both 'simple' and 'searched' cases. ++ @param lex the parser lex context ++ @param when the parsed expression for the WHEN clause ++ @param simple true for simple cases, false for searched cases ++*/ ++ ++int case_stmt_action_when(LEX *lex, Item *when, bool simple) ++{ ++ sp_head *sp= lex->sphead; ++ sp_pcontext *ctx= lex->spcont; ++ uint ip= sp->instructions(); ++ sp_instr_jump_if_not *i; ++ Item_case_expr *var; ++ Item *expr; ++ ++ if (simple) ++ { ++ var= new Item_case_expr(ctx->get_current_case_expr_id()); ++ ++#ifndef DBUG_OFF ++ if (var) ++ { ++ var->m_sp= sp; ++ } ++#endif ++ ++ expr= new Item_func_eq(var, when); ++ i= new sp_instr_jump_if_not(ip, ctx, expr, lex); ++ } ++ else ++ i= new sp_instr_jump_if_not(ip, ctx, when, lex); ++ ++ /* ++ BACKPATCH: Registering forward jump from ++ "case_stmt_action_when" to "case_stmt_action_then" ++ (jump_if_not from instruction 2 to 5, 5 to 8 ... in the example) ++ */ ++ ++ return !test(i) || ++ sp->push_backpatch(i, ctx->push_label((char *)"", 0)) || ++ sp->add_cont_backpatch(i) || ++ sp->add_instr(i); ++} ++ ++/** ++ Helper action for a case then statements. ++ This helper is used for both 'simple' and 'searched' cases. ++ @param lex the parser lex context ++*/ ++ ++int case_stmt_action_then(LEX *lex) ++{ ++ sp_head *sp= lex->sphead; ++ sp_pcontext *ctx= lex->spcont; ++ uint ip= sp->instructions(); ++ sp_instr_jump *i = new sp_instr_jump(ip, ctx); ++ if (!test(i) || sp->add_instr(i)) ++ return 1; ++ ++ /* ++ BACKPATCH: Resolving forward jump from ++ "case_stmt_action_when" to "case_stmt_action_then" ++ (jump_if_not from instruction 2 to 5, 5 to 8 ... in the example) ++ */ ++ ++ sp->backpatch(ctx->pop_label()); ++ ++ /* ++ BACKPATCH: Registering forward jump from ++ "case_stmt_action_then" to "case_stmt_action_end_case" ++ (jump from instruction 4 to 12, 7 to 12 ... in the example) ++ */ ++ ++ return sp->push_backpatch(i, ctx->last_label()); ++} ++ ++/** ++ Helper action for an end case. ++ This helper is used for both 'simple' and 'searched' cases. ++ @param lex the parser lex context ++ @param simple true for simple cases, false for searched cases ++*/ ++ ++void case_stmt_action_end_case(LEX *lex, bool simple) ++{ ++ /* ++ BACKPATCH: Resolving forward jump from ++ "case_stmt_action_then" to "case_stmt_action_end_case" ++ (jump from instruction 4 to 12, 7 to 12 ... in the example) ++ */ ++ lex->sphead->backpatch(lex->spcont->pop_label()); ++ ++ if (simple) ++ lex->spcont->pop_case_expr_id(); ++ ++ lex->sphead->do_cont_backpatch(); ++} ++ ++ ++static bool ++find_sys_var_null_base(THD *thd, struct sys_var_with_base *tmp) ++{ ++ tmp->var= find_sys_var(thd, tmp->base_name.str, tmp->base_name.length); ++ ++ if (tmp->var == NULL) ++ my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), tmp->base_name.str); ++ else ++ tmp->base_name= null_lex_str; ++ ++ return thd->is_error(); ++} ++ ++ ++/** ++ Helper action for a SET statement. ++ Used to push a system variable into the assignment list. ++ ++ @param thd the current thread ++ @param tmp the system variable with base name ++ @param var_type the scope of the variable ++ @param val the value being assigned to the variable ++ ++ @return TRUE if error, FALSE otherwise. ++*/ ++ ++static bool ++set_system_variable(THD *thd, struct sys_var_with_base *tmp, ++ enum enum_var_type var_type, Item *val) ++{ ++ set_var *var; ++ LEX *lex= thd->lex; ++ ++ /* No AUTOCOMMIT from a stored function or trigger. */ ++ if (lex->spcont && tmp->var == Sys_autocommit_ptr) ++ lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; ++ ++ if (val && val->type() == Item::FIELD_ITEM && ++ ((Item_field*)val)->table_name) ++ { ++ my_error(ER_WRONG_TYPE_FOR_VAR, MYF(0), tmp->var->name.str); ++ return TRUE; ++ } ++ ++ if (! (var= new set_var(var_type, tmp->var, &tmp->base_name, val))) ++ return TRUE; ++ ++ return lex->var_list.push_back(var); ++} ++ ++ ++/** ++ Helper action for a SET statement. ++ Used to push a SP local variable into the assignment list. ++ ++ @param thd the current thread ++ @param var_type the SP local variable ++ @param val the value being assigned to the variable ++ ++ @return TRUE if error, FALSE otherwise. ++*/ ++ ++static bool ++set_local_variable(THD *thd, sp_variable_t *spv, Item *val) ++{ ++ Item *it; ++ LEX *lex= thd->lex; ++ sp_instr_set *sp_set; ++ ++ if (val) ++ it= val; ++ else if (spv->dflt) ++ it= spv->dflt; ++ else ++ { ++ it= new (thd->mem_root) Item_null(); ++ if (it == NULL) ++ return TRUE; ++ } ++ ++ sp_set= new sp_instr_set(lex->sphead->instructions(), lex->spcont, ++ spv->offset, it, spv->type, lex, TRUE); ++ ++ return (sp_set == NULL || lex->sphead->add_instr(sp_set)); ++} ++ ++ ++/** ++ Helper action for a SET statement. ++ Used to SET a field of NEW row. ++ ++ @param thd the current thread ++ @param name the field name ++ @param val the value being assigned to the row ++ ++ @return TRUE if error, FALSE otherwise. ++*/ ++ ++static bool ++set_trigger_new_row(THD *thd, LEX_STRING *name, Item *val) ++{ ++ LEX *lex= thd->lex; ++ Item_trigger_field *trg_fld; ++ sp_instr_set_trigger_field *sp_fld; ++ ++ /* QQ: Shouldn't this be field's default value ? */ ++ if (! val) ++ val= new Item_null(); ++ ++ DBUG_ASSERT(lex->trg_chistics.action_time == TRG_ACTION_BEFORE && ++ (lex->trg_chistics.event == TRG_EVENT_INSERT || ++ lex->trg_chistics.event == TRG_EVENT_UPDATE)); ++ ++ trg_fld= new (thd->mem_root) ++ Item_trigger_field(lex->current_context(), ++ Item_trigger_field::NEW_ROW, ++ name->str, UPDATE_ACL, FALSE); ++ ++ if (trg_fld == NULL) ++ return TRUE; ++ ++ sp_fld= new sp_instr_set_trigger_field(lex->sphead->instructions(), ++ lex->spcont, trg_fld, val, lex); ++ ++ if (sp_fld == NULL) ++ return TRUE; ++ ++ /* ++ Let us add this item to list of all Item_trigger_field ++ objects in trigger. ++ */ ++ lex->trg_table_fields.link_in_list(trg_fld, &trg_fld->next_trg_field); ++ ++ return lex->sphead->add_instr(sp_fld); ++} ++ ++ ++/** ++ Helper to resolve the SQL:2003 Syntax exception 1) in <in predicate>. ++ See SQL:2003, Part 2, section 8.4 <in predicate>, Note 184, page 383. ++ This function returns the proper item for the SQL expression ++ <code>left [NOT] IN ( expr )</code> ++ @param thd the current thread ++ @param left the in predicand ++ @param equal true for IN predicates, false for NOT IN predicates ++ @param expr first and only expression of the in value list ++ @return an expression representing the IN predicate. ++*/ ++Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal, ++ Item *expr) ++{ ++ /* ++ Relevant references for this issue: ++ - SQL:2003, Part 2, section 8.4 <in predicate>, page 383, ++ - SQL:2003, Part 2, section 7.2 <row value expression>, page 296, ++ - SQL:2003, Part 2, section 6.3 <value expression primary>, page 174, ++ - SQL:2003, Part 2, section 7.15 <subquery>, page 370, ++ - SQL:2003 Feature F561, "Full value expressions". ++ ++ The exception in SQL:2003 Note 184 means: ++ Item_singlerow_subselect, which corresponds to a <scalar subquery>, ++ should be re-interpreted as an Item_in_subselect, which corresponds ++ to a <table subquery> when used inside an <in predicate>. ++ ++ Our reading of Note 184 is reccursive, so that all: ++ - IN (( <subquery> )) ++ - IN ((( <subquery> ))) ++ - IN '('^N <subquery> ')'^N ++ - etc ++ should be interpreted as a <table subquery>, no matter how deep in the ++ expression the <subquery> is. ++ */ ++ ++ Item *result; ++ ++ DBUG_ENTER("handle_sql2003_note184_exception"); ++ ++ if (expr->type() == Item::SUBSELECT_ITEM) ++ { ++ Item_subselect *expr2 = (Item_subselect*) expr; ++ ++ if (expr2->substype() == Item_subselect::SINGLEROW_SUBS) ++ { ++ Item_singlerow_subselect *expr3 = (Item_singlerow_subselect*) expr2; ++ st_select_lex *subselect; ++ ++ /* ++ Implement the mandated change, by altering the semantic tree: ++ left IN Item_singlerow_subselect(subselect) ++ is modified to ++ left IN (subselect) ++ which is represented as ++ Item_in_subselect(left, subselect) ++ */ ++ subselect= expr3->invalidate_and_restore_select_lex(); ++ result= new (thd->mem_root) Item_in_subselect(left, subselect); ++ ++ if (! equal) ++ result = negate_expression(thd, result); ++ ++ DBUG_RETURN(result); ++ } ++ } ++ ++ if (equal) ++ result= new (thd->mem_root) Item_func_eq(left, expr); ++ else ++ result= new (thd->mem_root) Item_func_ne(left, expr); ++ ++ DBUG_RETURN(result); ++} ++ ++/** ++ @brief Creates a new SELECT_LEX for a UNION branch. ++ ++ Sets up and initializes a SELECT_LEX structure for a query once the parser ++ discovers a UNION token. The current SELECT_LEX is pushed on the stack and ++ the new SELECT_LEX becomes the current one. ++ ++ @param lex The parser state. ++ ++ @param is_union_distinct True if the union preceding the new select statement ++ uses UNION DISTINCT. ++ ++ @param is_top_level This should be @c TRUE if the newly created SELECT_LEX ++ is a non-nested statement. ++ ++ @return <code>false</code> if successful, <code>true</code> if an error was ++ reported. In the latter case parsing should stop. ++ */ ++bool add_select_to_union_list(LEX *lex, bool is_union_distinct, ++ bool is_top_level) ++{ ++ /* ++ Only the last SELECT can have INTO. Since the grammar won't allow INTO in ++ a nested SELECT, we make this check only when creating a top-level SELECT. ++ */ ++ if (is_top_level && lex->result) ++ { ++ my_error(ER_WRONG_USAGE, MYF(0), "UNION", "INTO"); ++ return TRUE; ++ } ++ if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE) ++ { ++ my_parse_error(ER(ER_SYNTAX_ERROR)); ++ return TRUE; ++ } ++ /* This counter shouldn't be incremented for UNION parts */ ++ lex->nest_level--; ++ if (mysql_new_select(lex, 0)) ++ return TRUE; ++ mysql_init_select(lex); ++ lex->current_select->linkage=UNION_TYPE; ++ if (is_union_distinct) /* UNION DISTINCT - remember position */ ++ lex->current_select->master_unit()->union_distinct= ++ lex->current_select; ++ return FALSE; ++} ++ ++/** ++ @brief Initializes a SELECT_LEX for a query within parentheses (aka ++ braces). ++ ++ @return false if successful, true if an error was reported. In the latter ++ case parsing should stop. ++ */ ++bool setup_select_in_parentheses(LEX *lex) ++{ ++ SELECT_LEX * sel= lex->current_select; ++ if (sel->set_braces(1)) ++ { ++ my_parse_error(ER(ER_SYNTAX_ERROR)); ++ return TRUE; ++ } ++ if (sel->linkage == UNION_TYPE && ++ !sel->master_unit()->first_select()->braces && ++ sel->master_unit()->first_select()->linkage == ++ UNION_TYPE) ++ { ++ my_parse_error(ER(ER_SYNTAX_ERROR)); ++ return TRUE; ++ } ++ if (sel->linkage == UNION_TYPE && ++ sel->olap != UNSPECIFIED_OLAP_TYPE && ++ sel->master_unit()->fake_select_lex) ++ { ++ my_error(ER_WRONG_USAGE, MYF(0), "CUBE/ROLLUP", "ORDER BY"); ++ return TRUE; ++ } ++ /* select in braces, can't contain global parameters */ ++ if (sel->master_unit()->fake_select_lex) ++ sel->master_unit()->global_parameters= ++ sel->master_unit()->fake_select_lex; ++ return FALSE; ++} ++ ++static bool add_create_index_prepare (LEX *lex, Table_ident *table) ++{ ++ lex->sql_command= SQLCOM_CREATE_INDEX; ++ if (!lex->current_select->add_table_to_list(lex->thd, table, NULL, ++ TL_OPTION_UPDATING, ++ TL_READ_NO_INSERT, ++ MDL_SHARED_NO_WRITE)) ++ return TRUE; ++ lex->alter_info.reset(); ++ lex->alter_info.flags= ALTER_ADD_INDEX; ++ lex->col_list.empty(); ++ lex->change= NullS; ++ lex->option_list= NULL; ++ return FALSE; ++} ++ ++static bool add_create_index (LEX *lex, Key::Keytype type, ++ const LEX_STRING &name, ++ KEY_CREATE_INFO *info= NULL, bool generated= 0) ++{ ++ Key *key; ++ key= new Key(type, name, info ? info : &lex->key_create_info, generated, ++ lex->col_list, lex->option_list); ++ if (key == NULL) ++ return TRUE; ++ ++ lex->alter_info.key_list.push_back(key); ++ lex->col_list.empty(); ++ return FALSE; ++} ++ ++ ++#line 780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:339 */ ++ ++# ifndef YY_NULLPTR ++# if defined __cplusplus && 201103L <= __cplusplus ++# define YY_NULLPTR nullptr ++# else ++# define YY_NULLPTR 0 ++# endif ++# endif ++ ++/* Enabling verbose error messages. */ ++#ifdef YYERROR_VERBOSE ++# undef YYERROR_VERBOSE ++# define YYERROR_VERBOSE 1 ++#else ++# define YYERROR_VERBOSE 0 ++#endif ++ ++/* In a future release of Bison, this section will be replaced ++ by #include "sql_yacc.h". */ ++#ifndef YY_MYSQL_HOME_BUILDBOT_GIT_MKDIST_SQL_SQL_YACC_H_INCLUDED ++# define YY_MYSQL_HOME_BUILDBOT_GIT_MKDIST_SQL_SQL_YACC_H_INCLUDED ++/* Debug traces. */ ++#ifndef YYDEBUG ++# define YYDEBUG 0 ++#endif ++#if YYDEBUG ++extern int MYSQLdebug; ++#endif ++ ++/* Token type. */ ++#ifndef YYTOKENTYPE ++# define YYTOKENTYPE ++ enum yytokentype ++ { ++ ABORT_SYM = 258, ++ ACCESSIBLE_SYM = 259, ++ ACTION = 260, ++ ADD = 261, ++ ADDDATE_SYM = 262, ++ AFTER_SYM = 263, ++ AGAINST = 264, ++ AGGREGATE_SYM = 265, ++ ALGORITHM_SYM = 266, ++ ALL = 267, ++ ALTER = 268, ++ ALWAYS_SYM = 269, ++ ANALYZE_SYM = 270, ++ AND_AND_SYM = 271, ++ AND_SYM = 272, ++ ANY_SYM = 273, ++ AS = 274, ++ ASC = 275, ++ ASCII_SYM = 276, ++ ASENSITIVE_SYM = 277, ++ AT_SYM = 278, ++ AUTHORS_SYM = 279, ++ AUTOEXTEND_SIZE_SYM = 280, ++ AUTO_INC = 281, ++ AVG_ROW_LENGTH = 282, ++ AVG_SYM = 283, ++ BACKUP_SYM = 284, ++ BEFORE_SYM = 285, ++ BEGIN_SYM = 286, ++ BETWEEN_SYM = 287, ++ BIGINT = 288, ++ BINARY = 289, ++ BINLOG_SYM = 290, ++ BIN_NUM = 291, ++ BIT_AND = 292, ++ BIT_OR = 293, ++ BIT_SYM = 294, ++ BIT_XOR = 295, ++ BLOB_SYM = 296, ++ BLOCK_SYM = 297, ++ BOOLEAN_SYM = 298, ++ BOOL_SYM = 299, ++ BOTH = 300, ++ BTREE_SYM = 301, ++ BY = 302, ++ BYTE_SYM = 303, ++ CACHE_SYM = 304, ++ CALL_SYM = 305, ++ CASCADE = 306, ++ CASCADED = 307, ++ CASE_SYM = 308, ++ CAST_SYM = 309, ++ CATALOG_NAME_SYM = 310, ++ CHAIN_SYM = 311, ++ CHANGE = 312, ++ CHANGED = 313, ++ CHARSET = 314, ++ CHAR_SYM = 315, ++ CHECKPOINT_SYM = 316, ++ CHECKSUM_SYM = 317, ++ CHECK_SYM = 318, ++ CIPHER_SYM = 319, ++ CLASS_ORIGIN_SYM = 320, ++ CLIENT_SYM = 321, ++ CLIENT_STATS_SYM = 322, ++ CLOSE_SYM = 323, ++ COALESCE = 324, ++ CODE_SYM = 325, ++ COLLATE_SYM = 326, ++ COLLATION_SYM = 327, ++ COLUMNS = 328, ++ COLUMN_ADD_SYM = 329, ++ COLUMN_CREATE_SYM = 330, ++ COLUMN_DELETE_SYM = 331, ++ COLUMN_EXISTS_SYM = 332, ++ COLUMN_GET_SYM = 333, ++ COLUMN_LIST_SYM = 334, ++ COLUMN_SYM = 335, ++ COLUMN_NAME_SYM = 336, ++ COMMENT_SYM = 337, ++ COMMITTED_SYM = 338, ++ COMMIT_SYM = 339, ++ COMPACT_SYM = 340, ++ COMPLETION_SYM = 341, ++ COMPRESSED_SYM = 342, ++ CONCURRENT = 343, ++ CONDITION_SYM = 344, ++ CONNECTION_SYM = 345, ++ CONSISTENT_SYM = 346, ++ CONSTRAINT = 347, ++ CONSTRAINT_CATALOG_SYM = 348, ++ CONSTRAINT_NAME_SYM = 349, ++ CONSTRAINT_SCHEMA_SYM = 350, ++ CONTAINS_SYM = 351, ++ CONTEXT_SYM = 352, ++ CONTINUE_SYM = 353, ++ CONTRIBUTORS_SYM = 354, ++ CONVERT_SYM = 355, ++ COUNT_SYM = 356, ++ CPU_SYM = 357, ++ CREATE = 358, ++ CROSS = 359, ++ CUBE_SYM = 360, ++ CURDATE = 361, ++ CURRENT_USER = 362, ++ CURSOR_SYM = 363, ++ CURSOR_NAME_SYM = 364, ++ CURTIME = 365, ++ DATABASE = 366, ++ DATABASES = 367, ++ DATAFILE_SYM = 368, ++ DATA_SYM = 369, ++ DATETIME = 370, ++ DATE_ADD_INTERVAL = 371, ++ DATE_SUB_INTERVAL = 372, ++ DATE_SYM = 373, ++ DAY_HOUR_SYM = 374, ++ DAY_MICROSECOND_SYM = 375, ++ DAY_MINUTE_SYM = 376, ++ DAY_SECOND_SYM = 377, ++ DAY_SYM = 378, ++ DEALLOCATE_SYM = 379, ++ DECIMAL_NUM = 380, ++ DECIMAL_SYM = 381, ++ DECLARE_SYM = 382, ++ DEFAULT = 383, ++ DEFINER_SYM = 384, ++ DELAYED_SYM = 385, ++ DELAY_KEY_WRITE_SYM = 386, ++ DELETE_SYM = 387, ++ DESC = 388, ++ DESCRIBE = 389, ++ DES_KEY_FILE = 390, ++ DETERMINISTIC_SYM = 391, ++ DIRECTORY_SYM = 392, ++ DISABLE_SYM = 393, ++ DISCARD = 394, ++ DISK_SYM = 395, ++ DISTINCT = 396, ++ DIV_SYM = 397, ++ DOUBLE_SYM = 398, ++ DO_SYM = 399, ++ DROP = 400, ++ DUAL_SYM = 401, ++ DUMPFILE = 402, ++ DUPLICATE_SYM = 403, ++ DYNAMIC_SYM = 404, ++ EACH_SYM = 405, ++ ELSE = 406, ++ ELSEIF_SYM = 407, ++ ENABLE_SYM = 408, ++ ENCLOSED = 409, ++ END = 410, ++ ENDS_SYM = 411, ++ END_OF_INPUT = 412, ++ ENGINES_SYM = 413, ++ ENGINE_SYM = 414, ++ ENUM = 415, ++ EQUAL_SYM = 416, ++ ERROR_SYM = 417, ++ ERRORS = 418, ++ ESCAPED = 419, ++ ESCAPE_SYM = 420, ++ EVENTS_SYM = 421, ++ EVENT_SYM = 422, ++ EVERY_SYM = 423, ++ EXAMINED_SYM = 424, ++ EXECUTE_SYM = 425, ++ EXISTS = 426, ++ EXIT_SYM = 427, ++ EXPANSION_SYM = 428, ++ EXTENDED_SYM = 429, ++ EXTENT_SIZE_SYM = 430, ++ EXTRACT_SYM = 431, ++ FALSE_SYM = 432, ++ FAST_SYM = 433, ++ FAULTS_SYM = 434, ++ FETCH_SYM = 435, ++ FILE_SYM = 436, ++ FIRST_SYM = 437, ++ FIXED_SYM = 438, ++ FLOAT_NUM = 439, ++ FLOAT_SYM = 440, ++ FLUSH_SYM = 441, ++ FORCE_SYM = 442, ++ FOREIGN = 443, ++ FOR_SYM = 444, ++ FOUND_SYM = 445, ++ FROM = 446, ++ FULL = 447, ++ FULLTEXT_SYM = 448, ++ FUNCTION_SYM = 449, ++ GE = 450, ++ GENERAL = 451, ++ GENERATED_SYM = 452, ++ GEOMETRYCOLLECTION = 453, ++ GEOMETRY_SYM = 454, ++ GET_FORMAT = 455, ++ GLOBAL_SYM = 456, ++ GRANT = 457, ++ GRANTS = 458, ++ GROUP_SYM = 459, ++ GROUP_CONCAT_SYM = 460, ++ HANDLER_SYM = 461, ++ HARD_SYM = 462, ++ HASH_SYM = 463, ++ HAVING = 464, ++ HELP_SYM = 465, ++ HEX_NUM = 466, ++ HEX_STRING = 467, ++ HIGH_PRIORITY = 468, ++ HOST_SYM = 469, ++ HOSTS_SYM = 470, ++ HOUR_MICROSECOND_SYM = 471, ++ HOUR_MINUTE_SYM = 472, ++ HOUR_SECOND_SYM = 473, ++ HOUR_SYM = 474, ++ IDENT = 475, ++ IDENTIFIED_SYM = 476, ++ IDENT_QUOTED = 477, ++ IF = 478, ++ IGNORE_SYM = 479, ++ IGNORE_SERVER_IDS_SYM = 480, ++ IMPORT = 481, ++ INDEXES = 482, ++ INDEX_SYM = 483, ++ INDEX_STATS_SYM = 484, ++ INFILE = 485, ++ INITIAL_SIZE_SYM = 486, ++ INNER_SYM = 487, ++ INOUT_SYM = 488, ++ INSENSITIVE_SYM = 489, ++ INSERT = 490, ++ INSERT_METHOD = 491, ++ INSTALL_SYM = 492, ++ INTERVAL_SYM = 493, ++ INTO = 494, ++ INT_SYM = 495, ++ INVOKER_SYM = 496, ++ IN_SYM = 497, ++ IO_SYM = 498, ++ IPC_SYM = 499, ++ IS = 500, ++ ISOLATION = 501, ++ ISSUER_SYM = 502, ++ ITERATE_SYM = 503, ++ JOIN_SYM = 504, ++ KEYS = 505, ++ KEY_BLOCK_SIZE = 506, ++ KEY_SYM = 507, ++ KILL_SYM = 508, ++ LANGUAGE_SYM = 509, ++ LAST_SYM = 510, ++ LAST_VALUE = 511, ++ LE = 512, ++ LEADING = 513, ++ LEAVES = 514, ++ LEAVE_SYM = 515, ++ LEFT = 516, ++ LESS_SYM = 517, ++ LEVEL_SYM = 518, ++ LEX_HOSTNAME = 519, ++ LIKE = 520, ++ LIMIT = 521, ++ LINEAR_SYM = 522, ++ LINES = 523, ++ LINESTRING = 524, ++ LIST_SYM = 525, ++ LOAD = 526, ++ LOCAL_SYM = 527, ++ LOCATOR_SYM = 528, ++ LOCKS_SYM = 529, ++ LOCK_SYM = 530, ++ LOGFILE_SYM = 531, ++ LOGS_SYM = 532, ++ LONGBLOB = 533, ++ LONGTEXT = 534, ++ LONG_NUM = 535, ++ LONG_SYM = 536, ++ LOOP_SYM = 537, ++ LOW_PRIORITY = 538, ++ MASTER_CONNECT_RETRY_SYM = 539, ++ MASTER_HOST_SYM = 540, ++ MASTER_LOG_FILE_SYM = 541, ++ MASTER_LOG_POS_SYM = 542, ++ MASTER_PASSWORD_SYM = 543, ++ MASTER_PORT_SYM = 544, ++ MASTER_SERVER_ID_SYM = 545, ++ MASTER_SSL_CAPATH_SYM = 546, ++ MASTER_SSL_CA_SYM = 547, ++ MASTER_SSL_CERT_SYM = 548, ++ MASTER_SSL_CIPHER_SYM = 549, ++ MASTER_SSL_KEY_SYM = 550, ++ MASTER_SSL_SYM = 551, ++ MASTER_SSL_VERIFY_SERVER_CERT_SYM = 552, ++ MASTER_SYM = 553, ++ MASTER_USER_SYM = 554, ++ MASTER_HEARTBEAT_PERIOD_SYM = 555, ++ MATCH = 556, ++ MAX_CONNECTIONS_PER_HOUR = 557, ++ MAX_QUERIES_PER_HOUR = 558, ++ MAX_ROWS = 559, ++ MAX_SIZE_SYM = 560, ++ MAX_SYM = 561, ++ MAX_UPDATES_PER_HOUR = 562, ++ MAX_USER_CONNECTIONS_SYM = 563, ++ MAX_VALUE_SYM = 564, ++ MEDIUMBLOB = 565, ++ MEDIUMINT = 566, ++ MEDIUMTEXT = 567, ++ MEDIUM_SYM = 568, ++ MEMORY_SYM = 569, ++ MERGE_SYM = 570, ++ MESSAGE_TEXT_SYM = 571, ++ MICROSECOND_SYM = 572, ++ MIGRATE_SYM = 573, ++ MINUTE_MICROSECOND_SYM = 574, ++ MINUTE_SECOND_SYM = 575, ++ MINUTE_SYM = 576, ++ MIN_ROWS = 577, ++ MIN_SYM = 578, ++ MODE_SYM = 579, ++ MODIFIES_SYM = 580, ++ MODIFY_SYM = 581, ++ MOD_SYM = 582, ++ MONTH_SYM = 583, ++ MULTILINESTRING = 584, ++ MULTIPOINT = 585, ++ MULTIPOLYGON = 586, ++ MUTEX_SYM = 587, ++ MYSQL_SYM = 588, ++ MYSQL_ERRNO_SYM = 589, ++ NAMES_SYM = 590, ++ NAME_SYM = 591, ++ NATIONAL_SYM = 592, ++ NATURAL = 593, ++ NCHAR_STRING = 594, ++ NCHAR_SYM = 595, ++ NDBCLUSTER_SYM = 596, ++ NE = 597, ++ NEG = 598, ++ NEW_SYM = 599, ++ NEXT_SYM = 600, ++ NODEGROUP_SYM = 601, ++ NONE_SYM = 602, ++ NOT2_SYM = 603, ++ NOT_SYM = 604, ++ NOW_SYM = 605, ++ NO_SYM = 606, ++ NO_WAIT_SYM = 607, ++ NO_WRITE_TO_BINLOG = 608, ++ NULL_SYM = 609, ++ NUM = 610, ++ NUMERIC_SYM = 611, ++ NVARCHAR_SYM = 612, ++ OFFSET_SYM = 613, ++ OLD_PASSWORD = 614, ++ ON = 615, ++ ONE_SHOT_SYM = 616, ++ ONE_SYM = 617, ++ ONLINE_SYM = 618, ++ OPEN_SYM = 619, ++ OPTIMIZE = 620, ++ OPTIONS_SYM = 621, ++ OPTION = 622, ++ OPTIONALLY = 623, ++ OR2_SYM = 624, ++ ORDER_SYM = 625, ++ OR_OR_SYM = 626, ++ OR_SYM = 627, ++ OUTER = 628, ++ OUTFILE = 629, ++ OUT_SYM = 630, ++ OWNER_SYM = 631, ++ PACK_KEYS_SYM = 632, ++ PAGE_SYM = 633, ++ PAGE_CHECKSUM_SYM = 634, ++ PARAM_MARKER = 635, ++ PARSER_SYM = 636, ++ PARSE_VCOL_EXPR_SYM = 637, ++ PARTIAL = 638, ++ PARTITIONING_SYM = 639, ++ PARTITIONS_SYM = 640, ++ PARTITION_SYM = 641, ++ PASSWORD = 642, ++ PERSISTENT_SYM = 643, ++ PHASE_SYM = 644, ++ PLUGINS_SYM = 645, ++ PLUGIN_SYM = 646, ++ POINT_SYM = 647, ++ POLYGON = 648, ++ PORT_SYM = 649, ++ POSITION_SYM = 650, ++ PRECISION = 651, ++ PREPARE_SYM = 652, ++ PRESERVE_SYM = 653, ++ PREV_SYM = 654, ++ PRIMARY_SYM = 655, ++ PRIVILEGES = 656, ++ PROCEDURE_SYM = 657, ++ PROCESS = 658, ++ PROCESSLIST_SYM = 659, ++ PROFILE_SYM = 660, ++ PROFILES_SYM = 661, ++ PROXY_SYM = 662, ++ PURGE = 663, ++ QUARTER_SYM = 664, ++ QUERY_SYM = 665, ++ QUICK = 666, ++ RANGE_SYM = 667, ++ READS_SYM = 668, ++ READ_ONLY_SYM = 669, ++ READ_SYM = 670, ++ READ_WRITE_SYM = 671, ++ REAL = 672, ++ REBUILD_SYM = 673, ++ RECOVER_SYM = 674, ++ REDOFILE_SYM = 675, ++ REDO_BUFFER_SIZE_SYM = 676, ++ REDUNDANT_SYM = 677, ++ REFERENCES = 678, ++ REGEXP = 679, ++ RELAY = 680, ++ RELAYLOG_SYM = 681, ++ RELAY_LOG_FILE_SYM = 682, ++ RELAY_LOG_POS_SYM = 683, ++ RELAY_THREAD = 684, ++ RELEASE_SYM = 685, ++ RELOAD = 686, ++ REMOVE_SYM = 687, ++ RENAME = 688, ++ REORGANIZE_SYM = 689, ++ REPAIR = 690, ++ REPEATABLE_SYM = 691, ++ REPEAT_SYM = 692, ++ REPLACE = 693, ++ REPLICATION = 694, ++ REQUIRE_SYM = 695, ++ RESET_SYM = 696, ++ RESIGNAL_SYM = 697, ++ RESOURCES = 698, ++ RESTORE_SYM = 699, ++ RESTRICT = 700, ++ RESUME_SYM = 701, ++ RETURNS_SYM = 702, ++ RETURN_SYM = 703, ++ REVOKE = 704, ++ RIGHT = 705, ++ ROLLBACK_SYM = 706, ++ ROLLUP_SYM = 707, ++ ROUTINE_SYM = 708, ++ ROWS_SYM = 709, ++ ROW_FORMAT_SYM = 710, ++ ROW_SYM = 711, ++ RTREE_SYM = 712, ++ SAVEPOINT_SYM = 713, ++ SCHEDULE_SYM = 714, ++ SCHEMA_NAME_SYM = 715, ++ SECOND_MICROSECOND_SYM = 716, ++ SECOND_SYM = 717, ++ SECURITY_SYM = 718, ++ SELECT_SYM = 719, ++ SENSITIVE_SYM = 720, ++ SEPARATOR_SYM = 721, ++ SERIALIZABLE_SYM = 722, ++ SERIAL_SYM = 723, ++ SESSION_SYM = 724, ++ SERVER_SYM = 725, ++ SERVER_OPTIONS = 726, ++ SET = 727, ++ SET_VAR = 728, ++ SHARE_SYM = 729, ++ SHIFT_LEFT = 730, ++ SHIFT_RIGHT = 731, ++ SHOW = 732, ++ SHUTDOWN = 733, ++ SIGNAL_SYM = 734, ++ SIGNED_SYM = 735, ++ SIMPLE_SYM = 736, ++ SLAVE = 737, ++ SLOW = 738, ++ SMALLINT = 739, ++ SNAPSHOT_SYM = 740, ++ SOCKET_SYM = 741, ++ SOFT_SYM = 742, ++ SONAME_SYM = 743, ++ SOUNDS_SYM = 744, ++ SOURCE_SYM = 745, ++ SPATIAL_SYM = 746, ++ SPECIFIC_SYM = 747, ++ SQLEXCEPTION_SYM = 748, ++ SQLSTATE_SYM = 749, ++ SQLWARNING_SYM = 750, ++ SQL_BIG_RESULT = 751, ++ SQL_BUFFER_RESULT = 752, ++ SQL_CACHE_SYM = 753, ++ SQL_CALC_FOUND_ROWS = 754, ++ SQL_NO_CACHE_SYM = 755, ++ SQL_SMALL_RESULT = 756, ++ SQL_SYM = 757, ++ SQL_THREAD = 758, ++ SSL_SYM = 759, ++ STARTING = 760, ++ STARTS_SYM = 761, ++ START_SYM = 762, ++ STATUS_SYM = 763, ++ STDDEV_SAMP_SYM = 764, ++ STD_SYM = 765, ++ STOP_SYM = 766, ++ STORAGE_SYM = 767, ++ STRAIGHT_JOIN = 768, ++ STRING_SYM = 769, ++ SUBCLASS_ORIGIN_SYM = 770, ++ SUBDATE_SYM = 771, ++ SUBJECT_SYM = 772, ++ SUBPARTITIONS_SYM = 773, ++ SUBPARTITION_SYM = 774, ++ SUBSTRING = 775, ++ SUM_SYM = 776, ++ SUPER_SYM = 777, ++ SUSPEND_SYM = 778, ++ SWAPS_SYM = 779, ++ SWITCHES_SYM = 780, ++ SYSDATE = 781, ++ TABLES = 782, ++ TABLESPACE = 783, ++ TABLE_REF_PRIORITY = 784, ++ TABLE_STATS_SYM = 785, ++ TABLE_SYM = 786, ++ TABLE_CHECKSUM_SYM = 787, ++ TABLE_NAME_SYM = 788, ++ TEMPORARY = 789, ++ TEMPTABLE_SYM = 790, ++ TERMINATED = 791, ++ TEXT_STRING = 792, ++ TEXT_SYM = 793, ++ THAN_SYM = 794, ++ THEN_SYM = 795, ++ TIMESTAMP = 796, ++ TIMESTAMP_ADD = 797, ++ TIMESTAMP_DIFF = 798, ++ TIME_SYM = 799, ++ TINYBLOB = 800, ++ TINYINT = 801, ++ TINYTEXT = 802, ++ TO_SYM = 803, ++ TRAILING = 804, ++ TRANSACTION_SYM = 805, ++ TRANSACTIONAL_SYM = 806, ++ TRIGGERS_SYM = 807, ++ TRIGGER_SYM = 808, ++ TRIM = 809, ++ TRUE_SYM = 810, ++ TRUNCATE_SYM = 811, ++ TYPES_SYM = 812, ++ TYPE_SYM = 813, ++ UDF_RETURNS_SYM = 814, ++ ULONGLONG_NUM = 815, ++ UNCOMMITTED_SYM = 816, ++ UNDEFINED_SYM = 817, ++ UNDERSCORE_CHARSET = 818, ++ UNDOFILE_SYM = 819, ++ UNDO_BUFFER_SIZE_SYM = 820, ++ UNDO_SYM = 821, ++ UNICODE_SYM = 822, ++ UNINSTALL_SYM = 823, ++ UNION_SYM = 824, ++ UNIQUE_SYM = 825, ++ UNKNOWN_SYM = 826, ++ UNLOCK_SYM = 827, ++ UNSIGNED = 828, ++ UNTIL_SYM = 829, ++ UPDATE_SYM = 830, ++ UPGRADE_SYM = 831, ++ USAGE = 832, ++ USER = 833, ++ USER_STATS_SYM = 834, ++ USE_FRM = 835, ++ USE_SYM = 836, ++ USING = 837, ++ UTC_DATE_SYM = 838, ++ UTC_TIMESTAMP_SYM = 839, ++ UTC_TIME_SYM = 840, ++ VALUES = 841, ++ VALUE_SYM = 842, ++ VARBINARY = 843, ++ VARCHAR = 844, ++ VARIABLES = 845, ++ VARIANCE_SYM = 846, ++ VARYING = 847, ++ VAR_SAMP_SYM = 848, ++ VIA_SYM = 849, ++ VIEW_SYM = 850, ++ VIRTUAL_SYM = 851, ++ WAIT_SYM = 852, ++ WARNINGS = 853, ++ WEEK_SYM = 854, ++ WHEN_SYM = 855, ++ WHERE = 856, ++ WHILE_SYM = 857, ++ WITH = 858, ++ WITH_CUBE_SYM = 859, ++ WITH_ROLLUP_SYM = 860, ++ WORK_SYM = 861, ++ WRAPPER_SYM = 862, ++ WRITE_SYM = 863, ++ X509_SYM = 864, ++ XA_SYM = 865, ++ XML_SYM = 866, ++ XOR = 867, ++ YEAR_MONTH_SYM = 868, ++ YEAR_SYM = 869, ++ ZEROFILL = 870, ++ IMPOSSIBLE_ACTION = 871 ++ }; ++#endif ++/* Tokens. */ ++#define ABORT_SYM 258 ++#define ACCESSIBLE_SYM 259 ++#define ACTION 260 ++#define ADD 261 ++#define ADDDATE_SYM 262 ++#define AFTER_SYM 263 ++#define AGAINST 264 ++#define AGGREGATE_SYM 265 ++#define ALGORITHM_SYM 266 ++#define ALL 267 ++#define ALTER 268 ++#define ALWAYS_SYM 269 ++#define ANALYZE_SYM 270 ++#define AND_AND_SYM 271 ++#define AND_SYM 272 ++#define ANY_SYM 273 ++#define AS 274 ++#define ASC 275 ++#define ASCII_SYM 276 ++#define ASENSITIVE_SYM 277 ++#define AT_SYM 278 ++#define AUTHORS_SYM 279 ++#define AUTOEXTEND_SIZE_SYM 280 ++#define AUTO_INC 281 ++#define AVG_ROW_LENGTH 282 ++#define AVG_SYM 283 ++#define BACKUP_SYM 284 ++#define BEFORE_SYM 285 ++#define BEGIN_SYM 286 ++#define BETWEEN_SYM 287 ++#define BIGINT 288 ++#define BINARY 289 ++#define BINLOG_SYM 290 ++#define BIN_NUM 291 ++#define BIT_AND 292 ++#define BIT_OR 293 ++#define BIT_SYM 294 ++#define BIT_XOR 295 ++#define BLOB_SYM 296 ++#define BLOCK_SYM 297 ++#define BOOLEAN_SYM 298 ++#define BOOL_SYM 299 ++#define BOTH 300 ++#define BTREE_SYM 301 ++#define BY 302 ++#define BYTE_SYM 303 ++#define CACHE_SYM 304 ++#define CALL_SYM 305 ++#define CASCADE 306 ++#define CASCADED 307 ++#define CASE_SYM 308 ++#define CAST_SYM 309 ++#define CATALOG_NAME_SYM 310 ++#define CHAIN_SYM 311 ++#define CHANGE 312 ++#define CHANGED 313 ++#define CHARSET 314 ++#define CHAR_SYM 315 ++#define CHECKPOINT_SYM 316 ++#define CHECKSUM_SYM 317 ++#define CHECK_SYM 318 ++#define CIPHER_SYM 319 ++#define CLASS_ORIGIN_SYM 320 ++#define CLIENT_SYM 321 ++#define CLIENT_STATS_SYM 322 ++#define CLOSE_SYM 323 ++#define COALESCE 324 ++#define CODE_SYM 325 ++#define COLLATE_SYM 326 ++#define COLLATION_SYM 327 ++#define COLUMNS 328 ++#define COLUMN_ADD_SYM 329 ++#define COLUMN_CREATE_SYM 330 ++#define COLUMN_DELETE_SYM 331 ++#define COLUMN_EXISTS_SYM 332 ++#define COLUMN_GET_SYM 333 ++#define COLUMN_LIST_SYM 334 ++#define COLUMN_SYM 335 ++#define COLUMN_NAME_SYM 336 ++#define COMMENT_SYM 337 ++#define COMMITTED_SYM 338 ++#define COMMIT_SYM 339 ++#define COMPACT_SYM 340 ++#define COMPLETION_SYM 341 ++#define COMPRESSED_SYM 342 ++#define CONCURRENT 343 ++#define CONDITION_SYM 344 ++#define CONNECTION_SYM 345 ++#define CONSISTENT_SYM 346 ++#define CONSTRAINT 347 ++#define CONSTRAINT_CATALOG_SYM 348 ++#define CONSTRAINT_NAME_SYM 349 ++#define CONSTRAINT_SCHEMA_SYM 350 ++#define CONTAINS_SYM 351 ++#define CONTEXT_SYM 352 ++#define CONTINUE_SYM 353 ++#define CONTRIBUTORS_SYM 354 ++#define CONVERT_SYM 355 ++#define COUNT_SYM 356 ++#define CPU_SYM 357 ++#define CREATE 358 ++#define CROSS 359 ++#define CUBE_SYM 360 ++#define CURDATE 361 ++#define CURRENT_USER 362 ++#define CURSOR_SYM 363 ++#define CURSOR_NAME_SYM 364 ++#define CURTIME 365 ++#define DATABASE 366 ++#define DATABASES 367 ++#define DATAFILE_SYM 368 ++#define DATA_SYM 369 ++#define DATETIME 370 ++#define DATE_ADD_INTERVAL 371 ++#define DATE_SUB_INTERVAL 372 ++#define DATE_SYM 373 ++#define DAY_HOUR_SYM 374 ++#define DAY_MICROSECOND_SYM 375 ++#define DAY_MINUTE_SYM 376 ++#define DAY_SECOND_SYM 377 ++#define DAY_SYM 378 ++#define DEALLOCATE_SYM 379 ++#define DECIMAL_NUM 380 ++#define DECIMAL_SYM 381 ++#define DECLARE_SYM 382 ++#define DEFAULT 383 ++#define DEFINER_SYM 384 ++#define DELAYED_SYM 385 ++#define DELAY_KEY_WRITE_SYM 386 ++#define DELETE_SYM 387 ++#define DESC 388 ++#define DESCRIBE 389 ++#define DES_KEY_FILE 390 ++#define DETERMINISTIC_SYM 391 ++#define DIRECTORY_SYM 392 ++#define DISABLE_SYM 393 ++#define DISCARD 394 ++#define DISK_SYM 395 ++#define DISTINCT 396 ++#define DIV_SYM 397 ++#define DOUBLE_SYM 398 ++#define DO_SYM 399 ++#define DROP 400 ++#define DUAL_SYM 401 ++#define DUMPFILE 402 ++#define DUPLICATE_SYM 403 ++#define DYNAMIC_SYM 404 ++#define EACH_SYM 405 ++#define ELSE 406 ++#define ELSEIF_SYM 407 ++#define ENABLE_SYM 408 ++#define ENCLOSED 409 ++#define END 410 ++#define ENDS_SYM 411 ++#define END_OF_INPUT 412 ++#define ENGINES_SYM 413 ++#define ENGINE_SYM 414 ++#define ENUM 415 ++#define EQUAL_SYM 416 ++#define ERROR_SYM 417 ++#define ERRORS 418 ++#define ESCAPED 419 ++#define ESCAPE_SYM 420Lines of this file are not shown. View the raw message.
meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch +13
-17Lines of this file are not shown. View the raw message.
meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch +13
-4Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 7 lines
2.7.4 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Part of the diff is not shown here. View the raw message.