[Pkg-mysql-commits] [mariadb-5.5] 01/03: Imported Upstream version 5.5.54

Otto Kekäläinen otto at moszumanska.debian.org
Thu Jan 19 07:03:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

otto pushed a commit to branch ubuntu-14.04
in repository mariadb-5.5.

commit aa39e58b0079e5c3804dfbc2557dd4481d6a45e1
Author: Otto Kekäläinen <otto at seravo.fi>
Date:   Thu Jan 19 00:25:37 2017 +0200

    Imported Upstream version 5.5.54
---
 .gitignore                                         |    1 +
 Docs/INFO_SRC                                      |   10 +-
 VERSION                                            |    2 +-
 client/mysqladmin.cc                               |    6 +-
 client/mysqltest.cc                                |   28 +-
 cmake/install_macros.cmake                         |    1 +
 cmake/os/Windows.cmake                             |    2 +-
 cmake/readline.cmake                               |    1 +
 configure.cmake                                    |    1 -
 debian/dist/Debian/mariadb-server-5.5.files.in     |    1 +
 debian/dist/Ubuntu/mariadb-server-5.5.files.in     |    1 +
 extra/CMakeLists.txt                               |    3 +
 extra/mysqld_safe_helper.c                         |   77 +
 include/my_sys.h                                   |    4 +
 mysql-test/include/ctype_numconv.inc               |   26 +-
 mysql-test/r/cache_temporal_4265.result            |    1 +
 mysql-test/r/create.result                         |    7 +
 mysql-test/r/ctype_binary.result                   |   42 +-
 mysql-test/r/ctype_cp1251.result                   |   46 +-
 mysql-test/r/ctype_latin1.result                   |   42 +-
 mysql-test/r/ctype_ucs.result                      |   48 +-
 mysql-test/r/ctype_utf8.result                     |   72 +-
 mysql-test/r/derived.result                        |   65 +
 mysql-test/r/derived_view.result                   |   83 +
 mysql-test/r/events_slowlog.result                 |   12 +
 mysql-test/r/fulltext_charsets.result              |    7 +
 mysql-test/r/func_time.result                      |    6 +
 mysql-test/r/group_by.result                       |   14 +
 mysql-test/r/index_merge_innodb.result             |   29 +
 mysql-test/r/information_schema.result             |    8 +-
 mysql-test/r/information_schema_part.result        |    8 +
 mysql-test/r/loaddata.result                       |   26 +-
 mysql-test/r/parser.result                         |    9 +
 mysql-test/r/sp.result                             |   39 +
 mysql-test/r/subselect.result                      |   22 +
 mysql-test/r/subselect2.result                     |   45 +
 mysql-test/r/subselect4.result                     |   39 +
 mysql-test/r/subselect_no_mat.result               |   22 +
 mysql-test/r/subselect_no_opts.result              |   22 +
 mysql-test/r/subselect_no_scache.result            |   22 +
 mysql-test/r/subselect_no_semijoin.result          |   22 +
 mysql-test/r/type_decimal.result                   |    5 +-
 mysql-test/r/union.result                          |   33 +-
 mysql-test/std_data/bug20683959loaddata.txt        |    1 -
 mysql-test/suite/binlog/r/binlog_index.result      |    6 +-
 mysql-test/suite/binlog/t/binlog_index.test        |    6 +-
 .../suite/engines/iuds/r/insert_decimal.result     |    1 -
 mysql-test/suite/rpl/r/rpl_binlog_errors.result    |    4 +-
 mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result  |   37 +-
 mysql-test/suite/rpl/t/rpl_binlog_errors.test      |    4 +-
 mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test    |  120 +-
 .../suite/sys_vars/r/replicate_do_db_basic.result  |    4 +
 .../sys_vars/r/replicate_do_table_basic.result     |    4 +
 .../sys_vars/r/replicate_ignore_db_basic.result    |    4 +
 .../sys_vars/r/replicate_ignore_table_basic.result |    4 +
 .../r/replicate_wild_do_table_basic.result         |    4 +
 .../r/replicate_wild_ignore_table_basic.result     |    4 +
 .../suite/sys_vars/t/replicate_do_db_basic.test    |    3 +
 .../suite/sys_vars/t/replicate_do_table_basic.test |    3 +
 .../sys_vars/t/replicate_ignore_db_basic.test      |    3 +
 .../sys_vars/t/replicate_ignore_table_basic.test   |    3 +
 .../sys_vars/t/replicate_wild_do_table_basic.test  |    3 +
 .../t/replicate_wild_ignore_table_basic.test       |    3 +
 mysql-test/t/create.test                           |    9 +
 mysql-test/t/ctype_utf8.test                       |   14 +
 mysql-test/t/derived.test                          |   47 +
 mysql-test/t/derived_view.test                     |   54 +
 mysql-test/t/events_slowlog.test                   |   28 +
 mysql-test/t/fulltext_charsets.test                |   10 +
 mysql-test/t/func_time.test                        |    5 +
 mysql-test/t/group_by.test                         |   12 +
 mysql-test/t/index_merge_innodb.test               |   33 +-
 mysql-test/t/information_schema.test               |    8 +-
 mysql-test/t/information_schema_part.test          |    7 +
 mysql-test/t/loaddata.test                         |   25 +-
 mysql-test/t/parser.test                           |   10 +
 mysql-test/t/sp.test                               |   51 +
 mysql-test/t/subselect.test                        |   24 +
 mysql-test/t/subselect2.test                       |   50 +
 mysql-test/t/subselect4.test                       |   41 +
 mysql-test/t/type_decimal.test                     |    5 +
 mysql-test/t/union.test                            |   22 +-
 mysys/CMakeLists.txt                               |    4 +-
 mysys/my_setuser.c                                 |   81 +
 plugin/server_audit/server_audit.c                 |    1 +
 scripts/mysql_install_db.sh                        |    6 +-
 scripts/mysqld_safe.sh                             |  107 +-
 sql/event_db_repository.cc                         |   15 +-
 sql/field.cc                                       |   15 +-
 sql/filesort.cc                                    |    2 +-
 sql/handler.cc                                     |    2 +-
 sql/item.cc                                        |  114 +-
 sql/item.h                                         |    2 +-
 sql/item_func.cc                                   |    3 +-
 sql/item_func.h                                    |    1 +
 sql/item_strfunc.cc                                |    2 +-
 sql/item_strfunc.h                                 |    1 -
 sql/item_subselect.cc                              |   37 +-
 sql/item_timefunc.cc                               |   29 +-
 sql/item_timefunc.h                                |   62 +-
 sql/log.cc                                         |   17 +-
 sql/mysqld.cc                                      |  112 +-
 sql/rpl_filter.cc                                  |    3 +
 sql/signal_handler.cc                              |    2 +-
 sql/sp_head.cc                                     |   16 +-
 sql/sql_connect.cc                                 |   16 +-
 sql/sql_const.h                                    |    2 +-
 sql/sql_derived.cc                                 |    2 +
 sql/sql_lex.cc                                     |   28 +-
 sql/sql_load.cc                                    |   77 +-
 sql/sql_parse.cc                                   |   23 +-
 sql/sql_parse.h                                    |    1 +
 sql/sql_select.cc                                  |   16 +-
 sql/sql_select.h                                   |    5 +-
 sql/sql_table.cc                                   |   10 +-
 sql/sql_time.cc                                    |   17 +
 sql/sql_time.h                                     |    2 +
 sql/sql_udf.cc                                     |    6 +-
 sql/sql_yacc.cc                                    | 4244 ++++++++++----------
 sql/sql_yacc.yy                                    |    8 +-
 sql/sys_vars.cc                                    |    3 +-
 storage/innobase/mach/mach0data.c                  |   53 +-
 storage/myisam/ft_boolean_search.c                 |    7 +-
 .../tokudb/mysql-test/tokudb/r/type_decimal.result |    2 -
 strings/decimal.c                                  |    2 +
 support-files/mysql.server.sh                      |    8 +-
 win/packaging/extra.wxs.in                         |   17 +-
 win/packaging/heidisql.cmake                       |    2 +-
 win/packaging/heidisql.wxi.in                      |   14 +-
 129 files changed, 4124 insertions(+), 2711 deletions(-)

diff --git a/.gitignore b/.gitignore
index b780ca8..8b6e416 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,7 @@ extra/jemalloc/build/
 extra/jemalloc/tmp/
 extra/my_print_defaults
 extra/mysql_waitpid
+extra/mysqld_safe_helper
 extra/perror
 extra/replace
 extra/resolve_stack_dump
diff --git a/Docs/INFO_SRC b/Docs/INFO_SRC
index 8730503..5e22253 100644
--- a/Docs/INFO_SRC
+++ b/Docs/INFO_SRC
@@ -1,8 +1,8 @@
-commit: eac8d95ffcdea7cd31d60d273e30cb3dfec66add
-date: 2016-10-14 12:51:53 +0200
-build-date: 2016-10-14 12:55:57 +0200 
-short: eac8d95
+commit: ec6d8dadc01269451332e5b24b12a5350a2a4896
+date: 2016-12-22 13:02:32 +0100
+build-date: 2016-12-22 16:59:02 +0100 
+short: ec6d8da
 branch: HEAD
 
 
-MySQL source 5.5.53
+MySQL source 5.5.54
diff --git a/VERSION b/VERSION
index d44c8b2..4f1ecb3 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
 MYSQL_VERSION_MAJOR=5
 MYSQL_VERSION_MINOR=5
-MYSQL_VERSION_PATCH=53
+MYSQL_VERSION_PATCH=54
 MYSQL_VERSION_EXTRA=
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index e7c6410..1f0018e 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -1516,8 +1516,10 @@ static my_bool get_pidfile(MYSQL *mysql, char *pidfile)
 
   if (mysql_query(mysql, "SHOW VARIABLES LIKE 'pid_file'"))
   {
-    my_printf_error(0, "query failed; error: '%s'", error_flags,
-		    mysql_error(mysql));
+    my_printf_error(mysql_errno(mysql),
+                    "The query to get the server's pid file failed,"
+                    " error: '%s'. Continuing.", error_flags,
+                    mysql_error(mysql));
   }
   result = mysql_store_result(mysql);
   if (result)
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index acb9e8b..5daa0e7 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -1705,11 +1705,11 @@ int cat_file(DYNAMIC_STRING* ds, const char* filename)
   while((len= my_read(fd, (uchar*)&buff,
                       sizeof(buff)-1, MYF(0))) > 0)
   {
-    char *p= buff, *start= buff;
-    while (p < buff+len)
+    char *p= buff, *start= buff,*end=buff+len;
+    while (p < end)
     {
       /* Convert cr/lf to lf */
-      if (*p == '\r' && *(p+1) && *(p+1)== '\n')
+      if (*p == '\r' && p+1 < end && *(p+1)== '\n')
       {
         /* Add fake newline instead of cr and output the line */
         *p= '\n';
@@ -3367,16 +3367,32 @@ void do_exec(struct st_command *command)
     ds_result= &ds_sorted;
   }
 
+#ifdef _WIN32
+   /* Workaround for CRT bug, MDEV-9409 */
+  _setmode(fileno(res_file), O_BINARY);
+#endif
+
   while (fgets(buf, sizeof(buf), res_file))
   {
+    int len = (int)strlen(buf);
+#ifdef _WIN32
+    /* Strip '\r' off newlines. */
+    if (len > 1 && buf[len-2] == '\r' && buf[len-1] == '\n')
+    {
+      buf[len-2] = '\n';
+      buf[len-1] = 0;
+      len--;
+    }
+#endif
     if (disable_result_log)
     {
-      buf[strlen(buf)-1]=0;
+      if (len)
+        buf[len-1] = 0;
       DBUG_PRINT("exec_result",("%s", buf));
     }
     else
     {
-      replace_dynstr_append(ds_result, buf);
+      replace_dynstr_append_mem(ds_result, buf, len);
     }
   }
   error= pclose(res_file);
@@ -5200,7 +5216,7 @@ typedef struct
 
 static st_error global_error_names[] =
 {
-  { "<No error>", -1U, "" },
+  { "<No error>", ~0U, "" },
 #include <mysqld_ername.h>
   { 0, 0, 0 }
 };
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
index 15e2dc4..22a525d 100644
--- a/cmake/install_macros.cmake
+++ b/cmake/install_macros.cmake
@@ -208,6 +208,7 @@ IF(WIN32)
     FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool 
       PATHS "$ENV{ProgramFiles}/Microsoft SDKs/Windows/v7.0A/bin"
       "$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86"
+      "$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86"
     )
     IF(NOT SIGNTOOL_EXECUTABLE)
       MESSAGE(FATAL_ERROR 
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake
index e1055ab..283f79b 100644
--- a/cmake/os/Windows.cmake
+++ b/cmake/os/Windows.cmake
@@ -120,7 +120,7 @@ IF(MSVC)
   
   #TODO: update the code and remove the disabled warnings
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /we4099")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099")
 
   IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
     # _WIN64 is defined by the compiler itself. 
diff --git a/cmake/readline.cmake b/cmake/readline.cmake
index c72f8d0..64e04ef 100644
--- a/cmake/readline.cmake
+++ b/cmake/readline.cmake
@@ -230,5 +230,6 @@ MACRO (MYSQL_CHECK_READLINE)
     SET(CMAKE_REQUIRED_LIBRARIES)
     SET(CMAKE_REQUIRED_INCLUDES)
   ENDIF(NOT WIN32)
+  CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
 ENDMACRO()
 
diff --git a/configure.cmake b/configure.cmake
index f0517bf..4051b55 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -237,7 +237,6 @@ CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H)
 CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
 CHECK_INCLUDE_FILES (sys/stream.h HAVE_SYS_STREAM_H)
 CHECK_INCLUDE_FILES (sys/termcap.h HAVE_SYS_TERMCAP_H)
-CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
 CHECK_INCLUDE_FILES (asm/termbits.h HAVE_ASM_TERMBITS_H)
 CHECK_INCLUDE_FILES (termbits.h HAVE_TERMBITS_H)
 CHECK_INCLUDE_FILES (termios.h HAVE_TERMIOS_H)
diff --git a/debian/dist/Debian/mariadb-server-5.5.files.in b/debian/dist/Debian/mariadb-server-5.5.files.in
index c1ea587..47a9887 100644
--- a/debian/dist/Debian/mariadb-server-5.5.files.in
+++ b/debian/dist/Debian/mariadb-server-5.5.files.in
@@ -32,6 +32,7 @@ usr/bin/mysql_zap
 usr/bin/mysqlbinlog
 usr/bin/mysqld_multi
 usr/bin/mysqld_safe
+usr/bin/mysqld_safe_helper
 usr/bin/mysqlhotcopy
 usr/bin/perror
 usr/bin/replace
diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.files.in b/debian/dist/Ubuntu/mariadb-server-5.5.files.in
index 7f75ccc..5182dd7 100644
--- a/debian/dist/Ubuntu/mariadb-server-5.5.files.in
+++ b/debian/dist/Ubuntu/mariadb-server-5.5.files.in
@@ -34,6 +34,7 @@ usr/bin/mysql_zap
 usr/bin/mysqlbinlog
 usr/bin/mysqld_multi
 usr/bin/mysqld_safe
+usr/bin/mysqld_safe_helper
 usr/bin/mysqlhotcopy
 usr/bin/perror
 usr/bin/replace
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index f8f71b0..7f47f87 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -82,4 +82,7 @@ IF(UNIX)
 
   MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client)
   TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
+
+  MYSQL_ADD_EXECUTABLE(mysqld_safe_helper mysqld_safe_helper.c COMPONENT Server)
+  TARGET_LINK_LIBRARIES(mysqld_safe_helper mysys)
 ENDIF()
diff --git a/extra/mysqld_safe_helper.c b/extra/mysqld_safe_helper.c
new file mode 100644
index 0000000..09e507c
--- /dev/null
+++ b/extra/mysqld_safe_helper.c
@@ -0,0 +1,77 @@
+#include <my_global.h>
+#include <m_string.h>
+#include <my_sys.h>
+#include <my_pthread.h>
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+
+void my_exit(int c)
+{
+  my_end(0);
+  exit(c);
+}
+
+void do_usage()
+{
+  printf("Usage:\n"
+         "  %s <user> log  <filename>\n"
+         "  %s <user> exec <command> <args>\n",
+         my_progname, my_progname);
+  my_exit(1);
+}
+
+void do_log(const char *logfile)
+{
+  FILE *f;
+  uchar buf[4096];
+  int size;
+
+  if (!logfile)
+    do_usage();
+
+  f= my_fopen(logfile, O_WRONLY|O_APPEND|O_CREAT, MYF(MY_WME));
+  if (!f)
+    my_exit(1);
+
+  while ((size= my_fread(stdin, buf, sizeof(buf), MYF(MY_WME))) > 0)
+    if ((int)my_fwrite(f, buf, size, MYF(MY_WME)) != size)
+      my_exit(1);
+
+  my_fclose(f, MYF(0));
+  my_exit(0);
+}
+
+void do_exec(char *args[])
+{
+  if (!args[0])
+    do_usage();
+
+  my_end(0);
+  execvp(args[0], args);
+}
+
+int main(int argc, char *argv[])
+{
+  struct passwd *user_info;
+  MY_INIT(argv[0]);
+
+  if (argc < 3)
+    do_usage(argv[0]);
+
+  user_info= my_check_user(argv[1], MYF(0));
+  if (user_info ? my_set_user(argv[1], user_info, MYF(MY_WME))
+                : my_errno == EINVAL)
+    my_exit(1);
+
+  if (strcmp(argv[2], "log") == 0)
+    do_log(argv[3]);
+
+  if (strcmp(argv[2], "exec") == 0)
+    do_exec(argv+3);
+
+  my_end(0);
+  return 1;
+}
diff --git a/include/my_sys.h b/include/my_sys.h
index 001769a..5392a94 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -602,8 +602,12 @@ extern void *my_memmem(const void *haystack, size_t haystacklen,
 
 #ifdef _WIN32
 extern int      my_access(const char *path, int amode);
+#define my_check_user(A,B) (NULL)
+#define my_set_user(A,B,C) (0)
 #else
 #define my_access access
+struct passwd *my_check_user(const char *user, myf MyFlags);
+int my_set_user(const char *user, struct passwd *user_info, myf MyFlags);
 #endif
 
 extern int check_if_legal_filename(const char *path);
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc
index 9b21e7f..47b52be 100644
--- a/mysql-test/include/ctype_numconv.inc
+++ b/mysql-test/include/ctype_numconv.inc
@@ -1743,6 +1743,11 @@ DROP TABLE t1;
 --echo # Bug #31384 	DATE_ADD() and DATE_SUB() return binary data
 --echo #
 SELECT @@collation_connection, @@character_set_results;
+SELECT
+  CHARSET(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
+  CHARSET(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field_str2,
+  CHARSET(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
+  CHARSET(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
 CREATE TABLE t1 AS
 SELECT
   DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
@@ -1766,7 +1771,26 @@ SELECT
   HEX(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field1_str2,
   HEX(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
   HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
- 
+
+--echo #
+--echo # MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
+--echo #
+SELECT @@collation_connection, @@character_set_results;
+SELECT
+  CHARSET(ADDTIME(_latin1'10:01:01',_latin1'10:00:00')) AS addtime1,
+  CHARSET(ADDTIME('10:01:01','10:00:00')) AS addtime2,
+  CHARSET(DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second)) AS date_add1,
+  CHARSET(DATE_ADD('2001-01-01 10:01:01',interval 10 second)) AS date_add2;
+CREATE TABLE t1 AS
+SELECT
+  ADDTIME(_latin1'10:01:01',_latin1'10:00:00') AS addtime1,
+  ADDTIME('10:01:01','10:00:00') AS addtime2,
+  DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second) AS date_add1,
+  DATE_ADD('2001-01-01 10:01:01',interval 10 second) AS date_add2;
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
 --echo #
 --echo # Bug#11926811 / Bug#60625 Illegal mix of collations
 --echo #
diff --git a/mysql-test/r/cache_temporal_4265.result b/mysql-test/r/cache_temporal_4265.result
index 7f215de..980bb95 100644
--- a/mysql-test/r/cache_temporal_4265.result
+++ b/mysql-test/r/cache_temporal_4265.result
@@ -7,6 +7,7 @@ a
 2002-03-04
 Warnings:
 Note	1003	2000-01-01
+Note	1003	2000-01-06
 set debug_dbug='';
 drop table t1;
 create table t1 (id int not null, ut timestamp(6) not null);
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 0164aa4..829b54d 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -2498,4 +2498,11 @@ end|
 create table t1 as select f1();
 ERROR 42S02: Table 'test.t1' doesn't exist
 drop function f1;
+#
+# MDEV-10274 Bundling insert with create statement
+#  for table with unsigned Decimal primary key issues warning 1194
+#
+create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory
+select  2.1 ID;
+drop table t1;
 End of 5.5 tests
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index e7bf123..3fc440b 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -2777,6 +2777,13 @@ DROP TABLE t1;
 SELECT @@collation_connection, @@character_set_results;
 @@collation_connection	@@character_set_results
 binary	binary
+SELECT
+CHARSET(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
+CHARSET(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field_str2,
+CHARSET(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
+CHARSET(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
+field_str1	field_str2	field_date	field_datetime
+binary	binary	binary	binary
 CREATE TABLE t1 AS
 SELECT
 DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
@@ -2786,8 +2793,8 @@ DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_da
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `field_str1` varchar(19) DEFAULT NULL,
-  `field1_str2` varchar(19) DEFAULT NULL,
+  `field_str1` varbinary(19) DEFAULT NULL,
+  `field1_str2` varbinary(19) DEFAULT NULL,
   `field_date` date DEFAULT NULL,
   `field_datetime` datetime DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -2812,6 +2819,37 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
 field_str1	field1_str2	field_date	field_datetime
 323030372D30382D30322032333A35393A3030	323030372D30382D30332031373A33323A3030	323030372D30382D3032	323030372D30382D30332031373A33323A3030
 #
+# MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
+#
+SELECT @@collation_connection, @@character_set_results;
+@@collation_connection	@@character_set_results
+binary	binary
+SELECT
+CHARSET(ADDTIME(_latin1'10:01:01',_latin1'10:00:00')) AS addtime1,
+CHARSET(ADDTIME('10:01:01','10:00:00')) AS addtime2,
+CHARSET(DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second)) AS date_add1,
+CHARSET(DATE_ADD('2001-01-01 10:01:01',interval 10 second)) AS date_add2;
+addtime1	addtime2	date_add1	date_add2
+binary	binary	binary	binary
+CREATE TABLE t1 AS
+SELECT
+ADDTIME(_latin1'10:01:01',_latin1'10:00:00') AS addtime1,
+ADDTIME('10:01:01','10:00:00') AS addtime2,
+DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second) AS date_add1,
+DATE_ADD('2001-01-01 10:01:01',interval 10 second) AS date_add2;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `addtime1` varbinary(26) DEFAULT NULL,
+  `addtime2` varbinary(26) DEFAULT NULL,
+  `date_add1` varbinary(19) DEFAULT NULL,
+  `date_add2` varbinary(19) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+addtime1	addtime2	date_add1	date_add2
+20:01:01	20:01:01	2001-01-01 10:01:11	2001-01-01 10:01:11
+DROP TABLE t1;
+#
 # Bug#11926811 / Bug#60625 Illegal mix of collations
 #
 SELECT @@collation_connection;
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index 2a7d4ed..9d5dea2 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -3169,6 +3169,13 @@ DROP TABLE t1;
 SELECT @@collation_connection, @@character_set_results;
 @@collation_connection	@@character_set_results
 cp1251_general_ci	cp1251
+SELECT
+CHARSET(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
+CHARSET(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field_str2,
+CHARSET(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
+CHARSET(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
+field_str1	field_str2	field_date	field_datetime
+cp1251	cp1251	binary	binary
 CREATE TABLE t1 AS
 SELECT
 DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
@@ -3178,8 +3185,8 @@ DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_da
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `field_str1` varchar(19) DEFAULT NULL,
-  `field1_str2` varchar(19) DEFAULT NULL,
+  `field_str1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL,
+  `field1_str2` varchar(19) CHARACTER SET cp1251 DEFAULT NULL,
   `field_date` date DEFAULT NULL,
   `field_datetime` datetime DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -3190,8 +3197,8 @@ DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
 DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY) AS field_date,
 DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
 Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					field_str1	254	19	10	Y	128	0	63
-def					field1_str2	254	19	19	Y	128	0	63
+def					field_str1	254	19	10	Y	0	0	51
+def					field1_str2	254	19	19	Y	0	0	51
 def					field_date	10	10	10	Y	128	0	63
 def					field_datetime	12	19	19	Y	128	0	63
 field_str1	field1_str2	field_date	field_datetime
@@ -3204,6 +3211,37 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
 field_str1	field1_str2	field_date	field_datetime
 323030372D30382D30322032333A35393A3030	323030372D30382D30332031373A33323A3030	323030372D30382D3032	323030372D30382D30332031373A33323A3030
 #
+# MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
+#
+SELECT @@collation_connection, @@character_set_results;
+@@collation_connection	@@character_set_results
+cp1251_general_ci	cp1251
+SELECT
+CHARSET(ADDTIME(_latin1'10:01:01',_latin1'10:00:00')) AS addtime1,
+CHARSET(ADDTIME('10:01:01','10:00:00')) AS addtime2,
+CHARSET(DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second)) AS date_add1,
+CHARSET(DATE_ADD('2001-01-01 10:01:01',interval 10 second)) AS date_add2;
+addtime1	addtime2	date_add1	date_add2
+cp1251	cp1251	cp1251	cp1251
+CREATE TABLE t1 AS
+SELECT
+ADDTIME(_latin1'10:01:01',_latin1'10:00:00') AS addtime1,
+ADDTIME('10:01:01','10:00:00') AS addtime2,
+DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second) AS date_add1,
+DATE_ADD('2001-01-01 10:01:01',interval 10 second) AS date_add2;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `addtime1` varchar(26) CHARACTER SET cp1251 DEFAULT NULL,
+  `addtime2` varchar(26) CHARACTER SET cp1251 DEFAULT NULL,
+  `date_add1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL,
+  `date_add2` varchar(19) CHARACTER SET cp1251 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+addtime1	addtime2	date_add1	date_add2
+20:01:01	20:01:01	2001-01-01 10:01:11	2001-01-01 10:01:11
+DROP TABLE t1;
+#
 # Bug#11926811 / Bug#60625 Illegal mix of collations
 #
 SELECT @@collation_connection;
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index dc96495..db9d03a 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -3351,6 +3351,13 @@ DROP TABLE t1;
 SELECT @@collation_connection, @@character_set_results;
 @@collation_connection	@@character_set_results
 latin1_swedish_ci	latin1
+SELECT
+CHARSET(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
+CHARSET(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field_str2,
+CHARSET(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
+CHARSET(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
+field_str1	field_str2	field_date	field_datetime
+latin1	latin1	binary	binary
 CREATE TABLE t1 AS
 SELECT
 DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
@@ -3372,8 +3379,8 @@ DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
 DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY) AS field_date,
 DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
 Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					field_str1	254	19	10	Y	128	0	63
-def					field1_str2	254	19	19	Y	128	0	63
+def					field_str1	254	19	10	Y	0	0	8
+def					field1_str2	254	19	19	Y	0	0	8
 def					field_date	10	10	10	Y	128	0	63
 def					field_datetime	12	19	19	Y	128	0	63
 field_str1	field1_str2	field_date	field_datetime
@@ -3386,6 +3393,37 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
 field_str1	field1_str2	field_date	field_datetime
 323030372D30382D30322032333A35393A3030	323030372D30382D30332031373A33323A3030	323030372D30382D3032	323030372D30382D30332031373A33323A3030
 #
+# MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
+#
+SELECT @@collation_connection, @@character_set_results;
+@@collation_connection	@@character_set_results
+latin1_swedish_ci	latin1
+SELECT
+CHARSET(ADDTIME(_latin1'10:01:01',_latin1'10:00:00')) AS addtime1,
+CHARSET(ADDTIME('10:01:01','10:00:00')) AS addtime2,
+CHARSET(DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second)) AS date_add1,
+CHARSET(DATE_ADD('2001-01-01 10:01:01',interval 10 second)) AS date_add2;
+addtime1	addtime2	date_add1	date_add2
+latin1	latin1	latin1	latin1
+CREATE TABLE t1 AS
+SELECT
+ADDTIME(_latin1'10:01:01',_latin1'10:00:00') AS addtime1,
+ADDTIME('10:01:01','10:00:00') AS addtime2,
+DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second) AS date_add1,
+DATE_ADD('2001-01-01 10:01:01',interval 10 second) AS date_add2;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `addtime1` varchar(26) DEFAULT NULL,
+  `addtime2` varchar(26) DEFAULT NULL,
+  `date_add1` varchar(19) DEFAULT NULL,
+  `date_add2` varchar(19) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+addtime1	addtime2	date_add1	date_add2
+20:01:01	20:01:01	2001-01-01 10:01:11	2001-01-01 10:01:11
+DROP TABLE t1;
+#
 # Bug#11926811 / Bug#60625 Illegal mix of collations
 #
 SELECT @@collation_connection;
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 96e0970..c38a03f 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -4167,6 +4167,13 @@ DROP TABLE t1;
 SELECT @@collation_connection, @@character_set_results;
 @@collation_connection	@@character_set_results
 ucs2_general_ci	latin1
+SELECT
+CHARSET(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
+CHARSET(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field_str2,
+CHARSET(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
+CHARSET(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
+field_str1	field_str2	field_date	field_datetime
+ucs2	ucs2	binary	binary
 CREATE TABLE t1 AS
 SELECT
 DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
@@ -4176,8 +4183,8 @@ DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_da
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `field_str1` varchar(19) DEFAULT NULL,
-  `field1_str2` varchar(19) DEFAULT NULL,
+  `field_str1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL,
+  `field1_str2` varchar(19) CHARACTER SET ucs2 DEFAULT NULL,
   `field_date` date DEFAULT NULL,
   `field_datetime` datetime DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -4188,8 +4195,8 @@ DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
 DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY) AS field_date,
 DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
 Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					field_str1	254	19	10	Y	128	0	63
-def					field1_str2	254	19	19	Y	128	0	63
+def					field_str1	254	19	10	Y	0	0	8
+def					field1_str2	254	19	19	Y	0	0	8
 def					field_date	10	10	10	Y	128	0	63
 def					field_datetime	12	19	19	Y	128	0	63
 field_str1	field1_str2	field_date	field_datetime
@@ -4200,7 +4207,38 @@ HEX(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field1_str2,
 HEX(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
 HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
 field_str1	field1_str2	field_date	field_datetime
-323030372D30382D30322032333A35393A3030	323030372D30382D30332031373A33323A3030	323030372D30382D3032	323030372D30382D30332031373A33323A3030
+0032003000300037002D00300038002D00300032002000320033003A00350039003A00300030	0032003000300037002D00300038002D00300033002000310037003A00330032003A00300030	323030372D30382D3032	323030372D30382D30332031373A33323A3030
+#
+# MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
+#
+SELECT @@collation_connection, @@character_set_results;
+@@collation_connection	@@character_set_results
+ucs2_general_ci	latin1
+SELECT
+CHARSET(ADDTIME(_latin1'10:01:01',_latin1'10:00:00')) AS addtime1,
+CHARSET(ADDTIME('10:01:01','10:00:00')) AS addtime2,
+CHARSET(DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second)) AS date_add1,
+CHARSET(DATE_ADD('2001-01-01 10:01:01',interval 10 second)) AS date_add2;
+addtime1	addtime2	date_add1	date_add2
+ucs2	ucs2	ucs2	ucs2
+CREATE TABLE t1 AS
+SELECT
+ADDTIME(_latin1'10:01:01',_latin1'10:00:00') AS addtime1,
+ADDTIME('10:01:01','10:00:00') AS addtime2,
+DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second) AS date_add1,
+DATE_ADD('2001-01-01 10:01:01',interval 10 second) AS date_add2;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `addtime1` varchar(26) CHARACTER SET ucs2 DEFAULT NULL,
+  `addtime2` varchar(26) CHARACTER SET ucs2 DEFAULT NULL,
+  `date_add1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL,
+  `date_add2` varchar(19) CHARACTER SET ucs2 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+addtime1	addtime2	date_add1	date_add2
+20:01:01	20:01:01	2001-01-01 10:01:11	2001-01-01 10:01:11
+DROP TABLE t1;
 #
 # Bug#11926811 / Bug#60625 Illegal mix of collations
 #
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 121168c..74fed6a 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -4988,6 +4988,13 @@ DROP TABLE t1;
 SELECT @@collation_connection, @@character_set_results;
 @@collation_connection	@@character_set_results
 utf8_general_ci	utf8
+SELECT
+CHARSET(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
+CHARSET(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field_str2,
+CHARSET(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
+CHARSET(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
+field_str1	field_str2	field_date	field_datetime
+utf8	utf8	binary	binary
 CREATE TABLE t1 AS
 SELECT
 DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
@@ -4997,8 +5004,8 @@ DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_da
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `field_str1` varchar(19) DEFAULT NULL,
-  `field1_str2` varchar(19) DEFAULT NULL,
+  `field_str1` varchar(19) CHARACTER SET utf8 DEFAULT NULL,
+  `field1_str2` varchar(19) CHARACTER SET utf8 DEFAULT NULL,
   `field_date` date DEFAULT NULL,
   `field_datetime` datetime DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -5009,8 +5016,8 @@ DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
 DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY) AS field_date,
 DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
 Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					field_str1	254	19	10	Y	128	0	63
-def					field1_str2	254	19	19	Y	128	0	63
+def					field_str1	254	57	10	Y	0	0	33
+def					field1_str2	254	57	19	Y	0	0	33
 def					field_date	10	10	10	Y	128	0	63
 def					field_datetime	12	19	19	Y	128	0	63
 field_str1	field1_str2	field_date	field_datetime
@@ -5023,6 +5030,37 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
 field_str1	field1_str2	field_date	field_datetime
 323030372D30382D30322032333A35393A3030	323030372D30382D30332031373A33323A3030	323030372D30382D3032	323030372D30382D30332031373A33323A3030
 #
+# MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
+#
+SELECT @@collation_connection, @@character_set_results;
+@@collation_connection	@@character_set_results
+utf8_general_ci	utf8
+SELECT
+CHARSET(ADDTIME(_latin1'10:01:01',_latin1'10:00:00')) AS addtime1,
+CHARSET(ADDTIME('10:01:01','10:00:00')) AS addtime2,
+CHARSET(DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second)) AS date_add1,
+CHARSET(DATE_ADD('2001-01-01 10:01:01',interval 10 second)) AS date_add2;
+addtime1	addtime2	date_add1	date_add2
+utf8	utf8	utf8	utf8
+CREATE TABLE t1 AS
+SELECT
+ADDTIME(_latin1'10:01:01',_latin1'10:00:00') AS addtime1,
+ADDTIME('10:01:01','10:00:00') AS addtime2,
+DATE_ADD(_latin1'2001-01-01 10:01:01',interval 10 second) AS date_add1,
+DATE_ADD('2001-01-01 10:01:01',interval 10 second) AS date_add2;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `addtime1` varchar(26) CHARACTER SET utf8 DEFAULT NULL,
+  `addtime2` varchar(26) CHARACTER SET utf8 DEFAULT NULL,
+  `date_add1` varchar(19) CHARACTER SET utf8 DEFAULT NULL,
+  `date_add2` varchar(19) CHARACTER SET utf8 DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+addtime1	addtime2	date_add1	date_add2
+20:01:01	20:01:01	2001-01-01 10:01:11	2001-01-01 10:01:11
+DROP TABLE t1;
+#
 # Bug#11926811 / Bug#60625 Illegal mix of collations
 #
 SELECT @@collation_connection;
@@ -5869,5 +5907,31 @@ SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65537) AS data) AS sub;
 len
 131074
 #
+# MDEV-10717 Assertion `!null_value' failed in virtual bool Item::send(Protocol*, String*)
+#
+CREATE TABLE t1 (i INT, KEY(i));
+INSERT INTO t1 VALUES (20081205),(20050327);
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+HEX(i)	HEX(CHAR(i USING utf8))
+131F197	0131
+1326A35	01326A35
+Warnings:
+Warning	1300	Invalid utf8 character string: 'F197'
+SET sql_mode='STRICT_ALL_TABLES';
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+HEX(i)	HEX(CHAR(i USING utf8))
+131F197	NULL
+1326A35	01326A35
+Warnings:
+Warning	1300	Invalid utf8 character string: 'F197'
+SELECT CHAR(i USING utf8) FROM t1;
+CHAR(i USING utf8)
+###
+###
+Warnings:
+###	1300	Invalid utf8 character string: 'F197'
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+#
 # End of 5.5 tests
 #
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 2c316a8..a4d474c 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -924,3 +924,68 @@ id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 3	DERIVED	NULL	NULL	NULL	NULL	NULL	NULL	NULL	no matching row in const table
 2	DERIVED	NULL	NULL	NULL	NULL	NULL	NULL	NULL	no matching row in const table
 DROP TABLES t1,t2;
+#
+# MDEV-10663: Use of Inline table columns in HAVING clause
+# throws 1463 Error
+#
+set @save_sql_mode = @@sql_mode;
+set sql_mode='ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
+CREATE TABLE `example1463` (
+`Customer` varchar(255) NOT NULL,
+`DeliveryStatus` varchar(255) NOT NULL,
+`OrderSize` int(11) NOT NULL
+);
+INSERT INTO example1463 VALUES ('Charlie', 'Success', 100);
+INSERT INTO example1463 VALUES ('David', 'Success', 110);
+INSERT INTO example1463 VALUES ('Charlie', 'Failed', 200);
+INSERT INTO example1463 VALUES ('David', 'Success', 100);
+INSERT INTO example1463 VALUES ('David', 'Unknown', 100);
+INSERT INTO example1463 VALUES ('Edward', 'Success', 150);
+INSERT INTO example1463 VALUES ('Edward', 'Pending', 150);
+SELECT Customer, Success, SUM(OrderSize)
+FROM (SELECT Customer,
+CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
+OrderSize
+FROM example1463) as subQ
+GROUP BY Success, Customer
+WITH ROLLUP;
+Customer	Success	SUM(OrderSize)
+Charlie	No	200
+David	No	100
+Edward	No	150
+NULL	No	450
+Charlie	Yes	100
+David	Yes	210
+Edward	Yes	150
+NULL	Yes	460
+NULL	NULL	910
+SELECT Customer, Success, SUM(OrderSize)
+FROM (SELECT Customer,
+CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
+OrderSize
+FROM example1463) as subQ
+GROUP BY Success, Customer;
+Customer	Success	SUM(OrderSize)
+Charlie	No	200
+David	No	100
+Edward	No	150
+Charlie	Yes	100
+David	Yes	210
+Edward	Yes	150
+SELECT Customer, Success, SUM(OrderSize)
+FROM (SELECT Customer,
+CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
+OrderSize
+FROM example1463) as subQ
+GROUP BY Success, Customer
+HAVING Success IS NOT NULL;
+Customer	Success	SUM(OrderSize)
+Charlie	No	200
+David	No	100
+Edward	No	150
+Charlie	Yes	100
+David	Yes	210
+Edward	Yes	150
+DROP TABLE example1463;
+set sql_mode= @save_sql_mode;
+# end of 5.5
diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result
index 230660f..d993086 100644
--- a/mysql-test/r/derived_view.result
+++ b/mysql-test/r/derived_view.result
@@ -2496,5 +2496,88 @@ DROP TABLE t1,t2;
 #
 # end of 5.3 tests
 #
+#
+# Bug mdev-11161: The second execution of prepared statement
+#                 does not use generated key for materialized
+#                 derived table / view 
+# (actually this is a 5.3 bug.)               
+#
+create table t1 (
+mat_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+matintnum CHAR(6) NOT NULL,
+test MEDIUMINT UNSIGNED NULL
+);
+create table t2 (
+mat_id MEDIUMINT UNSIGNED NOT NULL,
+pla_id MEDIUMINT UNSIGNED NOT NULL
+);
+insert into t1 values
+(NULL, 'a', 1), (NULL, 'b', 2), (NULL, 'c', 3), (NULL, 'd', 4),
+(NULL, 'e', 5), (NULL, 'f', 6), (NULL, 'g', 7), (NULL, 'h', 8),
+(NULL, 'i', 9);
+insert into t2 values
+(1, 100), (1, 101), (1, 102), (2, 100), (2, 103), (2, 104), 
+(3, 101), (3, 102), (3, 105);
+explain
+SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id
+FROM t1 m2 
+INNER JOIN
+(SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum
+FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id
+GROUP BY mp.pla_id) d
+ON d.matintnum=m2.matintnum;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	m2	ALL	NULL	NULL	NULL	NULL	9	
+1	PRIMARY	<derived2>	ref	key0	key0	7	test.m2.matintnum	2	
+2	DERIVED	mp	ALL	NULL	NULL	NULL	NULL	9	Using temporary; Using filesort
+2	DERIVED	m1	eq_ref	PRIMARY	PRIMARY	3	test.mp.mat_id	1	
+prepare stmt1 from
+"SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id
+   FROM t1 m2 
+        INNER JOIN
+        (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum
+           FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id
+         GROUP BY mp.pla_id) d
+        ON d.matintnum=m2.matintnum";
+flush status;
+execute stmt1;
+pla_id	mat_id
+102	1
+101	1
+100	1
+104	2
+103	2
+105	3
+show status like '%Handler_read%';
+Variable_name	Value
+Handler_read_first	0
+Handler_read_key	21
+Handler_read_last	0
+Handler_read_next	6
+Handler_read_prev	0
+Handler_read_rnd	6
+Handler_read_rnd_deleted	0
+Handler_read_rnd_next	27
+flush status;
+execute stmt1;
+pla_id	mat_id
+102	1
+101	1
+100	1
+104	2
+103	2
+105	3
+show status like '%Handler_read%';
+Variable_name	Value
+Handler_read_first	0
+Handler_read_key	21
+Handler_read_last	0
+Handler_read_next	6
+Handler_read_prev	0
+Handler_read_rnd	6
+Handler_read_rnd_deleted	0
+Handler_read_rnd_next	27
+deallocate prepare stmt1;
+drop table t1,t2;
 set optimizer_switch=@exit_optimizer_switch;
 set join_cache_level=@exit_join_cache_level;
diff --git a/mysql-test/r/events_slowlog.result b/mysql-test/r/events_slowlog.result
new file mode 100644
index 0000000..c97fe8a
--- /dev/null
+++ b/mysql-test/r/events_slowlog.result
@@ -0,0 +1,12 @@
+set @event_scheduler_save= @@global.event_scheduler;
+set @slow_query_log_save= @@global.slow_query_log;
+set global event_scheduler= on;
+set global slow_query_log= on;
+set global long_query_time=0.2;
+create table t1 (i int);
+insert into t1 values (0);
+create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5);
+drop table t1;
+set global event_scheduler= @event_scheduler_save;
+set global slow_query_log= @slow_query_log_save;
+set global long_query_time= @@session.long_query_time;
diff --git a/mysql-test/r/fulltext_charsets.result b/mysql-test/r/fulltext_charsets.result
new file mode 100644
index 0000000..39ce02a
--- /dev/null
+++ b/mysql-test/r/fulltext_charsets.result
@@ -0,0 +1,7 @@
+set names utf8mb4;
+create table t1 (a int, b text, fulltext (b)) charset=utf8mb4 collate=utf8mb4_unicode_ci;
+insert t1 values (1000, 'C͓̙̯͔̩ͅͅi̩̘̜̲a̯̲̬̳̜̖̤o͕͓̜͓̺̖̗,̠̬͚ ̺T͇̲h͈̱e ̬̜D̖o̦̖͔̗͖̩̘c̣̼t̝͉̫̮̗o͉̫̭r̙͎̗.͓̪̥');
+select a from t1 where match(b) against ('ciao' in boolean mode);
+a
+1000
+drop table t1;
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index ef5e348..68b1e0f 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -2620,3 +2620,9 @@ id	date1	date2	DATE_ADD(a.date1,INTERVAL -10 DAY)	TO_DAYS(a.date1)-10
 17	NULL	NULL	NULL	NULL
 18	2010-10-13	2010-10-03	2010-10-03	734413
 DROP TABLE t1;
+#
+# MDEV-10524 Assertion `arg1_int >= 0' failed in Item_func_additive_op::result_precision()
+#
+SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2;
+1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2
+3
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 0b4973c..262bb2e 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -2517,3 +2517,17 @@ MAX(i)	c
 0	bar
 7	foo
 drop table t1,t2;
+#
+# ONLY_FULL_GROUP_BY references
+#
+set @save_sql_mode = @@sql_mode;
+set sql_mode='ONLY_FULL_GROUP_BY';
+create table t1 (a int, b int);
+select a+b as x from t1 group by x having x > 1;
+x
+select a as x from t1 group by x having x > 1;
+x
+select a from t1 group by a having a > 1;
+a
+drop table t1;
+set sql_mode= @save_sql_mode;
diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result
index b93d15f..00cbf35 100644
--- a/mysql-test/r/index_merge_innodb.result
+++ b/mysql-test/r/index_merge_innodb.result
@@ -793,3 +793,32 @@ a	b	c
 9	d	d
 DROP TABLE t1;
 set optimizer_switch= @optimizer_switch_save;
+#
+# MDEV-10927: Crash When Using sort_union Optimization
+#
+set @tmp_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='index_merge_sort_intersection=on';
+SET SESSION sort_buffer_size = 1024;
+create table t1 (
+pk int(11) NOT NULL AUTO_INCREMENT,
+col1 int(11) NOT NULL,
+col2 int(11) NOT NULL,
+col3 int(11) NOT NULL,
+key2 int(11) NOT NULL,
+col4 int(11) NOT NULL,
+key1 int(11) NOT NULL,
+PRIMARY KEY (pk),
+KEY key1 (key1),
+KEY key2 (key2)
+) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
+create table t2(a int);
+insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t3(a int);
+insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D;
+insert into t1 (key1, key2, col1,col2,col3,col4)
+select  a,a, a,a,a,a from t3;
+SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE  (key1 between 10 and 8191+10) or (key2= 5);
+sum(col1)
+33632261
+drop table t1,t2,t3;
+set optimizer_switch=@tmp_optimizer_switch;
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index d98f816..1f765a7 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -986,19 +986,19 @@ show grants;
 Grants for user3 at localhost
 GRANT USAGE ON *.* TO 'user3'@'localhost'
 GRANT SELECT ON `mysqltest`.* TO 'user3'@'localhost'
-select * from information_schema.column_privileges where grantee like '%user%'
+select * from information_schema.column_privileges where grantee like '\'user%'
 order by grantee;
 GRANTEE	TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	COLUMN_NAME	PRIVILEGE_TYPE	IS_GRANTABLE
 'user1'@'localhost'	def	mysqltest	t1	f1	SELECT	NO
-select * from information_schema.table_privileges where grantee like '%user%'
+select * from information_schema.table_privileges where grantee like '\'user%'
 order by grantee;
 GRANTEE	TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PRIVILEGE_TYPE	IS_GRANTABLE
 'user2'@'localhost'	def	mysqltest	t2	SELECT	NO
-select * from information_schema.schema_privileges where grantee like '%user%'
+select * from information_schema.schema_privileges where grantee like '\'user%'
 order by grantee;
 GRANTEE	TABLE_CATALOG	TABLE_SCHEMA	PRIVILEGE_TYPE	IS_GRANTABLE
 'user3'@'localhost'	def	mysqltest	SELECT	NO
-select * from information_schema.user_privileges where grantee like '%user%'
+select * from information_schema.user_privileges where grantee like '\'user%'
 order by grantee;
 GRANTEE	TABLE_CATALOG	PRIVILEGE_TYPE	IS_GRANTABLE
 'user1'@'localhost'	def	USAGE	NO
diff --git a/mysql-test/r/information_schema_part.result b/mysql-test/r/information_schema_part.result
index b34183e..77959de 100644
--- a/mysql-test/r/information_schema_part.result
+++ b/mysql-test/r/information_schema_part.result
@@ -151,3 +151,11 @@ select create_options from information_schema.tables where table_schema="test";
 create_options
 partitioned
 drop table t1;
+#
+# MDEV-11353 - Identical logical conditions
+#
+CREATE TABLE t1(a INT) CHECKSUM=1 SELECT 1;
+SELECT CHECKSUM FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
+CHECKSUM
+3036305396
+DROP TABLE t1;
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index ba5c763..8ccc1a3 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -507,7 +507,7 @@ DROP TABLE t1;
 # Bug#11765139  58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
 #
 CREATE TABLE t1(f1 INT);
-SELECT 0xE1C330 INTO OUTFILE 't1.dat';
+SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
 LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
 DROP TABLE t1;
 #
@@ -532,27 +532,3 @@ FIELDS TERMINATED BY 't' LINES TERMINATED BY '';
 Got one of the listed errors
 SET @@sql_mode= @old_mode;
 DROP TABLE t1;
-
-#
-#  Bug#23080148 - Backport of Bug#20683959.
-#  Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY
-#               UNDER DB CHARSET IS UTF8.
-#
-CREATE DATABASE d1 CHARSET latin1;
-USE d1;
-CREATE TABLE t1 (val TEXT);
-LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-1
-SELECT HEX(val) FROM t1;
-HEX(val)
-C38322525420406E696F757A656368756E3A20E98198E2889AF58081AEE7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C89F580948EE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A7F5808B96E28693E99EABE38287E58F99E7B8BAE58AB1 [...]
-CREATE DATABASE d2 CHARSET utf8;
-USE d2;
-CREATE TABLE t1 (val TEXT);
-LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
-ERROR HY000: Invalid utf8 character string: '�"RT @niouzechun: \9058\221A'
-DROP TABLE d1.t1, d2.t1;
-DROP DATABASE d1;
-DROP DATABASE d2;
diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result
index 25143f9..9a14c0e 100644
--- a/mysql-test/r/parser.result
+++ b/mysql-test/r/parser.result
@@ -663,3 +663,12 @@ select 1<<!0, 1 << !0;
 select 0<!0,  0 < ! 0;
 0<!0	0 < ! 0
 1	1
+#
+# MDEV-11171 Assertion `m_cpp_buf <= ptr && ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_append(const char*, const char*)
+#
+CREATE TABLE t1 (id INT);
+CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 1\;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\' at line 1
+PREPARE stmt FROM 'CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 1\\';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\' at line 1
+DROP TABLE t1;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 6214fbc..823c6f7 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -8016,4 +8016,43 @@ Warnings:
 Error	1329	No data - zero rows fetched, selected, or processed
 DROP PROCEDURE p1;
 DROP TABLE t1;
+#
+# MDEV-10713: signal 11 error on multi-table update - crash in
+# handler::increment_statistics or in make_select or assertion
+# failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
+#
+CREATE TABLE `t1` (
+`CLOSE_YN` varchar(10) COLLATE utf8_bin DEFAULT NULL
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
+CREATE TABLE `t2` (
+`ap_close_to` varchar(8) COLLATE utf8_bin DEFAULT NULL
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
+insert t1 values (1);
+CREATE  FUNCTION `f1`(`P_DC_CD` VARBINARY(50), `P_SYS_DATE` DATETIME) RETURNS datetime
+DETERMINISTIC
+SQL SECURITY INVOKER
+BEGIN
+DECLARE V_SYS_DATE DATETIME;
+SELECT now() AS LOC_DATE INTO V_SYS_DATE ;
+RETURN v_sys_date ;
+END $$
+update t1 S
+JOIN
+(
+SELECT CASE
+WHEN DATE_FORMAT( f1('F01', NOW()) , '%Y%m%d') <= CLOSE_YMD
+THEN '99991231'
+	     ELSE '' END ACCOUNT_APPLY_YYYYMMDD
+FROM (
+select case
+when 'AP'='AP'
+                   then ap_close_to
+end AS CLOSE_YMD
+from t2
+) A
+) X
+SET S.CLOSE_YN = ''
+where 1=1;
+drop function if exists f1;
+drop table t1,t2;
 # End of 5.5 test
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 16ab4cf..789cfe2 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -7094,3 +7094,25 @@ a
 0
 DROP TABLE t1;
 SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
+#
+# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
+#
+CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
+INSERT INTO t1 VALUES ('foo','bar');
+SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
+f1	f2
+SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
+f1	f2
+foo	bar
+DROP TABLE t1;
diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result
index 72ca9d3..64bd867 100644
--- a/mysql-test/r/subselect2.result
+++ b/mysql-test/r/subselect2.result
@@ -348,4 +348,49 @@ where t1.a = t2.a and ( t1.a = ( select min(a) from t1 ) or 0 );
 a	a	a
 FRA	FRA	FRA
 drop table t1,t2,t3;
+#
+# MDEV-10148: Database crashes in the query to the View
+#
+CREATE TABLE t1 (
+key_code INT(11) NOT NULL,
+value_string VARCHAR(50) NULL DEFAULT NULL,
+PRIMARY KEY (key_code)
+) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
+CREATE TABLE t2 (
+key_code INT(11) NOT NULL,
+target_date DATE NULL DEFAULT NULL,
+PRIMARY KEY (key_code)
+) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
+CREATE TABLE t3 (
+now_date DATE NOT NULL,
+PRIMARY KEY (now_date)
+) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
+CREATE VIEW v1
+AS
+SELECT
+B.key_code,
+B.target_date
+FROM
+t2 B INNER JOIN t3 C ON
+B.target_date = C.now_date
+;
+SET @s = 'SELECT A.* FROM t1 A WHERE A.key_code IN (SELECT key_code FROM v1)';
+PREPARE stmt FROM @s;
+EXECUTE stmt;
+key_code	value_string
+EXECUTE stmt;
+key_code	value_string
+DEALLOCATE PREPARE stmt;
+DROP VIEW v1;
+DROP TABLE t1,t2,t3;
 set optimizer_switch=@subselect2_test_tmp;
+create table t1 (a int);
+create table t2 (a int);
+create table t3(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+insert into t2 select a from t1;
+insert into t3 select a from t1;
+select null in (select a from t1 where a < out3.a union select a from t2 where
+(select a from t3) +1 < out3.a+1) from t3 out3;
+ERROR 21000: Subquery returns more than 1 row
+drop table t1, t2, t3;
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index c7f22cf..89fb090 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -2410,5 +2410,44 @@ SELECT x FROM t1 WHERE id > (SELECT MAX(id) - 1000 FROM t1) ORDER BY x LIMIT 1;
 x
 0
 drop table t1;
+#
+# MDEV-7691: Assertion `outer_context || !*from_field || *from_field == not_found_field' ...
+#
+set optimizer_switch=default;
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(6);
+CREATE TABLE t2 (b INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(8);
+PREPARE stmt FROM "
+SELECT * FROM t2
+HAVING 0 IN (
+  SELECT a FROM t1
+  WHERE a IN ( 
+    SELECT a FROM t1
+    WHERE b = a
+  )
+)
+";
+EXECUTE stmt;
+b
+EXECUTE stmt;
+b
+# Alternative test case, without HAVING
+CREATE TABLE t3 (i INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (4),(6);
+PREPARE stmt FROM "
+SELECT * FROM t3 AS t10
+WHERE EXISTS ( 
+  SELECT * FROM t3 AS t20 WHERE t10.i IN ( 
+    SELECT i FROM t3 
+  ) 
+)";
+EXECUTE stmt;
+i
+6
+EXECUTE stmt;
+i
+6
+drop table t1, t2, t3;
 SET optimizer_switch= @@global.optimizer_switch;
 set @@tmp_table_size= @@global.tmp_table_size;
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index aed4fb3..c729c17 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -7091,6 +7091,28 @@ a
 0
 DROP TABLE t1;
 SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
+#
+# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
+#
+CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
+INSERT INTO t1 VALUES ('foo','bar');
+SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
+f1	f2
+SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
+f1	f2
+foo	bar
+DROP TABLE t1;
 set optimizer_switch=default;
 select @@optimizer_switch like '%materialization=on%';
 @@optimizer_switch like '%materialization=on%'
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index e1f0853..dc308ea 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -7089,4 +7089,26 @@ a
 0
 DROP TABLE t1;
 SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
+#
+# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
+#
+CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
+INSERT INTO t1 VALUES ('foo','bar');
+SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
+f1	f2
+SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
+f1	f2
+foo	bar
+DROP TABLE t1;
 set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index b5fa7b1..e7c85c1 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -7100,6 +7100,28 @@ a
 0
 DROP TABLE t1;
 SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
+#
+# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
+#
+CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
+INSERT INTO t1 VALUES ('foo','bar');
+SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
+f1	f2
+SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
+f1	f2
+foo	bar
+DROP TABLE t1;
 set optimizer_switch=default;
 select @@optimizer_switch like '%subquery_cache=on%';
 @@optimizer_switch like '%subquery_cache=on%'
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index b815559..b6261f0 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -7089,5 +7089,27 @@ a
 0
 DROP TABLE t1;
 SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
+#
+# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
+#
+CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
+INSERT INTO t1 VALUES ('foo','bar');
+SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
+f1	f2
+SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
+f1	f2
+foo	bar
+DROP TABLE t1;
 set @optimizer_switch_for_subselect_test=null;
 set @join_cache_level_for_subselect_test=NULL;
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index cde8816..7ff74c8 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -221,7 +221,6 @@ drop  table t1;
 create table t1 (a decimal(10,2) unsigned);
 insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 2
 Warning	1264	Out of range value for column 'a' at row 6
 insert into t1 values ("-.1"),("+.1"),(".1");
 Warnings:
@@ -280,7 +279,6 @@ drop  table t1;
 create table t1 (a decimal(10,2) zerofill);
 insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 2
 Warning	1264	Out of range value for column 'a' at row 6
 insert into t1 values ("-.1"),("+.1"),(".1");
 Warnings:
@@ -1012,6 +1010,9 @@ SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE
 COLUMN_NAME	DATA_TYPE	COLUMN_TYPE
 a	decimal	decimal(10,2)/*old*/
 DROP TABLE t1dec102;
+select cast('-0.0' as decimal(5,1)) < 0;
+cast('-0.0' as decimal(5,1)) < 0
+0
 #
 # End of 5.5 tests
 #
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 40f5a77..5a6cd89 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -362,7 +362,7 @@ a
 2
 select found_rows();
 found_rows()
-6
+5
 SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 100;
 a
 1
@@ -1169,12 +1169,9 @@ a	b
 select * from ((select * from t1 limit 1) union (select * from t1 limit 1)) a;
 a	b
 1	a
-2	b
 select * from ((select * from t1 limit 1) union (select * from t1 limit 1) union (select * from t1 limit 1)) a;
 a	b
 1	a
-2	b
-3	c
 select * from ((((select * from t1))) union (select * from t1) union (select * from t1)) a;
 a	b
 1	a
@@ -1553,7 +1550,6 @@ NULL	UNION RESULT	<union1,2>	ALL	NULL	NULL	NULL	NULL	NULL	NULL	Using filesort
 Warnings:
 Note	1003	select NULL AS `a` from `test`.`t1` union select NULL AS `a` from `test`.`t1` order by `a`
 DROP TABLE t1;
-End of 5.0 tests
 #
 # Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take 
 # subselects into account
@@ -1659,6 +1655,14 @@ a
 4
 5
 6
+(select a from t1 where false) UNION (select a from t1) limit 8;
+a
+10
+2
+3
+4
+5
+6
 7
 8
 drop table t1;
@@ -1955,3 +1959,22 @@ cccc
 bbbb
 dddd
 drop table t1;
+#
+# MDEV-10172: UNION query returns incorrect rows outside
+# conditional evaluation
+#
+create table t1 (d datetime not null primary key);
+insert into t1(d) values ('2016-06-01'),('2016-06-02'),('2016-06-03'),('2016-06-04');
+select * from
+(
+select * from t1 where d between '2016-06-02' and '2016-06-05'
+	union
+(select * from t1 where d < '2016-06-05' order by d desc limit 1)
+) onlyJun2toJun4
+order by d;
+d
+2016-06-02 00:00:00
+2016-06-03 00:00:00
+2016-06-04 00:00:00
+drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/std_data/bug20683959loaddata.txt b/mysql-test/std_data/bug20683959loaddata.txt
deleted file mode 100644
index 1878cc7..0000000
--- a/mysql-test/std_data/bug20683959loaddata.txt
+++ /dev/null
@@ -1 +0,0 @@
-Ã"RT @niouzechun: 遘√����繝上ャ繝斐����繧ィ繝ウ繝牙耳縺ェ繧薙□縺代l縺ゥ縲√い繝ウ繝上ャ繝斐����繧ィ繝ウ繝峨d諠ィ蜉����噪縺ェ縺願ゥア繧偵≠縺セ繧顔ゥ肴・オ逧����↓鞫ょ叙縺励↑縺����炊逕ア縺ッ縲∫樟螳溘����莠コ逕溘����蝓コ譛ャ逧����↓縺����∪縺上>縺九↑縺����@荳榊ケウ遲峨□縺礼炊荳榊ース縺�縺苓セ帙>
diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result
index ca92cc5..35a86f4 100644
--- a/mysql-test/suite/binlog/r/binlog_index.result
+++ b/mysql-test/suite/binlog/r/binlog_index.result
@@ -1,9 +1,9 @@
 call mtr.add_suppression('Attempting backtrace');
-call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
-call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
+call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
+call mtr.add_suppression('MYSQL_BIN_LOG::open failed to sync the index file');
 call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
 call mtr.add_suppression('Could not open .*');
-call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
+call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
 flush tables;
 RESET MASTER;
 flush logs;
diff --git a/mysql-test/suite/binlog/t/binlog_index.test b/mysql-test/suite/binlog/t/binlog_index.test
index a264549..09e817c 100644
--- a/mysql-test/suite/binlog/t/binlog_index.test
+++ b/mysql-test/suite/binlog/t/binlog_index.test
@@ -9,11 +9,11 @@ source include/have_debug.inc;
 # Avoid CrashReporter popup on Mac
 --source include/not_crashrep.inc
 call mtr.add_suppression('Attempting backtrace');
-call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
-call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
+call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
+call mtr.add_suppression('MYSQL_BIN_LOG::open failed to sync the index file');
 call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
 call mtr.add_suppression('Could not open .*');
-call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
+call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
 flush tables;
 
 let $old=`select @@debug`;
diff --git a/mysql-test/suite/engines/iuds/r/insert_decimal.result b/mysql-test/suite/engines/iuds/r/insert_decimal.result
index 50fde80..eab8592 100644
--- a/mysql-test/suite/engines/iuds/r/insert_decimal.result
+++ b/mysql-test/suite/engines/iuds/r/insert_decimal.result
@@ -48,7 +48,6 @@ Warning	1264	Out of range value for column 'c2' at row 1
 Note	1265	Data truncated for column 'c3' at row 1
 insert into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12);
 Warnings:
-Warning	1264	Out of range value for column 'c2' at row 2
 Warning	1264	Out of range value for column 'c2' at row 6
 insert into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15);
 Warnings:
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result
index ddafbca..a71dcdf 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result
@@ -169,7 +169,7 @@ count(*)
 SET SQL_LOG_BIN=1;
 SET GLOBAL debug_dbug="-d,error_unique_log_filename";
 ###################### TEST #10
-call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
+call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
 call mtr.add_suppression("Could not open .*");
 RESET MASTER;
 SHOW WARNINGS;
@@ -226,7 +226,7 @@ include/rpl_reset.inc
 call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
 call mtr.add_suppression("Error writing file .*");
 call mtr.add_suppression("Could not open .*");
-call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
+call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
 call mtr.add_suppression("Can't generate a unique log-filename .*");
 ###################### TEST #13
 SET @old_debug=@@global.debug;
diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
index 1489af8..19611ac 100644
--- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
@@ -1,14 +1,21 @@
 include/master-slave.inc
 [connection master]
-
 ---Setup Section  --
 set timestamp=1000000000;
-DROP TABLE IF EXISTS t1,t2,t3;
 CREATE TABLE t1(word VARCHAR(20));
 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
-
----Test1 check table load  --
+INSERT INTO t1 VALUES ("abirvalg");
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
+set @d1 = 'dd1';
+set @d1 = concat(@d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1);
+set @d1 = concat(@d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1);
+set @d1 = concat(@d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1);
+---Test 1 check table load  --
 SELECT COUNT(*) from t1;
 COUNT(*)
 351
@@ -71,9 +78,7 @@ c1	c3	c4	c5
 5	2006-02-22 00:00:00	Tested in Texas	11
 insert into t1 values ("Alas");
 flush logs;
-
 --- Test 1 Dump binlog to file --
-
 --- Test 1 delete tables, clean master and slave  --
 DROP TABLE t1;
 DROP TABLE t2;
@@ -84,9 +89,7 @@ reset master;
 reset slave;
 start slave;
 include/wait_for_slave_to_start.inc
-
 --- Test 1 Load from Dump binlog file --
-
 --- Test 1 Check Load Results --
 SELECT COUNT(*) from t1;
 COUNT(*)
@@ -148,7 +151,6 @@ c1	c3	c4	c5
 3	2006-02-22 00:00:00	Tested in Texas	6.6
 4	2006-02-22 00:00:00	Tested in Texas	8.8
 5	2006-02-22 00:00:00	Tested in Texas	11
-
 --- Test 2 position test --
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
@@ -172,7 +174,6 @@ DELIMITER ;
 ROLLBACK /* added by mysqlbinlog */;
 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
-
 --- Test 3 First Remote test --
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
@@ -189,9 +190,6 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/
 SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 SET @@session.lc_time_names=0/*!*/;
 SET @@session.collation_database=DEFAULT/*!*/;
-DROP TABLE IF EXISTS `t1`,`t2`,`t3` /* generated by server */
-/*!*/;
-SET TIMESTAMP=1000000000/*!*/;
 CREATE TABLE t1(word VARCHAR(20))
 /*!*/;
 SET TIMESTAMP=1000000000/*!*/;
@@ -205,7 +203,6 @@ DELIMITER ;
 ROLLBACK /* added by mysqlbinlog */;
 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
-
 --- Test 4 Second Remote test --
 DROP TABLE t1;
 DROP TABLE t2;
@@ -276,7 +273,6 @@ c1	c3	c4	c5
 3	2006-02-22 00:00:00	Tested in Texas	6.6
 4	2006-02-22 00:00:00	Tested in Texas	8.8
 5	2006-02-22 00:00:00	Tested in Texas	11
-
 --- Test 5 LOAD DATA --
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
@@ -287,7 +283,6 @@ DELIMITER ;
 ROLLBACK /* added by mysqlbinlog */;
 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
-
 --- Test 6 reading stdin --
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
@@ -304,9 +299,6 @@ SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/
 SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 SET @@session.lc_time_names=0/*!*/;
 SET @@session.collation_database=DEFAULT/*!*/;
-DROP TABLE IF EXISTS `t1`,`t2`,`t3` /* generated by server */
-/*!*/;
-SET TIMESTAMP=1000000000/*!*/;
 CREATE TABLE t1(word VARCHAR(20))
 /*!*/;
 SET TIMESTAMP=1000000000/*!*/;
@@ -320,7 +312,6 @@ DELIMITER ;
 ROLLBACK /* added by mysqlbinlog */;
 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
-
 --- Test 7 reading stdin w/position --
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
@@ -344,7 +335,6 @@ DELIMITER ;
 ROLLBACK /* added by mysqlbinlog */;
 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
-
 --- Test 8 switch internal charset --
 stop slave;
 include/wait_for_slave_to_stop.inc
@@ -380,14 +370,13 @@ HEX(f)
 select HEX(f) from t5;
 HEX(f)
 835C
-
 --- Test cleanup --
-DROP TABLE IF EXISTS t1;
+DROP TABLE t1, t2, t3, t04, t05, t4, t5;
 CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
 INSERT INTO t1 VALUES(1,1);
 SELECT * FROM t1;
 a	b
 1	1
 FLUSH LOGS;
-DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
+DROP TABLE t1;
 include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_binlog_errors.test b/mysql-test/suite/rpl/t/rpl_binlog_errors.test
index 9e4a106..fb3b39f 100644
--- a/mysql-test/suite/rpl/t/rpl_binlog_errors.test
+++ b/mysql-test/suite/rpl/t/rpl_binlog_errors.test
@@ -256,7 +256,7 @@ SET GLOBAL debug_dbug="-d,error_unique_log_filename";
 ###            while registering the index file and the binary log
 ###            file or failure to write the rotate event.
 
-call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
+call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
 call mtr.add_suppression("Could not open .*");
 
 RESET MASTER;
@@ -362,7 +362,7 @@ RESET MASTER;
 call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
 call mtr.add_suppression("Error writing file .*");
 call mtr.add_suppression("Could not open .*");
-call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
+call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
 call mtr.add_suppression("Can't generate a unique log-filename .*");
 -- echo ###################### TEST #13
 
diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
index ed0f31b..678679f 100644
--- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
+++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
@@ -4,43 +4,27 @@
 # Purpose: To test changes to mysqlbinlog for row based bin logs #
 # We are using .opt file since we need small binlog size         #
 ##################################################################
-# Include Section
-# Make sure that we have row based bin log
 -- source include/have_binlog_format_row.inc
-# Embedded server doesn't support binlogging
 -- source include/not_embedded.inc
-# This test requires the cp932 charset compiled in
 -- source include/have_cp932.inc
-# Slow test, don't run during staging part
--- source include/not_staging.inc
-
 -- source include/master-slave.inc
 
-# Setup Section
-# we need this for getting fixed timestamps inside of this test
-
---disable_query_log
-select "---Setup Section  --" as "";
---enable_query_log
+--echo ---Setup Section  --
 
+# we need this for getting fixed timestamps inside of this test
 set timestamp=1000000000;
 
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3;
---enable_warnings
-
-connection master;
 CREATE TABLE t1(word VARCHAR(20));
 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
---let $position= query_get_value(SHOW MASTER STATUS, Position, 1)
+--let position= query_get_value(SHOW MASTER STATUS, Position, 1)
 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); 
---let $stop_position=query_get_value(SHOW MASTER STATUS, Position, 1)
---let $stop_position1=`select $stop_position - 1`
---let $binlog_start_pos=query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
+--let stop_position=query_get_value(SHOW MASTER STATUS, Position, 1)
+--let stop_position1=`select $stop_position - 1`
+--let binlog_start_pos=query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
+
 # Test Section
 # Lets start by putting some data into the tables.
 
---disable_query_log
 INSERT INTO t1 VALUES ("abirvalg");
 LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
 LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
@@ -54,7 +38,8 @@ set @d1 = concat(@d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1);
 set @d1 = concat(@d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1);
 set @d1 = concat(@d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1, at d1);
 
-let $count=500;
+--disable_query_log
+let count=500;
 while ($count)
 {
  INSERT INTO t2 VALUES (NULL);
@@ -63,10 +48,7 @@ while ($count)
 }
 --enable_query_log
 
-
---disable_query_log
-select "---Test1 check table load  --" as "";
---enable_query_log
+--echo ---Test 1 check table load  --
 
 # Lets Check the tables on the Master
 SELECT COUNT(*) from t1;
@@ -95,34 +77,26 @@ insert into t1 values ("Alas");
 flush logs;
 
 # delimiters are for easier debugging in future
---disable_query_log
-select "--- Test 1 Dump binlog to file --" as "";
---enable_query_log
+--echo --- Test 1 Dump binlog to file --
 
 #
 #  Prepare local temporary file to recreate what we have currently.
-let $MYSQLD_DATADIR= `select @@datadir;`;
+let MYSQLD_DATADIR= `select @@datadir;`;
 --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql
 
 --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql
 
 # Now that we have our file, lets get rid of the current database.
 # Cleanup the master and the slave and try to recreate.
---disable_query_log
-select "--- Test 1 delete tables, clean master and slave  --" as "";
---enable_query_log
+--echo --- Test 1 delete tables, clean master and slave  --
 
 DROP TABLE t1;
 DROP TABLE t2;
 DROP TABLE t3;
 
 sync_slave_with_master;
-#we expect STOP SLAVE to produce a warning as the slave is stopped
-#(the server was started with skip-slave-start)
---disable_warnings
 stop slave;
 --source include/wait_for_slave_to_stop.inc
---enable_warnings
 connection master;
 reset master;
 connection slave;
@@ -132,15 +106,11 @@ start slave;
 connection master;
 
 # We should be clean at this point, now we will run in the file from above.
---disable_query_log
-select "--- Test 1 Load from Dump binlog file --" as "";
---enable_query_log
+--echo --- Test 1 Load from Dump binlog file --
 
 --exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql"
 
---disable_query_log
-select "--- Test 1 Check Load Results --" as "";
---enable_query_log
+--echo --- Test 1 Check Load Results --
 
 # Lets Check the tables on the Master
 SELECT COUNT(*) from t1;
@@ -168,28 +138,20 @@ remove_file $MYSQLTEST_VARDIR/tmp/master.sql;
 
 # this test for start-position option
 # By setting this position to 416, we should only get the create of t3
---disable_query_log
-select "--- Test 2 position test --" as "";
---enable_query_log
-let $MYSQLD_DATADIR= `select @@datadir;`;
+--echo --- Test 2 position test --
 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --start-position=$position --stop-position=$stop_position $MYSQLD_DATADIR/master-bin.000001
 
 # These are tests for remote binlog.
 # They should return the same as previous test.
 
---disable_query_log
-select "--- Test 3 First Remote test --" as "";
---enable_query_log
+--echo --- Test 3 First Remote test --
 
 # This is broken now
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$stop_position --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
 
---disable_query_log
-select "--- Test 4 Second Remote test --" as "";
---enable_query_log
+--echo --- Test 4 Second Remote test --
 --exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql
-
 --exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql
 
 # Now that we have our file, lets get rid of the current database.
@@ -201,13 +163,8 @@ DROP TABLE t3;
 
 sync_slave_with_master;
 
-#we expect STOP SLAVE to produce a warning as the slave is stopped
-#(the server was started with skip-slave-start)
-
---disable_warnings
 stop slave;
 --source include/wait_for_slave_to_stop.inc
---enable_warnings
 connection master;
 reset master;
 connection slave;
@@ -251,40 +208,26 @@ connection master;
 # transactions. /Matz
 
 # LOAD DATA
---disable_query_log
-select "--- Test 5 LOAD DATA --" as "";
---enable_query_log
+--echo --- Test 5 LOAD DATA --
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$binlog_start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
 
 # Bug#7853 (mysqlbinlog does not accept input from stdin)
 
---disable_query_log
-select "--- Test 6 reading stdin --" as "";
---enable_query_log
-let $MYSQLD_DATADIR= `select @@datadir;`;
+--echo --- Test 6 reading stdin --
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 --exec $MYSQL_BINLOG --short-form --stop-position=$stop_position1 - < $MYSQLD_DATADIR/master-bin.000001
 
---disable_query_log
-select "--- Test 7 reading stdin w/position --" as "";
---enable_query_log
+--echo --- Test 7 reading stdin w/position --
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 --exec $MYSQL_BINLOG --short-form --start-position=$position --stop-position=$stop_position - < $MYSQLD_DATADIR/master-bin.000001
        
 # Bug#16217 (mysql client did not know how not switch its internal charset)
---disable_query_log
-select "--- Test 8 switch internal charset --" as "";
---enable_query_log
+--echo --- Test 8 switch internal charset --
 sync_slave_with_master;
 
-#we expect STOP SLAVE to produce a warning as the slave is stopped
-#(the server was started with skip-slave-start)
-
---disable_warnings
 stop slave;
 --source include/wait_for_slave_to_stop.inc
---enable_warnings
 connection master;
 reset master;
 connection slave;
@@ -297,7 +240,6 @@ create table t4 (f text character set utf8);
 create table t5 (f text character set cp932); 
 --exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')"
 --exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'�\');"
-let $MYSQLD_DATADIR= `select @@datadir;`;
 flush logs;
 rename table t4 to t04, t5 to t05;
 --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL --default-character-set=utf8
@@ -314,42 +256,30 @@ select HEX(f) from t4;
 select HEX(f) from t05;
 select HEX(f) from t5;
 
---disable_query_log
-select "--- Test cleanup --" as "";
---enable_query_log
+--echo --- Test cleanup --
 # clean up
 connection master;
 sync_slave_with_master;
 
 connection master;
+DROP TABLE t1, t2, t3, t04, t05, t4, t5;
 
 # BUG#17654 also test mysqlbinlog to ensure it can read the binlog from a remote server 
 # and ensure that the results are the same as if read from a file (the same file).
 
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
 CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
-
 INSERT INTO t1 VALUES(1,1);
-
 SELECT * FROM t1;
-
-let $MYSQLD_DATADIR= `select @@datadir;`;
-
 FLUSH LOGS;
 
 --exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql
 --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql
 
 --diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql
-
 --remove_file $MYSQLTEST_VARDIR/tmp/remote.sql
-
 --remove_file $MYSQLTEST_VARDIR/tmp/local.sql
+DROP TABLE t1;
 
-DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; 
 sync_slave_with_master;
 
 # End of 4.1 tests
diff --git a/mysql-test/suite/sys_vars/r/replicate_do_db_basic.result b/mysql-test/suite/sys_vars/r/replicate_do_db_basic.result
index b964d3d..a05b85a 100644
--- a/mysql-test/suite/sys_vars/r/replicate_do_db_basic.result
+++ b/mysql-test/suite/sys_vars/r/replicate_do_db_basic.result
@@ -33,5 +33,9 @@ SET @@GLOBAL.replicate_do_db="";
 SELECT @@GLOBAL.replicate_do_db;
 @@GLOBAL.replicate_do_db
 
+SET @@GLOBAL.replicate_do_db=null;
+SELECT @@GLOBAL.replicate_do_db;
+@@GLOBAL.replicate_do_db
+
 # Cleanup.
 SET @@GLOBAL.replicate_do_db = @save_replicate_do_db;
diff --git a/mysql-test/suite/sys_vars/r/replicate_do_table_basic.result b/mysql-test/suite/sys_vars/r/replicate_do_table_basic.result
index fac2372..e67b1ee 100644
--- a/mysql-test/suite/sys_vars/r/replicate_do_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/replicate_do_table_basic.result
@@ -40,5 +40,9 @@ SET @@GLOBAL.replicate_do_table="";
 SELECT @@GLOBAL.replicate_do_table;
 @@GLOBAL.replicate_do_table
 
+SET @@GLOBAL.replicate_do_table=null;
+SELECT @@GLOBAL.replicate_do_table;
+@@GLOBAL.replicate_do_table
+
 # Cleanup.
 SET @@GLOBAL.replicate_do_table = @save_replicate_do_table;
diff --git a/mysql-test/suite/sys_vars/r/replicate_ignore_db_basic.result b/mysql-test/suite/sys_vars/r/replicate_ignore_db_basic.result
index c4d7a37..c7ff697 100644
--- a/mysql-test/suite/sys_vars/r/replicate_ignore_db_basic.result
+++ b/mysql-test/suite/sys_vars/r/replicate_ignore_db_basic.result
@@ -33,5 +33,9 @@ SET @@GLOBAL.replicate_ignore_db="";
 SELECT @@GLOBAL.replicate_ignore_db;
 @@GLOBAL.replicate_ignore_db
 
+SET @@GLOBAL.replicate_ignore_db=null;
+SELECT @@GLOBAL.replicate_ignore_db;
+@@GLOBAL.replicate_ignore_db
+
 # Cleanup.
 SET @@GLOBAL.replicate_ignore_db = @save_replicate_ignore_db;
diff --git a/mysql-test/suite/sys_vars/r/replicate_ignore_table_basic.result b/mysql-test/suite/sys_vars/r/replicate_ignore_table_basic.result
index bc463d0..db97ce1 100644
--- a/mysql-test/suite/sys_vars/r/replicate_ignore_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/replicate_ignore_table_basic.result
@@ -40,5 +40,9 @@ SET @@GLOBAL.replicate_ignore_table="";
 SELECT @@GLOBAL.replicate_ignore_table;
 @@GLOBAL.replicate_ignore_table
 
+SET @@GLOBAL.replicate_ignore_table=null;
+SELECT @@GLOBAL.replicate_ignore_table;
+@@GLOBAL.replicate_ignore_table
+
 # Cleanup.
 SET @@GLOBAL.replicate_ignore_table = @save_replicate_ignore_table;
diff --git a/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result b/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result
index 5647cc9..8c55103 100644
--- a/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result
@@ -40,5 +40,9 @@ SET @@GLOBAL.replicate_wild_do_table="";
 SELECT @@GLOBAL.replicate_wild_do_table;
 @@GLOBAL.replicate_wild_do_table
 
+SET @@GLOBAL.replicate_wild_do_table=null;
+SELECT @@GLOBAL.replicate_wild_do_table;
+@@GLOBAL.replicate_wild_do_table
+
 # Cleanup.
 SET @@GLOBAL.replicate_wild_do_table = @save_replicate_wild_do_table;
diff --git a/mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_basic.result b/mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_basic.result
index c6829b7..0f46ce3 100644
--- a/mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_basic.result
@@ -40,5 +40,9 @@ SET @@GLOBAL.replicate_wild_ignore_table="";
 SELECT @@GLOBAL.replicate_wild_ignore_table;
 @@GLOBAL.replicate_wild_ignore_table
 
+SET @@GLOBAL.replicate_wild_ignore_table=null;
+SELECT @@GLOBAL.replicate_wild_ignore_table;
+@@GLOBAL.replicate_wild_ignore_table
+
 # Cleanup.
 SET @@GLOBAL.replicate_wild_ignore_table = @save_replicate_wild_ignore_table;
diff --git a/mysql-test/suite/sys_vars/t/replicate_do_db_basic.test b/mysql-test/suite/sys_vars/t/replicate_do_db_basic.test
index ccf50b1..59d0176 100644
--- a/mysql-test/suite/sys_vars/t/replicate_do_db_basic.test
+++ b/mysql-test/suite/sys_vars/t/replicate_do_db_basic.test
@@ -35,5 +35,8 @@ SELECT @@GLOBAL.replicate_do_db;
 SET @@GLOBAL.replicate_do_db="";
 SELECT @@GLOBAL.replicate_do_db;
 
+SET @@GLOBAL.replicate_do_db=null;
+SELECT @@GLOBAL.replicate_do_db;
+
 --echo # Cleanup.
 SET @@GLOBAL.replicate_do_db = @save_replicate_do_db;
diff --git a/mysql-test/suite/sys_vars/t/replicate_do_table_basic.test b/mysql-test/suite/sys_vars/t/replicate_do_table_basic.test
index f3b1585..346bdf3 100644
--- a/mysql-test/suite/sys_vars/t/replicate_do_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/replicate_do_table_basic.test
@@ -44,5 +44,8 @@ SELECT @@GLOBAL.replicate_do_table;
 SET @@GLOBAL.replicate_do_table="";
 SELECT @@GLOBAL.replicate_do_table;
 
+SET @@GLOBAL.replicate_do_table=null;
+SELECT @@GLOBAL.replicate_do_table;
+
 --echo # Cleanup.
 SET @@GLOBAL.replicate_do_table = @save_replicate_do_table;
diff --git a/mysql-test/suite/sys_vars/t/replicate_ignore_db_basic.test b/mysql-test/suite/sys_vars/t/replicate_ignore_db_basic.test
index 3a0bc88..376397d 100644
--- a/mysql-test/suite/sys_vars/t/replicate_ignore_db_basic.test
+++ b/mysql-test/suite/sys_vars/t/replicate_ignore_db_basic.test
@@ -35,5 +35,8 @@ SELECT @@GLOBAL.replicate_ignore_db;
 SET @@GLOBAL.replicate_ignore_db="";
 SELECT @@GLOBAL.replicate_ignore_db;
 
+SET @@GLOBAL.replicate_ignore_db=null;
+SELECT @@GLOBAL.replicate_ignore_db;
+
 --echo # Cleanup.
 SET @@GLOBAL.replicate_ignore_db = @save_replicate_ignore_db;
diff --git a/mysql-test/suite/sys_vars/t/replicate_ignore_table_basic.test b/mysql-test/suite/sys_vars/t/replicate_ignore_table_basic.test
index aebe907..56cf7f1 100644
--- a/mysql-test/suite/sys_vars/t/replicate_ignore_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/replicate_ignore_table_basic.test
@@ -44,5 +44,8 @@ SELECT @@GLOBAL.replicate_ignore_table;
 SET @@GLOBAL.replicate_ignore_table="";
 SELECT @@GLOBAL.replicate_ignore_table;
 
+SET @@GLOBAL.replicate_ignore_table=null;
+SELECT @@GLOBAL.replicate_ignore_table;
+
 --echo # Cleanup.
 SET @@GLOBAL.replicate_ignore_table = @save_replicate_ignore_table;
diff --git a/mysql-test/suite/sys_vars/t/replicate_wild_do_table_basic.test b/mysql-test/suite/sys_vars/t/replicate_wild_do_table_basic.test
index b96a62f..832d339 100644
--- a/mysql-test/suite/sys_vars/t/replicate_wild_do_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/replicate_wild_do_table_basic.test
@@ -44,5 +44,8 @@ SELECT @@GLOBAL.replicate_wild_do_table;
 SET @@GLOBAL.replicate_wild_do_table="";
 SELECT @@GLOBAL.replicate_wild_do_table;
 
+SET @@GLOBAL.replicate_wild_do_table=null;
+SELECT @@GLOBAL.replicate_wild_do_table;
+
 --echo # Cleanup.
 SET @@GLOBAL.replicate_wild_do_table = @save_replicate_wild_do_table;
diff --git a/mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_basic.test b/mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_basic.test
index 2900dea..5cb1ff6 100644
--- a/mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_basic.test
@@ -44,5 +44,8 @@ SELECT @@GLOBAL.replicate_wild_ignore_table;
 SET @@GLOBAL.replicate_wild_ignore_table="";
 SELECT @@GLOBAL.replicate_wild_ignore_table;
 
+SET @@GLOBAL.replicate_wild_ignore_table=null;
+SELECT @@GLOBAL.replicate_wild_ignore_table;
+
 --echo # Cleanup.
 SET @@GLOBAL.replicate_wild_ignore_table = @save_replicate_wild_ignore_table;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 5c90c3e..1e77dac 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -2081,4 +2081,13 @@ DELIMITER ;|
 create table t1 as select f1();
 drop function f1;
 
+--echo #
+--echo # MDEV-10274 Bundling insert with create statement
+--echo #  for table with unsigned Decimal primary key issues warning 1194
+--echo #
+
+create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory
+        select  2.1 ID;
+drop table t1;
+
 --echo End of 5.5 tests
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index d6fdc6c..75581ed 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1682,5 +1682,19 @@ SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65536) AS data) AS sub;
 SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65537) AS data) AS sub;
 
 --echo #
+--echo # MDEV-10717 Assertion `!null_value' failed in virtual bool Item::send(Protocol*, String*)
+--echo #
+CREATE TABLE t1 (i INT, KEY(i));
+INSERT INTO t1 VALUES (20081205),(20050327);
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+SET sql_mode='STRICT_ALL_TABLES';
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+# Avoid garbage in the output
+--replace_column 1 ###
+SELECT CHAR(i USING utf8) FROM t1;
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+
+--echo #
 --echo # End of 5.5 tests
 --echo #
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index e10349b..e8a6ac3 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -796,3 +796,50 @@ A.DIVISION=C1.DIVISION AND A.RECEIVABLE_GROUP=C1.RECEIVABLE_GROUP AND A.CREDIT_L
 ORDER BY TOTAL DESC;
 
 DROP TABLES t1,t2;
+
+--echo #
+--echo # MDEV-10663: Use of Inline table columns in HAVING clause
+--echo # throws 1463 Error
+--echo #
+
+set @save_sql_mode = @@sql_mode;
+set sql_mode='ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
+
+CREATE TABLE `example1463` (
+  `Customer` varchar(255) NOT NULL,
+  `DeliveryStatus` varchar(255) NOT NULL,
+  `OrderSize` int(11) NOT NULL
+);
+INSERT INTO example1463 VALUES ('Charlie', 'Success', 100);
+INSERT INTO example1463 VALUES ('David', 'Success', 110);
+INSERT INTO example1463 VALUES ('Charlie', 'Failed', 200);
+INSERT INTO example1463 VALUES ('David', 'Success', 100);
+INSERT INTO example1463 VALUES ('David', 'Unknown', 100);
+INSERT INTO example1463 VALUES ('Edward', 'Success', 150);
+INSERT INTO example1463 VALUES ('Edward', 'Pending', 150);
+
+SELECT Customer, Success, SUM(OrderSize)
+ FROM (SELECT Customer,
+ CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
+ OrderSize
+ FROM example1463) as subQ
+ GROUP BY Success, Customer
+ WITH ROLLUP;
+SELECT Customer, Success, SUM(OrderSize)
+ FROM (SELECT Customer,
+ CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
+ OrderSize
+ FROM example1463) as subQ
+ GROUP BY Success, Customer;
+SELECT Customer, Success, SUM(OrderSize)
+ FROM (SELECT Customer,
+ CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
+ OrderSize
+ FROM example1463) as subQ
+ GROUP BY Success, Customer
+ HAVING Success IS NOT NULL;
+
+DROP TABLE example1463;
+set sql_mode= @save_sql_mode;
+
+--echo # end of 5.5
diff --git a/mysql-test/t/derived_view.test b/mysql-test/t/derived_view.test
index 6789983..d017f84 100644
--- a/mysql-test/t/derived_view.test
+++ b/mysql-test/t/derived_view.test
@@ -1827,6 +1827,60 @@ DROP TABLE t1,t2;
 --echo # end of 5.3 tests
 --echo #
 
+--echo #
+--echo # Bug mdev-11161: The second execution of prepared statement
+--echo #                 does not use generated key for materialized
+--echo #                 derived table / view 
+--echo # (actually this is a 5.3 bug.)               
+--echo #
+
+create table t1 (
+  mat_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+  matintnum CHAR(6) NOT NULL,
+  test MEDIUMINT UNSIGNED NULL
+);
+create table t2 (
+  mat_id MEDIUMINT UNSIGNED NOT NULL,
+   pla_id MEDIUMINT UNSIGNED NOT NULL
+);
+insert into t1 values
+  (NULL, 'a', 1), (NULL, 'b', 2), (NULL, 'c', 3), (NULL, 'd', 4),
+  (NULL, 'e', 5), (NULL, 'f', 6), (NULL, 'g', 7), (NULL, 'h', 8),
+   (NULL, 'i', 9);
+insert into t2 values
+  (1, 100), (1, 101), (1, 102), (2, 100), (2, 103), (2, 104), 
+  (3, 101), (3, 102), (3, 105);
+
+explain
+ SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id
+   FROM t1 m2 
+        INNER JOIN
+        (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum
+           FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id
+         GROUP BY mp.pla_id) d
+        ON d.matintnum=m2.matintnum;
+
+prepare stmt1 from
+"SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id
+   FROM t1 m2 
+        INNER JOIN
+        (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum
+           FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id
+         GROUP BY mp.pla_id) d
+        ON d.matintnum=m2.matintnum";
+
+flush status;
+execute stmt1;
+show status like '%Handler_read%';
+
+flush status;
+execute stmt1;
+show status like '%Handler_read%';
+
+deallocate prepare stmt1;
+
+drop table t1,t2;
+
 # The following command must be the last one the file 
 set optimizer_switch=@exit_optimizer_switch;
 set join_cache_level=@exit_join_cache_level;
diff --git a/mysql-test/t/events_slowlog.test b/mysql-test/t/events_slowlog.test
new file mode 100644
index 0000000..9679714
--- /dev/null
+++ b/mysql-test/t/events_slowlog.test
@@ -0,0 +1,28 @@
+--source include/not_embedded.inc
+#
+# MDEV-11552 Queries executed by event scheduler are written to slow log incorrectly or not written at all
+#
+set @event_scheduler_save= @@global.event_scheduler;
+set @slow_query_log_save= @@global.slow_query_log;
+
+set global event_scheduler= on;
+set global slow_query_log= on;
+set global long_query_time=0.2;
+
+create table t1 (i int);
+insert into t1 values (0);
+create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5);
+
+--let wait_condition= select i from t1 where i > 0
+--source include/wait_condition.inc
+
+--let SEARCH_FILE = `SELECT @@slow_query_log_file`
+--let SEARCH_PATTERN= update t1 set i=1
+--let SEARCH_RANGE= -1000
+--source include/search_pattern_in_file.inc
+
+drop table t1;
+
+set global event_scheduler= @event_scheduler_save;
+set global slow_query_log= @slow_query_log_save;
+set global long_query_time= @@session.long_query_time;
diff --git a/mysql-test/t/fulltext_charsets.test b/mysql-test/t/fulltext_charsets.test
new file mode 100644
index 0000000..3ac9791
--- /dev/null
+++ b/mysql-test/t/fulltext_charsets.test
@@ -0,0 +1,10 @@
+#
+# MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches
+#
+set names utf8mb4;
+
+create table t1 (a int, b text, fulltext (b)) charset=utf8mb4 collate=utf8mb4_unicode_ci;
+insert t1 values (1000, 'C͓̙̯͔̩ͅͅi̩̘̜̲a̯̲̬̳̜̖̤o͕͓̜͓̺̖̗,̠̬͚ ̺T͇̲h͈̱e ̬̜D̖o̦̖͔̗͖̩̘c̣̼t̝͉̫̮̗o͉̫̭r̙͎̗.͓̪̥');
+select a from t1 where match(b) against ('ciao' in boolean mode);
+drop table t1;
+
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 45214ae..92e1c38 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -1597,3 +1597,8 @@ INSERT INTO t1 VALUES (17, NULL);
 INSERT INTO t1 VALUES (18, '2010-10-13');
 SELECT a.id,a.date1,FROM_DAYS(TO_DAYS(a.date1)-10) as date2, DATE_ADD(a.date1,INTERVAL -10 DAY),TO_DAYS(a.date1)-10 FROM t1 a ORDER BY a.id;
 DROP TABLE t1;
+
+--echo #
+--echo # MDEV-10524 Assertion `arg1_int >= 0' failed in Item_func_additive_op::result_precision()
+--echo #
+SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2;
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index c94d27b..4162e9c 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1691,6 +1691,18 @@ SELECT MAX(i), c FROM t1
 WHERE c != 'qux' AND ( SELECT SUM(j) FROM t1, t2 ) IS NOT NULL GROUP BY c;
 drop table t1,t2;
 
+--echo #
+--echo # ONLY_FULL_GROUP_BY references
+--echo #
+
+set @save_sql_mode = @@sql_mode;
+set sql_mode='ONLY_FULL_GROUP_BY';
+create table t1 (a int, b int);
+select a+b as x from t1 group by x having x > 1;
+select a as x from t1 group by x having x > 1;
+select a from t1 group by a having a > 1;
+drop table t1;
+set sql_mode= @save_sql_mode;
 #
 # End of MariaDB 5.5 tests
 #
diff --git a/mysql-test/t/index_merge_innodb.test b/mysql-test/t/index_merge_innodb.test
index 6a1cb53..fb56e44 100644
--- a/mysql-test/t/index_merge_innodb.test
+++ b/mysql-test/t/index_merge_innodb.test
@@ -171,6 +171,37 @@ WHERE ( tb.b != ta.b OR tb.a = ta.a )
   AND ( tb.b = ta.c OR tb.b = ta.b );
 
 DROP TABLE t1;
-
 set optimizer_switch= @optimizer_switch_save;
 
+--echo #
+--echo # MDEV-10927: Crash When Using sort_union Optimization
+--echo #
+
+set @tmp_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='index_merge_sort_intersection=on';
+SET SESSION sort_buffer_size = 1024;
+
+create table t1 (
+pk int(11) NOT NULL AUTO_INCREMENT,
+col1 int(11) NOT NULL,
+col2 int(11) NOT NULL,
+col3 int(11) NOT NULL,
+key2 int(11) NOT NULL,
+col4 int(11) NOT NULL,
+key1 int(11) NOT NULL,
+PRIMARY KEY (pk),
+KEY key1 (key1),
+KEY key2 (key2)
+) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
+
+create table t2(a int);
+insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t3(a int);
+insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D;
+
+insert into t1 (key1, key2, col1,col2,col3,col4)
+select  a,a, a,a,a,a from t3;
+SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE  (key1 between 10 and 8191+10) or (key2= 5);
+drop table t1,t2,t3;
+set optimizer_switch=@tmp_optimizer_switch;
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index fb39f2e..943eb8b 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -612,13 +612,13 @@ select * from information_schema.schema_privileges order by grantee;
 select * from information_schema.user_privileges order by grantee;
 show grants;
 connection con4;
-select * from information_schema.column_privileges where grantee like '%user%'
+select * from information_schema.column_privileges where grantee like '\'user%'
 order by grantee;
-select * from information_schema.table_privileges where grantee like '%user%'
+select * from information_schema.table_privileges where grantee like '\'user%'
 order by grantee;
-select * from information_schema.schema_privileges where grantee like '%user%'
+select * from information_schema.schema_privileges where grantee like '\'user%'
 order by grantee;
-select * from information_schema.user_privileges where grantee like '%user%'
+select * from information_schema.user_privileges where grantee like '\'user%'
 order by grantee;
 show grants;
 connection default;
diff --git a/mysql-test/t/information_schema_part.test b/mysql-test/t/information_schema_part.test
index f1415d1..ea88f36 100644
--- a/mysql-test/t/information_schema_part.test
+++ b/mysql-test/t/information_schema_part.test
@@ -131,3 +131,10 @@ drop table if exists t1;
 create table t1 (f1 int key) partition by key(f1) partitions 2;
 select create_options from information_schema.tables where table_schema="test";
 drop table t1;
+
+--echo #
+--echo # MDEV-11353 - Identical logical conditions
+--echo #
+CREATE TABLE t1(a INT) CHECKSUM=1 SELECT 1;
+SELECT CHECKSUM FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
+DROP TABLE t1;
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 7d0f385..3524386 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -612,7 +612,7 @@ disconnect con1;
 --echo #
 
 CREATE TABLE t1(f1 INT);
-EVAL SELECT 0xE1C330 INTO OUTFILE 't1.dat';
+EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
 --disable_warnings
 LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
 --enable_warnings
@@ -658,26 +658,3 @@ SET @@sql_mode= @old_mode;
 --remove_file $MYSQLTEST_VARDIR/mysql
 DROP TABLE t1;
 
---echo
---echo #
---echo #  Bug#23080148 - Backport of Bug#20683959.
---echo #  Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY
---echo #               UNDER DB CHARSET IS UTF8.
---echo #
-
-CREATE DATABASE d1 CHARSET latin1;
-USE d1;
-CREATE TABLE t1 (val TEXT);
-LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
-SELECT COUNT(*) FROM t1;
-SELECT HEX(val) FROM t1;
-
-CREATE DATABASE d2 CHARSET utf8;
-USE d2;
-CREATE TABLE t1 (val TEXT);
---error ER_INVALID_CHARACTER_STRING
-LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
-
-DROP TABLE d1.t1, d2.t1;
-DROP DATABASE d1;
-DROP DATABASE d2;
diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test
index c6aa892..1e3458e 100644
--- a/mysql-test/t/parser.test
+++ b/mysql-test/t/parser.test
@@ -770,3 +770,13 @@ select 2>!0,  2 > ! 0;
 select 0<=!0, 0 <= !0;
 select 1<<!0, 1 << !0;
 select 0<!0,  0 < ! 0;
+
+--echo #
+--echo # MDEV-11171 Assertion `m_cpp_buf <= ptr && ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_append(const char*, const char*)
+--echo #
+CREATE TABLE t1 (id INT);
+--error ER_PARSE_ERROR
+CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 1\;
+--error ER_PARSE_ERROR
+PREPARE stmt FROM 'CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 1\\';
+DROP TABLE t1;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index ecb1240..0e42bf3 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -9302,4 +9302,55 @@ CALL p1;
 DROP PROCEDURE p1;
 DROP TABLE t1;
 
+--echo #
+--echo # MDEV-10713: signal 11 error on multi-table update - crash in
+--echo # handler::increment_statistics or in make_select or assertion
+--echo # failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
+--echo #
+
+CREATE TABLE `t1` (
+  `CLOSE_YN` varchar(10) COLLATE utf8_bin DEFAULT NULL
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
+
+
+CREATE TABLE `t2` (
+  `ap_close_to` varchar(8) COLLATE utf8_bin DEFAULT NULL
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
+insert t1 values (1);
+
+
+--delimiter $$
+
+CREATE  FUNCTION `f1`(`P_DC_CD` VARBINARY(50), `P_SYS_DATE` DATETIME) RETURNS datetime
+    DETERMINISTIC
+    SQL SECURITY INVOKER
+BEGIN
+  DECLARE V_SYS_DATE DATETIME;
+  SELECT now() AS LOC_DATE INTO V_SYS_DATE ;
+  RETURN v_sys_date ;
+END $$
+
+--delimiter ;
+
+update t1 S
+JOIN
+(
+  SELECT CASE
+           WHEN DATE_FORMAT( f1('F01', NOW()) , '%Y%m%d') <= CLOSE_YMD
+             THEN '99991231'
+	     ELSE '' END ACCOUNT_APPLY_YYYYMMDD
+  FROM (
+        select case
+                 when 'AP'='AP'
+                   then ap_close_to
+                   end AS CLOSE_YMD
+	from t2
+       ) A
+) X
+SET S.CLOSE_YN = ''
+where 1=1;
+
+drop function if exists f1;
+drop table t1,t2;
+
 --echo # End of 5.5 test
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index b802761..a8ad3ba 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -5974,3 +5974,27 @@ INSERT INTO t1 VALUES(0),(0),(0);
 SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
 DROP TABLE t1;
 SET SESSION big_tables=0;
+
+
+--echo #
+--echo # MDEV-10776: Server crash on query
+--echo #
+create table t1 (field1 int);
+
+insert into t1 values (1);
+
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+
+drop table t1;
+
+--echo #
+--echo # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
+--echo #
+
+CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
+INSERT INTO t1 VALUES ('foo','bar');
+SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
+SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
+DROP TABLE t1;
diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test
index b3c1322..ae210b8 100644
--- a/mysql-test/t/subselect2.test
+++ b/mysql-test/t/subselect2.test
@@ -359,5 +359,55 @@ where t1.a = t2.a and ( t1.a = ( select min(a) from t1 ) or 0 );
 
 drop table t1,t2,t3;
 
+--echo #
+--echo # MDEV-10148: Database crashes in the query to the View
+--echo #
+CREATE TABLE t1 (
+	key_code INT(11) NOT NULL,
+	value_string VARCHAR(50) NULL DEFAULT NULL,
+	PRIMARY KEY (key_code)
+) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
+ 
+CREATE TABLE t2 (
+	key_code INT(11) NOT NULL,
+	target_date DATE NULL DEFAULT NULL,
+	PRIMARY KEY (key_code)
+) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
+ 
+CREATE TABLE t3 (
+	now_date DATE NOT NULL,
+	PRIMARY KEY (now_date)
+) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
+ 
+CREATE VIEW v1
+AS
+SELECT
+	B.key_code,
+	B.target_date
+FROM
+	t2 B INNER JOIN t3 C ON
+	B.target_date = C.now_date
+;
+SET @s = 'SELECT A.* FROM t1 A WHERE A.key_code IN (SELECT key_code FROM v1)';
+PREPARE stmt FROM @s;
+EXECUTE stmt;                                   #1st time -> success
+EXECUTE stmt;                                   #2nd time -> crash
+DEALLOCATE PREPARE stmt;
+DROP VIEW v1;
+DROP TABLE t1,t2,t3;
+
 set optimizer_switch=@subselect2_test_tmp;
 
+#
+# Bug #23303485 : HANDLE_FATAL_SIGNAL (SIG=11) IN SUBSELECT_UNION_ENGINE::NO_ROWS
+#
+create table t1 (a int);
+create table t2 (a int);
+create table t3(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+insert into t2 select a from t1;
+insert into t3 select a from t1;
+--error ER_SUBQUERY_NO_1_ROW
+select null in (select a from t1 where a < out3.a union select a from t2 where
+  (select a from t3) +1 < out3.a+1) from t3 out3;
+drop table t1, t2, t3;
diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test
index b179ead..7a7dd7e 100644
--- a/mysql-test/t/subselect4.test
+++ b/mysql-test/t/subselect4.test
@@ -1959,5 +1959,46 @@ SELECT x FROM t1 WHERE id > (SELECT MAX(id) - 1000 FROM t1) ORDER BY x LIMIT 1;
 
 drop table t1;
 
+--echo #
+--echo # MDEV-7691: Assertion `outer_context || !*from_field || *from_field == not_found_field' ...
+--echo #
+set optimizer_switch=default;
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(6);
+ 
+CREATE TABLE t2 (b INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(8);
+ 
+PREPARE stmt FROM "
+SELECT * FROM t2
+HAVING 0 IN (
+  SELECT a FROM t1
+  WHERE a IN ( 
+    SELECT a FROM t1
+    WHERE b = a
+  )
+)
+"; 
+ 
+EXECUTE stmt;
+EXECUTE stmt;
+
+--echo # Alternative test case, without HAVING
+CREATE TABLE t3 (i INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (4),(6);
+ 
+PREPARE stmt FROM "
+SELECT * FROM t3 AS t10
+WHERE EXISTS ( 
+  SELECT * FROM t3 AS t20 WHERE t10.i IN ( 
+    SELECT i FROM t3 
+  ) 
+)";
+ 
+EXECUTE stmt;
+EXECUTE stmt;
+
+drop table t1, t2, t3;
+
 SET optimizer_switch= @@global.optimizer_switch;
 set @@tmp_table_size= @@global.tmp_table_size;
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index 659e752..834fd0c 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -604,6 +604,11 @@ SHOW COLUMNS FROM t1dec102;
 SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1dec102';
 DROP TABLE t1dec102;
 
+#
+# MDEV-10552 equality operation on cast of the value "-0.0" to decimal not working
+#
+select cast('-0.0' as decimal(5,1)) < 0;
+
 --echo #
 --echo # End of 5.5 tests
 --echo #
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 9204ddd..f4dc6a5 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -1022,7 +1022,6 @@ ORDER BY a;
 DROP TABLE t1;
 
 
---echo End of 5.0 tests
 -- echo #
 -- echo # Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take 
 -- echo # subselects into account
@@ -1126,6 +1125,8 @@ create table t1 (a int);
 insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10);
 --sorted_result
 select a from t1 where false UNION select a from t1 limit 8;
+--sorted_result
+(select a from t1 where false) UNION (select a from t1) limit 8;
 drop table t1;
 
 --echo #
@@ -1350,3 +1351,22 @@ UNION
 ;
 
 drop table t1;
+
+
+--echo #
+--echo # MDEV-10172: UNION query returns incorrect rows outside
+--echo # conditional evaluation
+--echo #
+
+create table t1 (d datetime not null primary key);
+insert into t1(d) values ('2016-06-01'),('2016-06-02'),('2016-06-03'),('2016-06-04');
+select * from
+(
+	select * from t1 where d between '2016-06-02' and '2016-06-05'
+	union
+	(select * from t1 where d < '2016-06-05' order by d desc limit 1)
+) onlyJun2toJun4
+order by d;
+drop table t1;
+
+--echo End of 5.0 tests
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 06a811f..cb86850 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -34,7 +34,7 @@ SET(MYSYS_SOURCES  array.c charset-def.c charset.c checksum.c default.c
 				rijndael.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c
 				thr_rwlock.c tree.c typelib.c base64.c my_memmem.c my_getpagesize.c
 				lf_alloc-pin.c lf_dynarray.c lf_hash.c
-                safemalloc.c my_new.cc
+                                safemalloc.c my_new.cc
 				my_atomic.c my_getncpus.c my_safehash.c my_chmod.c my_rnd.c
                                 my_uuid.c wqueue.c waiting_threads.c ma_dyncol.c
 				my_rdtsc.c my_context.c file_logger.c)
@@ -44,7 +44,7 @@ IF (WIN32)
 ENDIF()
 
 IF(UNIX)
- SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_addr_resolve.c)
+ SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_addr_resolve.c my_setuser.c)
 ENDIF()
 
 IF(HAVE_ALARM)
diff --git a/mysys/my_setuser.c b/mysys/my_setuser.c
new file mode 100644
index 0000000..1f3e777
--- /dev/null
+++ b/mysys/my_setuser.c
@@ -0,0 +1,81 @@
+#include <my_global.h>
+#include <m_string.h>
+#include <my_sys.h>
+#include <my_pthread.h>
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+
+struct passwd *my_check_user(const char *user, myf MyFlags)
+{
+  struct passwd *user_info;
+  uid_t user_id= geteuid();
+  DBUG_ENTER("my_check_user");
+
+  // Don't bother if we aren't superuser
+  if (user_id)
+  {
+    if (user)
+    {
+      /* Don't give a warning, if real user is same as given with --user */
+      user_info= getpwnam(user);
+      if (!user_info || user_id != user_info->pw_uid)
+      {
+        my_errno= EPERM;
+        if (MyFlags & MY_WME)
+          my_printf_error(my_errno, "One can only use the --user switch if "
+                         "running as root", MYF(ME_JUST_WARNING|ME_NOREFRESH));
+      }
+    }
+    DBUG_RETURN(NULL);
+  }
+  if (!user)
+  {
+    if (MyFlags & MY_FAE)
+    {
+      my_errno= EINVAL;
+      my_printf_error(my_errno, "Please consult the Knowledge Base to find "
+                      "out how to run mysqld as root!", MYF(ME_NOREFRESH));
+    }
+    DBUG_RETURN(NULL);
+  }
+  if (!strcmp(user,"root"))
+    DBUG_RETURN(NULL);
+
+  if (!(user_info= getpwnam(user)))
+  {
+    // Allow a numeric uid to be used
+    int err= 0;
+    user_id= my_strtoll10(user, NULL, &err);
+    if (err || !(user_info= getpwuid(user_id)))
+    {
+      my_errno= EINVAL;
+      my_printf_error(my_errno, "Can't change to run as user '%s'.  Please "
+                      "check that the user exists!", MYF(ME_NOREFRESH), user);
+      DBUG_RETURN(NULL);
+    }
+  }
+  DBUG_ASSERT(user_info);
+  DBUG_RETURN(user_info);
+}
+
+int my_set_user(const char *user, struct passwd *user_info, myf MyFlags)
+{
+  DBUG_ENTER("my_set_user");
+
+  DBUG_ASSERT(user_info != 0);
+#ifdef HAVE_INITGROUPS
+  initgroups(user, user_info->pw_gid);
+#endif
+  if (setgid(user_info->pw_gid) == -1 || setuid(user_info->pw_uid) == -1)
+  {
+    my_errno= errno;
+    if (MyFlags & MY_WME)
+      my_error(my_errno, MYF(ME_NOREFRESH));
+    DBUG_RETURN(my_errno);
+  }
+  DBUG_RETURN(0);
+}
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index 95150c8..87ba00b 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -2845,6 +2845,7 @@ void __attribute__ ((constructor)) audit_plugin_so_init(void)
       _mysql_plugin_declarations_[0].info= mysql_v4_descriptor;
       use_event_data_for_disconnect= 1;
     }
+    MYSQL_SYSVAR_NAME(loc_info).flags= PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC;
   }
 
   memset(locinfo_ini_value, 'O', sizeof(locinfo_ini_value)-1);
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 5d53b25..aefcc1a 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -512,10 +512,8 @@ then
   echo "The latest information about MariaDB is available at http://mariadb.org/."
   echo "You can find additional information about the MySQL part at:"
   echo "http://dev.mysql.com"
-  echo "Support MariaDB development by buying support/new features from MariaDB"
-  echo "Corporation Ab. You can contact us about this at sales at mariadb.com."
-  echo "Alternatively consider joining our community based development effort:"
-  echo "http://mariadb.com/kb/en/contributing-to-the-mariadb-project/"
+  echo "Consider joining MariaDB's strong and vibrant community:"
+  echo "https://mariadb.org/get-involved/"
   echo
 fi
 
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 7cadce7..059263f 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -20,6 +20,7 @@ mysqld_ld_preload=
 mysqld_ld_library_path=
 flush_caches=0
 numa_interleave=0
+unsafe_my_cnf=0
 
 # Initial logging status: error log is not open, and not using syslog
 logging=init
@@ -128,6 +129,18 @@ my_which ()
   return $ret  # Success
 }
 
+find_in_bin() {
+  if test -x "$MY_BASEDIR_VERSION/bin/$1"
+  then
+    echo "$MY_BASEDIR_VERSION/bin/$1"
+  elif test -x "@bindir@/$1"
+  then
+    echo "@bindir@/$1"
+  else
+    echo "$1"
+  fi
+}
+
 log_generic () {
   priority="$1"
   shift
@@ -136,7 +149,7 @@ log_generic () {
   echo "$msg"
   case $logging in
     init) ;;  # Just echo the message, don't save it anywhere
-    file) echo "$msg" >> "$err_log" ;;
+    file) echo "$msg" | "$helper" "$user" log "$err_log" ;;
     syslog) logger -t "$syslog_tag_mysqld_safe" -p "$priority" "$*" ;;
     *)
       echo "Internal program error (non-fatal):" \
@@ -156,7 +169,7 @@ log_notice () {
 eval_log_error () {
   cmd="$1"
   case $logging in
-    file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;;
+    file) cmd="$cmd 2>&1 | "`shell_quote_string "$helper"`" $user log "`shell_quote_string "$err_log"` ;;
     syslog)
       # mysqld often prefixes its messages with a timestamp, which is
       # redundant when logging to syslog (which adds its own timestamp)
@@ -190,6 +203,13 @@ shell_quote_string() {
   echo "$1" | sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
 }
 
+check_executable_location() {
+  if test "$unsafe_my_cnf" = 1 -a "$unrecognized_handling" != collect; then
+    log_error "Cannot accept $1 from a config file, when my.cnf is in the datadir"
+    exit 1
+  fi
+}
+
 parse_arguments() {
   for arg do
     # the parameter after "=", or the whole $arg if no match
@@ -200,7 +220,6 @@ parse_arguments() {
     optname_subst=`echo "$optname" | sed 's/_/-/g'`
     arg=`echo $arg | sed "s/^$optname/$optname_subst/"`
     case "$arg" in
-      --crash-script=*) CRASH_SCRIPT="$val" ;;
       # these get passed explicitly to mysqld
       --basedir=*) MY_BASEDIR_VERSION="$val" ;;
       --datadir=*|--data=*) DATADIR="$val" ;;
@@ -220,12 +239,14 @@ parse_arguments() {
 
       # mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
       --core-file-size=*) core_file_size="$val" ;;
-      --ledir=*) ledir="$val" ;;
-      --malloc-lib=*) set_malloc_lib "$val" ;;
-      --mysqld=*) MYSQLD="$val" ;;
+      --ledir=*) check_executable_location "$arg" ; ledir="$val" ;;
+      --malloc-lib=*) check_executable_location "$arg"; set_malloc_lib "$val" ;;
+      --crash-script=*) check_executable_location "$arg"; crash_script="$val" ;;
+      --mysqld=*) check_executable_location "$arg"; MYSQLD="$val" ;;
       --mysqld-version=*)
         if test -n "$val"
         then
+          check_executable_location "$arg"
           MYSQLD="mysqld-$val"
           PLUGIN_VARIANT="/$val"
         else
@@ -385,15 +406,8 @@ set_malloc_lib() {
 # First, try to find BASEDIR and ledir (where mysqld is)
 #
 
-if echo '@pkgdatadir@' | grep '^@prefix@' > /dev/null
-then
-  relpkgdata=`echo '@pkgdatadir@' | sed -e 's,^@prefix@,,' -e 's,^/,,' -e 's,^,./,'`
-else
-  # pkgdatadir is not relative to prefix
-  relpkgdata='@pkgdatadir@'
-fi
-
-MY_PWD=`pwd`
+MY_PWD=`dirname $0`
+MY_PWD=`cd "$MY_PWD"/.. && pwd`
 # Check for the directories we would expect from a binary release install
 if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION"
 then
@@ -409,16 +423,16 @@ then
   else
     ledir="$MY_BASEDIR_VERSION/bin"
   fi
-elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/bin/mysqld"
+elif test -x "$MY_PWD/bin/mysqld"
 then
   MY_BASEDIR_VERSION="$MY_PWD"		# Where bin, share and data are
   ledir="$MY_PWD/bin"			# Where mysqld is
 # Check for the directories we would expect from a source install
-elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/libexec/mysqld"
+elif test -x "$MY_PWD/libexec/mysqld"
 then
   MY_BASEDIR_VERSION="$MY_PWD"		# Where libexec, share and var are
   ledir="$MY_PWD/libexec"		# Where mysqld is
-elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/sbin/mysqld"
+elif test -x "$MY_PWD/sbin/mysqld"
 then
   MY_BASEDIR_VERSION="$MY_PWD"		# Where sbin, share and var are
   ledir="$MY_PWD/sbin"			# Where mysqld is
@@ -428,6 +442,8 @@ else
   ledir='@libexecdir@'
 fi
 
+helper=`find_in_bin mysqld_safe_helper`
+print_defaults=`find_in_bin my_print_defaults`
 
 #
 # Second, try to find the data directory
@@ -465,6 +481,7 @@ IGNORING $DATADIR/my.cnf"
     log_error "WARNING: Found $DATADIR/my.cnf
 The data directory is a deprecated location for my.cnf, please move it to
 $MY_BASEDIR_VERSION/my.cnf"
+    unsafe_my_cnf=1
     MYSQL_HOME=$DATADIR
   else
     MYSQL_HOME=$MY_BASEDIR_VERSION
@@ -472,34 +489,15 @@ $MY_BASEDIR_VERSION/my.cnf"
 fi
 export MYSQL_HOME
 
-
-# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
-# and then merge with the command line arguments
-if test -x "$MY_BASEDIR_VERSION/bin/my_print_defaults"
-then
-  print_defaults="$MY_BASEDIR_VERSION/bin/my_print_defaults"
-elif test -x `dirname $0`/my_print_defaults
-then
-  print_defaults="`dirname $0`/my_print_defaults"
-elif test -x ./bin/my_print_defaults
-then
-  print_defaults="./bin/my_print_defaults"
-elif test -x @bindir@/my_print_defaults
-then
-  print_defaults="@bindir@/my_print_defaults"
-elif test -x @bindir@/mysql_print_defaults
-then
-  print_defaults="@bindir@/mysql_print_defaults"
-else
-  print_defaults="my_print_defaults"
-fi
-
 append_arg_to_args () {
   args="$args "`shell_quote_string "$1"`
 }
 
 args=
 
+# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
+# and then merge with the command line arguments
+
 SET_USER=2
 parse_arguments `$print_defaults $defaults --loose-verbose --mysqld`
 if test $SET_USER -eq 2
@@ -603,11 +601,6 @@ then
   log_notice "Logging to '$err_log'."
   logging=file
 
-  if [ ! -f "$err_log" ]; then                  # if error log already exists,
-    touch "$err_log"                            # we just append. otherwise,
-    chmod "$fmode" "$err_log"                   # fix the permissions here!
-  fi
-
 else
   if [ -n "$syslog_tag" ]
   then
@@ -620,10 +613,6 @@ else
   logging=syslog
 fi
 
-# close stdout and stderr, everything goes to $logging now
-exec 1>&-
-exec 2>&-
-
 USER_OPTION=""
 if test -w / -o "$USER" = "root"
 then
@@ -631,11 +620,6 @@ then
   then
     USER_OPTION="--user=$user"
   fi
-  # Change the err log to the right user, if it is in use
-  if [ $want_syslog -eq 0 ]; then
-    touch "$err_log"
-    chown $user "$err_log"
-  fi
   if test -n "$open_files"
   then
     ulimit -n $open_files
@@ -879,6 +863,10 @@ max_fast_restarts=5
 # flag whether a usable sleep command exists
 have_sleep=1
 
+# close stdout and stderr, everything goes to $logging now
+exec 1>&-
+exec 2>&-
+
 while true
 do
   rm -f "$pid_file"	# Some extra safety
@@ -886,13 +874,6 @@ do
   start_time=`date +%M%S`
 
   eval_log_error "$cmd"
-
-  if [ $want_syslog -eq 0 -a ! -f "$err_log" ]; then
-    touch "$err_log"                    # hypothetical: log was renamed but not
-    chown $user "$err_log"              # flushed yet. we'd recreate it with
-    chmod "$fmode" "$err_log"           # wrong owner next time we log, so set
-  fi                                    # it up correctly while we can!
-
   end_time=`date +%M%S`
 
   if test ! -f "$pid_file"		# This is removed if normal shutdown
@@ -956,9 +937,9 @@ do
     done
   fi
   log_notice "mysqld restarted"
-  if test -n "$CRASH_SCRIPT"
+  if test -n "$crash_script"
   then
-    crash_script_output=`$CRASH_SCRIPT 2>&1`
+    crash_script_output=`$crash_script 2>&1`
     log_error "$crash_script_output"
   fi
 done
diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc
index 37dff0d..673250f 100644
--- a/sql/event_db_repository.cc
+++ b/sql/event_db_repository.cc
@@ -17,6 +17,7 @@
 #include "sql_priv.h"
 #include "unireg.h"
 #include "sql_base.h"                           // close_thread_tables
+#include "sql_parse.h"
 #include "event_db_repository.h"
 #include "key.h"                                // key_copy
 #include "sql_db.h"                        // get_default_db_collation
@@ -702,19 +703,17 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
 
   restore_record(table, s->default_values);     // Get default values for fields
 
-  if (system_charset_info->cset->
-        numchars(system_charset_info, parse_data->dbname.str,
-                 parse_data->dbname.str + parse_data->dbname.length) >
-      table->field[ET_FIELD_DB]->char_length())
+  if (check_string_char_length(&parse_data->dbname, 0,
+                               table->field[ET_FIELD_DB]->char_length(),
+                               system_charset_info, 1))
   {
     my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->dbname.str);
     goto end;
   }
 
-  if (system_charset_info->cset->
-        numchars(system_charset_info, parse_data->name.str,
-                 parse_data->name.str + parse_data->name.length) >
-      table->field[ET_FIELD_NAME]->char_length())
+  if (check_string_char_length(&parse_data->name, 0,
+                               table->field[ET_FIELD_NAME]->char_length(),
+                               system_charset_info, 1))
   {
     my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->name.str);
     goto end;
diff --git a/sql/field.cc b/sql/field.cc
index 878e3d3..716d522 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1157,12 +1157,15 @@ void Field_num::prepend_zeros(String *value)
   int diff;
   if ((diff= (int) (field_length - value->length())) > 0)
   {
-    bmove_upp((uchar*) value->ptr()+field_length,
-              (uchar*) value->ptr()+value->length(),
-	      value->length());
-    bfill((uchar*) value->ptr(),diff,'0');
-    value->length(field_length);
-    (void) value->c_ptr_quick();		// Avoid warnings in purify
+    const bool error= value->realloc(field_length);
+    if (!error)
+    {
+      bmove_upp((uchar*) value->ptr()+field_length,
+                (uchar*) value->ptr()+value->length(),
+	        value->length());
+      bfill((uchar*) value->ptr(),diff,'0');
+      value->length(field_length);
+    }
   }
 }
 
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 5bb5c64..38404b0 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -1411,7 +1411,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file,
       if (!(error= (int) read_to_buffer(from_file, buffpek,
                                         rec_length)))
       {
-        queue_remove(&queue,0);
+        (void) queue_remove_top(&queue);
         reuse_freed_buff(&queue, buffpek, rec_length);
       }
       else if (error == -1)
diff --git a/sql/handler.cc b/sql/handler.cc
index 5fc7560..bc71aa5 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3924,7 +3924,7 @@ void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info,
   stat_info->update_time=          stats.update_time;
   stat_info->check_time=           stats.check_time;
   stat_info->check_sum=            0;
-  if (table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_OLD_CHECKSUM))
+  if (table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM))
     stat_info->check_sum= checksum();
   return;
 }
diff --git a/sql/item.cc b/sql/item.cc
index 3448b23..1df91dc 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1164,7 +1164,8 @@ Item *Item_cache::safe_charset_converter(CHARSET_INFO *tocs)
   if (conv == example)
     return this;
   Item_cache *cache;
-  if (!conv || !(cache= new Item_cache_str(conv)))
+  if (!conv || conv->fix_fields(current_thd, (Item **) NULL) ||
+      !(cache= new Item_cache_str(conv)))
     return NULL; // Safe conversion is not possible, or OEM
   cache->setup(conv);
   cache->fixed= false; // Make Item::fix_fields() happy
@@ -2777,6 +2778,44 @@ void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref)
     depended_from= NULL;
   if (context)
   {
+    bool need_change= false;
+    /*
+      Suppose there are nested selects:
+
+       select_id=1
+         select_id=2
+           select_id=3  <----+
+             select_id=4    -+
+               select_id=5 --+
+
+      Suppose, pullout operation has moved anything that had select_id=4 or 5
+      in to select_id=3.
+
+      If this Item_field had a name resolution context pointing into select_lex
+      with id=4 or id=5, it needs a new name resolution context.
+
+      However, it could also be that this object is a part of outer reference:
+      Item_ref(Item_field(field in select with select_id=1))).
+      - The Item_ref object has a context with select_id=5, and so needs a new
+        name resolution context.
+      - The Item_field object has a context with select_id=1, and doesn't need
+        a new name resolution context.
+
+      So, the following loop walks from Item_field's current context upwards.
+      If we find that the select we've been pulled out to is up there, we
+      create the new name resolution context. Otherwise, we don't.
+    */
+    for (Name_resolution_context *ct= context; ct; ct= ct->outer_context)
+    {
+      if (new_parent == ct->select_lex)
+      {
+        need_change= true;
+        break;
+      }
+    }
+    if (!need_change)
+      return;
+
     Name_resolution_context *ctx= new Name_resolution_context();
     if (context->select_lex == new_parent)
     {
@@ -4556,8 +4595,6 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
   const char *field_name;
   ORDER      *found_group= NULL;
   int         found_match_degree= 0;
-  Item_ident *cur_field;
-  int         cur_match_degree= 0;
   char        name_buff[SAFE_NAME_LEN+1];
 
   if (find_item->type() == Item::FIELD_ITEM ||
@@ -4582,54 +4619,70 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
 
   for (ORDER *cur_group= group_list ; cur_group ; cur_group= cur_group->next)
   {
-    if ((*(cur_group->item))->real_item()->type() == Item::FIELD_ITEM)
+    int cur_match_degree= 0;
+
+    /* SELECT list element with explicit alias */
+    if ((*(cur_group->item))->name &&
+        !(*(cur_group->item))->is_autogenerated_name &&
+        !my_strcasecmp(system_charset_info,
+                       (*(cur_group->item))->name, field_name))
     {
-      cur_field= (Item_ident*) *cur_group->item;
-      cur_match_degree= 0;
-      
-      DBUG_ASSERT(cur_field->field_name != 0);
+      ++cur_match_degree;
+    }
+    /* Reference on the field or view/derived field. */
+    else if ((*(cur_group->item))->type() == Item::FIELD_ITEM ||
+             (*(cur_group->item))->type() == Item::REF_ITEM )
+    {
+      Item_ident *cur_field= (Item_ident*) *cur_group->item;
+      const char *l_db_name= cur_field->db_name;
+      const char *l_table_name= cur_field->table_name;
+      const char *l_field_name= cur_field->field_name;
+
+      DBUG_ASSERT(l_field_name != 0);
 
       if (!my_strcasecmp(system_charset_info,
-                         cur_field->field_name, field_name))
+                         l_field_name, field_name))
         ++cur_match_degree;
       else
         continue;
 
-      if (cur_field->table_name && table_name)
+      if (l_table_name && table_name)
       {
         /* If field_name is qualified by a table name. */
-        if (my_strcasecmp(table_alias_charset, cur_field->table_name, table_name))
+        if (my_strcasecmp(table_alias_charset, l_table_name, table_name))
           /* Same field names, different tables. */
           return NULL;
 
         ++cur_match_degree;
-        if (cur_field->db_name && db_name)
+        if (l_db_name && db_name)
         {
           /* If field_name is also qualified by a database name. */
-          if (strcmp(cur_field->db_name, db_name))
+          if (strcmp(l_db_name, db_name))
             /* Same field names, different databases. */
             return NULL;
           ++cur_match_degree;
         }
       }
+    }
+    else
+      continue;
 
-      if (cur_match_degree > found_match_degree)
-      {
-        found_match_degree= cur_match_degree;
-        found_group= cur_group;
-      }
-      else if (found_group && (cur_match_degree == found_match_degree) &&
-               ! (*(found_group->item))->eq(cur_field, 0))
-      {
-        /*
-          If the current resolve candidate matches equally well as the current
-          best match, they must reference the same column, otherwise the field
-          is ambiguous.
-        */
-        my_error(ER_NON_UNIQ_ERROR, MYF(0),
-                 find_item->full_name(), current_thd->where);
-        return NULL;
-      }
+    if (cur_match_degree > found_match_degree)
+    {
+      found_match_degree= cur_match_degree;
+      found_group= cur_group;
+    }
+    else if (found_group && (cur_match_degree == found_match_degree) &&
+             !(*(found_group->item))->eq((*(cur_group->item)), 0))
+    {
+      /*
+        If the current resolve candidate matches equally well as the current
+        best match, they must reference the same column, otherwise the field
+        is ambiguous.
+      */
+      my_error(ER_NON_UNIQ_ERROR, MYF(0),
+               find_item->full_name(), current_thd->where);
+      return NULL;
     }
   }
 
@@ -5743,6 +5796,7 @@ String *Item::check_well_formed_result(String *str, bool send_error)
   uint wlen= cs->cset->well_formed_len(cs,
                                        str->ptr(), str->ptr() + str->length(),
                                        str->length(), &well_formed_error);
+  null_value= false;
   if (wlen < str->length())
   {
     THD *thd= current_thd;
diff --git a/sql/item.h b/sql/item.h
index 41e6fe0..89155ac 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -3294,7 +3294,7 @@ public:
     if (result_type() == ROW_RESULT)
       orig_item->bring_value();
   }
-  virtual bool is_expensive() { return orig_item->is_expensive(); }
+  bool is_expensive() { return orig_item->is_expensive(); }
   bool is_expensive_processor(uchar *arg)
   { return orig_item->is_expensive_processor(arg); }
   bool check_vcol_func_processor(uchar *arg)
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 6c80c7d..89d3cd9 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -6778,7 +6778,8 @@ Item_func_sp::init_result_field(THD *thd)
 
 bool Item_func_sp::is_expensive()
 {
-  return !(m_sp->m_chistics->detistic);
+  return !m_sp->m_chistics->detistic ||
+          current_thd->locked_tables_mode < LTM_LOCK_TABLES;
 }
 
 
diff --git a/sql/item_func.h b/sql/item_func.h
index 667be3c..0da38e2 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -39,6 +39,7 @@ protected:
     0 means get this number from first argument
   */
   uint allowed_arg_cols;
+  String *val_str_from_val_str_ascii(String *str, String *str2);
 
   void count_only_length(Item **item, uint nitems);
   void count_real_length(Item **item, uint nitems);
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 94370d4..ec9580b 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -70,7 +70,7 @@ size_t username_char_length= 16;
   Normally conversion does not happen, and val_str_ascii() is immediately
   returned instead.
 */
-String *Item_str_func::val_str_from_val_str_ascii(String *str, String *str2)
+String *Item_func::val_str_from_val_str_ascii(String *str, String *str2)
 {
   DBUG_ASSERT(fixed == 1);
 
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 7606c28..00ae60a 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -62,7 +62,6 @@ public:
   enum Item_result result_type () const { return STRING_RESULT; }
   void left_right_max_length();
   bool fix_fields(THD *thd, Item **ref);
-  String *val_str_from_val_str_ascii(String *str, String *str2);
 };
 
 
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 3727711..5750de7 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2002, 2015, Oracle and/or its affiliates.
-   Copyright (c) 2010, 2015, MariaDB
+/* Copyright (c) 2002, 2016, Oracle and/or its affiliates.
+   Copyright (c) 2010, 2016, MariaDB
 
    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
@@ -209,6 +209,7 @@ bool
 Item_subselect::select_transformer(JOIN *join)
 {
   DBUG_ENTER("Item_subselect::select_transformer");
+  DBUG_ASSERT(thd == join->thd);
   DBUG_RETURN(false);
 }
 
@@ -579,7 +580,7 @@ bool Item_subselect::is_expensive()
 
     examined_rows+= cur_join->get_examined_rows();
   }
-
+  // here we are sure that subquery is optimized so thd is set
   return (examined_rows > thd->variables.expensive_subquery_limit);
 }
 
@@ -643,6 +644,7 @@ bool Item_subselect::exec()
   subselect_engine *org_engine= engine;
 
   DBUG_ENTER("Item_subselect::exec");
+  DBUG_ASSERT(fixed);
 
   /*
     Do not execute subselect in case of a fatal error
@@ -688,6 +690,7 @@ int Item_in_subselect::optimize(double *out_rows, double *cost)
 {
   int res;
   DBUG_ENTER("Item_in_subselect::optimize");
+  DBUG_ASSERT(fixed);
   SELECT_LEX *save_select= thd->lex->current_select;
   JOIN *join= unit->first_select()->join;
 
@@ -802,6 +805,7 @@ bool Item_in_subselect::expr_cache_is_needed(THD *thd)
 bool Item_in_subselect::exec()
 {
   DBUG_ENTER("Item_in_subselect::exec");
+  DBUG_ASSERT(fixed);
   /*
     Initialize the cache of the left predicate operand. This has to be done as
     late as now, because Cached_item directly contains a resolved field (not
@@ -856,6 +860,7 @@ table_map Item_subselect::used_tables() const
 
 bool Item_subselect::const_item() const
 {
+  DBUG_ASSERT(thd);
   return (thd->lex->context_analysis_only ?
           FALSE :
           forced_const || const_item_cache);
@@ -1049,10 +1054,11 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
   DBUG_ENTER("Item_singlerow_subselect::select_transformer");
   if (changed)
     DBUG_RETURN(false);
+  DBUG_ASSERT(join->thd == thd);
 
   SELECT_LEX *select_lex= join->select_lex;
   Query_arena *arena= thd->stmt_arena;
- 
+
   if (!select_lex->master_unit()->is_union() &&
       !select_lex->table_list.elements &&
       select_lex->item_list.elements == 1 &&
@@ -1717,6 +1723,7 @@ Item_in_subselect::single_value_transformer(JOIN *join)
 {
   SELECT_LEX *select_lex= join->select_lex;
   DBUG_ENTER("Item_in_subselect::single_value_transformer");
+  DBUG_ASSERT(thd == join->thd);
 
   /*
     Check that the right part of the subselect contains no more than one
@@ -1829,9 +1836,9 @@ bool Item_allany_subselect::transform_into_max_min(JOIN *join)
   if (!test_strategy(SUBS_MAXMIN_INJECTED | SUBS_MAXMIN_ENGINE))
     DBUG_RETURN(false);
   Item **place= optimizer->arguments() + 1;
-  THD *thd= join->thd;
   SELECT_LEX *select_lex= join->select_lex;
   Item *subs;
+  DBUG_ASSERT(thd == join->thd);
 
   /*
   */
@@ -1938,6 +1945,7 @@ bool Item_allany_subselect::transform_into_max_min(JOIN *join)
 bool Item_in_subselect::fix_having(Item *having, SELECT_LEX *select_lex)
 {
   bool fix_res= 0;
+  DBUG_ASSERT(thd);
   if (!having->fixed)
   {
     select_lex->having_fix_field= 1;
@@ -2000,6 +2008,7 @@ Item_in_subselect::create_single_in_to_exists_cond(JOIN *join,
                                                    Item **having_item)
 {
   SELECT_LEX *select_lex= join->select_lex;
+  DBUG_ASSERT(thd == join->thd);
   /*
     The non-transformed HAVING clause of 'join' may be stored in two ways
     during JOIN::optimize: this->tmp_having= this->having; this->having= 0;
@@ -2136,6 +2145,7 @@ Item_in_subselect::row_value_transformer(JOIN *join)
   uint cols_num= left_expr->cols();
 
   DBUG_ENTER("Item_in_subselect::row_value_transformer");
+  DBUG_ASSERT(thd == join->thd);
 
   // psergey: duplicated_subselect_card_check
   if (select_lex->item_list.elements != cols_num)
@@ -2248,6 +2258,7 @@ Item_in_subselect::create_row_in_to_exists_cond(JOIN * join,
                         !select_lex->table_list.elements);
 
   DBUG_ENTER("Item_in_subselect::create_row_in_to_exists_cond");
+  DBUG_ASSERT(thd == join->thd);
 
   *where_item= NULL;
   *having_item= NULL;
@@ -2473,6 +2484,7 @@ bool Item_in_subselect::inject_in_to_exists_cond(JOIN *join_arg)
   Item *having_item= join_arg->in_to_exists_having;
 
   DBUG_ENTER("Item_in_subselect::inject_in_to_exists_cond");
+  DBUG_ASSERT(thd == join_arg->thd);
 
   if (where_item)
   {
@@ -2561,6 +2573,7 @@ Item_in_subselect::select_in_like_transformer(JOIN *join)
   bool result;
 
   DBUG_ENTER("Item_in_subselect::select_in_like_transformer");
+  DBUG_ASSERT(thd == join->thd);
 
   /*
     IN/SOME/ALL/ANY subqueries aren't support LIMIT clause. Without it
@@ -2762,6 +2775,7 @@ bool Item_in_subselect::setup_mat_engine()
   subselect_single_select_engine *select_engine;
 
   DBUG_ENTER("Item_in_subselect::setup_mat_engine");
+  DBUG_ASSERT(thd);
 
   /*
     The select_engine (that executes transformed IN=>EXISTS subselects) is
@@ -2800,6 +2814,7 @@ bool Item_in_subselect::setup_mat_engine()
 bool Item_in_subselect::init_left_expr_cache()
 {
   JOIN *outer_join;
+  DBUG_ASSERT(thd);
 
   outer_join= unit->outer_select()->join;
   /*
@@ -2826,6 +2841,7 @@ bool Item_in_subselect::init_left_expr_cache()
 
 bool Item_in_subselect::init_cond_guards()
 {
+  DBUG_ASSERT(thd);
   uint cols_num= left_expr->cols();
   if (!abort_on_null && left_expr->maybe_null && !pushed_cond_guards)
   {
@@ -2953,8 +2969,12 @@ bool subselect_union_engine::is_executed() const
 
 bool subselect_union_engine::no_rows()
 {
+  bool rows_present= false;
+
   /* Check if we got any rows when reading UNION result from temp. table: */
-  return test(!unit->fake_select_lex->join->send_records);
+  if (unit->fake_select_lex->join)
+    rows_present= test(!unit->fake_select_lex->join->send_records);
+  return rows_present;
 }
 
 
@@ -4336,9 +4356,9 @@ bool subselect_hash_sj_engine::init(List<Item> *tmp_columns, uint subquery_id)
   result= result_sink;
 
   /*
-    If the subquery has blobs, or the total key lenght is bigger than
+    If the subquery has blobs, or the total key length is bigger than
     some length, or the total number of key parts is more than the
-    allowed maximum (currently MAX_REF_PARTS == 16), then the created
+    allowed maximum (currently MAX_REF_PARTS == 32), then the created
     index cannot be used for lookups and we can't use hash semi
     join. If this is the case, delete the temporary table since it
     will not be used, and tell the caller we failed to initialize the
@@ -6089,4 +6109,3 @@ end:
 void subselect_table_scan_engine::cleanup()
 {
 }
-
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 28e9368..420fb29 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1455,25 +1455,29 @@ bool get_interval_value(Item *args,interval_type int_type, INTERVAL *interval)
 
 void Item_temporal_func::fix_length_and_dec()
 { 
+  uint char_length= mysql_temporal_int_part_length(field_type());
   /*
     We set maybe_null to 1 as default as any bad argument with date or
     time can get us to return NULL.
   */ 
   maybe_null= 1;
-  max_length= mysql_temporal_int_part_length(field_type());
+
   if (decimals)
   {
     if (decimals == NOT_FIXED_DEC)
-      max_length+= TIME_SECOND_PART_DIGITS + 1;
+      char_length+= TIME_SECOND_PART_DIGITS + 1;
     else
     {
       set_if_smaller(decimals, TIME_SECOND_PART_DIGITS);
-      max_length+= decimals + 1;
+      char_length+= decimals + 1;
     }
   }
   sql_mode= current_thd->variables.sql_mode &
                  (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE);
-  collation.set(&my_charset_numeric, DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
+  collation.set(field_type() == MYSQL_TYPE_STRING ?
+                default_charset() : &my_charset_numeric,
+                DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
+  fix_char_length(char_length);
 }
 
 String *Item_temporal_func::val_str(String *str)
@@ -1483,6 +1487,23 @@ String *Item_temporal_func::val_str(String *str)
 }
 
 
+String *Item_temporal_hybrid_func::val_str_ascii(String *str)
+{
+  DBUG_ASSERT(fixed == 1);
+  MYSQL_TIME ltime;
+
+  if (get_date(&ltime, 0) ||
+      (null_value= my_TIME_to_str(&ltime, str, decimals)))
+    return (String *) 0;
+
+  /* Check that the returned timestamp type matches to the function type */
+  DBUG_ASSERT(cached_field_type == MYSQL_TYPE_STRING ||
+              ltime.time_type == MYSQL_TIMESTAMP_NONE ||
+              mysql_type_to_time_type(cached_field_type) == ltime.time_type);
+  return str;
+}
+
+
 bool Item_func_from_days::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
 {
   longlong value=args[0]->val_int();
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 3a03ee4..0062d50 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -506,6 +506,50 @@ public:
 };
 
 
+/**
+  Abstract class for functions returning TIME, DATE, DATETIME or string values,
+  whose data type depends on parameters and is set at fix_fields time.
+*/
+class Item_temporal_hybrid_func: public Item_temporal_func
+{
+protected:
+  enum_field_types cached_field_type; // TIME, DATE, DATETIME or STRING
+  String ascii_buf; // Conversion buffer
+public:
+  Item_temporal_hybrid_func(Item *a,Item *b)
+    :Item_temporal_func(a,b) {}
+  enum_field_types field_type() const { return cached_field_type; }
+  Item_result cmp_type() const
+  {
+    return cached_field_type == MYSQL_TYPE_STRING ?
+           STRING_RESULT : TIME_RESULT;
+  }
+  const CHARSET_INFO *charset_for_protocol() const
+  {
+    /*
+      Can return TIME, DATE, DATETIME or VARCHAR depending on arguments.
+      Send using "binary" when TIME, DATE or DATETIME,
+      or using collation.collation when VARCHAR
+      (which is fixed from @@collation_connection in fix_length_and_dec).
+    */
+    DBUG_ASSERT(fixed == 1);
+    return cached_field_type == MYSQL_TYPE_STRING ?
+           collation.collation : &my_charset_bin;
+  }
+  /**
+    Return string value in ASCII character set.
+  */
+  String *val_str_ascii(String *str);
+  /**
+    Return string value in @@character_set_connection.
+  */
+  String *val_str(String *str)
+  {
+    return val_str_from_val_str_ascii(str, &ascii_buf);
+  }
+};
+
+
 class Item_datefunc :public Item_temporal_func
 {
 public:
@@ -763,17 +807,15 @@ public:
 };
 
 
-class Item_date_add_interval :public Item_temporal_func
+class Item_date_add_interval :public Item_temporal_hybrid_func
 {
-  enum_field_types cached_field_type;
 public:
   const interval_type int_type; // keep it public
   const bool date_sub_interval; // keep it public
   Item_date_add_interval(Item *a,Item *b,interval_type type_arg,bool neg_arg)
-    :Item_temporal_func(a,b),int_type(type_arg), date_sub_interval(neg_arg) {}
+    :Item_temporal_hybrid_func(a,b),int_type(type_arg), date_sub_interval(neg_arg) {}
   const char *func_name() const { return "date_add_interval"; }
   void fix_length_and_dec();
-  enum_field_types field_type() const { return cached_field_type; }
   bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
   bool eq(const Item *item, bool binary_cmp) const;
   void print(String *str, enum_query_type query_type);
@@ -911,16 +953,14 @@ public:
 };
 
 
-class Item_func_add_time :public Item_temporal_func
+class Item_func_add_time :public Item_temporal_hybrid_func
 {
   const bool is_date;
   int sign;
-  enum_field_types cached_field_type;
 
 public:
   Item_func_add_time(Item *a, Item *b, bool type_arg, bool neg_arg)
-    :Item_temporal_func(a, b), is_date(type_arg) { sign= neg_arg ? -1 : 1; }
-  enum_field_types field_type() const { return cached_field_type; }
+    :Item_temporal_hybrid_func(a, b), is_date(type_arg) { sign= neg_arg ? -1 : 1; }
   void fix_length_and_dec();
   bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
   void print(String *str, enum_query_type query_type);
@@ -1019,9 +1059,8 @@ public:
 };
 
 
-class Item_func_str_to_date :public Item_temporal_func
+class Item_func_str_to_date :public Item_temporal_hybrid_func
 {
-  enum_field_types cached_field_type;
   timestamp_type cached_timestamp_type;
   bool const_item;
   String subject_converter;
@@ -1029,12 +1068,11 @@ class Item_func_str_to_date :public Item_temporal_func
   CHARSET_INFO *internal_charset;
 public:
   Item_func_str_to_date(Item *a, Item *b)
-    :Item_temporal_func(a, b), const_item(false),
+    :Item_temporal_hybrid_func(a, b), const_item(false),
     internal_charset(NULL)
   {}
   bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
   const char *func_name() const { return "str_to_date"; }
-  enum_field_types field_type() const { return cached_field_type; }
   void fix_length_and_dec();
 };
 
diff --git a/sql/log.cc b/sql/log.cc
index bb8f06c..dc87c39 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -263,6 +263,9 @@ public:
   {
     compute_statistics();
     truncate(0);
+    if(cache_log.file != -1)
+      my_chsize(cache_log.file, 0, 0, MYF(MY_WME));
+
     changes_to_non_trans_temp_table_flag= FALSE;
     incident= FALSE;
     before_stmt_pos= MY_OFF_T_UNDEF;
@@ -3059,7 +3062,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
   if (init_and_set_log_file_name(log_name, new_name, log_type_arg,
                                  io_cache_type_arg))
   {
-    sql_print_error("MSYQL_BIN_LOG::open failed to generate new file name.");
+    sql_print_error("MYSQL_BIN_LOG::open failed to generate new file name.");
     DBUG_RETURN(1);
   }
 
@@ -3086,7 +3089,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
       }
     });
 
-    sql_print_error("MSYQL_BIN_LOG::open failed to sync the index file.");
+    sql_print_error("MYSQL_BIN_LOG::open failed to sync the index file.");
     DBUG_RETURN(1);
   }
   DBUG_EXECUTE_IF("crash_create_non_critical_before_update_index", DBUG_SUICIDE(););
@@ -3849,14 +3852,14 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
 
   if ((error= sync_purge_index_file()))
   {
-    sql_print_error("MSYQL_BIN_LOG::purge_logs failed to flush register file.");
+    sql_print_error("MYSQL_BIN_LOG::purge_logs failed to flush register file.");
     goto err;
   }
 
   /* We know how many files to delete. Update index file. */
   if ((error=update_log_index(&log_info, need_update_threads)))
   {
-    sql_print_error("MSYQL_BIN_LOG::purge_logs failed to update the index file");
+    sql_print_error("MYSQL_BIN_LOG::purge_logs failed to update the index file");
     goto err;
   }
 
@@ -3866,7 +3869,7 @@ err:
   /* Read each entry from purge_index_file and delete the file. */
   if (is_inited_purge_index_file() &&
       (error= purge_index_entry(thd, reclaimed_space, FALSE)))
-    sql_print_error("MSYQL_BIN_LOG::purge_logs failed to process registered files"
+    sql_print_error("MYSQL_BIN_LOG::purge_logs failed to process registered files"
                     " that would be purged.");
   close_purge_index_file();
 
@@ -3983,7 +3986,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *reclaimed_space,
 
   if ((error=reinit_io_cache(&purge_index_file, READ_CACHE, 0, 0, 0)))
   {
-    sql_print_error("MSYQL_BIN_LOG::purge_index_entry failed to reinit register file "
+    sql_print_error("MYSQL_BIN_LOG::purge_index_entry failed to reinit register file "
                     "for read");
     goto err;
   }
@@ -3998,7 +4001,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *reclaimed_space,
       if (purge_index_file.error)
       {
         error= purge_index_file.error;
-        sql_print_error("MSYQL_BIN_LOG::purge_index_entry error %d reading from "
+        sql_print_error("MYSQL_BIN_LOG::purge_index_entry error %d reading from "
                         "register file.", error);
         goto err;
       }
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index be9e21d..eb19e09 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -121,10 +121,7 @@ extern "C" {					// Because of SCO 3.2V4.2
 #include <sysent.h>
 #endif
 #ifdef HAVE_PWD_H
-#include <pwd.h>				// For getpwent
-#endif
-#ifdef HAVE_GRP_H
-#include <grp.h>
+#include <pwd.h>				// For struct passwd
 #endif
 #include <my_net.h>
 
@@ -455,9 +452,7 @@ ulong opt_binlog_rows_event_max_size;
 my_bool opt_master_verify_checksum= 0;
 my_bool opt_slave_sql_verify_checksum= 1;
 const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS};
-#ifdef HAVE_INITGROUPS
 volatile sig_atomic_t calling_initgroups= 0; /**< Used in SIGSEGV handler. */
-#endif
 uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
 uint mysqld_extra_port;
 uint mysqld_port_timeout;
@@ -1462,7 +1457,7 @@ static void close_connections(void)
   end_slave();
 
   /* Give threads time to die. */
-  for (int i= 0; thread_count && i < 100; i++)
+  for (int i= 0; thread_count && i < 200; i++)
     my_sleep(20000);
 
   /*
@@ -2001,59 +1996,18 @@ static void set_ports()
 
 static struct passwd *check_user(const char *user)
 {
-#if !defined(__WIN__)
-  struct passwd *tmp_user_info;
-  uid_t user_id= geteuid();
+  myf flags= 0;
+  if (global_system_variables.log_warnings)
+    flags|= MY_WME;
+  if (!opt_bootstrap && !opt_help)
+    flags|= MY_FAE;
 
-  // Don't bother if we aren't superuser
-  if (user_id)
-  {
-    if (user)
-    {
-      /* Don't give a warning, if real user is same as given with --user */
-      /* purecov: begin tested */
-      tmp_user_info= getpwnam(user);
-      if ((!tmp_user_info || user_id != tmp_user_info->pw_uid) &&
-	  global_system_variables.log_warnings)
-        sql_print_warning(
-                    "One can only use the --user switch if running as root\n");
-      /* purecov: end */
-    }
-    return NULL;
-  }
-  if (!user)
-  {
-    if (!opt_bootstrap && !opt_help)
-    {
-      sql_print_error("Fatal error: Please consult the Knowledge Base "
-                      "to find out how to run mysqld as root!\n");
-      unireg_abort(1);
-    }
-    return NULL;
-  }
-  /* purecov: begin tested */
-  if (!strcmp(user,"root"))
-    return NULL;                        // Avoid problem with dynamic libraries
+  struct passwd *tmp_user_info= my_check_user(user, MYF(flags));
 
-  if (!(tmp_user_info= getpwnam(user)))
-  {
-    // Allow a numeric uid to be used
-    const char *pos;
-    for (pos= user; my_isdigit(mysqld_charset,*pos); pos++) ;
-    if (*pos)                                   // Not numeric id
-      goto err;
-    if (!(tmp_user_info= getpwuid(atoi(user))))
-      goto err;
-  }
+  if (!tmp_user_info && my_errno==EINVAL && (flags & MY_FAE))
+    unireg_abort(1);
 
   return tmp_user_info;
-  /* purecov: end */
-
-err:
-  sql_print_error("Fatal error: Can't change to run as user '%s' ;  Please check that the user exists!\n",user);
-  unireg_abort(1);
-#endif
-  return NULL;
 }
 
 static inline void allow_coredumps()
@@ -2070,10 +2024,6 @@ static inline void allow_coredumps()
 
 static void set_user(const char *user, struct passwd *user_info_arg)
 {
-  /* purecov: begin tested */
-#if !defined(__WIN__)
-  DBUG_ASSERT(user_info_arg != 0);
-#ifdef HAVE_INITGROUPS
   /*
     We can get a SIGSEGV when calling initgroups() on some systems when NSS
     is configured to use LDAP and the server is statically linked.  We set
@@ -2081,22 +2031,11 @@ static void set_user(const char *user, struct passwd *user_info_arg)
     output a specific message to help the user resolve this problem.
   */
   calling_initgroups= 1;
-  initgroups((char*) user, user_info_arg->pw_gid);
+  int res= my_set_user(user, user_info_arg, MYF(MY_WME));
   calling_initgroups= 0;
-#endif
-  if (setgid(user_info_arg->pw_gid) == -1)
-  {
-    sql_perror("setgid");
+  if (res)
     unireg_abort(1);
-  }
-  if (setuid(user_info_arg->pw_uid) == -1)
-  {
-    sql_perror("setuid");
-    unireg_abort(1);
-  }
   allow_coredumps();
-#endif
-  /* purecov: end */
 }
 
 
@@ -3807,9 +3746,23 @@ static int init_common_variables()
   /* Set collactions that depends on the default collation */
   global_system_variables.collation_server=	 default_charset_info;
   global_system_variables.collation_database=	 default_charset_info;
-  global_system_variables.collation_connection=  default_charset_info;
-  global_system_variables.character_set_results= default_charset_info;
-  global_system_variables.character_set_client=  default_charset_info;
+
+  if (is_supported_parser_charset(default_charset_info))
+  {
+    global_system_variables.collation_connection= default_charset_info;
+    global_system_variables.character_set_results= default_charset_info;
+    global_system_variables.character_set_client= default_charset_info;
+  }
+  else
+  {
+    sql_print_information("'%s' can not be used as client character set. "
+                          "'%s' will be used as default client character set.",
+                          default_charset_info->csname,
+                          my_charset_latin1.csname);
+    global_system_variables.collation_connection= &my_charset_latin1;
+    global_system_variables.character_set_results= &my_charset_latin1;
+    global_system_variables.character_set_client= &my_charset_latin1;
+  }
 
   if (!(character_set_filesystem=
         get_charset_by_csname(character_set_filesystem_name,
@@ -4949,6 +4902,12 @@ int mysqld_main(int argc, char **argv)
     setbuf(stderr, NULL);
     FreeConsole();				// Remove window
   }
+
+  if (fileno(stdin) >= 0)
+  {
+    /* Disable CRLF translation (MDEV-9409). */
+    _setmode(fileno(stdin), O_BINARY);
+  }
 #endif
 
   /*
@@ -8434,4 +8393,3 @@ template class I_List<i_string_pair>;
 template class I_List<Statement>;
 template class I_List_iterator<Statement>;
 #endif
-
diff --git a/sql/rpl_filter.cc b/sql/rpl_filter.cc
index 9103cad..6205c25 100644
--- a/sql/rpl_filter.cc
+++ b/sql/rpl_filter.cc
@@ -279,6 +279,9 @@ Rpl_filter::parse_filter_rule(const char* spec, Add_filter add)
   int status= 0;
   char *arg, *ptr, *pstr;
 
+  if (!spec)
+    return false;
+  
   if (! (ptr= my_strdup(spec, MYF(MY_WME))))
     return true;
 
diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
index b0c67fb..81792cc 100644
--- a/sql/signal_handler.cc
+++ b/sql/signal_handler.cc
@@ -143,7 +143,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
 
   if (opt_stack_trace)
   {
-    my_safe_printf_stderr("Thread pointer: 0x%p\n", thd);
+    my_safe_printf_stderr("Thread pointer: %p\n", thd);
     my_safe_printf_stderr("%s",
       "Attempting backtrace. You can use the following "
       "information to find out\n"
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 019e9d9..69364ea 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -488,12 +488,8 @@ check_routine_name(LEX_STRING *ident)
     my_error(ER_SP_WRONG_NAME, MYF(0), ident->str);
     return TRUE;
   }
-  if (check_string_char_length(ident, "", NAME_CHAR_LEN,
-                               system_charset_info, 1))
-  {
-    my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str);
+  if (check_ident_length(ident))
     return TRUE;
-  }
 
   return FALSE;
 }
@@ -3146,18 +3142,18 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
                                           thd->query_length()) <= 0)
     {
       res= m_lex_keeper.reset_lex_and_exec_core(thd, nextp, FALSE, this);
+      bool log_slow= !res && thd->enable_slow_log;
 
-      if (thd->stmt_da->is_eof())
-      {
-        /* Finalize server status flags after executing a statement. */
+      /* Finalize server status flags after executing a statement. */
+      if (log_slow || thd->stmt_da->is_eof())
         thd->update_server_status();
 
+      if (thd->stmt_da->is_eof())
         thd->protocol->end_statement();
-      }
 
       query_cache_end_of_result(thd);
 
-      if (!res && unlikely(thd->enable_slow_log))
+      if (log_slow)
         log_slow_statement(thd);
     }
     else
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 61f8b40..e2e56c4 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1,6 +1,6 @@
 /*
    Copyright (c) 2007, 2013, Oracle and/or its affiliates.
-   Copyright (c) 2008, 2014, SkySQL Ab.
+   Copyright (c) 2008, 2016, MariaDB
 
    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
@@ -821,6 +821,7 @@ void update_global_user_stats(THD *thd, bool create_user, time_t now)
 
 bool thd_init_client_charset(THD *thd, uint cs_number)
 {
+  SV *gv=&global_system_variables;
   CHARSET_INFO *cs;
   /*
    Use server character set and collation if
@@ -831,16 +832,13 @@ bool thd_init_client_charset(THD *thd, uint cs_number)
   */
   if (!opt_character_set_client_handshake ||
       !(cs= get_charset(cs_number, MYF(0))) ||
-      !my_strcasecmp(&my_charset_latin1,
-                     global_system_variables.character_set_client->name,
+      !my_strcasecmp(&my_charset_latin1, gv->character_set_client->name,
                      cs->name))
   {
-    thd->variables.character_set_client=
-      global_system_variables.character_set_client;
-    thd->variables.collation_connection=
-      global_system_variables.collation_connection;
-    thd->variables.character_set_results=
-      global_system_variables.character_set_results;
+    DBUG_ASSERT(is_supported_parser_charset(gv->character_set_client));
+    thd->variables.character_set_client= gv->character_set_client;
+    thd->variables.collation_connection= gv->collation_connection;
+    thd->variables.character_set_results= gv->character_set_results;
   }
   else
   {
diff --git a/sql/sql_const.h b/sql/sql_const.h
index 9d22760..3c127a0 100644
--- a/sql/sql_const.h
+++ b/sql/sql_const.h
@@ -54,7 +54,7 @@
 #define MIN_TIME_WIDTH          10      /* -HHH:MM:SS */
 #define MAX_TIME_WIDTH          16      /* -DDDDDD HH:MM:SS */
 #define MAX_TIME_FULL_WIDTH     23      /* -DDDDDD HH:MM:SS.###### */
-#define MAX_DATETIME_FULL_WIDTH 29	/* YYYY-MM-DD HH:MM:SS.###### AM */
+#define MAX_DATETIME_FULL_WIDTH 26	/* YYYY-MM-DD HH:MM:SS.###### */
 #define MAX_DATETIME_WIDTH	19	/* YYYY-MM-DD HH:MM:SS */
 #define MAX_DATETIME_COMPRESSED_WIDTH 14  /* YYYYMMDDHHMMSS */
 #define MAX_DATETIME_PRECISION  6
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index c6865a7..4439559 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -651,6 +651,8 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
 
   unit->derived= derived;
 
+  derived->fill_me= FALSE;
+
   if (!(derived->derived_result= new select_union))
     DBUG_RETURN(TRUE); // out of memory
 
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index ee0e09a..fa866bc 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1074,7 +1074,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
       state= (enum my_lex_states) state_map[c];
       break;
     case MY_LEX_ESCAPE:
-      if (lip->yyGet() == 'N')
+      if (!lip->eof() && lip->yyGet() == 'N')
       {					// Allow \N as shortcut for NULL
 	yylval->lex_str.str=(char*) "\\N";
 	yylval->lex_str.length=2;
@@ -3486,12 +3486,28 @@ bool st_select_lex::add_index_hint (THD *thd, char *str, uint length)
 
 bool st_select_lex::optimize_unflattened_subqueries(bool const_only)
 {
-  for (SELECT_LEX_UNIT *un= first_inner_unit(); un; un= un->next_unit())
+  SELECT_LEX_UNIT *next_unit= NULL;
+  for (SELECT_LEX_UNIT *un= first_inner_unit();
+       un;
+       un= next_unit ? next_unit : un->next_unit())
   {
     Item_subselect *subquery_predicate= un->item;
-    
+    next_unit= NULL;
+
     if (subquery_predicate)
     {
+      if (!subquery_predicate->fixed)
+      {
+	/*
+	 This subquery was excluded as part of some expression so it is
+	 invisible from all prepared expression.
+       */
+	next_unit= un->next_unit();
+	un->exclude_level();
+	if (next_unit)
+	  continue;
+	break;
+      }
       if (subquery_predicate->substype() == Item_subselect::IN_SUBS)
       {
         Item_in_subselect *in_subs= (Item_in_subselect*) subquery_predicate;
@@ -4231,6 +4247,12 @@ bool st_select_lex::is_merged_child_of(st_select_lex *ancestor)
     {
       continue;
     }
+
+    if (sl->master_unit()->derived &&
+      sl->master_unit()->derived->is_merged_derived())
+    {
+      continue;
+    }
     all_merged= FALSE;
     break;
   }
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 9f300f8..4723c2b 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -1389,8 +1389,8 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
   set_if_bigger(length,line_start.length());
   stack=stack_pos=(int*) sql_alloc(sizeof(int)*length);
 
-  if (!(buffer=(uchar*) my_malloc(buff_length+1,MYF(MY_WME))))
-    error= true; /* purecov: inspected */
+  if (!(buffer=(uchar*) my_malloc(buff_length+1,MYF(0))))
+    error=1; /* purecov: inspected */
   else
   {
     end_of_buff=buffer+buff_length;
@@ -1581,50 +1581,37 @@ int READ_INFO::read_field()
 	}
       }
 #ifdef USE_MB
-        uint ml= my_mbcharlen(read_charset, chr);
-        if (ml == 0)
-        {
-          *to= '\0';
-          my_error(ER_INVALID_CHARACTER_STRING, MYF(0),
-                   read_charset->csname, buffer);
-          error= true;
-          return 1;
-        }
+      if (my_mbcharlen(read_charset, chr) > 1 &&
+          to + my_mbcharlen(read_charset, chr) <= end_of_buff)
+      {
+        uchar* p= to;
+        int ml, i;
+        *to++ = chr;
 
-        if (ml > 1 &&
-            to + ml <= end_of_buff)
-        {
-          uchar* p= to;
-          *to++ = chr;
+        ml= my_mbcharlen(read_charset, chr);
 
-          for (uint i= 1; i < ml; i++)
+        for (i= 1; i < ml; i++)
+        {
+          chr= GET;
+          if (chr == my_b_EOF)
           {
-            chr= GET;
-            if (chr == my_b_EOF)
-            {
-              /*
-                Need to back up the bytes already ready from illformed
-                multi-byte char 
-              */
-              to-= i;
-              goto found_eof;
-            }
-            *to++ = chr;
+            /*
+             Need to back up the bytes already ready from illformed
+             multi-byte char
+            */
+            to-= i;
+            goto found_eof;
           }
-          if (my_ismbchar(read_charset,
+          *to++ = chr;
+        }
+        if (my_ismbchar(read_charset,
                         (const char *)p,
                         (const char *)to))
-            continue;
-          for (uint i= 0; i < ml; i++)
-            PUSH(*--to);
-          chr= GET;
-        }
-        else if (ml > 1)
-        {
-          // Buffer is too small, exit while loop, and reallocate.
-          PUSH(chr);
-          break;
-        }
+          continue;
+        for (i= 0; i < ml; i++)
+          PUSH(*--to);
+        chr= GET;
+      }
 #endif
       *to++ = (uchar) chr;
     }
@@ -1868,15 +1855,7 @@ int READ_INFO::read_value(int delim, String *val)
   for (chr= GET; my_tospace(chr) != delim && chr != my_b_EOF;)
   {
 #ifdef USE_MB
-    uint ml= my_mbcharlen(read_charset, chr);
-    if (ml == 0)
-    {
-      chr= my_b_EOF;
-      val->length(0);
-      return chr;
-    }
-
-    if (ml > 1)
+    if (my_mbcharlen(read_charset, chr) > 1)
     {
       DBUG_PRINT("read_xml",("multi byte"));
       int i, ml= my_mbcharlen(read_charset, chr);
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index a3114ab..f000fe1 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4329,11 +4329,8 @@ create_sp_error:
     }
   case SQLCOM_SHOW_CREATE_TRIGGER:
     {
-      if (lex->spname->m_name.length > NAME_LEN)
-      {
-        my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str);
+      if (check_ident_length(&lex->spname->m_name))
         goto error;
-      }
 
       if (show_create_trigger(thd, lex->spname))
         goto error; /* Error has been already logged. */
@@ -6019,12 +6016,9 @@ bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type,
   LEX  *lex= thd->lex;
   DBUG_ENTER("add_field_to_list");
 
-  if (check_string_char_length(field_name, "", NAME_CHAR_LEN,
-                               system_charset_info, 1))
-  {
-    my_error(ER_TOO_LONG_IDENT, MYF(0), field_name->str); /* purecov: inspected */
+  if (check_ident_length(field_name))
     DBUG_RETURN(1);				/* purecov: inspected */
-  }
+
   if (type_modifier & PRI_KEY_FLAG)
   {
     Key *key;
@@ -7688,6 +7682,17 @@ bool check_string_char_length(LEX_STRING *str, const char *err_msg,
 }
 
 
+bool check_ident_length(LEX_STRING *ident)
+{
+  if (check_string_char_length(ident, 0, NAME_CHAR_LEN, system_charset_info, 1))
+  {
+    my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str);
+    return 1;
+  }
+  return 0;
+}
+
+
 /*
   Check if path does not contain mysql data home directory
 
diff --git a/sql/sql_parse.h b/sql/sql_parse.h
index 4c3070d..66a8f6e 100644
--- a/sql/sql_parse.h
+++ b/sql/sql_parse.h
@@ -75,6 +75,7 @@ bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
 bool check_string_char_length(LEX_STRING *str, const char *err_msg,
                               uint max_char_length, CHARSET_INFO *cs,
                               bool no_error);
+bool check_ident_length(LEX_STRING *ident);
 CHARSET_INFO* merge_charset_and_collation(CHARSET_INFO *cs, CHARSET_INFO *cl);
 bool check_host_name(LEX_STRING *str);
 bool check_identifier_name(LEX_STRING *str, uint max_char_length,
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 8c99496..c406fab 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2871,7 +2871,7 @@ JOIN::exec()
                                     *curr_fields_list),
                                    Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF);
   error= do_select(curr_join, curr_fields_list, NULL, procedure);
-  thd->limit_found_rows= curr_join->send_records;
+  thd->limit_found_rows= curr_join->send_records - curr_join->duplicate_rows;
 
   /* Accumulate the counts from all join iterations of all join parts. */
   thd->examined_row_count+= curr_join->examined_rows;
@@ -11946,6 +11946,9 @@ static COND *build_equal_items_for_cond(THD *thd, COND *cond,
   COND_EQUAL cond_equal;
   cond_equal.upper_levels= inherited;
 
+  if (check_stack_overrun(thd, STACK_MIN_SIZE, NULL))
+    return cond;                          // Fatal error flag is set!
+
   if (cond->type() == Item::COND_ITEM)
   {
     List<Item> eq_list;
@@ -16578,7 +16581,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
     join->join_tab[join->top_join_tab_count - 1].next_select= end_select;
     join_tab=join->join_tab+join->const_tables;
   }
-  join->send_records=0;
+  join->duplicate_rows= join->send_records=0;
   if (join->table_count == join->const_tables)
   {
     /*
@@ -18089,7 +18092,12 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
       int error;
       /* result < 0 if row was not accepted and should not be counted */
       if ((error= join->result->send_data(*join->fields)))
-        DBUG_RETURN(error < 0 ? NESTED_LOOP_OK : NESTED_LOOP_ERROR);
+      {
+        if (error > 0)
+          DBUG_RETURN(NESTED_LOOP_ERROR);
+        // error < 0 => duplicate row
+        join->duplicate_rows++;
+      }
     }
     if (++join->send_records >= join->unit->select_limit_cnt &&
 	join->do_send_rows)
@@ -18205,7 +18213,7 @@ end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
               if (error < 0)
               {
                 /* Duplicate row, don't count */
-                join->send_records--;
+                join->duplicate_rows++;
                 error= 0;
               }
             }
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 4650bc2..0623672 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -1018,7 +1018,8 @@ public:
   table_map outer_join;
   /* Bitmap of tables used in the select list items */
   table_map select_list_used_tables;
-  ha_rows  send_records,found_records,examined_rows,row_limit, select_limit;
+  ha_rows  send_records, found_records, examined_rows,
+           row_limit, select_limit, duplicate_rows;
   /**
     Used to fetch no more than given amount of rows per one
     fetch operation of server side cursor.
@@ -1272,7 +1273,7 @@ public:
     sort_and_group= 0;
     first_record= 0;
     do_send_rows= 1;
-    send_records= 0;
+    duplicate_rows= send_records= 0;
     found_records= 0;
     fetch_limit= HA_POS_ERROR;
     examined_rows= 0;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 2cd36ce..2cec480 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -684,7 +684,7 @@ static bool read_ddl_log_file_entry(uchar *file_entry_buf,
   DBUG_ENTER("read_ddl_log_file_entry");
   DBUG_ASSERT(io_size >= size);
 
-  if (mysql_file_pread(file_id, file_entry_buf, size, io_size * entry_no,
+  if (mysql_file_pread(file_id, file_entry_buf, size, ((my_off_t)io_size) * entry_no,
                        MYF(MY_WME)) != size)
     error= TRUE;
   DBUG_RETURN(error);
@@ -3167,7 +3167,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
           sql_field->pack_length=	dup_field->pack_length;
           sql_field->key_length=	dup_field->key_length;
 	  sql_field->decimals=		dup_field->decimals;
-	  sql_field->create_length_to_internal_length();
 	  sql_field->unireg_check=	dup_field->unireg_check;
           /* 
             We're making one field from two, the result field will have
@@ -3177,6 +3176,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
           if (!(sql_field->flags & NOT_NULL_FLAG))
             null_fields--;
 	  sql_field->flags=		dup_field->flags;
+	  sql_field->create_length_to_internal_length();
           sql_field->interval=          dup_field->interval;
           sql_field->vcol_info=         dup_field->vcol_info;
           sql_field->stored_in_db=      dup_field->stored_in_db;
@@ -3312,12 +3312,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
       my_error(ER_TOO_MANY_KEY_PARTS,MYF(0),tmp);
       DBUG_RETURN(TRUE);
     }
-    if (check_string_char_length(&key->name, "", NAME_CHAR_LEN,
-                                 system_charset_info, 1))
-    {
-      my_error(ER_TOO_LONG_IDENT, MYF(0), key->name.str);
+    if (check_ident_length(&key->name))
       DBUG_RETURN(TRUE);
-    }
     key_iterator2.rewind ();
     if (key->type != Key::FOREIGN_KEY)
     {
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index c5c6539..d912a7b 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -838,6 +838,23 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
   }
 }
 
+
+/**
+  Convert TIME/DATE/DATETIME value to String.
+  @param l_time   DATE value
+  @param OUT str  String to convert to
+  @param dec      Number of fractional digits.
+*/
+bool my_TIME_to_str(const MYSQL_TIME *ltime, String *str, uint dec)
+{
+  if (str->alloc(MAX_DATE_STRING_REP_LENGTH))
+    return true;
+  str->set_charset(&my_charset_numeric);
+  str->length(my_TIME_to_str(ltime, const_cast<char*>(str->ptr()), dec));
+  return false;
+}
+
+
 void make_truncated_value_warning(THD *thd,
                                   MYSQL_ERROR::enum_warning_level level,
                                   const ErrConv *sval,
diff --git a/sql/sql_time.h b/sql/sql_time.h
index ad75212..9becdcd 100644
--- a/sql/sql_time.h
+++ b/sql/sql_time.h
@@ -74,6 +74,8 @@ extern DATE_TIME_FORMAT *date_time_format_copy(THD *thd,
 					       DATE_TIME_FORMAT *format);
 const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
 				     timestamp_type type);
+bool my_TIME_to_str(const MYSQL_TIME *ltime, String *str, uint dec);
+
 /* MYSQL_TIME operations */
 bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type,
                        INTERVAL interval);
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 626e556..d18498d 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -455,12 +455,8 @@ int mysql_create_function(THD *thd,udf_func *udf)
     my_message(ER_UDF_NO_PATHS, ER(ER_UDF_NO_PATHS), MYF(0));
     DBUG_RETURN(1);
   }
-  if (check_string_char_length(&udf->name, "", NAME_CHAR_LEN,
-                               system_charset_info, 1))
-  {
-    my_error(ER_TOO_LONG_IDENT, MYF(0), udf->name.str);
+  if (check_ident_length(&udf->name))
     DBUG_RETURN(1);
-  }
 
   /* 
     Turn off row binlogging of this statement and use statement-based 
diff --git a/sql/sql_yacc.cc b/sql/sql_yacc.cc
index 5f17121..00085ba 100644
--- a/sql/sql_yacc.cc
+++ b/sql/sql_yacc.cc
@@ -3545,223 +3545,223 @@ static const yytype_uint16 yyrline[] =
     4420,  4422,  4424,  4426,  4431,  4432,  4438,  4439,  4456,  4457,
     4461,  4462,  4466,  4485,  4495,  4506,  4515,  4516,  4532,  4534,
     4533,  4538,  4536,  4547,  4548,  4552,  4570,  4586,  4587,  4603,
-    4618,  4640,  4641,  4646,  4645,  4669,  4679,  4701,  4700,  4718,
-    4717,  4737,  4759,  4763,  4792,  4804,  4805,  4810,  4821,  4809,
-    4846,  4847,  4851,  4864,  4885,  4898,  4924,  4925,  4930,  4929,
-    4966,  4971,  4972,  4976,  4977,  4981,  4983,  4989,  4995,  4997,
-    4999,  5001,  5003,  5005,  5015,  5030,  5014,  5044,  5045,  5049,
-    5050,  5054,  5055,  5059,  5060,  5064,  5065,  5069,  5070,  5074,
-    5078,  5079,  5082,  5084,  5088,  5089,  5093,  5094,  5095,  5099,
-    5104,  5109,  5114,  5119,  5124,  5129,  5134,  5149,  5155,  5160,
-    5165,  5170,  5175,  5181,  5180,  5206,  5207,  5208,  5213,  5218,
-    5223,  5225,  5227,  5229,  5235,  5240,  5245,  5251,  5257,  5263,
-    5272,  5290,  5307,  5330,  5344,  5345,  5346,  5347,  5348,  5349,
-    5350,  5354,  5355,  5356,  5360,  5361,  5365,  5366,  5367,  5368,
-    5373,  5380,  5381,  5385,  5386,  5390,  5391,  5399,  5398,  5407,
-    5405,  5415,  5413,  5423,  5421,  5429,  5448,  5454,  5456,  5460,
-    5464,  5465,  5469,  5474,  5473,  5499,  5502,  5501,  5511,  5513,
-    5518,  5521,  5525,  5532,  5533,  5537,  5538,  5542,  5548,  5554,
-    5558,  5574,  5590,  5591,  5592,  5593,  5598,  5602,  5607,  5612,
-    5616,  5621,  5626,  5632,  5637,  5643,  5647,  5652,  5657,  5675,
-    5677,  5679,  5692,  5694,  5699,  5704,  5716,  5721,  5726,  5731,
-    5733,  5735,  5737,  5739,  5741,  5743,  5745,  5748,  5747,  5752,
-    5751,  5755,  5757,  5766,  5767,  5768,  5774,  5775,  5776,  5777,
-    5778,  5782,  5786,  5787,  5791,  5792,  5796,  5797,  5798,  5799,
-    5800,  5804,  5805,  5806,  5807,  5808,  5812,  5817,  5819,  5825,
-    5826,  5828,  5833,  5842,  5843,  5847,  5848,  5852,  5853,  5854,
-    5858,  5859,  5860,  5861,  5864,  5865,  5869,  5870,  5874,  5875,
-    5879,  5880,  5884,  5885,  5886,  5887,  5894,  5895,  5901,  5907,
-    5913,  5919,  5920,  5933,  5939,  5945,  5951,  5960,  5981,  5987,
-    5992,  5993,  5997,  5998,  6002,  6010,  6014,  6015,  6019,  6020,
-    6024,  6033,  6037,  6038,  6042,  6053,  6054,  6058,  6059,  6063,
-    6064,  6069,  6070,  6074,  6081,  6090,  6098,  6109,  6110,  6111,
-    6112,  6113,  6114,  6119,  6127,  6128,  6132,  6134,  6138,  6150,
-    6151,  6155,  6162,  6175,  6176,  6178,  6180,  6186,  6191,  6197,
-    6203,  6210,  6220,  6221,  6222,  6223,  6224,  6228,  6232,  6233,
-    6237,  6238,  6242,  6243,  6247,  6248,  6249,  6253,  6254,  6258,
-    6262,  6275,  6287,  6288,  6292,  6293,  6297,  6298,  6302,  6303,
-    6307,  6308,  6312,  6313,  6317,  6318,  6322,  6323,  6327,  6329,
-    6330,  6336,  6342,  6348,  6356,  6357,  6361,  6365,  6366,  6379,
-    6380,  6381,  6385,  6386,  6390,  6396,  6410,  6411,  6415,  6416,
-    6420,  6421,  6429,  6428,  6465,  6464,  6478,  6490,  6489,  6508,
-    6507,  6526,  6525,  6544,  6538,  6558,  6557,  6590,  6595,  6600,
-    6605,  6610,  6620,  6621,  6622,  6623,  6627,  6628,  6640,  6641,
-    6645,  6646,  6649,  6651,  6652,  6653,  6655,  6657,  6658,  6667,
-    6668,  6672,  6681,  6679,  6692,  6705,  6704,  6717,  6715,  6728,
-    6735,  6745,  6749,  6756,  6760,  6765,  6764,  6780,  6782,  6787,
-    6795,  6794,  6810,  6814,  6813,  6825,  6826,  6830,  6845,  6846,
-    6850,  6859,  6863,  6868,  6873,  6872,  6884,  6895,  6883,  6911,
-    6920,  6924,  6933,  6942,  6948,  6954,  6963,  6972,  6991,  7011,
-    7021,  7025,  7033,  7034,  7038,  7039,  7043,  7043,  7046,  7048,
-    7052,  7053,  7057,  7058,  7062,  7063,  7064,  7068,  7069,  7070,
-    7074,  7075,  7076,  7077,  7086,  7085,  7094,  7102,  7101,  7109,
-    7118,  7127,  7128,  7135,  7135,  7141,  7142,  7146,  7147,  7148,
-    7152,  7153,  7169,  7170,  7175,  7174,  7186,  7187,  7188,  7192,
-    7193,  7193,  7198,  7197,  7218,  7219,  7223,  7224,  7228,  7229,
-    7230,  7234,  7235,  7240,  7239,  7260,  7268,  7269,  7269,  7273,
-    7272,  7298,  7299,  7303,  7304,  7308,  7309,  7310,  7311,  7312,
-    7313,  7317,  7318,  7323,  7322,  7343,  7344,  7345,  7350,  7349,
-    7355,  7362,  7367,  7375,  7376,  7380,  7394,  7393,  7406,  7407,
-    7411,  7412,  7416,  7426,  7436,  7437,  7442,  7441,  7452,  7453,
-    7457,  7458,  7462,  7472,  7483,  7482,  7490,  7490,  7499,  7500,
-    7505,  7506,  7515,  7524,  7525,  7529,  7534,  7539,  7544,  7549,
-    7548,  7568,  7576,  7568,  7583,  7584,  7585,  7586,  7587,  7591,
-    7598,  7605,  7607,  7618,  7619,  7623,  7624,  7652,  7682,  7684,
-    7690,  7700,  7701,  7702,  7716,  7721,  7746,  7752,  7758,  7759,
-    7760,  7761,  7762,  7766,  7767,  7768,  7772,  7773,  7778,  7829,
-    7836,  7879,  7885,  7891,  7897,  7903,  7909,  7915,  7921,  7925,
-    7931,  7937,  7943,  7949,  7955,  7959,  7965,  7974,  7980,  7988,
-    7994,  8004,  8010,  8019,  8029,  8035,  8045,  8051,  8060,  8064,
-    8070,  8076,  8082,  8088,  8094,  8100,  8106,  8112,  8118,  8124,
-    8130,  8136,  8142,  8148,  8152,  8153,  8157,  8158,  8162,  8163,
-    8167,  8168,  8172,  8173,  8174,  8175,  8176,  8177,  8181,  8182,
-    8187,  8193,  8197,  8204,  8211,  8218,  8225,  8232,  8237,  8243,
-    8250,  8257,  8265,  8276,  8298,  8305,  8313,  8314,  8315,  8316,
-    8317,  8318,  8329,  8330,  8331,  8332,  8333,  8339,  8343,  8349,
-    8355,  8361,  8367,  8369,  8376,  8383,  8389,  8391,  8400,  8407,
-    8415,  8421,  8428,  8434,  8448,  8455,  8471,  8477,  8483,  8491,
-    8497,  8503,  8509,  8515,  8529,  8540,  8546,  8552,  8558,  8564,
-    8570,  8576,  8582,  8588,  8594,  8600,  8606,  8612,  8618,  8624,
-    8630,  8636,  8644,  8665,  8672,  8678,  8685,  8692,  8699,  8706,
-    8712,  8718,  8725,  8731,  8738,  8744,  8750,  8756,  8762,  8768,
-    8786,  8792,  8798,  8805,  8812,  8820,  8827,  8834,  8841,  8848,
-    8855,  8872,  8878,  8884,  8890,  8896,  8903,  8909,  8915,  8921,
-    8927,  8933,  8944,  8950,  8956,  8962,  8968,  8979,  8985,  9001,
-    9007,  9014,  9021,  9028,  9035,  9042,  9046,  9066,  9065,  9137,
-    9178,  9180,  9185,  9186,  9190,  9191,  9195,  9196,  9200,  9207,
-    9215,  9242,  9248,  9254,  9260,  9266,  9272,  9281,  9288,  9290,
-    9287,  9297,  9308,  9314,  9320,  9326,  9332,  9338,  9344,  9350,
-    9356,  9363,  9362,  9382,  9381,  9396,  9406,  9414,  9430,  9431,
-    9436,  9441,  9444,  9447,  9446,  9463,  9465,  9471,  9470,  9487,
-    9489,  9491,  9493,  9495,  9497,  9499,  9501,  9503,  9505,  9511,
-    9517,  9520,  9519,  9525,  9526,  9530,  9537,  9545,  9546,  9550,
-    9557,  9565,  9566,  9570,  9571,  9575,  9583,  9594,  9595,  9607,
-    9618,  9619,  9625,  9626,  9646,  9648,  9652,  9650,  9667,  9665,
-    9683,  9681,  9688,  9697,  9695,  9713,  9712,  9722,  9733,  9731,
-    9750,  9749,  9760,  9771,  9772,  9773,  9785,  9785,  9799,  9839,
-    9924,  9935,  9940,  9932,  9959,  9979,  9987,  9979,  9996,  9995,
-   10018, 10035, 10018, 10042, 10046, 10072, 10073, 10078, 10081, 10082,
-   10083, 10087, 10088, 10093, 10092, 10098, 10097, 10105, 10106, 10109,
-   10111, 10111, 10115, 10115, 10120, 10121, 10125, 10127, 10132, 10133,
-   10137, 10148, 10161, 10162, 10163, 10164, 10165, 10166, 10167, 10168,
-   10169, 10170, 10171, 10172, 10176, 10177, 10178, 10179, 10180, 10181,
-   10182, 10183, 10184, 10188, 10189, 10190, 10191, 10194, 10196, 10197,
-   10201, 10202, 10210, 10212, 10216, 10218, 10217, 10231, 10234, 10233,
-   10248, 10254, 10268, 10270, 10274, 10276, 10281, 10282, 10302, 10327,
-   10331, 10332, 10336, 10348, 10350, 10355, 10354, 10389, 10391, 10396,
-   10397, 10398, 10403, 10410, 10414, 10415, 10419, 10423, 10427, 10434,
-   10441, 10448, 10458, 10491, 10495, 10501, 10507, 10516, 10524, 10528,
-   10535, 10536, 10540, 10541, 10542, 10546, 10547, 10548, 10549, 10550,
-   10551, 10555, 10556, 10557, 10558, 10559, 10563, 10564, 10565, 10566,
-   10567, 10571, 10572, 10573, 10574, 10575, 10579, 10584, 10585, 10589,
-   10590, 10593, 10596, 10595, 10638, 10639, 10643, 10644, 10648, 10658,
-   10658, 10668, 10669, 10673, 10692, 10725, 10724, 10737, 10745, 10736,
-   10747, 10759, 10771, 10770, 10788, 10787, 10798, 10798, 10814, 10821,
-   10843, 10863, 10875, 10880, 10879, 10889, 10895, 10902, 10907, 10912,
-   10922, 10923, 10927, 10938, 10939, 10943, 10954, 10955, 10959, 10960,
-   10968, 10976, 10967, 10986, 10993, 10985, 11003, 11011, 11012, 11020,
-   11024, 11025, 11036, 11037, 11041, 11050, 11051, 11052, 11054, 11053,
-   11064, 11065, 11069, 11070, 11072, 11071, 11075, 11074, 11080, 11081,
-   11085, 11086, 11090, 11100, 11101, 11105, 11106, 11111, 11110, 11124,
-   11125, 11129, 11134, 11142, 11143, 11151, 11153, 11153, 11161, 11169,
-   11160, 11191, 11192, 11196, 11204, 11205, 11209, 11219, 11220, 11227,
-   11226, 11242, 11241, 11253, 11252, 11264, 11263, 11277, 11278, 11282,
-   11295, 11311, 11312, 11316, 11317, 11321, 11322, 11323, 11328, 11327,
-   11348, 11350, 11353, 11355, 11358, 11359, 11362, 11366, 11370, 11374,
-   11378, 11382, 11386, 11390, 11394, 11402, 11405, 11415, 11414, 11429,
-   11436, 11444, 11452, 11460, 11468, 11476, 11483, 11485, 11487, 11496,
-   11500, 11505, 11504, 11510, 11509, 11514, 11523, 11530, 11539, 11548,
-   11553, 11555, 11557, 11559, 11561, 11563, 11570, 11578, 11580, 11588,
-   11595, 11602, 11612, 11619, 11625, 11633, 11641, 11645, 11649, 11656,
-   11663, 11670, 11677, 11684, 11691, 11697, 11704, 11711, 11716, 11721,
-   11729, 11731, 11733, 11738, 11739, 11742, 11744, 11748, 11749, 11753,
-   11754, 11758, 11759, 11763, 11764, 11768, 11769, 11772, 11774, 11781,
-   11792, 11791, 11807, 11806, 11816, 11817, 11821, 11822, 11823, 11827,
-   11828, 11829, 11844, 11843, 11856, 11865, 11855, 11867, 11871, 11872,
-   11886, 11887, 11892, 11894, 11896, 11898, 11900, 11902, 11904, 11906,
-   11908, 11910, 11912, 11914, 11919, 11921, 11923, 11925, 11927, 11929,
-   11931, 11936, 11937, 11941, 11942, 11946, 11945, 11955, 11956, 11960,
-   11960, 11962, 11963, 11967, 11968, 11973, 11972, 11983, 11987, 11991,
-   12004, 12003, 12017, 12018, 12019, 12022, 12023, 12024, 12028, 12033,
-   12043, 12055, 12066, 12076, 12086, 12054, 12094, 12095, 12099, 12100,
-   12104, 12105, 12113, 12117, 12118, 12119, 12122, 12124, 12128, 12129,
-   12133, 12138, 12145, 12150, 12157, 12159, 12163, 12164, 12168, 12173,
-   12181, 12182, 12185, 12187, 12195, 12197, 12201, 12202, 12203, 12207,
-   12209, 12214, 12215, 12224, 12225, 12229, 12230, 12234, 12247, 12270,
-   12282, 12293, 12312, 12320, 12332, 12340, 12355, 12375, 12376, 12377,
-   12385, 12386, 12387, 12394, 12400, 12406, 12412, 12418, 12424, 12453,
-   12481, 12482, 12483, 12487, 12497, 12507, 12513, 12522, 12537, 12538,
-   12542, 12551, 12566, 12570, 12616, 12620, 12637, 12641, 12719, 12743,
-   12773, 12774, 12790, 12800, 12804, 12810, 12816, 12826, 12832, 12841,
-   12851, 12852, 12880, 12894, 12908, 12923, 12924, 12934, 12935, 12945,
-   12946, 12947, 12951, 12967, 12988, 13003, 13004, 13005, 13006, 13007,
-   13008, 13009, 13010, 13011, 13012, 13013, 13014, 13015, 13016, 13017,
-   13018, 13019, 13020, 13021, 13022, 13023, 13024, 13025, 13026, 13027,
-   13028, 13029, 13030, 13031, 13032, 13033, 13034, 13035, 13036, 13037,
-   13038, 13039, 13040, 13041, 13042, 13043, 13044, 13045, 13046, 13047,
-   13048, 13049, 13050, 13051, 13052, 13053, 13054, 13055, 13056, 13057,
-   13058, 13059, 13060, 13061, 13071, 13072, 13073, 13074, 13075, 13076,
-   13077, 13078, 13079, 13080, 13081, 13082, 13083, 13084, 13085, 13086,
-   13087, 13088, 13089, 13090, 13091, 13092, 13093, 13094, 13095, 13096,
-   13097, 13098, 13099, 13100, 13101, 13102, 13103, 13104, 13105, 13106,
-   13107, 13108, 13109, 13110, 13111, 13112, 13113, 13114, 13115, 13116,
-   13117, 13118, 13119, 13120, 13121, 13122, 13123, 13124, 13125, 13126,
-   13127, 13128, 13129, 13130, 13131, 13132, 13133, 13134, 13135, 13136,
-   13137, 13138, 13139, 13140, 13141, 13142, 13143, 13144, 13145, 13146,
-   13147, 13148, 13149, 13150, 13151, 13152, 13153, 13154, 13155, 13156,
-   13157, 13158, 13159, 13160, 13161, 13162, 13163, 13164, 13165, 13166,
-   13167, 13168, 13169, 13170, 13171, 13172, 13173, 13174, 13175, 13176,
-   13177, 13178, 13179, 13180, 13181, 13182, 13183, 13184, 13185, 13186,
-   13187, 13188, 13189, 13190, 13191, 13192, 13193, 13194, 13195, 13196,
-   13197, 13198, 13199, 13200, 13201, 13202, 13203, 13204, 13205, 13206,
-   13207, 13208, 13209, 13210, 13211, 13212, 13213, 13214, 13215, 13216,
-   13217, 13218, 13219, 13220, 13221, 13222, 13223, 13224, 13225, 13226,
-   13227, 13228, 13229, 13230, 13231, 13232, 13233, 13234, 13235, 13236,
-   13237, 13238, 13239, 13240, 13241, 13242, 13243, 13244, 13245, 13246,
-   13247, 13248, 13249, 13250, 13251, 13252, 13253, 13254, 13255, 13256,
-   13257, 13258, 13259, 13260, 13261, 13262, 13263, 13264, 13265, 13266,
-   13267, 13268, 13269, 13270, 13271, 13272, 13273, 13274, 13275, 13276,
-   13277, 13278, 13279, 13280, 13281, 13282, 13283, 13284, 13285, 13286,
-   13287, 13288, 13289, 13290, 13291, 13292, 13293, 13294, 13295, 13296,
-   13297, 13298, 13299, 13300, 13301, 13302, 13303, 13304, 13305, 13306,
-   13307, 13308, 13309, 13310, 13311, 13312, 13313, 13314, 13315, 13316,
-   13317, 13318, 13319, 13320, 13321, 13322, 13323, 13324, 13325, 13326,
-   13327, 13328, 13329, 13330, 13331, 13332, 13333, 13334, 13335, 13336,
-   13337, 13338, 13339, 13340, 13341, 13342, 13343, 13344, 13345, 13346,
-   13347, 13348, 13349, 13350, 13351, 13352, 13353, 13354, 13355, 13356,
-   13357, 13358, 13359, 13360, 13361, 13362, 13363, 13370, 13369, 13384,
-   13385, 13389, 13390, 13394, 13394, 13474, 13475, 13476, 13477, 13481,
-   13482, 13486, 13487, 13488, 13489, 13493, 13494, 13495, 13496, 13500,
-   13501, 13505, 13546, 13564, 13575, 13587, 13600, 13615, 13634, 13660,
-   13673, 13699, 13742, 13756, 13757, 13758, 13759, 13763, 13764, 13773,
-   13785, 13786, 13787, 13793, 13799, 13811, 13810, 13826, 13827, 13831,
-   13832, 13836, 13851, 13852, 13853, 13858, 13859, 13864, 13863, 13883,
-   13895, 13908, 13907, 13941, 13942, 13946, 13947, 13951, 13952, 13953,
-   13954, 13956, 13955, 13968, 13969, 13970, 13971, 13972, 13978, 13983,
-   13989, 14000, 14011, 14015, 14025, 14030, 14037, 14049, 14061, 14070,
-   14072, 14076, 14077, 14084, 14086, 14090, 14091, 14096, 14095, 14099,
-   14098, 14102, 14101, 14105, 14104, 14107, 14108, 14109, 14110, 14111,
-   14112, 14113, 14114, 14115, 14116, 14117, 14118, 14119, 14120, 14121,
-   14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131,
-   14132, 14136, 14137, 14141, 14142, 14146, 14156, 14166, 14179, 14194,
-   14207, 14220, 14232, 14237, 14245, 14250, 14257, 14257, 14258, 14258,
-   14261, 14288, 14293, 14299, 14305, 14311, 14315, 14319, 14320, 14324,
-   14351, 14353, 14357, 14361, 14365, 14372, 14373, 14377, 14378, 14382,
-   14383, 14387, 14388, 14394, 14400, 14406, 14416, 14415, 14425, 14426,
-   14431, 14432, 14433, 14438, 14439, 14440, 14444, 14445, 14449, 14461,
-   14470, 14480, 14489, 14503, 14504, 14509, 14508, 14524, 14525, 14526,
-   14530, 14531, 14535, 14535, 14557, 14558, 14562, 14563, 14564, 14568,
-   14572, 14579, 14582, 14580, 14596, 14603, 14624, 14648, 14650, 14654,
-   14655, 14659, 14660, 14668, 14669, 14670, 14671, 14677, 14683, 14693,
-   14695, 14697, 14702, 14703, 14704, 14705, 14706, 14710, 14711, 14712,
-   14713, 14714, 14715, 14725, 14726, 14731, 14744, 14757, 14759, 14761,
-   14766, 14771, 14773, 14775, 14781, 14782, 14784, 14790, 14789, 14806,
-   14807, 14811, 14816, 14824, 14824, 14848, 14849, 14854, 14855, 14857,
-   14859, 14877, 14883, 14888, 14870, 14949, 14966, 14990, 15021, 15025,
-   15034, 15057, 14986, 15120, 15144, 15153, 15160, 15119, 15180, 15184,
-   15188, 15192, 15196, 15200, 15207, 15214, 15221, 15231, 15232, 15236,
-   15237, 15238, 15242, 15243, 15248, 15250, 15249, 15255, 15256, 15260,
-   15267, 15277, 15283, 15294
+    4618,  4640,  4641,  4646,  4645,  4669,  4681,  4703,  4702,  4720,
+    4719,  4739,  4761,  4765,  4794,  4806,  4807,  4812,  4823,  4811,
+    4848,  4849,  4853,  4866,  4887,  4900,  4926,  4927,  4932,  4931,
+    4968,  4977,  4978,  4982,  4983,  4987,  4989,  4995,  5001,  5003,
+    5005,  5007,  5009,  5011,  5021,  5036,  5020,  5050,  5051,  5055,
+    5056,  5060,  5061,  5065,  5066,  5070,  5071,  5075,  5076,  5080,
+    5084,  5085,  5088,  5090,  5094,  5095,  5099,  5100,  5101,  5105,
+    5110,  5115,  5120,  5125,  5130,  5135,  5140,  5155,  5161,  5166,
+    5171,  5176,  5181,  5187,  5186,  5212,  5213,  5214,  5219,  5224,
+    5229,  5231,  5233,  5235,  5241,  5246,  5251,  5257,  5263,  5269,
+    5278,  5296,  5313,  5336,  5350,  5351,  5352,  5353,  5354,  5355,
+    5356,  5360,  5361,  5362,  5366,  5367,  5371,  5372,  5373,  5374,
+    5379,  5386,  5387,  5391,  5392,  5396,  5397,  5405,  5404,  5413,
+    5411,  5421,  5419,  5429,  5427,  5435,  5454,  5460,  5462,  5466,
+    5470,  5471,  5475,  5480,  5479,  5505,  5508,  5507,  5517,  5519,
+    5524,  5527,  5531,  5538,  5539,  5543,  5544,  5548,  5554,  5560,
+    5564,  5580,  5596,  5597,  5598,  5599,  5604,  5608,  5613,  5618,
+    5622,  5627,  5632,  5638,  5643,  5649,  5653,  5658,  5663,  5681,
+    5683,  5685,  5698,  5700,  5705,  5710,  5722,  5727,  5732,  5737,
+    5739,  5741,  5743,  5745,  5747,  5749,  5751,  5754,  5753,  5758,
+    5757,  5761,  5763,  5772,  5773,  5774,  5780,  5781,  5782,  5783,
+    5784,  5788,  5792,  5793,  5797,  5798,  5802,  5803,  5804,  5805,
+    5806,  5810,  5811,  5812,  5813,  5814,  5818,  5823,  5825,  5831,
+    5832,  5834,  5839,  5848,  5849,  5853,  5854,  5858,  5859,  5860,
+    5864,  5865,  5866,  5867,  5870,  5871,  5875,  5876,  5880,  5881,
+    5885,  5886,  5890,  5891,  5892,  5893,  5900,  5901,  5907,  5913,
+    5919,  5925,  5926,  5939,  5945,  5951,  5957,  5966,  5987,  5993,
+    5998,  5999,  6003,  6004,  6008,  6016,  6020,  6021,  6025,  6026,
+    6030,  6039,  6043,  6044,  6048,  6059,  6060,  6064,  6065,  6069,
+    6070,  6075,  6076,  6080,  6087,  6096,  6104,  6115,  6116,  6117,
+    6118,  6119,  6120,  6125,  6133,  6134,  6138,  6140,  6144,  6156,
+    6157,  6161,  6168,  6181,  6182,  6184,  6186,  6192,  6197,  6203,
+    6209,  6216,  6226,  6227,  6228,  6229,  6230,  6234,  6238,  6239,
+    6243,  6244,  6248,  6249,  6253,  6254,  6255,  6259,  6260,  6264,
+    6268,  6281,  6293,  6294,  6298,  6299,  6303,  6304,  6308,  6309,
+    6313,  6314,  6318,  6319,  6323,  6324,  6328,  6329,  6333,  6335,
+    6336,  6342,  6348,  6354,  6362,  6363,  6367,  6371,  6372,  6385,
+    6386,  6387,  6391,  6392,  6396,  6402,  6416,  6417,  6421,  6422,
+    6426,  6427,  6435,  6434,  6471,  6470,  6484,  6496,  6495,  6514,
+    6513,  6532,  6531,  6550,  6544,  6564,  6563,  6596,  6601,  6606,
+    6611,  6616,  6626,  6627,  6628,  6629,  6633,  6634,  6646,  6647,
+    6651,  6652,  6655,  6657,  6658,  6659,  6661,  6663,  6664,  6673,
+    6674,  6678,  6687,  6685,  6698,  6711,  6710,  6723,  6721,  6734,
+    6741,  6751,  6755,  6762,  6766,  6771,  6770,  6786,  6788,  6793,
+    6801,  6800,  6816,  6820,  6819,  6831,  6832,  6836,  6851,  6852,
+    6856,  6865,  6869,  6874,  6879,  6878,  6890,  6901,  6889,  6917,
+    6926,  6930,  6939,  6948,  6954,  6960,  6969,  6978,  6997,  7017,
+    7027,  7031,  7039,  7040,  7044,  7045,  7049,  7049,  7052,  7054,
+    7058,  7059,  7063,  7064,  7068,  7069,  7070,  7074,  7075,  7076,
+    7080,  7081,  7082,  7083,  7092,  7091,  7100,  7108,  7107,  7115,
+    7124,  7133,  7134,  7141,  7141,  7147,  7148,  7152,  7153,  7154,
+    7158,  7159,  7175,  7176,  7181,  7180,  7192,  7193,  7194,  7198,
+    7199,  7199,  7204,  7203,  7224,  7225,  7229,  7230,  7234,  7235,
+    7236,  7240,  7241,  7246,  7245,  7266,  7274,  7275,  7275,  7279,
+    7278,  7304,  7305,  7309,  7310,  7314,  7315,  7316,  7317,  7318,
+    7319,  7323,  7324,  7329,  7328,  7349,  7350,  7351,  7356,  7355,
+    7361,  7368,  7373,  7381,  7382,  7386,  7400,  7399,  7412,  7413,
+    7417,  7418,  7422,  7432,  7442,  7443,  7448,  7447,  7458,  7459,
+    7463,  7464,  7468,  7478,  7489,  7488,  7496,  7496,  7505,  7506,
+    7511,  7512,  7521,  7530,  7531,  7535,  7540,  7545,  7550,  7555,
+    7554,  7574,  7582,  7574,  7589,  7590,  7591,  7592,  7593,  7597,
+    7604,  7611,  7613,  7624,  7625,  7629,  7630,  7658,  7688,  7690,
+    7696,  7706,  7707,  7708,  7722,  7727,  7752,  7758,  7764,  7765,
+    7766,  7767,  7768,  7772,  7773,  7774,  7778,  7779,  7784,  7835,
+    7842,  7885,  7891,  7897,  7903,  7909,  7915,  7921,  7927,  7931,
+    7937,  7943,  7949,  7955,  7961,  7965,  7971,  7980,  7986,  7994,
+    8000,  8010,  8016,  8025,  8035,  8041,  8051,  8057,  8066,  8070,
+    8076,  8082,  8088,  8094,  8100,  8106,  8112,  8118,  8124,  8130,
+    8136,  8142,  8148,  8154,  8158,  8159,  8163,  8164,  8168,  8169,
+    8173,  8174,  8178,  8179,  8180,  8181,  8182,  8183,  8187,  8188,
+    8193,  8199,  8203,  8210,  8217,  8224,  8231,  8238,  8243,  8249,
+    8256,  8263,  8271,  8282,  8304,  8311,  8319,  8320,  8321,  8322,
+    8323,  8324,  8335,  8336,  8337,  8338,  8339,  8345,  8349,  8355,
+    8361,  8367,  8373,  8375,  8382,  8389,  8395,  8397,  8406,  8413,
+    8421,  8427,  8434,  8440,  8454,  8461,  8477,  8483,  8489,  8497,
+    8503,  8509,  8515,  8521,  8535,  8546,  8552,  8558,  8564,  8570,
+    8576,  8582,  8588,  8594,  8600,  8606,  8612,  8618,  8624,  8630,
+    8636,  8642,  8650,  8671,  8678,  8684,  8691,  8698,  8705,  8712,
+    8718,  8724,  8731,  8737,  8744,  8750,  8756,  8762,  8768,  8774,
+    8792,  8798,  8804,  8811,  8818,  8826,  8833,  8840,  8847,  8854,
+    8861,  8878,  8884,  8890,  8896,  8902,  8909,  8915,  8921,  8927,
+    8933,  8939,  8950,  8956,  8962,  8968,  8974,  8985,  8991,  9007,
+    9013,  9020,  9027,  9034,  9041,  9048,  9052,  9072,  9071,  9143,
+    9184,  9186,  9191,  9192,  9196,  9197,  9201,  9202,  9206,  9213,
+    9221,  9248,  9254,  9260,  9266,  9272,  9278,  9287,  9294,  9296,
+    9293,  9303,  9314,  9320,  9326,  9332,  9338,  9344,  9350,  9356,
+    9362,  9369,  9368,  9388,  9387,  9402,  9412,  9420,  9436,  9437,
+    9442,  9447,  9450,  9453,  9452,  9469,  9471,  9477,  9476,  9493,
+    9495,  9497,  9499,  9501,  9503,  9505,  9507,  9509,  9511,  9517,
+    9523,  9526,  9525,  9531,  9532,  9536,  9543,  9551,  9552,  9556,
+    9563,  9571,  9572,  9576,  9577,  9581,  9589,  9600,  9601,  9613,
+    9624,  9625,  9631,  9632,  9652,  9654,  9658,  9656,  9673,  9671,
+    9689,  9687,  9694,  9703,  9701,  9719,  9718,  9728,  9739,  9737,
+    9756,  9755,  9766,  9777,  9778,  9779,  9791,  9791,  9805,  9845,
+    9930,  9941,  9946,  9938,  9965,  9985,  9993,  9985, 10002, 10001,
+   10024, 10041, 10024, 10048, 10052, 10078, 10079, 10084, 10087, 10088,
+   10089, 10093, 10094, 10099, 10098, 10104, 10103, 10111, 10112, 10115,
+   10117, 10117, 10121, 10121, 10126, 10127, 10131, 10133, 10138, 10139,
+   10143, 10154, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174,
+   10175, 10176, 10177, 10178, 10182, 10183, 10184, 10185, 10186, 10187,
+   10188, 10189, 10190, 10194, 10195, 10196, 10197, 10200, 10202, 10203,
+   10207, 10208, 10216, 10218, 10222, 10224, 10223, 10237, 10240, 10239,
+   10254, 10260, 10274, 10276, 10280, 10282, 10287, 10288, 10308, 10333,
+   10337, 10338, 10342, 10354, 10356, 10361, 10360, 10395, 10397, 10402,
+   10403, 10404, 10409, 10416, 10420, 10421, 10425, 10429, 10433, 10440,
+   10447, 10454, 10464, 10497, 10501, 10507, 10513, 10522, 10530, 10534,
+   10541, 10542, 10546, 10547, 10548, 10552, 10553, 10554, 10555, 10556,
+   10557, 10561, 10562, 10563, 10564, 10565, 10569, 10570, 10571, 10572,
+   10573, 10577, 10578, 10579, 10580, 10581, 10585, 10590, 10591, 10595,
+   10596, 10599, 10602, 10601, 10644, 10645, 10649, 10650, 10654, 10664,
+   10664, 10674, 10675, 10679, 10698, 10731, 10730, 10743, 10751, 10742,
+   10753, 10765, 10777, 10776, 10794, 10793, 10804, 10804, 10820, 10827,
+   10849, 10869, 10881, 10886, 10885, 10895, 10901, 10908, 10913, 10918,
+   10928, 10929, 10933, 10944, 10945, 10949, 10960, 10961, 10965, 10966,
+   10974, 10982, 10973, 10992, 10999, 10991, 11009, 11017, 11018, 11026,
+   11030, 11031, 11042, 11043, 11047, 11056, 11057, 11058, 11060, 11059,
+   11070, 11071, 11075, 11076, 11078, 11077, 11081, 11080, 11086, 11087,
+   11091, 11092, 11096, 11106, 11107, 11111, 11112, 11117, 11116, 11130,
+   11131, 11135, 11140, 11148, 11149, 11157, 11159, 11159, 11167, 11175,
+   11166, 11197, 11198, 11202, 11210, 11211, 11215, 11225, 11226, 11233,
+   11232, 11248, 11247, 11259, 11258, 11270, 11269, 11283, 11284, 11288,
+   11301, 11317, 11318, 11322, 11323, 11327, 11328, 11329, 11334, 11333,
+   11354, 11356, 11359, 11361, 11364, 11365, 11368, 11372, 11376, 11380,
+   11384, 11388, 11392, 11396, 11400, 11408, 11411, 11421, 11420, 11435,
+   11442, 11450, 11458, 11466, 11474, 11482, 11489, 11491, 11493, 11502,
+   11506, 11511, 11510, 11516, 11515, 11520, 11529, 11536, 11545, 11554,
+   11559, 11561, 11563, 11565, 11567, 11569, 11576, 11584, 11586, 11594,
+   11601, 11608, 11618, 11625, 11631, 11639, 11647, 11651, 11655, 11662,
+   11669, 11676, 11683, 11690, 11697, 11703, 11710, 11717, 11722, 11727,
+   11735, 11737, 11739, 11744, 11745, 11748, 11750, 11754, 11755, 11759,
+   11760, 11764, 11765, 11769, 11770, 11774, 11775, 11778, 11780, 11787,
+   11798, 11797, 11813, 11812, 11822, 11823, 11827, 11828, 11829, 11833,
+   11834, 11835, 11850, 11849, 11862, 11871, 11861, 11873, 11877, 11878,
+   11892, 11893, 11898, 11900, 11902, 11904, 11906, 11908, 11910, 11912,
+   11914, 11916, 11918, 11920, 11925, 11927, 11929, 11931, 11933, 11935,
+   11937, 11942, 11943, 11947, 11948, 11952, 11951, 11961, 11962, 11966,
+   11966, 11968, 11969, 11973, 11974, 11979, 11978, 11989, 11993, 11997,
+   12010, 12009, 12023, 12024, 12025, 12028, 12029, 12030, 12034, 12039,
+   12049, 12061, 12072, 12082, 12092, 12060, 12100, 12101, 12105, 12106,
+   12110, 12111, 12119, 12123, 12124, 12125, 12128, 12130, 12134, 12135,
+   12139, 12144, 12151, 12156, 12163, 12165, 12169, 12170, 12174, 12179,
+   12187, 12188, 12191, 12193, 12201, 12203, 12207, 12208, 12209, 12213,
+   12215, 12220, 12221, 12230, 12231, 12235, 12236, 12240, 12253, 12276,
+   12288, 12299, 12318, 12326, 12338, 12346, 12361, 12381, 12382, 12383,
+   12391, 12392, 12393, 12400, 12406, 12412, 12418, 12424, 12430, 12459,
+   12487, 12488, 12489, 12493, 12503, 12513, 12519, 12528, 12543, 12544,
+   12548, 12557, 12572, 12576, 12622, 12626, 12643, 12647, 12725, 12749,
+   12779, 12780, 12796, 12806, 12810, 12816, 12822, 12832, 12838, 12847,
+   12857, 12858, 12886, 12900, 12914, 12929, 12930, 12940, 12941, 12951,
+   12952, 12953, 12957, 12973, 12994, 13009, 13010, 13011, 13012, 13013,
+   13014, 13015, 13016, 13017, 13018, 13019, 13020, 13021, 13022, 13023,
+   13024, 13025, 13026, 13027, 13028, 13029, 13030, 13031, 13032, 13033,
+   13034, 13035, 13036, 13037, 13038, 13039, 13040, 13041, 13042, 13043,
+   13044, 13045, 13046, 13047, 13048, 13049, 13050, 13051, 13052, 13053,
+   13054, 13055, 13056, 13057, 13058, 13059, 13060, 13061, 13062, 13063,
+   13064, 13065, 13066, 13067, 13077, 13078, 13079, 13080, 13081, 13082,
+   13083, 13084, 13085, 13086, 13087, 13088, 13089, 13090, 13091, 13092,
+   13093, 13094, 13095, 13096, 13097, 13098, 13099, 13100, 13101, 13102,
+   13103, 13104, 13105, 13106, 13107, 13108, 13109, 13110, 13111, 13112,
+   13113, 13114, 13115, 13116, 13117, 13118, 13119, 13120, 13121, 13122,
+   13123, 13124, 13125, 13126, 13127, 13128, 13129, 13130, 13131, 13132,
+   13133, 13134, 13135, 13136, 13137, 13138, 13139, 13140, 13141, 13142,
+   13143, 13144, 13145, 13146, 13147, 13148, 13149, 13150, 13151, 13152,
+   13153, 13154, 13155, 13156, 13157, 13158, 13159, 13160, 13161, 13162,
+   13163, 13164, 13165, 13166, 13167, 13168, 13169, 13170, 13171, 13172,
+   13173, 13174, 13175, 13176, 13177, 13178, 13179, 13180, 13181, 13182,
+   13183, 13184, 13185, 13186, 13187, 13188, 13189, 13190, 13191, 13192,
+   13193, 13194, 13195, 13196, 13197, 13198, 13199, 13200, 13201, 13202,
+   13203, 13204, 13205, 13206, 13207, 13208, 13209, 13210, 13211, 13212,
+   13213, 13214, 13215, 13216, 13217, 13218, 13219, 13220, 13221, 13222,
+   13223, 13224, 13225, 13226, 13227, 13228, 13229, 13230, 13231, 13232,
+   13233, 13234, 13235, 13236, 13237, 13238, 13239, 13240, 13241, 13242,
+   13243, 13244, 13245, 13246, 13247, 13248, 13249, 13250, 13251, 13252,
+   13253, 13254, 13255, 13256, 13257, 13258, 13259, 13260, 13261, 13262,
+   13263, 13264, 13265, 13266, 13267, 13268, 13269, 13270, 13271, 13272,
+   13273, 13274, 13275, 13276, 13277, 13278, 13279, 13280, 13281, 13282,
+   13283, 13284, 13285, 13286, 13287, 13288, 13289, 13290, 13291, 13292,
+   13293, 13294, 13295, 13296, 13297, 13298, 13299, 13300, 13301, 13302,
+   13303, 13304, 13305, 13306, 13307, 13308, 13309, 13310, 13311, 13312,
+   13313, 13314, 13315, 13316, 13317, 13318, 13319, 13320, 13321, 13322,
+   13323, 13324, 13325, 13326, 13327, 13328, 13329, 13330, 13331, 13332,
+   13333, 13334, 13335, 13336, 13337, 13338, 13339, 13340, 13341, 13342,
+   13343, 13344, 13345, 13346, 13347, 13348, 13349, 13350, 13351, 13352,
+   13353, 13354, 13355, 13356, 13357, 13358, 13359, 13360, 13361, 13362,
+   13363, 13364, 13365, 13366, 13367, 13368, 13369, 13376, 13375, 13390,
+   13391, 13395, 13396, 13400, 13400, 13480, 13481, 13482, 13483, 13487,
+   13488, 13492, 13493, 13494, 13495, 13499, 13500, 13501, 13502, 13506,
+   13507, 13511, 13552, 13570, 13581, 13593, 13606, 13621, 13640, 13666,
+   13679, 13705, 13748, 13762, 13763, 13764, 13765, 13769, 13770, 13779,
+   13791, 13792, 13793, 13799, 13805, 13817, 13816, 13832, 13833, 13837,
+   13838, 13842, 13857, 13858, 13859, 13864, 13865, 13870, 13869, 13889,
+   13901, 13914, 13913, 13947, 13948, 13952, 13953, 13957, 13958, 13959,
+   13960, 13962, 13961, 13974, 13975, 13976, 13977, 13978, 13984, 13989,
+   13995, 14006, 14017, 14021, 14031, 14036, 14043, 14055, 14067, 14076,
+   14078, 14082, 14083, 14090, 14092, 14096, 14097, 14102, 14101, 14105,
+   14104, 14108, 14107, 14111, 14110, 14113, 14114, 14115, 14116, 14117,
+   14118, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127,
+   14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137,
+   14138, 14142, 14143, 14147, 14148, 14152, 14162, 14172, 14185, 14200,
+   14213, 14226, 14238, 14243, 14251, 14256, 14263, 14263, 14264, 14264,
+   14267, 14294, 14299, 14305, 14311, 14317, 14321, 14325, 14326, 14330,
+   14357, 14359, 14363, 14367, 14371, 14378, 14379, 14383, 14384, 14388,
+   14389, 14393, 14394, 14400, 14406, 14412, 14422, 14421, 14431, 14432,
+   14437, 14438, 14439, 14444, 14445, 14446, 14450, 14451, 14455, 14467,
+   14476, 14486, 14495, 14509, 14510, 14515, 14514, 14530, 14531, 14532,
+   14536, 14537, 14541, 14541, 14563, 14564, 14568, 14569, 14570, 14574,
+   14578, 14585, 14588, 14586, 14602, 14609, 14630, 14654, 14656, 14660,
+   14661, 14665, 14666, 14674, 14675, 14676, 14677, 14683, 14689, 14699,
+   14701, 14703, 14708, 14709, 14710, 14711, 14712, 14716, 14717, 14718,
+   14719, 14720, 14721, 14731, 14732, 14737, 14750, 14763, 14765, 14767,
+   14772, 14777, 14779, 14781, 14787, 14788, 14790, 14796, 14795, 14812,
+   14813, 14817, 14822, 14830, 14830, 14854, 14855, 14860, 14861, 14863,
+   14865, 14883, 14889, 14894, 14876, 14955, 14972, 14996, 15027, 15031,
+   15040, 15063, 14992, 15126, 15150, 15159, 15166, 15125, 15186, 15190,
+   15194, 15198, 15202, 15206, 15213, 15220, 15227, 15237, 15238, 15242,
+   15243, 15244, 15248, 15249, 15254, 15256, 15255, 15261, 15262, 15266,
+   15273, 15283, 15289, 15300
 };
 #endif
 
@@ -22084,6 +22084,8 @@ yyreduce:
     {
             partition_info *part_info= Lex->part_info;
             partition_element *p_elem= part_info->curr_part_elem;
+            if (check_ident_length(&(yyvsp[(1) - (1)].lex_str)))
+              MYSQL_YYABORT;
             p_elem->partition_name= (yyvsp[(1) - (1)].lex_str).str;
           }
     break;
@@ -22091,7 +22093,7 @@ yyreduce:
   case 486:
 
 /* Line 1455 of yacc.c  */
-#line 4679 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4681 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -22118,7 +22120,7 @@ yyreduce:
   case 487:
 
 /* Line 1455 of yacc.c  */
-#line 4701 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4703 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -22139,14 +22141,14 @@ yyreduce:
   case 488:
 
 /* Line 1455 of yacc.c  */
-#line 4716 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4718 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 489:
 
 /* Line 1455 of yacc.c  */
-#line 4718 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4720 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -22167,14 +22169,14 @@ yyreduce:
   case 490:
 
 /* Line 1455 of yacc.c  */
-#line 4733 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4735 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 491:
 
 /* Line 1455 of yacc.c  */
-#line 4738 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4740 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
 
@@ -22201,14 +22203,14 @@ yyreduce:
   case 492:
 
 /* Line 1455 of yacc.c  */
-#line 4759 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4761 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 493:
 
 /* Line 1455 of yacc.c  */
-#line 4764 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4766 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -22242,7 +22244,7 @@ yyreduce:
   case 494:
 
 /* Line 1455 of yacc.c  */
-#line 4793 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4795 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             if (part_info->num_columns < 2U)
@@ -22256,21 +22258,21 @@ yyreduce:
   case 495:
 
 /* Line 1455 of yacc.c  */
-#line 4804 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4806 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 496:
 
 /* Line 1455 of yacc.c  */
-#line 4805 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4807 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 497:
 
 /* Line 1455 of yacc.c  */
-#line 4810 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4812 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             part_info->print_debug("( part_value_item", NULL);
@@ -22287,14 +22289,14 @@ yyreduce:
   case 498:
 
 /* Line 1455 of yacc.c  */
-#line 4821 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4823 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 499:
 
 /* Line 1455 of yacc.c  */
-#line 4823 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4825 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             part_info->print_debug(") part_value_item", NULL);
@@ -22320,21 +22322,21 @@ yyreduce:
   case 500:
 
 /* Line 1455 of yacc.c  */
-#line 4846 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4848 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 501:
 
 /* Line 1455 of yacc.c  */
-#line 4847 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4849 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 502:
 
 /* Line 1455 of yacc.c  */
-#line 4852 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4854 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             if (part_info->part_type == LIST_PARTITION)
@@ -22352,7 +22354,7 @@ yyreduce:
   case 503:
 
 /* Line 1455 of yacc.c  */
-#line 4865 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4867 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -22373,7 +22375,7 @@ yyreduce:
   case 504:
 
 /* Line 1455 of yacc.c  */
-#line 4885 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4887 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             if (part_info->num_subparts != 0 &&
@@ -22392,7 +22394,7 @@ yyreduce:
   case 505:
 
 /* Line 1455 of yacc.c  */
-#line 4899 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4901 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             if (part_info->num_subparts != 0)
@@ -22420,21 +22422,21 @@ yyreduce:
   case 506:
 
 /* Line 1455 of yacc.c  */
-#line 4924 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4926 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 507:
 
 /* Line 1455 of yacc.c  */
-#line 4925 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4927 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 508:
 
 /* Line 1455 of yacc.c  */
-#line 4930 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4932 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             partition_element *curr_part= part_info->current_partition;
@@ -22472,56 +22474,60 @@ yyreduce:
   case 509:
 
 /* Line 1455 of yacc.c  */
-#line 4962 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4964 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 510:
 
 /* Line 1455 of yacc.c  */
-#line 4967 "/home/buildbot/git/sql/sql_yacc.yy"
-    { Lex->part_info->curr_part_elem->partition_name= (yyvsp[(1) - (1)].lex_str).str; }
+#line 4969 "/home/buildbot/git/sql/sql_yacc.yy"
+    {
+            if (check_ident_length(&(yyvsp[(1) - (1)].lex_str)))
+              MYSQL_YYABORT;
+            Lex->part_info->curr_part_elem->partition_name= (yyvsp[(1) - (1)].lex_str).str;
+          }
     break;
 
   case 511:
 
 /* Line 1455 of yacc.c  */
-#line 4971 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4977 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 512:
 
 /* Line 1455 of yacc.c  */
-#line 4972 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4978 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 513:
 
 /* Line 1455 of yacc.c  */
-#line 4976 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4982 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 514:
 
 /* Line 1455 of yacc.c  */
-#line 4977 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4983 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 515:
 
 /* Line 1455 of yacc.c  */
-#line 4982 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4988 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->part_info->curr_part_elem->tablespace_name= (yyvsp[(3) - (3)].lex_str).str; }
     break;
 
   case 516:
 
 /* Line 1455 of yacc.c  */
-#line 4984 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4990 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             part_info->curr_part_elem->engine_type= (yyvsp[(4) - (4)].db_type);
@@ -22532,7 +22538,7 @@ yyreduce:
   case 517:
 
 /* Line 1455 of yacc.c  */
-#line 4990 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 4996 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->part_info->curr_part_elem->connect_string.str= (yyvsp[(3) - (3)].lex_str).str;
@@ -22543,49 +22549,49 @@ yyreduce:
   case 518:
 
 /* Line 1455 of yacc.c  */
-#line 4996 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5002 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[(3) - (3)].ulong_num); }
     break;
 
   case 519:
 
 /* Line 1455 of yacc.c  */
-#line 4998 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5004 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[(3) - (3)].ulonglong_number); }
     break;
 
   case 520:
 
 /* Line 1455 of yacc.c  */
-#line 5000 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5006 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[(3) - (3)].ulonglong_number); }
     break;
 
   case 521:
 
 /* Line 1455 of yacc.c  */
-#line 5002 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5008 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->part_info->curr_part_elem->data_file_name= (yyvsp[(4) - (4)].lex_str).str; }
     break;
 
   case 522:
 
 /* Line 1455 of yacc.c  */
-#line 5004 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5010 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->part_info->curr_part_elem->index_file_name= (yyvsp[(4) - (4)].lex_str).str; }
     break;
 
   case 523:
 
 /* Line 1455 of yacc.c  */
-#line 5006 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5012 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->part_info->curr_part_elem->part_comment= (yyvsp[(3) - (3)].lex_str).str; }
     break;
 
   case 524:
 
 /* Line 1455 of yacc.c  */
-#line 5015 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5021 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->sql_command == SQLCOM_INSERT)
@@ -22605,7 +22611,7 @@ yyreduce:
   case 525:
 
 /* Line 1455 of yacc.c  */
-#line 5030 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5036 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= NO_MATTER;
           }
@@ -22614,7 +22620,7 @@ yyreduce:
   case 526:
 
 /* Line 1455 of yacc.c  */
-#line 5034 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5040 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               The following work only with the local list, the global list
@@ -22627,112 +22633,112 @@ yyreduce:
   case 527:
 
 /* Line 1455 of yacc.c  */
-#line 5044 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5050 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 528:
 
 /* Line 1455 of yacc.c  */
-#line 5045 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5051 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 529:
 
 /* Line 1455 of yacc.c  */
-#line 5049 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5055 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 530:
 
 /* Line 1455 of yacc.c  */
-#line 5050 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5056 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 531:
 
 /* Line 1455 of yacc.c  */
-#line 5054 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5060 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 532:
 
 /* Line 1455 of yacc.c  */
-#line 5055 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5061 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 533:
 
 /* Line 1455 of yacc.c  */
-#line 5059 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5065 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 534:
 
 /* Line 1455 of yacc.c  */
-#line 5060 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5066 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 535:
 
 /* Line 1455 of yacc.c  */
-#line 5064 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5070 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 536:
 
 /* Line 1455 of yacc.c  */
-#line 5065 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5071 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (yyvsp[(1) - (1)].num);}
     break;
 
   case 537:
 
 /* Line 1455 of yacc.c  */
-#line 5069 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5075 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=(yyvsp[(1) - (1)].num); }
     break;
 
   case 538:
 
 /* Line 1455 of yacc.c  */
-#line 5070 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5076 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (yyvsp[(1) - (2)].num) | (yyvsp[(2) - (2)].num); }
     break;
 
   case 539:
 
 /* Line 1455 of yacc.c  */
-#line 5074 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5080 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=HA_LEX_CREATE_TMP_TABLE; }
     break;
 
   case 540:
 
 /* Line 1455 of yacc.c  */
-#line 5078 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5084 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 541:
 
 /* Line 1455 of yacc.c  */
-#line 5079 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5085 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=HA_LEX_CREATE_IF_NOT_EXISTS; }
     break;
 
   case 549:
 
 /* Line 1455 of yacc.c  */
-#line 5100 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5106 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.db_type= (yyvsp[(3) - (3)].db_type);
             Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
@@ -22742,7 +22748,7 @@ yyreduce:
   case 550:
 
 /* Line 1455 of yacc.c  */
-#line 5105 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5111 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.max_rows= (yyvsp[(3) - (3)].ulonglong_number);
             Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS;
@@ -22752,7 +22758,7 @@ yyreduce:
   case 551:
 
 /* Line 1455 of yacc.c  */
-#line 5110 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5116 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.min_rows= (yyvsp[(3) - (3)].ulonglong_number);
             Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS;
@@ -22762,7 +22768,7 @@ yyreduce:
   case 552:
 
 /* Line 1455 of yacc.c  */
-#line 5115 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5121 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.avg_row_length=(yyvsp[(3) - (3)].ulong_num);
             Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH;
@@ -22772,7 +22778,7 @@ yyreduce:
   case 553:
 
 /* Line 1455 of yacc.c  */
-#line 5120 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5126 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.password=(yyvsp[(3) - (3)].lex_str).str;
             Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD;
@@ -22782,7 +22788,7 @@ yyreduce:
   case 554:
 
 /* Line 1455 of yacc.c  */
-#line 5125 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5131 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.comment=(yyvsp[(3) - (3)].lex_str);
             Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
@@ -22792,7 +22798,7 @@ yyreduce:
   case 555:
 
 /* Line 1455 of yacc.c  */
-#line 5130 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5136 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.auto_increment_value=(yyvsp[(3) - (3)].ulonglong_number);
             Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;
@@ -22802,7 +22808,7 @@ yyreduce:
   case 556:
 
 /* Line 1455 of yacc.c  */
-#line 5135 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5141 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             switch((yyvsp[(3) - (3)].ulong_num)) {
             case 0:
@@ -22822,7 +22828,7 @@ yyreduce:
   case 557:
 
 /* Line 1455 of yacc.c  */
-#line 5150 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5156 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.table_options&=
               ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS);
@@ -22833,7 +22839,7 @@ yyreduce:
   case 558:
 
 /* Line 1455 of yacc.c  */
-#line 5156 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5162 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.table_options|= (yyvsp[(3) - (3)].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
             Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
@@ -22843,7 +22849,7 @@ yyreduce:
   case 559:
 
 /* Line 1455 of yacc.c  */
-#line 5161 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5167 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              Lex->create_info.table_options|= (yyvsp[(3) - (3)].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
              Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
@@ -22853,7 +22859,7 @@ yyreduce:
   case 560:
 
 /* Line 1455 of yacc.c  */
-#line 5166 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5172 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM;
             Lex->create_info.page_checksum= (yyvsp[(3) - (3)].choice);
@@ -22863,7 +22869,7 @@ yyreduce:
   case 561:
 
 /* Line 1455 of yacc.c  */
-#line 5171 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5177 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.table_options|= (yyvsp[(3) - (3)].ulong_num) ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE;
             Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE;
@@ -22873,7 +22879,7 @@ yyreduce:
   case 562:
 
 /* Line 1455 of yacc.c  */
-#line 5176 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5182 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.row_type= (yyvsp[(3) - (3)].row_type);
             Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT;
@@ -22883,7 +22889,7 @@ yyreduce:
   case 563:
 
 /* Line 1455 of yacc.c  */
-#line 5181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5187 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->select_lex.table_list.save_and_clear(&Lex->save_list);
           }
@@ -22892,7 +22898,7 @@ yyreduce:
   case 564:
 
 /* Line 1455 of yacc.c  */
-#line 5185 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5191 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               Move the union list to the merge_list and exclude its tables
@@ -22919,7 +22925,7 @@ yyreduce:
   case 567:
 
 /* Line 1455 of yacc.c  */
-#line 5209 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5215 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.merge_insert_method= (yyvsp[(3) - (3)].ulong_num);
             Lex->create_info.used_fields|= HA_CREATE_USED_INSERT_METHOD;
@@ -22929,7 +22935,7 @@ yyreduce:
   case 568:
 
 /* Line 1455 of yacc.c  */
-#line 5214 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5220 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.data_file_name= (yyvsp[(4) - (4)].lex_str).str;
             Lex->create_info.used_fields|= HA_CREATE_USED_DATADIR;
@@ -22939,7 +22945,7 @@ yyreduce:
   case 569:
 
 /* Line 1455 of yacc.c  */
-#line 5219 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5225 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.index_file_name= (yyvsp[(4) - (4)].lex_str).str;
             Lex->create_info.used_fields|= HA_CREATE_USED_INDEXDIR;
@@ -22949,28 +22955,28 @@ yyreduce:
   case 570:
 
 /* Line 1455 of yacc.c  */
-#line 5224 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5230 "/home/buildbot/git/sql/sql_yacc.yy"
     {Lex->create_info.tablespace= (yyvsp[(2) - (2)].lex_str).str;}
     break;
 
   case 571:
 
 /* Line 1455 of yacc.c  */
-#line 5226 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5232 "/home/buildbot/git/sql/sql_yacc.yy"
     {Lex->create_info.storage_media= HA_SM_DISK;}
     break;
 
   case 572:
 
 /* Line 1455 of yacc.c  */
-#line 5228 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5234 "/home/buildbot/git/sql/sql_yacc.yy"
     {Lex->create_info.storage_media= HA_SM_MEMORY;}
     break;
 
   case 573:
 
 /* Line 1455 of yacc.c  */
-#line 5230 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5236 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.connect_string.str= (yyvsp[(3) - (3)].lex_str).str;
             Lex->create_info.connect_string.length= (yyvsp[(3) - (3)].lex_str).length;
@@ -22981,7 +22987,7 @@ yyreduce:
   case 574:
 
 /* Line 1455 of yacc.c  */
-#line 5236 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5242 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
             Lex->create_info.key_block_size= (yyvsp[(3) - (3)].ulong_num);
@@ -22991,7 +22997,7 @@ yyreduce:
   case 575:
 
 /* Line 1455 of yacc.c  */
-#line 5241 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5247 "/home/buildbot/git/sql/sql_yacc.yy"
     {
 	    Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
             Lex->create_info.transactional= (yyvsp[(3) - (3)].choice);
@@ -23001,7 +23007,7 @@ yyreduce:
   case 576:
 
 /* Line 1455 of yacc.c  */
-#line 5246 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5252 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].lex_str), true, &Lex->create_info.option_list,
@@ -23012,7 +23018,7 @@ yyreduce:
   case 577:
 
 /* Line 1455 of yacc.c  */
-#line 5252 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5258 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].lex_str), false, &Lex->create_info.option_list,
@@ -23023,7 +23029,7 @@ yyreduce:
   case 578:
 
 /* Line 1455 of yacc.c  */
-#line 5258 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5264 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].ulonglong_number), &Lex->create_info.option_list,
@@ -23034,7 +23040,7 @@ yyreduce:
   case 579:
 
 /* Line 1455 of yacc.c  */
-#line 5264 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5270 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), &Lex->create_info.option_list,
@@ -23045,7 +23051,7 @@ yyreduce:
   case 580:
 
 /* Line 1455 of yacc.c  */
-#line 5273 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5279 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             HA_CREATE_INFO *cinfo= &Lex->create_info;
             if ((cinfo->used_fields & HA_CREATE_USED_DEFAULT_CHARSET) &&
@@ -23065,7 +23071,7 @@ yyreduce:
   case 581:
 
 /* Line 1455 of yacc.c  */
-#line 5291 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5297 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             HA_CREATE_INFO *cinfo= &Lex->create_info;
             if ((cinfo->used_fields & HA_CREATE_USED_DEFAULT_CHARSET) &&
@@ -23084,7 +23090,7 @@ yyreduce:
   case 582:
 
 /* Line 1455 of yacc.c  */
-#line 5308 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5314 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             plugin_ref plugin= ha_resolve_by_name(thd, &(yyvsp[(1) - (1)].lex_str));
 
@@ -23109,7 +23115,7 @@ yyreduce:
   case 583:
 
 /* Line 1455 of yacc.c  */
-#line 5331 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5337 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             plugin_ref plugin;
             if ((plugin= ha_resolve_by_name(thd, &(yyvsp[(1) - (1)].lex_str))))
@@ -23125,112 +23131,112 @@ yyreduce:
   case 584:
 
 /* Line 1455 of yacc.c  */
-#line 5344 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5350 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.row_type)= ROW_TYPE_DEFAULT; }
     break;
 
   case 585:
 
 /* Line 1455 of yacc.c  */
-#line 5345 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5351 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.row_type)= ROW_TYPE_FIXED; }
     break;
 
   case 586:
 
 /* Line 1455 of yacc.c  */
-#line 5346 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5352 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.row_type)= ROW_TYPE_DYNAMIC; }
     break;
 
   case 587:
 
 /* Line 1455 of yacc.c  */
-#line 5347 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5353 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.row_type)= ROW_TYPE_COMPRESSED; }
     break;
 
   case 588:
 
 /* Line 1455 of yacc.c  */
-#line 5348 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5354 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.row_type)= ROW_TYPE_REDUNDANT; }
     break;
 
   case 589:
 
 /* Line 1455 of yacc.c  */
-#line 5349 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5355 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.row_type)= ROW_TYPE_COMPACT; }
     break;
 
   case 590:
 
 /* Line 1455 of yacc.c  */
-#line 5350 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5356 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.row_type)= ROW_TYPE_PAGE; }
     break;
 
   case 591:
 
 /* Line 1455 of yacc.c  */
-#line 5354 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5360 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
     break;
 
   case 592:
 
 /* Line 1455 of yacc.c  */
-#line 5355 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5361 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
     break;
 
   case 593:
 
 /* Line 1455 of yacc.c  */
-#line 5356 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5362 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
     break;
 
   case 594:
 
 /* Line 1455 of yacc.c  */
-#line 5360 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5366 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 596:
 
 /* Line 1455 of yacc.c  */
-#line 5365 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5371 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.num) = (int) STRING_RESULT; }
     break;
 
   case 597:
 
 /* Line 1455 of yacc.c  */
-#line 5366 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5372 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.num) = (int) REAL_RESULT; }
     break;
 
   case 598:
 
 /* Line 1455 of yacc.c  */
-#line 5367 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5373 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.num) = (int) DECIMAL_RESULT; }
     break;
 
   case 599:
 
 /* Line 1455 of yacc.c  */
-#line 5368 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5374 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.num) = (int) INT_RESULT; }
     break;
 
   case 600:
 
 /* Line 1455 of yacc.c  */
-#line 5374 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5380 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           Lex->create_last_non_select_table= Lex->last_table();
         }
@@ -23239,7 +23245,7 @@ yyreduce:
   case 606:
 
 /* Line 1455 of yacc.c  */
-#line 5392 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5398 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->col_list.empty(); /* Alloced by sql_alloc */
           }
@@ -23248,14 +23254,14 @@ yyreduce:
   case 607:
 
 /* Line 1455 of yacc.c  */
-#line 5399 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5405 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->option_list= NULL; }
     break;
 
   case 608:
 
 /* Line 1455 of yacc.c  */
-#line 5401 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5407 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_create_index (Lex, (yyvsp[(1) - (8)].key_type), (yyvsp[(2) - (8)].lex_str)))
               MYSQL_YYABORT;
@@ -23265,14 +23271,14 @@ yyreduce:
   case 609:
 
 /* Line 1455 of yacc.c  */
-#line 5407 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5413 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->option_list= NULL; }
     break;
 
   case 610:
 
 /* Line 1455 of yacc.c  */
-#line 5409 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5415 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_create_index (Lex, (yyvsp[(1) - (9)].key_type), (yyvsp[(3) - (9)].lex_str)))
               MYSQL_YYABORT;
@@ -23282,14 +23288,14 @@ yyreduce:
   case 611:
 
 /* Line 1455 of yacc.c  */
-#line 5415 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5421 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->option_list= NULL; }
     break;
 
   case 612:
 
 /* Line 1455 of yacc.c  */
-#line 5417 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5423 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_create_index (Lex, (yyvsp[(1) - (9)].key_type), (yyvsp[(3) - (9)].lex_str)))
               MYSQL_YYABORT;
@@ -23299,14 +23305,14 @@ yyreduce:
   case 613:
 
 /* Line 1455 of yacc.c  */
-#line 5423 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5429 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->option_list= NULL; }
     break;
 
   case 614:
 
 /* Line 1455 of yacc.c  */
-#line 5425 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5431 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_create_index (Lex, (yyvsp[(2) - (9)].key_type), (yyvsp[(3) - (9)].lex_str).str ? (yyvsp[(3) - (9)].lex_str) : (yyvsp[(1) - (9)].lex_str)))
               MYSQL_YYABORT;
@@ -23316,7 +23322,7 @@ yyreduce:
   case 615:
 
 /* Line 1455 of yacc.c  */
-#line 5430 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5436 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             Key *key= new Foreign_key((yyvsp[(4) - (8)].lex_str).str ? (yyvsp[(4) - (8)].lex_str) : (yyvsp[(1) - (8)].lex_str), lex->col_list,
@@ -23340,7 +23346,7 @@ yyreduce:
   case 616:
 
 /* Line 1455 of yacc.c  */
-#line 5449 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5455 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->col_list.empty(); /* Alloced by sql_alloc */
           }
@@ -23349,28 +23355,28 @@ yyreduce:
   case 620:
 
 /* Line 1455 of yacc.c  */
-#line 5464 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5470 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= null_lex_str; }
     break;
 
   case 621:
 
 /* Line 1455 of yacc.c  */
-#line 5465 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5471 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 622:
 
 /* Line 1455 of yacc.c  */
-#line 5469 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5475 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(2) - (2)].lex_str); }
     break;
 
   case 623:
 
 /* Line 1455 of yacc.c  */
-#line 5474 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5480 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->length=lex->dec=0;
@@ -23386,7 +23392,7 @@ yyreduce:
   case 624:
 
 /* Line 1455 of yacc.c  */
-#line 5485 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5491 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (add_field_to_list(lex->thd, &(yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].lex_type).type,
@@ -23403,21 +23409,21 @@ yyreduce:
   case 625:
 
 /* Line 1455 of yacc.c  */
-#line 5500 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5506 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_type).set((yyvsp[(1) - (2)].num), Lex->length, Lex->dec, Lex->charset); }
     break;
 
   case 626:
 
 /* Line 1455 of yacc.c  */
-#line 5502 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5508 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_type).set((yyvsp[(1) - (3)].num), Lex->length, Lex->dec, Lex->charset); }
     break;
 
   case 627:
 
 /* Line 1455 of yacc.c  */
-#line 5504 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5510 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.lex_type)= (yyvsp[(4) - (9)].lex_type);
             Lex->vcol_info->set_field_type((yyval.lex_type).type);
@@ -23428,14 +23434,14 @@ yyreduce:
   case 629:
 
 /* Line 1455 of yacc.c  */
-#line 5513 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5519 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 630:
 
 /* Line 1455 of yacc.c  */
-#line 5518 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5524 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->vcol_info->set_stored_in_db_flag(FALSE);
           }
@@ -23444,7 +23450,7 @@ yyreduce:
   case 631:
 
 /* Line 1455 of yacc.c  */
-#line 5522 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5528 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->vcol_info->set_stored_in_db_flag(FALSE);
           }
@@ -23453,7 +23459,7 @@ yyreduce:
   case 632:
 
 /* Line 1455 of yacc.c  */
-#line 5526 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5532 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->vcol_info->set_stored_in_db_flag(TRUE);
           }
@@ -23462,28 +23468,28 @@ yyreduce:
   case 633:
 
 /* Line 1455 of yacc.c  */
-#line 5532 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5538 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 634:
 
 /* Line 1455 of yacc.c  */
-#line 5533 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5539 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 635:
 
 /* Line 1455 of yacc.c  */
-#line 5537 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5543 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 637:
 
 /* Line 1455 of yacc.c  */
-#line 5543 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5549 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->type|= UNIQUE_FLAG;
@@ -23494,7 +23500,7 @@ yyreduce:
   case 638:
 
 /* Line 1455 of yacc.c  */
-#line 5549 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5555 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->type|= UNIQUE_KEY_FLAG;
@@ -23505,14 +23511,14 @@ yyreduce:
   case 639:
 
 /* Line 1455 of yacc.c  */
-#line 5554 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5560 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->comment= (yyvsp[(2) - (2)].lex_str); }
     break;
 
   case 640:
 
 /* Line 1455 of yacc.c  */
-#line 5559 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5565 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               "PARSE_VCOL_EXPR" can only be used by the SQL server
@@ -23530,7 +23536,7 @@ yyreduce:
   case 641:
 
 /* Line 1455 of yacc.c  */
-#line 5575 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5581 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->vcol_info= new Virtual_column_info();
             if (!Lex->vcol_info)
@@ -23548,28 +23554,28 @@ yyreduce:
   case 642:
 
 /* Line 1455 of yacc.c  */
-#line 5590 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5596 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=(yyvsp[(1) - (3)].num); }
     break;
 
   case 643:
 
 /* Line 1455 of yacc.c  */
-#line 5591 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5597 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=(yyvsp[(1) - (3)].num); }
     break;
 
   case 644:
 
 /* Line 1455 of yacc.c  */
-#line 5592 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5598 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_FLOAT; }
     break;
 
   case 645:
 
 /* Line 1455 of yacc.c  */
-#line 5594 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5600 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->length= (char*) "1";
             (yyval.num)=MYSQL_TYPE_BIT;
@@ -23579,7 +23585,7 @@ yyreduce:
   case 646:
 
 /* Line 1455 of yacc.c  */
-#line 5599 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5605 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)=MYSQL_TYPE_BIT;
           }
@@ -23588,7 +23594,7 @@ yyreduce:
   case 647:
 
 /* Line 1455 of yacc.c  */
-#line 5603 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5609 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->length= (char*) "1";
             (yyval.num)=MYSQL_TYPE_TINY;
@@ -23598,7 +23604,7 @@ yyreduce:
   case 648:
 
 /* Line 1455 of yacc.c  */
-#line 5608 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5614 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->length= (char*) "1";
             (yyval.num)=MYSQL_TYPE_TINY;
@@ -23608,7 +23614,7 @@ yyreduce:
   case 649:
 
 /* Line 1455 of yacc.c  */
-#line 5613 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5619 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)=MYSQL_TYPE_STRING;
           }
@@ -23617,7 +23623,7 @@ yyreduce:
   case 650:
 
 /* Line 1455 of yacc.c  */
-#line 5617 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5623 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->length= (char*) "1";
             (yyval.num)=MYSQL_TYPE_STRING;
@@ -23627,7 +23633,7 @@ yyreduce:
   case 651:
 
 /* Line 1455 of yacc.c  */
-#line 5622 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5628 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)=MYSQL_TYPE_STRING;
             Lex->charset=national_charset_info;
@@ -23637,7 +23643,7 @@ yyreduce:
   case 652:
 
 /* Line 1455 of yacc.c  */
-#line 5627 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5633 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->length= (char*) "1";
             (yyval.num)=MYSQL_TYPE_STRING;
@@ -23648,7 +23654,7 @@ yyreduce:
   case 653:
 
 /* Line 1455 of yacc.c  */
-#line 5633 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5639 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset=&my_charset_bin;
             (yyval.num)=MYSQL_TYPE_STRING;
@@ -23658,7 +23664,7 @@ yyreduce:
   case 654:
 
 /* Line 1455 of yacc.c  */
-#line 5638 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5644 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->length= (char*) "1";
             Lex->charset=&my_charset_bin;
@@ -23669,7 +23675,7 @@ yyreduce:
   case 655:
 
 /* Line 1455 of yacc.c  */
-#line 5644 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5650 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)= MYSQL_TYPE_VARCHAR;
           }
@@ -23678,7 +23684,7 @@ yyreduce:
   case 656:
 
 /* Line 1455 of yacc.c  */
-#line 5648 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5654 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)= MYSQL_TYPE_VARCHAR;
             Lex->charset=national_charset_info;
@@ -23688,7 +23694,7 @@ yyreduce:
   case 657:
 
 /* Line 1455 of yacc.c  */
-#line 5653 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5659 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset=&my_charset_bin;
             (yyval.num)= MYSQL_TYPE_VARCHAR;
@@ -23698,7 +23704,7 @@ yyreduce:
   case 658:
 
 /* Line 1455 of yacc.c  */
-#line 5658 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5664 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->length)
             {
@@ -23721,21 +23727,21 @@ yyreduce:
   case 659:
 
 /* Line 1455 of yacc.c  */
-#line 5676 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5682 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_DATE; }
     break;
 
   case 660:
 
 /* Line 1455 of yacc.c  */
-#line 5678 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5684 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_TIME; }
     break;
 
   case 661:
 
 /* Line 1455 of yacc.c  */
-#line 5680 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5686 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (thd->variables.sql_mode & MODE_MAXDB)
               (yyval.num)=MYSQL_TYPE_DATETIME;
@@ -23753,14 +23759,14 @@ yyreduce:
   case 662:
 
 /* Line 1455 of yacc.c  */
-#line 5693 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5699 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_DATETIME; }
     break;
 
   case 663:
 
 /* Line 1455 of yacc.c  */
-#line 5695 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5701 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset=&my_charset_bin;
             (yyval.num)=MYSQL_TYPE_TINY_BLOB;
@@ -23770,7 +23776,7 @@ yyreduce:
   case 664:
 
 /* Line 1455 of yacc.c  */
-#line 5700 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5706 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset=&my_charset_bin;
             (yyval.num)=MYSQL_TYPE_BLOB;
@@ -23780,7 +23786,7 @@ yyreduce:
   case 665:
 
 /* Line 1455 of yacc.c  */
-#line 5705 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5711 "/home/buildbot/git/sql/sql_yacc.yy"
     {
 #ifdef HAVE_SPATIAL
             Lex->charset=&my_charset_bin;
@@ -23797,7 +23803,7 @@ yyreduce:
   case 666:
 
 /* Line 1455 of yacc.c  */
-#line 5717 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5723 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset=&my_charset_bin;
             (yyval.num)=MYSQL_TYPE_MEDIUM_BLOB;
@@ -23807,7 +23813,7 @@ yyreduce:
   case 667:
 
 /* Line 1455 of yacc.c  */
-#line 5722 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5728 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset=&my_charset_bin;
             (yyval.num)=MYSQL_TYPE_LONG_BLOB;
@@ -23817,7 +23823,7 @@ yyreduce:
   case 668:
 
 /* Line 1455 of yacc.c  */
-#line 5727 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5733 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset=&my_charset_bin;
             (yyval.num)=MYSQL_TYPE_MEDIUM_BLOB;
@@ -23827,98 +23833,98 @@ yyreduce:
   case 669:
 
 /* Line 1455 of yacc.c  */
-#line 5732 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5738 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_MEDIUM_BLOB; }
     break;
 
   case 670:
 
 /* Line 1455 of yacc.c  */
-#line 5734 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5740 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_TINY_BLOB; }
     break;
 
   case 671:
 
 /* Line 1455 of yacc.c  */
-#line 5736 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5742 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_BLOB; }
     break;
 
   case 672:
 
 /* Line 1455 of yacc.c  */
-#line 5738 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5744 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_MEDIUM_BLOB; }
     break;
 
   case 673:
 
 /* Line 1455 of yacc.c  */
-#line 5740 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5746 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_LONG_BLOB; }
     break;
 
   case 674:
 
 /* Line 1455 of yacc.c  */
-#line 5742 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5748 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_NEWDECIMAL;}
     break;
 
   case 675:
 
 /* Line 1455 of yacc.c  */
-#line 5744 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5750 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_NEWDECIMAL;}
     break;
 
   case 676:
 
 /* Line 1455 of yacc.c  */
-#line 5746 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5752 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_NEWDECIMAL;}
     break;
 
   case 677:
 
 /* Line 1455 of yacc.c  */
-#line 5748 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5754 "/home/buildbot/git/sql/sql_yacc.yy"
     {Lex->interval_list.empty();}
     break;
 
   case 678:
 
 /* Line 1455 of yacc.c  */
-#line 5750 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5756 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_ENUM; }
     break;
 
   case 679:
 
 /* Line 1455 of yacc.c  */
-#line 5752 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5758 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->interval_list.empty();}
     break;
 
   case 680:
 
 /* Line 1455 of yacc.c  */
-#line 5754 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5760 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_SET; }
     break;
 
   case 681:
 
 /* Line 1455 of yacc.c  */
-#line 5756 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5762 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_MEDIUM_BLOB; }
     break;
 
   case 682:
 
 /* Line 1455 of yacc.c  */
-#line 5758 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5764 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)=MYSQL_TYPE_LONGLONG;
             Lex->type|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG |
@@ -23929,21 +23935,21 @@ yyreduce:
   case 683:
 
 /* Line 1455 of yacc.c  */
-#line 5766 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5772 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= Field::GEOM_GEOMETRY; }
     break;
 
   case 684:
 
 /* Line 1455 of yacc.c  */
-#line 5767 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5773 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= Field::GEOM_GEOMETRYCOLLECTION; }
     break;
 
   case 685:
 
 /* Line 1455 of yacc.c  */
-#line 5769 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5775 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->length= const_cast<char*>(STRINGIFY_ARG
                                            (MAX_LEN_GEOM_POINT_FIELD));
@@ -23954,147 +23960,147 @@ yyreduce:
   case 686:
 
 /* Line 1455 of yacc.c  */
-#line 5774 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5780 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= Field::GEOM_MULTIPOINT; }
     break;
 
   case 687:
 
 /* Line 1455 of yacc.c  */
-#line 5775 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5781 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= Field::GEOM_LINESTRING; }
     break;
 
   case 688:
 
 /* Line 1455 of yacc.c  */
-#line 5776 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5782 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= Field::GEOM_MULTILINESTRING; }
     break;
 
   case 689:
 
 /* Line 1455 of yacc.c  */
-#line 5777 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5783 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= Field::GEOM_POLYGON; }
     break;
 
   case 690:
 
 /* Line 1455 of yacc.c  */
-#line 5778 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5784 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= Field::GEOM_MULTIPOLYGON; }
     break;
 
   case 691:
 
 /* Line 1455 of yacc.c  */
-#line 5782 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5788 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 692:
 
 /* Line 1455 of yacc.c  */
-#line 5786 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5792 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 693:
 
 /* Line 1455 of yacc.c  */
-#line 5787 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5793 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 694:
 
 /* Line 1455 of yacc.c  */
-#line 5791 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5797 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 695:
 
 /* Line 1455 of yacc.c  */
-#line 5792 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5798 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 696:
 
 /* Line 1455 of yacc.c  */
-#line 5796 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5802 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 697:
 
 /* Line 1455 of yacc.c  */
-#line 5797 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5803 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 698:
 
 /* Line 1455 of yacc.c  */
-#line 5798 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5804 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 699:
 
 /* Line 1455 of yacc.c  */
-#line 5799 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5805 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 700:
 
 /* Line 1455 of yacc.c  */
-#line 5800 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5806 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 701:
 
 /* Line 1455 of yacc.c  */
-#line 5804 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5810 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_LONG; }
     break;
 
   case 702:
 
 /* Line 1455 of yacc.c  */
-#line 5805 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5811 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_TINY; }
     break;
 
   case 703:
 
 /* Line 1455 of yacc.c  */
-#line 5806 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5812 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_SHORT; }
     break;
 
   case 704:
 
 /* Line 1455 of yacc.c  */
-#line 5807 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5813 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_INT24; }
     break;
 
   case 705:
 
 /* Line 1455 of yacc.c  */
-#line 5808 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5814 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_LONGLONG; }
     break;
 
   case 706:
 
 /* Line 1455 of yacc.c  */
-#line 5813 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5819 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ?
               MYSQL_TYPE_FLOAT : MYSQL_TYPE_DOUBLE;
@@ -24104,42 +24110,42 @@ yyreduce:
   case 707:
 
 /* Line 1455 of yacc.c  */
-#line 5818 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5824 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_DOUBLE; }
     break;
 
   case 708:
 
 /* Line 1455 of yacc.c  */
-#line 5820 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5826 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=MYSQL_TYPE_DOUBLE; }
     break;
 
   case 709:
 
 /* Line 1455 of yacc.c  */
-#line 5825 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5831 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->dec=Lex->length= (char*)0; }
     break;
 
   case 710:
 
 /* Line 1455 of yacc.c  */
-#line 5827 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5833 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->dec= (char*)0; }
     break;
 
   case 711:
 
 /* Line 1455 of yacc.c  */
-#line 5829 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5835 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 712:
 
 /* Line 1455 of yacc.c  */
-#line 5834 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5840 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->length=(yyvsp[(2) - (5)].lex_str).str;
@@ -24150,154 +24156,154 @@ yyreduce:
   case 713:
 
 /* Line 1455 of yacc.c  */
-#line 5842 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5848 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 714:
 
 /* Line 1455 of yacc.c  */
-#line 5843 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5849 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 715:
 
 /* Line 1455 of yacc.c  */
-#line 5847 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5853 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 716:
 
 /* Line 1455 of yacc.c  */
-#line 5848 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5854 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 717:
 
 /* Line 1455 of yacc.c  */
-#line 5852 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5858 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 718:
 
 /* Line 1455 of yacc.c  */
-#line 5853 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5859 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= UNSIGNED_FLAG;}
     break;
 
   case 719:
 
 /* Line 1455 of yacc.c  */
-#line 5854 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5860 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= UNSIGNED_FLAG | ZEROFILL_FLAG; }
     break;
 
   case 720:
 
 /* Line 1455 of yacc.c  */
-#line 5858 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5864 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->length= (yyvsp[(2) - (3)].lex_str).str; }
     break;
 
   case 721:
 
 /* Line 1455 of yacc.c  */
-#line 5859 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5865 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->length= (yyvsp[(2) - (3)].lex_str).str; }
     break;
 
   case 722:
 
 /* Line 1455 of yacc.c  */
-#line 5860 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5866 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->length= (yyvsp[(2) - (3)].lex_str).str; }
     break;
 
   case 723:
 
 /* Line 1455 of yacc.c  */
-#line 5861 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5867 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->length= (yyvsp[(2) - (3)].lex_str).str; }
     break;
 
   case 724:
 
 /* Line 1455 of yacc.c  */
-#line 5864 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5870 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->length=(char*) 0; /* use default length */ }
     break;
 
   case 725:
 
 /* Line 1455 of yacc.c  */
-#line 5865 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5871 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 726:
 
 /* Line 1455 of yacc.c  */
-#line 5869 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5875 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 727:
 
 /* Line 1455 of yacc.c  */
-#line 5870 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5876 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 728:
 
 /* Line 1455 of yacc.c  */
-#line 5874 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5880 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 729:
 
 /* Line 1455 of yacc.c  */
-#line 5875 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5881 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 730:
 
 /* Line 1455 of yacc.c  */
-#line 5879 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5885 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 732:
 
 /* Line 1455 of yacc.c  */
-#line 5884 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5890 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type&= ~ NOT_NULL_FLAG; }
     break;
 
   case 733:
 
 /* Line 1455 of yacc.c  */
-#line 5885 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5891 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= NOT_NULL_FLAG; }
     break;
 
   case 734:
 
 /* Line 1455 of yacc.c  */
-#line 5886 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5892 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->default_value=(yyvsp[(2) - (2)].item); }
     break;
 
   case 735:
 
 /* Line 1455 of yacc.c  */
-#line 5888 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5894 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *item= new (thd->mem_root) Item_func_now_local(6);
             if (item == NULL)
@@ -24309,14 +24315,14 @@ yyreduce:
   case 736:
 
 /* Line 1455 of yacc.c  */
-#line 5894 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5900 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; }
     break;
 
   case 737:
 
 /* Line 1455 of yacc.c  */
-#line 5896 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5902 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             LEX *lex=Lex;
             lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG;
@@ -24327,7 +24333,7 @@ yyreduce:
   case 738:
 
 /* Line 1455 of yacc.c  */
-#line 5902 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5908 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG;
@@ -24338,7 +24344,7 @@ yyreduce:
   case 739:
 
 /* Line 1455 of yacc.c  */
-#line 5908 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5914 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->type|= UNIQUE_FLAG; 
@@ -24349,7 +24355,7 @@ yyreduce:
   case 740:
 
 /* Line 1455 of yacc.c  */
-#line 5914 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5920 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->type|= UNIQUE_KEY_FLAG; 
@@ -24360,14 +24366,14 @@ yyreduce:
   case 741:
 
 /* Line 1455 of yacc.c  */
-#line 5919 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5925 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->comment= (yyvsp[(2) - (2)].lex_str); }
     break;
 
   case 742:
 
 /* Line 1455 of yacc.c  */
-#line 5921 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5927 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->charset && !my_charset_same(Lex->charset,(yyvsp[(2) - (2)].charset)))
             {
@@ -24385,7 +24391,7 @@ yyreduce:
   case 743:
 
 /* Line 1455 of yacc.c  */
-#line 5934 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5940 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].lex_str), true, &Lex->option_list,
@@ -24396,7 +24402,7 @@ yyreduce:
   case 744:
 
 /* Line 1455 of yacc.c  */
-#line 5940 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5946 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].lex_str), false, &Lex->option_list,
@@ -24407,7 +24413,7 @@ yyreduce:
   case 745:
 
 /* Line 1455 of yacc.c  */
-#line 5946 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5952 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].ulonglong_number), &Lex->option_list,
@@ -24418,7 +24424,7 @@ yyreduce:
   case 746:
 
 /* Line 1455 of yacc.c  */
-#line 5952 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5958 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), &Lex->option_list, &Lex->option_list_last);
@@ -24428,7 +24434,7 @@ yyreduce:
   case 747:
 
 /* Line 1455 of yacc.c  */
-#line 5961 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5967 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           (yyval.num)= (yyvsp[(1) - (2)].num);
 
@@ -24450,7 +24456,7 @@ yyreduce:
   case 748:
 
 /* Line 1455 of yacc.c  */
-#line 5982 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5988 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_now_local(6);
             if ((yyval.item) == NULL)
@@ -24461,42 +24467,42 @@ yyreduce:
   case 749:
 
 /* Line 1455 of yacc.c  */
-#line 5988 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5994 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)=(yyvsp[(1) - (1)].item); }
     break;
 
   case 750:
 
 /* Line 1455 of yacc.c  */
-#line 5992 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5998 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 751:
 
 /* Line 1455 of yacc.c  */
-#line 5993 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 5999 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 752:
 
 /* Line 1455 of yacc.c  */
-#line 5997 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6003 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 753:
 
 /* Line 1455 of yacc.c  */
-#line 5998 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6004 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 754:
 
 /* Line 1455 of yacc.c  */
-#line 6003 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6009 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.charset)=get_charset_by_csname((yyvsp[(1) - (1)].lex_str).str,MY_CS_PRIMARY,MYF(0))))
             {
@@ -24509,42 +24515,42 @@ yyreduce:
   case 755:
 
 /* Line 1455 of yacc.c  */
-#line 6010 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6016 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)= &my_charset_bin; }
     break;
 
   case 756:
 
 /* Line 1455 of yacc.c  */
-#line 6014 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6020 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=(yyvsp[(1) - (1)].charset);   }
     break;
 
   case 757:
 
 /* Line 1455 of yacc.c  */
-#line 6015 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6021 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=NULL; }
     break;
 
   case 758:
 
 /* Line 1455 of yacc.c  */
-#line 6019 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6025 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)= NULL; }
     break;
 
   case 759:
 
 /* Line 1455 of yacc.c  */
-#line 6020 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6026 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)= (yyvsp[(2) - (2)].charset); }
     break;
 
   case 760:
 
 /* Line 1455 of yacc.c  */
-#line 6025 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6031 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.charset)=get_charset_by_csname((yyvsp[(1) - (1)].lex_str).str,MY_CS_PRIMARY,MYF(0))) &&
                 !((yyval.charset)=get_old_charset_by_name((yyvsp[(1) - (1)].lex_str).str)))
@@ -24558,28 +24564,28 @@ yyreduce:
   case 761:
 
 /* Line 1455 of yacc.c  */
-#line 6033 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6039 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)= &my_charset_bin; }
     break;
 
   case 762:
 
 /* Line 1455 of yacc.c  */
-#line 6037 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6043 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=(yyvsp[(1) - (1)].charset);   }
     break;
 
   case 763:
 
 /* Line 1455 of yacc.c  */
-#line 6038 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6044 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=NULL; }
     break;
 
   case 764:
 
 /* Line 1455 of yacc.c  */
-#line 6043 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6049 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.charset)=get_charset_by_name((yyvsp[(1) - (1)].lex_str).str,MYF(0))))
             {
@@ -24592,56 +24598,56 @@ yyreduce:
   case 765:
 
 /* Line 1455 of yacc.c  */
-#line 6053 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6059 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=NULL; }
     break;
 
   case 766:
 
 /* Line 1455 of yacc.c  */
-#line 6054 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6060 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=(yyvsp[(2) - (2)].charset); }
     break;
 
   case 767:
 
 /* Line 1455 of yacc.c  */
-#line 6058 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6064 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=(yyvsp[(1) - (1)].charset); }
     break;
 
   case 768:
 
 /* Line 1455 of yacc.c  */
-#line 6059 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6065 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.charset)=NULL; }
     break;
 
   case 769:
 
 /* Line 1455 of yacc.c  */
-#line 6063 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6069 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 770:
 
 /* Line 1455 of yacc.c  */
-#line 6064 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6070 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 771:
 
 /* Line 1455 of yacc.c  */
-#line 6069 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6075 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->charset= &my_charset_latin1; }
     break;
 
   case 772:
 
 /* Line 1455 of yacc.c  */
-#line 6071 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6077 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset= &my_charset_latin1_bin;
           }
@@ -24650,7 +24656,7 @@ yyreduce:
   case 773:
 
 /* Line 1455 of yacc.c  */
-#line 6075 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6081 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset= &my_charset_latin1_bin;
           }
@@ -24659,7 +24665,7 @@ yyreduce:
   case 774:
 
 /* Line 1455 of yacc.c  */
-#line 6082 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6088 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!(Lex->charset=get_charset_by_csname("ucs2",
                                                      MY_CS_PRIMARY,MYF(0))))
@@ -24673,7 +24679,7 @@ yyreduce:
   case 775:
 
 /* Line 1455 of yacc.c  */
-#line 6091 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6097 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!(Lex->charset=get_charset_by_name("ucs2_bin", MYF(0))))
             {
@@ -24686,7 +24692,7 @@ yyreduce:
   case 776:
 
 /* Line 1455 of yacc.c  */
-#line 6099 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6105 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!(Lex->charset=get_charset_by_name("ucs2_bin", MYF(0))))
             {
@@ -24699,28 +24705,28 @@ yyreduce:
   case 777:
 
 /* Line 1455 of yacc.c  */
-#line 6109 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6115 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->charset=NULL; }
     break;
 
   case 780:
 
 /* Line 1455 of yacc.c  */
-#line 6112 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6118 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->charset=&my_charset_bin; }
     break;
 
   case 781:
 
 /* Line 1455 of yacc.c  */
-#line 6113 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6119 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->charset=(yyvsp[(2) - (3)].charset); }
     break;
 
   case 782:
 
 /* Line 1455 of yacc.c  */
-#line 6115 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6121 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset= NULL;
             Lex->type|= BINCMP_FLAG;
@@ -24730,7 +24736,7 @@ yyreduce:
   case 783:
 
 /* Line 1455 of yacc.c  */
-#line 6120 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6126 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->charset= (yyvsp[(3) - (3)].charset);
             Lex->type|= BINCMP_FLAG;
@@ -24740,21 +24746,21 @@ yyreduce:
   case 784:
 
 /* Line 1455 of yacc.c  */
-#line 6127 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6133 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 785:
 
 /* Line 1455 of yacc.c  */
-#line 6128 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6134 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= BINCMP_FLAG; }
     break;
 
   case 788:
 
 /* Line 1455 of yacc.c  */
-#line 6143 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6149 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.table)=(yyvsp[(2) - (5)].table);
           }
@@ -24763,14 +24769,14 @@ yyreduce:
   case 789:
 
 /* Line 1455 of yacc.c  */
-#line 6150 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6156 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ref_list.empty(); }
     break;
 
   case 791:
 
 /* Line 1455 of yacc.c  */
-#line 6156 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6162 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Key_part_spec *key= new Key_part_spec((yyvsp[(3) - (3)].lex_str), 0);
             if (key == NULL)
@@ -24782,7 +24788,7 @@ yyreduce:
   case 792:
 
 /* Line 1455 of yacc.c  */
-#line 6163 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6169 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Key_part_spec *key= new Key_part_spec((yyvsp[(1) - (1)].lex_str), 0);
             if (key == NULL)
@@ -24796,35 +24802,35 @@ yyreduce:
   case 793:
 
 /* Line 1455 of yacc.c  */
-#line 6175 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6181 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
     break;
 
   case 794:
 
 /* Line 1455 of yacc.c  */
-#line 6177 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6183 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
     break;
 
   case 795:
 
 /* Line 1455 of yacc.c  */
-#line 6179 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6185 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
     break;
 
   case 796:
 
 /* Line 1455 of yacc.c  */
-#line 6181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6187 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
     break;
 
   case 797:
 
 /* Line 1455 of yacc.c  */
-#line 6186 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6192 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->fk_update_opt= Foreign_key::FK_OPTION_UNDEF;
@@ -24835,7 +24841,7 @@ yyreduce:
   case 798:
 
 /* Line 1455 of yacc.c  */
-#line 6192 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6198 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->fk_update_opt= (yyvsp[(3) - (3)].m_fk_option);
@@ -24846,7 +24852,7 @@ yyreduce:
   case 799:
 
 /* Line 1455 of yacc.c  */
-#line 6198 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6204 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->fk_update_opt= Foreign_key::FK_OPTION_UNDEF;
@@ -24857,7 +24863,7 @@ yyreduce:
   case 800:
 
 /* Line 1455 of yacc.c  */
-#line 6205 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6211 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->fk_update_opt= (yyvsp[(3) - (6)].m_fk_option);
@@ -24868,7 +24874,7 @@ yyreduce:
   case 801:
 
 /* Line 1455 of yacc.c  */
-#line 6212 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6218 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->fk_update_opt= (yyvsp[(6) - (6)].m_fk_option);
@@ -24879,126 +24885,126 @@ yyreduce:
   case 802:
 
 /* Line 1455 of yacc.c  */
-#line 6220 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6226 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_fk_option)= Foreign_key::FK_OPTION_RESTRICT; }
     break;
 
   case 803:
 
 /* Line 1455 of yacc.c  */
-#line 6221 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6227 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_fk_option)= Foreign_key::FK_OPTION_CASCADE; }
     break;
 
   case 804:
 
 /* Line 1455 of yacc.c  */
-#line 6222 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6228 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_fk_option)= Foreign_key::FK_OPTION_SET_NULL; }
     break;
 
   case 805:
 
 /* Line 1455 of yacc.c  */
-#line 6223 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6229 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_fk_option)= Foreign_key::FK_OPTION_NO_ACTION; }
     break;
 
   case 806:
 
 /* Line 1455 of yacc.c  */
-#line 6224 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6230 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_fk_option)= Foreign_key::FK_OPTION_DEFAULT;  }
     break;
 
   case 807:
 
 /* Line 1455 of yacc.c  */
-#line 6228 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6234 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_type)= Key::MULTIPLE; }
     break;
 
   case 808:
 
 /* Line 1455 of yacc.c  */
-#line 6232 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6238 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_type)= Key::PRIMARY; }
     break;
 
   case 809:
 
 /* Line 1455 of yacc.c  */
-#line 6233 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6239 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_type)= Key::UNIQUE; }
     break;
 
   case 810:
 
 /* Line 1455 of yacc.c  */
-#line 6237 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6243 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 811:
 
 /* Line 1455 of yacc.c  */
-#line 6238 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6244 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 812:
 
 /* Line 1455 of yacc.c  */
-#line 6242 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6248 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 814:
 
 /* Line 1455 of yacc.c  */
-#line 6247 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6253 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 815:
 
 /* Line 1455 of yacc.c  */
-#line 6248 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6254 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 816:
 
 /* Line 1455 of yacc.c  */
-#line 6249 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6255 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 817:
 
 /* Line 1455 of yacc.c  */
-#line 6253 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6259 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_type)= Key::MULTIPLE; }
     break;
 
   case 818:
 
 /* Line 1455 of yacc.c  */
-#line 6254 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6260 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_type)= Key::UNIQUE; }
     break;
 
   case 819:
 
 /* Line 1455 of yacc.c  */
-#line 6258 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6264 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_type)= Key::FULLTEXT;}
     break;
 
   case 820:
 
 /* Line 1455 of yacc.c  */
-#line 6263 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6269 "/home/buildbot/git/sql/sql_yacc.yy"
     {
 #ifdef HAVE_SPATIAL
             (yyval.key_type)= Key::SPATIAL;
@@ -25013,7 +25019,7 @@ yyreduce:
   case 821:
 
 /* Line 1455 of yacc.c  */
-#line 6275 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6281 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->key_create_info= default_key_create_info;
           }
@@ -25022,56 +25028,56 @@ yyreduce:
   case 824:
 
 /* Line 1455 of yacc.c  */
-#line 6292 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6298 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 826:
 
 /* Line 1455 of yacc.c  */
-#line 6297 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6303 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 828:
 
 /* Line 1455 of yacc.c  */
-#line 6302 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6308 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 836:
 
 /* Line 1455 of yacc.c  */
-#line 6322 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6328 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->key_create_info.algorithm= (yyvsp[(2) - (2)].key_alg); }
     break;
 
   case 837:
 
 /* Line 1455 of yacc.c  */
-#line 6323 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6329 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->key_create_info.algorithm= (yyvsp[(2) - (2)].key_alg); }
     break;
 
   case 838:
 
 /* Line 1455 of yacc.c  */
-#line 6328 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6334 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->key_create_info.block_size= (yyvsp[(3) - (3)].ulong_num); }
     break;
 
   case 839:
 
 /* Line 1455 of yacc.c  */
-#line 6329 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6335 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->key_create_info.comment= (yyvsp[(2) - (2)].lex_str); }
     break;
 
   case 840:
 
 /* Line 1455 of yacc.c  */
-#line 6331 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6337 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].lex_str), true, &Lex->option_list,
@@ -25082,7 +25088,7 @@ yyreduce:
   case 841:
 
 /* Line 1455 of yacc.c  */
-#line 6337 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6343 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].lex_str), false, &Lex->option_list,
@@ -25093,7 +25099,7 @@ yyreduce:
   case 842:
 
 /* Line 1455 of yacc.c  */
-#line 6343 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6349 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].ulonglong_number), &Lex->option_list,
@@ -25104,7 +25110,7 @@ yyreduce:
   case 843:
 
 /* Line 1455 of yacc.c  */
-#line 6349 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6355 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             new (thd->mem_root)
               engine_option_value((yyvsp[(1) - (3)].lex_str), &Lex->option_list, &Lex->option_list_last);
@@ -25114,7 +25120,7 @@ yyreduce:
   case 848:
 
 /* Line 1455 of yacc.c  */
-#line 6367 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6373 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (plugin_is_ready(&(yyvsp[(3) - (3)].lex_str), MYSQL_FTPARSER_PLUGIN))
               Lex->key_create_info.parser_name= (yyvsp[(3) - (3)].lex_str);
@@ -25129,42 +25135,42 @@ yyreduce:
   case 849:
 
 /* Line 1455 of yacc.c  */
-#line 6379 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6385 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_alg)= HA_KEY_ALG_BTREE; }
     break;
 
   case 850:
 
 /* Line 1455 of yacc.c  */
-#line 6380 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6386 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_alg)= HA_KEY_ALG_RTREE; }
     break;
 
   case 851:
 
 /* Line 1455 of yacc.c  */
-#line 6381 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6387 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.key_alg)= HA_KEY_ALG_HASH; }
     break;
 
   case 852:
 
 /* Line 1455 of yacc.c  */
-#line 6385 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6391 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->col_list.push_back((yyvsp[(3) - (4)].key_part)); }
     break;
 
   case 853:
 
 /* Line 1455 of yacc.c  */
-#line 6386 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6392 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->col_list.push_back((yyvsp[(1) - (2)].key_part)); }
     break;
 
   case 854:
 
 /* Line 1455 of yacc.c  */
-#line 6391 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6397 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.key_part)= new Key_part_spec((yyvsp[(1) - (1)].lex_str), 0);
             if ((yyval.key_part) == NULL)
@@ -25175,7 +25181,7 @@ yyreduce:
   case 855:
 
 /* Line 1455 of yacc.c  */
-#line 6397 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6403 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             int key_part_len= atoi((yyvsp[(3) - (4)].lex_str).str);
             if (!key_part_len)
@@ -25191,49 +25197,49 @@ yyreduce:
   case 856:
 
 /* Line 1455 of yacc.c  */
-#line 6410 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6416 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= null_lex_str; }
     break;
 
   case 857:
 
 /* Line 1455 of yacc.c  */
-#line 6411 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6417 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 858:
 
 /* Line 1455 of yacc.c  */
-#line 6415 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6421 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= null_lex_str; }
     break;
 
   case 859:
 
 /* Line 1455 of yacc.c  */
-#line 6416 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6422 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= (yyvsp[(2) - (2)].lex_str); }
     break;
 
   case 860:
 
 /* Line 1455 of yacc.c  */
-#line 6420 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6426 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->interval_list.push_back((yyvsp[(1) - (1)].string)); }
     break;
 
   case 861:
 
 /* Line 1455 of yacc.c  */
-#line 6421 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6427 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->interval_list.push_back((yyvsp[(3) - (3)].string)); }
     break;
 
   case 862:
 
 /* Line 1455 of yacc.c  */
-#line 6429 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6435 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             lex->name.str= 0;
@@ -25263,7 +25269,7 @@ yyreduce:
   case 863:
 
 /* Line 1455 of yacc.c  */
-#line 6454 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6460 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             if (!lex->m_stmt)
@@ -25279,7 +25285,7 @@ yyreduce:
   case 864:
 
 /* Line 1455 of yacc.c  */
-#line 6465 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6471 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_info.default_table_charset= NULL;
             Lex->create_info.used_fields= 0;
@@ -25289,7 +25295,7 @@ yyreduce:
   case 865:
 
 /* Line 1455 of yacc.c  */
-#line 6470 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6476 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_ALTER_DB;
@@ -25303,7 +25309,7 @@ yyreduce:
   case 866:
 
 /* Line 1455 of yacc.c  */
-#line 6479 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6485 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->sphead)
@@ -25319,7 +25325,7 @@ yyreduce:
   case 867:
 
 /* Line 1455 of yacc.c  */
-#line 6490 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6496 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -25335,7 +25341,7 @@ yyreduce:
   case 868:
 
 /* Line 1455 of yacc.c  */
-#line 6501 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6507 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
 
@@ -25347,7 +25353,7 @@ yyreduce:
   case 869:
 
 /* Line 1455 of yacc.c  */
-#line 6508 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6514 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -25363,7 +25369,7 @@ yyreduce:
   case 870:
 
 /* Line 1455 of yacc.c  */
-#line 6519 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6525 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
 
@@ -25375,7 +25381,7 @@ yyreduce:
   case 871:
 
 /* Line 1455 of yacc.c  */
-#line 6526 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6532 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -25391,14 +25397,14 @@ yyreduce:
   case 872:
 
 /* Line 1455 of yacc.c  */
-#line 6537 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6543 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 873:
 
 /* Line 1455 of yacc.c  */
-#line 6544 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6550 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -25415,14 +25421,14 @@ yyreduce:
   case 874:
 
 /* Line 1455 of yacc.c  */
-#line 6556 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6562 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 875:
 
 /* Line 1455 of yacc.c  */
-#line 6558 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6564 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* 
               It is safe to use Lex->spname because
@@ -25443,7 +25449,7 @@ yyreduce:
   case 876:
 
 /* Line 1455 of yacc.c  */
-#line 6578 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6584 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyvsp[(6) - (10)].num) || (yyvsp[(7) - (10)].num) || (yyvsp[(8) - (10)].num) || (yyvsp[(9) - (10)].num) || (yyvsp[(10) - (10)].num)))
             {
@@ -25461,7 +25467,7 @@ yyreduce:
   case 877:
 
 /* Line 1455 of yacc.c  */
-#line 6591 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6597 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE;
@@ -25471,7 +25477,7 @@ yyreduce:
   case 878:
 
 /* Line 1455 of yacc.c  */
-#line 6596 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6602 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP;
@@ -25481,7 +25487,7 @@ yyreduce:
   case 879:
 
 /* Line 1455 of yacc.c  */
-#line 6601 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6607 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= CHANGE_FILE_TABLESPACE;
@@ -25491,7 +25497,7 @@ yyreduce:
   case 880:
 
 /* Line 1455 of yacc.c  */
-#line 6606 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6612 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_ACCESS_MODE_TABLESPACE;
@@ -25501,7 +25507,7 @@ yyreduce:
   case 881:
 
 /* Line 1455 of yacc.c  */
-#line 6611 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6617 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_ALTER_SERVER;
@@ -25513,42 +25519,42 @@ yyreduce:
   case 882:
 
 /* Line 1455 of yacc.c  */
-#line 6620 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6626 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0;}
     break;
 
   case 883:
 
 /* Line 1455 of yacc.c  */
-#line 6621 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6627 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 884:
 
 /* Line 1455 of yacc.c  */
-#line 6622 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6628 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 885:
 
 /* Line 1455 of yacc.c  */
-#line 6623 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6629 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 886:
 
 /* Line 1455 of yacc.c  */
-#line 6627 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6633 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0;}
     break;
 
   case 887:
 
 /* Line 1455 of yacc.c  */
-#line 6629 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6635 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               Use lex's spname to hold the new name.
@@ -25562,49 +25568,49 @@ yyreduce:
   case 888:
 
 /* Line 1455 of yacc.c  */
-#line 6640 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6646 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0;}
     break;
 
   case 889:
 
 /* Line 1455 of yacc.c  */
-#line 6641 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6647 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 890:
 
 /* Line 1455 of yacc.c  */
-#line 6645 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6651 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str).str= 0; (yyval.lex_str).length= 0; }
     break;
 
   case 891:
 
 /* Line 1455 of yacc.c  */
-#line 6646 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6652 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 893:
 
 /* Line 1455 of yacc.c  */
-#line 6651 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6657 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->alter_info.tablespace_op= DISCARD_TABLESPACE; }
     break;
 
   case 894:
 
 /* Line 1455 of yacc.c  */
-#line 6652 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6658 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->alter_info.tablespace_op= IMPORT_TABLESPACE; }
     break;
 
   case 900:
 
 /* Line 1455 of yacc.c  */
-#line 6669 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6675 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_DROP_PARTITION;
           }
@@ -25613,7 +25619,7 @@ yyreduce:
   case 901:
 
 /* Line 1455 of yacc.c  */
-#line 6674 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6680 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_info.flags|= ALTER_REBUILD_PARTITION;
@@ -25624,7 +25630,7 @@ yyreduce:
   case 902:
 
 /* Line 1455 of yacc.c  */
-#line 6681 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6687 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[(3) - (4)].num);
@@ -25640,7 +25646,7 @@ yyreduce:
   case 904:
 
 /* Line 1455 of yacc.c  */
-#line 6694 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6700 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[(3) - (4)].num);
@@ -25656,7 +25662,7 @@ yyreduce:
   case 905:
 
 /* Line 1455 of yacc.c  */
-#line 6705 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6711 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             lex->check_opt.init();
@@ -25671,7 +25677,7 @@ yyreduce:
   case 907:
 
 /* Line 1455 of yacc.c  */
-#line 6717 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6723 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[(3) - (4)].num);
@@ -25687,7 +25693,7 @@ yyreduce:
   case 909:
 
 /* Line 1455 of yacc.c  */
-#line 6729 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6735 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_info.flags|= ALTER_COALESCE_PARTITION;
@@ -25699,7 +25705,7 @@ yyreduce:
   case 910:
 
 /* Line 1455 of yacc.c  */
-#line 6736 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6742 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             lex->check_opt.init();
@@ -25714,7 +25720,7 @@ yyreduce:
   case 912:
 
 /* Line 1455 of yacc.c  */
-#line 6750 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6756 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_REMOVE_PARTITIONING;
           }
@@ -25723,7 +25729,7 @@ yyreduce:
   case 913:
 
 /* Line 1455 of yacc.c  */
-#line 6757 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6763 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_ALL_PARTITION;
           }
@@ -25732,7 +25738,7 @@ yyreduce:
   case 915:
 
 /* Line 1455 of yacc.c  */
-#line 6765 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6771 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->part_info= new partition_info();
@@ -25749,14 +25755,14 @@ yyreduce:
   case 916:
 
 /* Line 1455 of yacc.c  */
-#line 6777 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6783 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 918:
 
 /* Line 1455 of yacc.c  */
-#line 6783 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6789 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->part_info->num_parts= lex->part_info->partitions.elements;
@@ -25766,7 +25772,7 @@ yyreduce:
   case 919:
 
 /* Line 1455 of yacc.c  */
-#line 6788 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6794 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->part_info->num_parts= (yyvsp[(2) - (2)].ulong_num);
           }
@@ -25775,7 +25781,7 @@ yyreduce:
   case 920:
 
 /* Line 1455 of yacc.c  */
-#line 6795 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6801 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->part_info= new partition_info();
@@ -25791,7 +25797,7 @@ yyreduce:
   case 922:
 
 /* Line 1455 of yacc.c  */
-#line 6810 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6816 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_TABLE_REORG;
           }
@@ -25800,7 +25806,7 @@ yyreduce:
   case 923:
 
 /* Line 1455 of yacc.c  */
-#line 6814 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6820 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_REORGANIZE_PARTITION;
           }
@@ -25809,7 +25815,7 @@ yyreduce:
   case 924:
 
 /* Line 1455 of yacc.c  */
-#line 6818 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6824 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             partition_info *part_info= Lex->part_info;
             part_info->num_parts= part_info->partitions.elements;
@@ -25819,21 +25825,21 @@ yyreduce:
   case 925:
 
 /* Line 1455 of yacc.c  */
-#line 6825 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6831 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 926:
 
 /* Line 1455 of yacc.c  */
-#line 6826 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6832 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 927:
 
 /* Line 1455 of yacc.c  */
-#line 6831 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6837 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->alter_info.partition_names.push_back((yyvsp[(1) - (1)].lex_str).str))
             {
@@ -25846,7 +25852,7 @@ yyreduce:
   case 930:
 
 /* Line 1455 of yacc.c  */
-#line 6851 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6857 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->change=0;
@@ -25857,7 +25863,7 @@ yyreduce:
   case 931:
 
 /* Line 1455 of yacc.c  */
-#line 6860 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6866 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_last_non_select_table= Lex->last_table();
           }
@@ -25866,7 +25872,7 @@ yyreduce:
   case 932:
 
 /* Line 1455 of yacc.c  */
-#line 6864 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6870 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_last_non_select_table= Lex->last_table();
             Lex->alter_info.flags|= ALTER_ADD_INDEX;
@@ -25876,7 +25882,7 @@ yyreduce:
   case 933:
 
 /* Line 1455 of yacc.c  */
-#line 6869 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6875 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_ADD_COLUMN | ALTER_ADD_INDEX;
           }
@@ -25885,7 +25891,7 @@ yyreduce:
   case 934:
 
 /* Line 1455 of yacc.c  */
-#line 6873 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6879 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->change= (yyvsp[(3) - (3)].lex_str).str;
@@ -25897,7 +25903,7 @@ yyreduce:
   case 935:
 
 /* Line 1455 of yacc.c  */
-#line 6880 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6886 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_last_non_select_table= Lex->last_table();
           }
@@ -25906,7 +25912,7 @@ yyreduce:
   case 936:
 
 /* Line 1455 of yacc.c  */
-#line 6884 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6890 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->length=lex->dec=0; lex->type=0;
@@ -25922,7 +25928,7 @@ yyreduce:
   case 937:
 
 /* Line 1455 of yacc.c  */
-#line 6895 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6901 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (add_field_to_list(lex->thd,&(yyvsp[(3) - (5)].lex_str),
@@ -25940,7 +25946,7 @@ yyreduce:
   case 938:
 
 /* Line 1455 of yacc.c  */
-#line 6908 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6914 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->create_last_non_select_table= Lex->last_table();
           }
@@ -25949,7 +25955,7 @@ yyreduce:
   case 939:
 
 /* Line 1455 of yacc.c  */
-#line 6912 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6918 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             Alter_drop *ad= new Alter_drop(Alter_drop::COLUMN, (yyvsp[(3) - (4)].lex_str).str);
@@ -25963,7 +25969,7 @@ yyreduce:
   case 940:
 
 /* Line 1455 of yacc.c  */
-#line 6921 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6927 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_DROP_INDEX | ALTER_FOREIGN_KEY;
           }
@@ -25972,7 +25978,7 @@ yyreduce:
   case 941:
 
 /* Line 1455 of yacc.c  */
-#line 6925 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6931 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             Alter_drop *ad= new Alter_drop(Alter_drop::KEY, primary_key_name);
@@ -25986,7 +25992,7 @@ yyreduce:
   case 942:
 
 /* Line 1455 of yacc.c  */
-#line 6934 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6940 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             Alter_drop *ad= new Alter_drop(Alter_drop::KEY, (yyvsp[(3) - (3)].lex_str).str);
@@ -26000,7 +26006,7 @@ yyreduce:
   case 943:
 
 /* Line 1455 of yacc.c  */
-#line 6943 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6949 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->alter_info.keys_onoff= DISABLE;
@@ -26011,7 +26017,7 @@ yyreduce:
   case 944:
 
 /* Line 1455 of yacc.c  */
-#line 6949 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6955 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->alter_info.keys_onoff= ENABLE;
@@ -26022,7 +26028,7 @@ yyreduce:
   case 945:
 
 /* Line 1455 of yacc.c  */
-#line 6955 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6961 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             Alter_column *ac= new Alter_column((yyvsp[(3) - (6)].lex_str).str,(yyvsp[(6) - (6)].item));
@@ -26036,7 +26042,7 @@ yyreduce:
   case 946:
 
 /* Line 1455 of yacc.c  */
-#line 6964 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6970 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             Alter_column *ac= new Alter_column((yyvsp[(3) - (5)].lex_str).str, (Item*) 0);
@@ -26050,7 +26056,7 @@ yyreduce:
   case 947:
 
 /* Line 1455 of yacc.c  */
-#line 6973 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6979 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             size_t dummy;
@@ -26074,7 +26080,7 @@ yyreduce:
   case 948:
 
 /* Line 1455 of yacc.c  */
-#line 6992 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 6998 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!(yyvsp[(4) - (5)].charset))
             {
@@ -26099,7 +26105,7 @@ yyreduce:
   case 949:
 
 /* Line 1455 of yacc.c  */
-#line 7012 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7018 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_OPTIONS;
@@ -26114,7 +26120,7 @@ yyreduce:
   case 950:
 
 /* Line 1455 of yacc.c  */
-#line 7022 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7028 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_RECREATE;
           }
@@ -26123,7 +26129,7 @@ yyreduce:
   case 951:
 
 /* Line 1455 of yacc.c  */
-#line 7026 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7032 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_ORDER;
@@ -26133,126 +26139,126 @@ yyreduce:
   case 952:
 
 /* Line 1455 of yacc.c  */
-#line 7033 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7039 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 953:
 
 /* Line 1455 of yacc.c  */
-#line 7034 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7040 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 954:
 
 /* Line 1455 of yacc.c  */
-#line 7038 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7044 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ignore= 0;}
     break;
 
   case 955:
 
 /* Line 1455 of yacc.c  */
-#line 7039 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7045 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ignore= 1;}
     break;
 
   case 956:
 
 /* Line 1455 of yacc.c  */
-#line 7043 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7049 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ignore= Lex->online= 0;}
     break;
 
   case 962:
 
 /* Line 1455 of yacc.c  */
-#line 7057 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7063 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ignore= 1;}
     break;
 
   case 963:
 
 /* Line 1455 of yacc.c  */
-#line 7058 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7064 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->online= 1;}
     break;
 
   case 964:
 
 /* Line 1455 of yacc.c  */
-#line 7062 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7068 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->drop_mode= DROP_DEFAULT; }
     break;
 
   case 965:
 
 /* Line 1455 of yacc.c  */
-#line 7063 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7069 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->drop_mode= DROP_RESTRICT; }
     break;
 
   case 966:
 
 /* Line 1455 of yacc.c  */
-#line 7064 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7070 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->drop_mode= DROP_CASCADE; }
     break;
 
   case 967:
 
 /* Line 1455 of yacc.c  */
-#line 7068 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7074 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 968:
 
 /* Line 1455 of yacc.c  */
-#line 7069 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7075 "/home/buildbot/git/sql/sql_yacc.yy"
     { store_position_for_column((yyvsp[(2) - (2)].lex_str).str); }
     break;
 
   case 969:
 
 /* Line 1455 of yacc.c  */
-#line 7070 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7076 "/home/buildbot/git/sql/sql_yacc.yy"
     { store_position_for_column(first_keyword); }
     break;
 
   case 970:
 
 /* Line 1455 of yacc.c  */
-#line 7074 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7080 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 971:
 
 /* Line 1455 of yacc.c  */
-#line 7075 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7081 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 972:
 
 /* Line 1455 of yacc.c  */
-#line 7076 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7082 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 973:
 
 /* Line 1455 of yacc.c  */
-#line 7077 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7083 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 974:
 
 /* Line 1455 of yacc.c  */
-#line 7086 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7092 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_SLAVE_START;
@@ -26264,14 +26270,14 @@ yyreduce:
   case 975:
 
 /* Line 1455 of yacc.c  */
-#line 7093 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7099 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 976:
 
 /* Line 1455 of yacc.c  */
-#line 7095 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7101 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_SLAVE_STOP;
@@ -26283,7 +26289,7 @@ yyreduce:
   case 977:
 
 /* Line 1455 of yacc.c  */
-#line 7102 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7108 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_SLAVE_START;
@@ -26294,14 +26300,14 @@ yyreduce:
   case 978:
 
 /* Line 1455 of yacc.c  */
-#line 7108 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7114 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 979:
 
 /* Line 1455 of yacc.c  */
-#line 7110 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7116 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_SLAVE_STOP;
@@ -26312,7 +26318,7 @@ yyreduce:
   case 980:
 
 /* Line 1455 of yacc.c  */
-#line 7119 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7125 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_BEGIN;
@@ -26323,14 +26329,14 @@ yyreduce:
   case 981:
 
 /* Line 1455 of yacc.c  */
-#line 7127 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7133 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) = 0; }
     break;
 
   case 982:
 
 /* Line 1455 of yacc.c  */
-#line 7129 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7135 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
           }
@@ -26339,49 +26345,49 @@ yyreduce:
   case 983:
 
 /* Line 1455 of yacc.c  */
-#line 7135 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7141 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->slave_thd_opt= 0; }
     break;
 
   case 984:
 
 /* Line 1455 of yacc.c  */
-#line 7137 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7143 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 987:
 
 /* Line 1455 of yacc.c  */
-#line 7146 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7152 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 988:
 
 /* Line 1455 of yacc.c  */
-#line 7147 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7153 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->slave_thd_opt|=SLAVE_SQL; }
     break;
 
   case 989:
 
 /* Line 1455 of yacc.c  */
-#line 7148 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7154 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->slave_thd_opt|=SLAVE_IO; }
     break;
 
   case 990:
 
 /* Line 1455 of yacc.c  */
-#line 7152 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7158 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 991:
 
 /* Line 1455 of yacc.c  */
-#line 7154 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7160 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (((lex->mi.log_file_name || lex->mi.pos) &&
@@ -26399,7 +26405,7 @@ yyreduce:
   case 994:
 
 /* Line 1455 of yacc.c  */
-#line 7175 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7181 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_CHECKSUM;
@@ -26411,42 +26417,42 @@ yyreduce:
   case 995:
 
 /* Line 1455 of yacc.c  */
-#line 7182 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7188 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 996:
 
 /* Line 1455 of yacc.c  */
-#line 7186 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7192 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags= 0; }
     break;
 
   case 997:
 
 /* Line 1455 of yacc.c  */
-#line 7187 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7193 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags= T_QUICK; }
     break;
 
   case 998:
 
 /* Line 1455 of yacc.c  */
-#line 7188 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7194 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags= T_EXTEND; }
     break;
 
   case 1000:
 
 /* Line 1455 of yacc.c  */
-#line 7193 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7199 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->only_view= TRUE; }
     break;
 
   case 1002:
 
 /* Line 1455 of yacc.c  */
-#line 7198 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7204 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_REPAIR;
@@ -26461,7 +26467,7 @@ yyreduce:
   case 1003:
 
 /* Line 1455 of yacc.c  */
-#line 7208 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7214 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_stmt);
@@ -26474,70 +26480,70 @@ yyreduce:
   case 1004:
 
 /* Line 1455 of yacc.c  */
-#line 7218 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7224 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags = T_MEDIUM; }
     break;
 
   case 1005:
 
 /* Line 1455 of yacc.c  */
-#line 7219 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7225 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1006:
 
 /* Line 1455 of yacc.c  */
-#line 7223 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7229 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1007:
 
 /* Line 1455 of yacc.c  */
-#line 7224 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7230 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1008:
 
 /* Line 1455 of yacc.c  */
-#line 7228 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7234 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags|= T_QUICK; }
     break;
 
   case 1009:
 
 /* Line 1455 of yacc.c  */
-#line 7229 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7235 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags|= T_EXTEND; }
     break;
 
   case 1010:
 
 /* Line 1455 of yacc.c  */
-#line 7230 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7236 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.sql_flags|= TT_USEFRM; }
     break;
 
   case 1011:
 
 /* Line 1455 of yacc.c  */
-#line 7234 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7240 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 1012:
 
 /* Line 1455 of yacc.c  */
-#line 7235 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7241 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
     break;
 
   case 1013:
 
 /* Line 1455 of yacc.c  */
-#line 7240 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7246 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_ANALYZE;
@@ -26552,7 +26558,7 @@ yyreduce:
   case 1014:
 
 /* Line 1455 of yacc.c  */
-#line 7250 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7256 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_stmt);
@@ -26565,7 +26571,7 @@ yyreduce:
   case 1015:
 
 /* Line 1455 of yacc.c  */
-#line 7261 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7267 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
             Lex->comment= (yyvsp[(2) - (2)].lex_str);
@@ -26575,14 +26581,14 @@ yyreduce:
   case 1017:
 
 /* Line 1455 of yacc.c  */
-#line 7269 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7275 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->only_view= TRUE; }
     break;
 
   case 1019:
 
 /* Line 1455 of yacc.c  */
-#line 7273 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7279 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
 
@@ -26597,7 +26603,7 @@ yyreduce:
   case 1020:
 
 /* Line 1455 of yacc.c  */
-#line 7283 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7289 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX* lex= thd->lex;
             if (lex->sphead)
@@ -26615,91 +26621,91 @@ yyreduce:
   case 1021:
 
 /* Line 1455 of yacc.c  */
-#line 7298 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7304 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags = T_MEDIUM; }
     break;
 
   case 1022:
 
 /* Line 1455 of yacc.c  */
-#line 7299 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7305 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1023:
 
 /* Line 1455 of yacc.c  */
-#line 7303 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7309 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1024:
 
 /* Line 1455 of yacc.c  */
-#line 7304 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7310 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1025:
 
 /* Line 1455 of yacc.c  */
-#line 7308 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7314 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags|= T_QUICK; }
     break;
 
   case 1026:
 
 /* Line 1455 of yacc.c  */
-#line 7309 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7315 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags|= T_FAST; }
     break;
 
   case 1027:
 
 /* Line 1455 of yacc.c  */
-#line 7310 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7316 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags|= T_MEDIUM; }
     break;
 
   case 1028:
 
 /* Line 1455 of yacc.c  */
-#line 7311 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7317 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags|= T_EXTEND; }
     break;
 
   case 1029:
 
 /* Line 1455 of yacc.c  */
-#line 7312 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7318 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
     break;
 
   case 1030:
 
 /* Line 1455 of yacc.c  */
-#line 7313 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7319 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
     break;
 
   case 1031:
 
 /* Line 1455 of yacc.c  */
-#line 7317 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7323 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 1032:
 
 /* Line 1455 of yacc.c  */
-#line 7318 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7324 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
     break;
 
   case 1033:
 
 /* Line 1455 of yacc.c  */
-#line 7323 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7329 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_OPTIMIZE;
@@ -26714,7 +26720,7 @@ yyreduce:
   case 1034:
 
 /* Line 1455 of yacc.c  */
-#line 7333 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7339 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_stmt);
@@ -26727,28 +26733,28 @@ yyreduce:
   case 1035:
 
 /* Line 1455 of yacc.c  */
-#line 7343 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7349 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 1036:
 
 /* Line 1455 of yacc.c  */
-#line 7344 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7350 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 1037:
 
 /* Line 1455 of yacc.c  */
-#line 7345 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7351 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 1038:
 
 /* Line 1455 of yacc.c  */
-#line 7350 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7356 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command= SQLCOM_RENAME_TABLE;
           }
@@ -26757,14 +26763,14 @@ yyreduce:
   case 1039:
 
 /* Line 1455 of yacc.c  */
-#line 7354 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7360 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1040:
 
 /* Line 1455 of yacc.c  */
-#line 7356 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7362 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_RENAME_USER;
           }
@@ -26773,7 +26779,7 @@ yyreduce:
   case 1041:
 
 /* Line 1455 of yacc.c  */
-#line 7363 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7369 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->users_list.push_back((yyvsp[(1) - (3)].lex_user)) || Lex->users_list.push_back((yyvsp[(3) - (3)].lex_user)))
               MYSQL_YYABORT;
@@ -26783,7 +26789,7 @@ yyreduce:
   case 1042:
 
 /* Line 1455 of yacc.c  */
-#line 7368 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7374 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->users_list.push_back((yyvsp[(3) - (5)].lex_user)) || Lex->users_list.push_back((yyvsp[(5) - (5)].lex_user)))
               MYSQL_YYABORT;
@@ -26793,7 +26799,7 @@ yyreduce:
   case 1045:
 
 /* Line 1455 of yacc.c  */
-#line 7381 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7387 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             SELECT_LEX *sl= lex->current_select;
@@ -26808,7 +26814,7 @@ yyreduce:
   case 1046:
 
 /* Line 1455 of yacc.c  */
-#line 7394 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7400 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.reset();
           }
@@ -26817,7 +26823,7 @@ yyreduce:
   case 1047:
 
 /* Line 1455 of yacc.c  */
-#line 7398 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7404 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
@@ -26828,7 +26834,7 @@ yyreduce:
   case 1052:
 
 /* Line 1455 of yacc.c  */
-#line 7417 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7423 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!Select->add_table_to_list(thd, (yyvsp[(1) - (2)].table), NULL, 0, TL_READ,
                                            MDL_SHARED_READ,
@@ -26840,7 +26846,7 @@ yyreduce:
   case 1053:
 
 /* Line 1455 of yacc.c  */
-#line 7427 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7433 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!Select->add_table_to_list(thd, (yyvsp[(1) - (3)].table), NULL, 0, TL_READ, 
                                            MDL_SHARED_READ,
@@ -26852,21 +26858,21 @@ yyreduce:
   case 1054:
 
 /* Line 1455 of yacc.c  */
-#line 7436 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7442 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 1055:
 
 /* Line 1455 of yacc.c  */
-#line 7437 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7443 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str) = default_key_cache_base; }
     break;
 
   case 1056:
 
 /* Line 1455 of yacc.c  */
-#line 7442 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7448 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_PRELOAD_KEYS;
@@ -26877,14 +26883,14 @@ yyreduce:
   case 1057:
 
 /* Line 1455 of yacc.c  */
-#line 7448 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7454 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1062:
 
 /* Line 1455 of yacc.c  */
-#line 7463 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7469 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!Select->add_table_to_list(thd, (yyvsp[(1) - (3)].table), NULL, (yyvsp[(3) - (3)].num), TL_READ,
                                            MDL_SHARED_READ,
@@ -26896,7 +26902,7 @@ yyreduce:
   case 1063:
 
 /* Line 1455 of yacc.c  */
-#line 7473 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7479 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!Select->add_table_to_list(thd, (yyvsp[(1) - (4)].table), NULL, (yyvsp[(4) - (4)].num), TL_READ,
                                            MDL_SHARED_READ,
@@ -26908,7 +26914,7 @@ yyreduce:
   case 1064:
 
 /* Line 1455 of yacc.c  */
-#line 7483 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7489 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
           }
@@ -26917,7 +26923,7 @@ yyreduce:
   case 1066:
 
 /* Line 1455 of yacc.c  */
-#line 7490 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7496 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->select_lex.alloc_index_hints(thd);
             Select->set_index_hint_type(INDEX_HINT_USE, 
@@ -26928,28 +26934,28 @@ yyreduce:
   case 1068:
 
 /* Line 1455 of yacc.c  */
-#line 7499 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7505 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 1070:
 
 /* Line 1455 of yacc.c  */
-#line 7505 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7511 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 1071:
 
 /* Line 1455 of yacc.c  */
-#line 7506 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7512 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
     break;
 
   case 1072:
 
 /* Line 1455 of yacc.c  */
-#line 7516 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7522 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SELECT;
@@ -26959,7 +26965,7 @@ yyreduce:
   case 1075:
 
 /* Line 1455 of yacc.c  */
-#line 7530 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7536 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (setup_select_in_parentheses(Lex))
               MYSQL_YYABORT;
@@ -26969,7 +26975,7 @@ yyreduce:
   case 1077:
 
 /* Line 1455 of yacc.c  */
-#line 7540 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7546 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (setup_select_in_parentheses(Lex))
               MYSQL_YYABORT;
@@ -26979,7 +26985,7 @@ yyreduce:
   case 1079:
 
 /* Line 1455 of yacc.c  */
-#line 7549 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7555 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             SELECT_LEX * sel= lex->current_select;
@@ -27000,7 +27006,7 @@ yyreduce:
   case 1081:
 
 /* Line 1455 of yacc.c  */
-#line 7568 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7574 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -27013,7 +27019,7 @@ yyreduce:
   case 1082:
 
 /* Line 1455 of yacc.c  */
-#line 7576 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7582 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= NO_MATTER;
           }
@@ -27022,14 +27028,14 @@ yyreduce:
   case 1084:
 
 /* Line 1455 of yacc.c  */
-#line 7583 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7589 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1089:
 
 /* Line 1455 of yacc.c  */
-#line 7593 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7599 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->context.table_list=
               Select->context.first_name_resolution_table=
@@ -27040,7 +27046,7 @@ yyreduce:
   case 1092:
 
 /* Line 1455 of yacc.c  */
-#line 7608 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7614 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Select->options & SELECT_DISTINCT && Select->options & SELECT_ALL)
             {
@@ -27053,7 +27059,7 @@ yyreduce:
   case 1096:
 
 /* Line 1455 of yacc.c  */
-#line 7625 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7631 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* 
               Allow this flag only on the first top-level SELECT statement, if
@@ -27086,7 +27092,7 @@ yyreduce:
   case 1097:
 
 /* Line 1455 of yacc.c  */
-#line 7653 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7659 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* 
               Allow this flag only on the first top-level SELECT statement, if
@@ -27119,7 +27125,7 @@ yyreduce:
   case 1099:
 
 /* Line 1455 of yacc.c  */
-#line 7685 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7691 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->current_select->set_lock_for_tables(TL_WRITE);
@@ -27130,7 +27136,7 @@ yyreduce:
   case 1100:
 
 /* Line 1455 of yacc.c  */
-#line 7691 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7697 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->current_select->
@@ -27142,7 +27148,7 @@ yyreduce:
   case 1103:
 
 /* Line 1455 of yacc.c  */
-#line 7703 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7709 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *item= new (thd->mem_root)
                           Item_field(&thd->lex->current_select->context,
@@ -27158,7 +27164,7 @@ yyreduce:
   case 1104:
 
 /* Line 1455 of yacc.c  */
-#line 7717 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7723 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_item_to_list(thd, (yyvsp[(2) - (3)].item)))
               MYSQL_YYABORT;
@@ -27168,7 +27174,7 @@ yyreduce:
   case 1105:
 
 /* Line 1455 of yacc.c  */
-#line 7722 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7728 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             DBUG_ASSERT((yyvsp[(1) - (4)].simple_string) < (yyvsp[(3) - (4)].simple_string));
 
@@ -27195,7 +27201,7 @@ yyreduce:
   case 1106:
 
 /* Line 1455 of yacc.c  */
-#line 7746 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7752 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
           }
@@ -27204,7 +27210,7 @@ yyreduce:
   case 1107:
 
 /* Line 1455 of yacc.c  */
-#line 7752 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7758 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end();
           }
@@ -27213,77 +27219,77 @@ yyreduce:
   case 1108:
 
 /* Line 1455 of yacc.c  */
-#line 7758 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7764 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=null_lex_str;}
     break;
 
   case 1109:
 
 /* Line 1455 of yacc.c  */
-#line 7759 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7765 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(2) - (2)].lex_str); }
     break;
 
   case 1110:
 
 /* Line 1455 of yacc.c  */
-#line 7760 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7766 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(2) - (2)].lex_str); }
     break;
 
   case 1111:
 
 /* Line 1455 of yacc.c  */
-#line 7761 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7767 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 1112:
 
 /* Line 1455 of yacc.c  */
-#line 7762 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7768 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 1113:
 
 /* Line 1455 of yacc.c  */
-#line 7766 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7772 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0;  }
     break;
 
   case 1114:
 
 /* Line 1455 of yacc.c  */
-#line 7767 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7773 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0;  }
     break;
 
   case 1115:
 
 /* Line 1455 of yacc.c  */
-#line 7768 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7774 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (yyvsp[(2) - (3)].ulong_num); }
     break;
 
   case 1116:
 
 /* Line 1455 of yacc.c  */
-#line 7772 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7778 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1117:
 
 /* Line 1455 of yacc.c  */
-#line 7773 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7779 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1118:
 
 /* Line 1455 of yacc.c  */
-#line 7779 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7785 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               Design notes:
@@ -27339,7 +27345,7 @@ yyreduce:
   case 1119:
 
 /* Line 1455 of yacc.c  */
-#line 7830 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7836 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* XOR is a proprietary extension */
             (yyval.item) = new (thd->mem_root) Item_func_xor((yyvsp[(1) - (3)].item), (yyvsp[(3) - (3)].item));
@@ -27351,7 +27357,7 @@ yyreduce:
   case 1120:
 
 /* Line 1455 of yacc.c  */
-#line 7837 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7843 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* See comments in rule expr: expr or expr */
             Item_cond_and *item1;
@@ -27399,7 +27405,7 @@ yyreduce:
   case 1121:
 
 /* Line 1455 of yacc.c  */
-#line 7880 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7886 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= negate_expression(thd, (yyvsp[(2) - (2)].item));
             if ((yyval.item) == NULL)
@@ -27410,7 +27416,7 @@ yyreduce:
   case 1122:
 
 /* Line 1455 of yacc.c  */
-#line 7886 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7892 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_istrue((yyvsp[(1) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27421,7 +27427,7 @@ yyreduce:
   case 1123:
 
 /* Line 1455 of yacc.c  */
-#line 7892 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7898 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnottrue((yyvsp[(1) - (4)].item));
             if ((yyval.item) == NULL)
@@ -27432,7 +27438,7 @@ yyreduce:
   case 1124:
 
 /* Line 1455 of yacc.c  */
-#line 7898 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7904 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_isfalse((yyvsp[(1) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27443,7 +27449,7 @@ yyreduce:
   case 1125:
 
 /* Line 1455 of yacc.c  */
-#line 7904 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7910 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotfalse((yyvsp[(1) - (4)].item));
             if ((yyval.item) == NULL)
@@ -27454,7 +27460,7 @@ yyreduce:
   case 1126:
 
 /* Line 1455 of yacc.c  */
-#line 7910 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7916 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnull((yyvsp[(1) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27465,7 +27471,7 @@ yyreduce:
   case 1127:
 
 /* Line 1455 of yacc.c  */
-#line 7916 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7922 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotnull((yyvsp[(1) - (4)].item));
             if ((yyval.item) == NULL)
@@ -27476,7 +27482,7 @@ yyreduce:
   case 1129:
 
 /* Line 1455 of yacc.c  */
-#line 7926 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7932 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnull((yyvsp[(1) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27487,7 +27493,7 @@ yyreduce:
   case 1130:
 
 /* Line 1455 of yacc.c  */
-#line 7932 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7938 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotnull((yyvsp[(1) - (4)].item));
             if ((yyval.item) == NULL)
@@ -27498,7 +27504,7 @@ yyreduce:
   case 1131:
 
 /* Line 1455 of yacc.c  */
-#line 7938 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7944 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_equal((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27509,7 +27515,7 @@ yyreduce:
   case 1132:
 
 /* Line 1455 of yacc.c  */
-#line 7944 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7950 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= (*(yyvsp[(2) - (3)].boolfunc2creator))(0)->create((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27520,7 +27526,7 @@ yyreduce:
   case 1133:
 
 /* Line 1455 of yacc.c  */
-#line 7950 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7956 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= all_any_subquery_creator((yyvsp[(1) - (6)].item), (yyvsp[(2) - (6)].boolfunc2creator), (yyvsp[(3) - (6)].num), (yyvsp[(5) - (6)].select_lex));
             if ((yyval.item) == NULL)
@@ -27531,7 +27537,7 @@ yyreduce:
   case 1135:
 
 /* Line 1455 of yacc.c  */
-#line 7960 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7966 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_in_subselect((yyvsp[(1) - (5)].item), (yyvsp[(4) - (5)].select_lex));
             if ((yyval.item) == NULL)
@@ -27542,7 +27548,7 @@ yyreduce:
   case 1136:
 
 /* Line 1455 of yacc.c  */
-#line 7966 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7972 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *item= new (thd->mem_root) Item_in_subselect((yyvsp[(1) - (6)].item), (yyvsp[(5) - (6)].select_lex));
             if (item == NULL)
@@ -27556,7 +27562,7 @@ yyreduce:
   case 1137:
 
 /* Line 1455 of yacc.c  */
-#line 7975 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7981 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[(1) - (5)].item), true, (yyvsp[(4) - (5)].item));
             if ((yyval.item) == NULL)
@@ -27567,7 +27573,7 @@ yyreduce:
   case 1138:
 
 /* Line 1455 of yacc.c  */
-#line 7981 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7987 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             (yyvsp[(6) - (7)].item_list)->push_front((yyvsp[(4) - (7)].item));
             (yyvsp[(6) - (7)].item_list)->push_front((yyvsp[(1) - (7)].item));
@@ -27580,7 +27586,7 @@ yyreduce:
   case 1139:
 
 /* Line 1455 of yacc.c  */
-#line 7989 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 7995 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[(1) - (6)].item), false, (yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -27591,7 +27597,7 @@ yyreduce:
   case 1140:
 
 /* Line 1455 of yacc.c  */
-#line 7995 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8001 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(7) - (8)].item_list)->push_front((yyvsp[(5) - (8)].item));
             (yyvsp[(7) - (8)].item_list)->push_front((yyvsp[(1) - (8)].item));
@@ -27606,7 +27612,7 @@ yyreduce:
   case 1141:
 
 /* Line 1455 of yacc.c  */
-#line 8005 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8011 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_between((yyvsp[(1) - (5)].item),(yyvsp[(3) - (5)].item),(yyvsp[(5) - (5)].item));
             if ((yyval.item) == NULL)
@@ -27617,7 +27623,7 @@ yyreduce:
   case 1142:
 
 /* Line 1455 of yacc.c  */
-#line 8011 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8017 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item_func_between *item;
             item= new (thd->mem_root) Item_func_between((yyvsp[(1) - (6)].item),(yyvsp[(4) - (6)].item),(yyvsp[(6) - (6)].item));
@@ -27631,7 +27637,7 @@ yyreduce:
   case 1143:
 
 /* Line 1455 of yacc.c  */
-#line 8020 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8026 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *item1= new (thd->mem_root) Item_func_soundex((yyvsp[(1) - (4)].item));
             Item *item4= new (thd->mem_root) Item_func_soundex((yyvsp[(4) - (4)].item));
@@ -27646,7 +27652,7 @@ yyreduce:
   case 1144:
 
 /* Line 1455 of yacc.c  */
-#line 8030 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8036 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_like((yyvsp[(1) - (4)].item),(yyvsp[(3) - (4)].item),(yyvsp[(4) - (4)].item),Lex->escape_used);
             if ((yyval.item) == NULL)
@@ -27657,7 +27663,7 @@ yyreduce:
   case 1145:
 
 /* Line 1455 of yacc.c  */
-#line 8036 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8042 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *item= new (thd->mem_root) Item_func_like((yyvsp[(1) - (5)].item),(yyvsp[(4) - (5)].item),(yyvsp[(5) - (5)].item),
                                                              Lex->escape_used);
@@ -27672,7 +27678,7 @@ yyreduce:
   case 1146:
 
 /* Line 1455 of yacc.c  */
-#line 8046 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8052 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_regex((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27683,7 +27689,7 @@ yyreduce:
   case 1147:
 
 /* Line 1455 of yacc.c  */
-#line 8052 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8058 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *item= new (thd->mem_root) Item_func_regex((yyvsp[(1) - (4)].item),(yyvsp[(4) - (4)].item));
             if (item == NULL)
@@ -27697,7 +27703,7 @@ yyreduce:
   case 1149:
 
 /* Line 1455 of yacc.c  */
-#line 8065 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8071 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_or((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27708,7 +27714,7 @@ yyreduce:
   case 1150:
 
 /* Line 1455 of yacc.c  */
-#line 8071 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8077 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_and((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27719,7 +27725,7 @@ yyreduce:
   case 1151:
 
 /* Line 1455 of yacc.c  */
-#line 8077 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8083 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_shift_left((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27730,7 +27736,7 @@ yyreduce:
   case 1152:
 
 /* Line 1455 of yacc.c  */
-#line 8083 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8089 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_shift_right((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27741,7 +27747,7 @@ yyreduce:
   case 1153:
 
 /* Line 1455 of yacc.c  */
-#line 8089 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8095 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_plus((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27752,7 +27758,7 @@ yyreduce:
   case 1154:
 
 /* Line 1455 of yacc.c  */
-#line 8095 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8101 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_minus((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27763,7 +27769,7 @@ yyreduce:
   case 1155:
 
 /* Line 1455 of yacc.c  */
-#line 8101 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8107 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(1) - (5)].item),(yyvsp[(4) - (5)].item),(yyvsp[(5) - (5)].interval),0);
             if ((yyval.item) == NULL)
@@ -27774,7 +27780,7 @@ yyreduce:
   case 1156:
 
 /* Line 1455 of yacc.c  */
-#line 8107 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8113 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(1) - (5)].item),(yyvsp[(4) - (5)].item),(yyvsp[(5) - (5)].interval),1);
             if ((yyval.item) == NULL)
@@ -27785,7 +27791,7 @@ yyreduce:
   case 1157:
 
 /* Line 1455 of yacc.c  */
-#line 8113 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8119 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_mul((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27796,7 +27802,7 @@ yyreduce:
   case 1158:
 
 /* Line 1455 of yacc.c  */
-#line 8119 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8125 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_div((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27807,7 +27813,7 @@ yyreduce:
   case 1159:
 
 /* Line 1455 of yacc.c  */
-#line 8125 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8131 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_mod((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27818,7 +27824,7 @@ yyreduce:
   case 1160:
 
 /* Line 1455 of yacc.c  */
-#line 8131 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8137 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_int_div((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27829,7 +27835,7 @@ yyreduce:
   case 1161:
 
 /* Line 1455 of yacc.c  */
-#line 8137 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8143 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_mod((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27840,7 +27846,7 @@ yyreduce:
   case 1162:
 
 /* Line 1455 of yacc.c  */
-#line 8143 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8149 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_xor((yyvsp[(1) - (3)].item),(yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -27851,63 +27857,63 @@ yyreduce:
   case 1172:
 
 /* Line 1455 of yacc.c  */
-#line 8172 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8178 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.boolfunc2creator) = &comp_eq_creator; }
     break;
 
   case 1173:
 
 /* Line 1455 of yacc.c  */
-#line 8173 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8179 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.boolfunc2creator) = &comp_ge_creator; }
     break;
 
   case 1174:
 
 /* Line 1455 of yacc.c  */
-#line 8174 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8180 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.boolfunc2creator) = &comp_gt_creator; }
     break;
 
   case 1175:
 
 /* Line 1455 of yacc.c  */
-#line 8175 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8181 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.boolfunc2creator) = &comp_le_creator; }
     break;
 
   case 1176:
 
 /* Line 1455 of yacc.c  */
-#line 8176 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8182 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.boolfunc2creator) = &comp_lt_creator; }
     break;
 
   case 1177:
 
 /* Line 1455 of yacc.c  */
-#line 8177 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8183 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.boolfunc2creator) = &comp_ne_creator; }
     break;
 
   case 1178:
 
 /* Line 1455 of yacc.c  */
-#line 8181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8187 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) = 1; }
     break;
 
   case 1179:
 
 /* Line 1455 of yacc.c  */
-#line 8182 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8188 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) = 0; }
     break;
 
   case 1180:
 
 /* Line 1455 of yacc.c  */
-#line 8187 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8193 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 	    (yyval.num)= DYN_COL_NULL; /* automatic type */
@@ -27919,14 +27925,14 @@ yyreduce:
   case 1181:
 
 /* Line 1455 of yacc.c  */
-#line 8193 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8199 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (yyvsp[(2) - (2)].num); }
     break;
 
   case 1182:
 
 /* Line 1455 of yacc.c  */
-#line 8198 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8204 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_INT;
@@ -27938,7 +27944,7 @@ yyreduce:
   case 1183:
 
 /* Line 1455 of yacc.c  */
-#line 8205 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8211 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_UINT;
@@ -27950,7 +27956,7 @@ yyreduce:
   case 1184:
 
 /* Line 1455 of yacc.c  */
-#line 8212 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8218 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_DOUBLE;
@@ -27962,7 +27968,7 @@ yyreduce:
   case 1185:
 
 /* Line 1455 of yacc.c  */
-#line 8219 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8225 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_DOUBLE;
@@ -27974,7 +27980,7 @@ yyreduce:
   case 1186:
 
 /* Line 1455 of yacc.c  */
-#line 8226 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8232 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_DOUBLE;
@@ -27986,7 +27992,7 @@ yyreduce:
   case 1187:
 
 /* Line 1455 of yacc.c  */
-#line 8233 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8239 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)= DYN_COL_DECIMAL;
             Lex->charset= NULL;
@@ -27996,7 +28002,7 @@ yyreduce:
   case 1188:
 
 /* Line 1455 of yacc.c  */
-#line 8238 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8244 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_STRING;
@@ -28007,7 +28013,7 @@ yyreduce:
   case 1189:
 
 /* Line 1455 of yacc.c  */
-#line 8244 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8250 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_STRING;
@@ -28019,7 +28025,7 @@ yyreduce:
   case 1190:
 
 /* Line 1455 of yacc.c  */
-#line 8251 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8257 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_DATE;
@@ -28031,7 +28037,7 @@ yyreduce:
   case 1191:
 
 /* Line 1455 of yacc.c  */
-#line 8258 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8264 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_TIME;
@@ -28044,7 +28050,7 @@ yyreduce:
   case 1192:
 
 /* Line 1455 of yacc.c  */
-#line 8266 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8272 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.num)= DYN_COL_DATETIME;
@@ -28057,7 +28063,7 @@ yyreduce:
   case 1193:
 
 /* Line 1455 of yacc.c  */
-#line 8277 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8283 "/home/buildbot/git/sql/sql_yacc.yy"
     {
      LEX *lex= Lex;
      (yyval.dyncol_def)= (DYNCALL_CREATE_DEF *)
@@ -28082,7 +28088,7 @@ yyreduce:
   case 1194:
 
 /* Line 1455 of yacc.c  */
-#line 8299 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8305 "/home/buildbot/git/sql/sql_yacc.yy"
     {
          (yyval.dyncol_def_list)= new (thd->mem_root) List<DYNCALL_CREATE_DEF>;
          if ((yyval.dyncol_def_list) == NULL)
@@ -28094,7 +28100,7 @@ yyreduce:
   case 1195:
 
 /* Line 1455 of yacc.c  */
-#line 8306 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8312 "/home/buildbot/git/sql/sql_yacc.yy"
     {
          (yyvsp[(1) - (3)].dyncol_def_list)->push_back((yyvsp[(3) - (3)].dyncol_def));
          (yyval.dyncol_def_list)= (yyvsp[(1) - (3)].dyncol_def_list);
@@ -28104,7 +28110,7 @@ yyreduce:
   case 1201:
 
 /* Line 1455 of yacc.c  */
-#line 8319 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8325 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *i1= new (thd->mem_root) Item_string((yyvsp[(3) - (3)].lex_str).str,
                                                       (yyvsp[(3) - (3)].lex_str).length,
@@ -28120,7 +28126,7 @@ yyreduce:
   case 1206:
 
 /* Line 1455 of yacc.c  */
-#line 8334 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8340 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_concat((yyvsp[(1) - (3)].item), (yyvsp[(3) - (3)].item));
             if ((yyval.item) == NULL)
@@ -28131,7 +28137,7 @@ yyreduce:
   case 1207:
 
 /* Line 1455 of yacc.c  */
-#line 8340 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8346 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= (yyvsp[(2) - (2)].item);
           }
@@ -28140,7 +28146,7 @@ yyreduce:
   case 1208:
 
 /* Line 1455 of yacc.c  */
-#line 8344 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8350 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_neg((yyvsp[(2) - (2)].item));
             if ((yyval.item) == NULL)
@@ -28151,7 +28157,7 @@ yyreduce:
   case 1209:
 
 /* Line 1455 of yacc.c  */
-#line 8350 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8356 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_neg((yyvsp[(2) - (2)].item));
             if ((yyval.item) == NULL)
@@ -28162,7 +28168,7 @@ yyreduce:
   case 1210:
 
 /* Line 1455 of yacc.c  */
-#line 8356 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8362 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= negate_expression(thd, (yyvsp[(2) - (2)].item));
             if ((yyval.item) == NULL)
@@ -28173,7 +28179,7 @@ yyreduce:
   case 1211:
 
 /* Line 1455 of yacc.c  */
-#line 8362 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8368 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             (yyval.item)= new (thd->mem_root) Item_singlerow_subselect((yyvsp[(2) - (3)].select_lex));
             if ((yyval.item) == NULL)
@@ -28184,14 +28190,14 @@ yyreduce:
   case 1212:
 
 /* Line 1455 of yacc.c  */
-#line 8368 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8374 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= (yyvsp[(2) - (3)].item); }
     break;
 
   case 1213:
 
 /* Line 1455 of yacc.c  */
-#line 8370 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8376 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(4) - (5)].item_list)->push_front((yyvsp[(2) - (5)].item));
             (yyval.item)= new (thd->mem_root) Item_row(*(yyvsp[(4) - (5)].item_list));
@@ -28203,7 +28209,7 @@ yyreduce:
   case 1214:
 
 /* Line 1455 of yacc.c  */
-#line 8377 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8383 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(5) - (6)].item_list)->push_front((yyvsp[(3) - (6)].item));
             (yyval.item)= new (thd->mem_root) Item_row(*(yyvsp[(5) - (6)].item_list));
@@ -28215,7 +28221,7 @@ yyreduce:
   case 1215:
 
 /* Line 1455 of yacc.c  */
-#line 8384 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8390 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_exists_subselect((yyvsp[(3) - (4)].select_lex));
             if ((yyval.item) == NULL)
@@ -28226,14 +28232,14 @@ yyreduce:
   case 1216:
 
 /* Line 1455 of yacc.c  */
-#line 8390 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8396 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= (yyvsp[(3) - (4)].item); }
     break;
 
   case 1217:
 
 /* Line 1455 of yacc.c  */
-#line 8392 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8398 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(2) - (7)].item_list)->push_front((yyvsp[(5) - (7)].item));
             Item_func_match *i1= new (thd->mem_root) Item_func_match(*(yyvsp[(2) - (7)].item_list), (yyvsp[(6) - (7)].num));
@@ -28247,7 +28253,7 @@ yyreduce:
   case 1218:
 
 /* Line 1455 of yacc.c  */
-#line 8401 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8407 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= create_func_cast(thd, (yyvsp[(2) - (2)].item), ITEM_CAST_CHAR, NULL, NULL,
                                  &my_charset_bin);
@@ -28259,7 +28265,7 @@ yyreduce:
   case 1219:
 
 /* Line 1455 of yacc.c  */
-#line 8408 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8414 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.item)= create_func_cast(thd, (yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].cast_type), lex->length, lex->dec,
@@ -28272,7 +28278,7 @@ yyreduce:
   case 1220:
 
 /* Line 1455 of yacc.c  */
-#line 8416 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8422 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_case(* (yyvsp[(3) - (5)].item_list), (yyvsp[(2) - (5)].item), (yyvsp[(4) - (5)].item) );
             if ((yyval.item) == NULL)
@@ -28283,7 +28289,7 @@ yyreduce:
   case 1221:
 
 /* Line 1455 of yacc.c  */
-#line 8422 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8428 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= create_func_cast(thd, (yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].cast_type), Lex->length, Lex->dec,
                                  Lex->charset);
@@ -28295,7 +28301,7 @@ yyreduce:
   case 1222:
 
 /* Line 1455 of yacc.c  */
-#line 8429 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8435 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_conv_charset((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].charset));
             if ((yyval.item) == NULL)
@@ -28306,7 +28312,7 @@ yyreduce:
   case 1223:
 
 /* Line 1455 of yacc.c  */
-#line 8435 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8441 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if ((yyvsp[(3) - (4)].item)->is_splocal())
             {
@@ -28325,7 +28331,7 @@ yyreduce:
   case 1224:
 
 /* Line 1455 of yacc.c  */
-#line 8449 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8455 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_insert_value(Lex->current_context(),
                                                         (yyvsp[(3) - (4)].item));
@@ -28337,7 +28343,7 @@ yyreduce:
   case 1225:
 
 /* Line 1455 of yacc.c  */
-#line 8457 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8463 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(5) - (5)].item),(yyvsp[(2) - (5)].item),(yyvsp[(3) - (5)].interval),0);
             if ((yyval.item) == NULL)
@@ -28348,7 +28354,7 @@ yyreduce:
   case 1226:
 
 /* Line 1455 of yacc.c  */
-#line 8472 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8478 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_char(*(yyvsp[(3) - (4)].item_list));
             if ((yyval.item) == NULL)
@@ -28359,7 +28365,7 @@ yyreduce:
   case 1227:
 
 /* Line 1455 of yacc.c  */
-#line 8478 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8484 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_char(*(yyvsp[(3) - (6)].item_list), (yyvsp[(5) - (6)].charset));
             if ((yyval.item) == NULL)
@@ -28370,7 +28376,7 @@ yyreduce:
   case 1228:
 
 /* Line 1455 of yacc.c  */
-#line 8484 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8490 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_current_user(Lex->current_context());
             if ((yyval.item) == NULL)
@@ -28383,7 +28389,7 @@ yyreduce:
   case 1229:
 
 /* Line 1455 of yacc.c  */
-#line 8492 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8498 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_typecast((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28394,7 +28400,7 @@ yyreduce:
   case 1230:
 
 /* Line 1455 of yacc.c  */
-#line 8498 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8504 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_dayofmonth((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28405,7 +28411,7 @@ yyreduce:
   case 1231:
 
 /* Line 1455 of yacc.c  */
-#line 8504 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8510 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_hour((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28416,7 +28422,7 @@ yyreduce:
   case 1232:
 
 /* Line 1455 of yacc.c  */
-#line 8510 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8516 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_insert((yyvsp[(3) - (10)].item),(yyvsp[(5) - (10)].item),(yyvsp[(7) - (10)].item),(yyvsp[(9) - (10)].item));
             if ((yyval.item) == NULL)
@@ -28427,7 +28433,7 @@ yyreduce:
   case 1233:
 
 /* Line 1455 of yacc.c  */
-#line 8516 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8522 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             List<Item> *list= new (thd->mem_root) List<Item>;
             if (list == NULL)
@@ -28446,7 +28452,7 @@ yyreduce:
   case 1234:
 
 /* Line 1455 of yacc.c  */
-#line 8530 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8536 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(7) - (8)].item_list)->push_front((yyvsp[(5) - (8)].item));
             (yyvsp[(7) - (8)].item_list)->push_front((yyvsp[(3) - (8)].item));
@@ -28462,7 +28468,7 @@ yyreduce:
   case 1235:
 
 /* Line 1455 of yacc.c  */
-#line 8541 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8547 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_left((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28473,7 +28479,7 @@ yyreduce:
   case 1236:
 
 /* Line 1455 of yacc.c  */
-#line 8547 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8553 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_minute((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28484,7 +28490,7 @@ yyreduce:
   case 1237:
 
 /* Line 1455 of yacc.c  */
-#line 8553 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8559 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_month((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28495,7 +28501,7 @@ yyreduce:
   case 1238:
 
 /* Line 1455 of yacc.c  */
-#line 8559 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8565 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_right((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28506,7 +28512,7 @@ yyreduce:
   case 1239:
 
 /* Line 1455 of yacc.c  */
-#line 8565 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8571 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_second((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28517,7 +28523,7 @@ yyreduce:
   case 1240:
 
 /* Line 1455 of yacc.c  */
-#line 8571 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8577 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_time_typecast((yyvsp[(3) - (4)].item), AUTO_SEC_PART_DIGITS);
             if ((yyval.item) == NULL)
@@ -28528,7 +28534,7 @@ yyreduce:
   case 1241:
 
 /* Line 1455 of yacc.c  */
-#line 8577 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8583 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_datetime_typecast((yyvsp[(3) - (4)].item), AUTO_SEC_PART_DIGITS);
             if ((yyval.item) == NULL)
@@ -28539,7 +28545,7 @@ yyreduce:
   case 1242:
 
 /* Line 1455 of yacc.c  */
-#line 8583 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8589 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_add_time((yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].item), 1, 0);
             if ((yyval.item) == NULL)
@@ -28550,7 +28556,7 @@ yyreduce:
   case 1243:
 
 /* Line 1455 of yacc.c  */
-#line 8589 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8595 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_trim((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28561,7 +28567,7 @@ yyreduce:
   case 1244:
 
 /* Line 1455 of yacc.c  */
-#line 8595 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8601 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_ltrim((yyvsp[(6) - (7)].item),(yyvsp[(4) - (7)].item));
             if ((yyval.item) == NULL)
@@ -28572,7 +28578,7 @@ yyreduce:
   case 1245:
 
 /* Line 1455 of yacc.c  */
-#line 8601 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8607 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_rtrim((yyvsp[(6) - (7)].item),(yyvsp[(4) - (7)].item));
             if ((yyval.item) == NULL)
@@ -28583,7 +28589,7 @@ yyreduce:
   case 1246:
 
 /* Line 1455 of yacc.c  */
-#line 8607 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8613 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_trim((yyvsp[(6) - (7)].item),(yyvsp[(4) - (7)].item));
             if ((yyval.item) == NULL)
@@ -28594,7 +28600,7 @@ yyreduce:
   case 1247:
 
 /* Line 1455 of yacc.c  */
-#line 8613 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8619 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_ltrim((yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28605,7 +28611,7 @@ yyreduce:
   case 1248:
 
 /* Line 1455 of yacc.c  */
-#line 8619 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8625 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_rtrim((yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28616,7 +28622,7 @@ yyreduce:
   case 1249:
 
 /* Line 1455 of yacc.c  */
-#line 8625 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8631 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_trim((yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28627,7 +28633,7 @@ yyreduce:
   case 1250:
 
 /* Line 1455 of yacc.c  */
-#line 8631 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8637 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_trim((yyvsp[(5) - (6)].item),(yyvsp[(3) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28638,7 +28644,7 @@ yyreduce:
   case 1251:
 
 /* Line 1455 of yacc.c  */
-#line 8637 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8643 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_user();
             if ((yyval.item) == NULL)
@@ -28651,7 +28657,7 @@ yyreduce:
   case 1252:
 
 /* Line 1455 of yacc.c  */
-#line 8645 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8651 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_year((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28662,7 +28668,7 @@ yyreduce:
   case 1253:
 
 /* Line 1455 of yacc.c  */
-#line 8666 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8672 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].item),
                                                              INTERVAL_DAY, 0);
@@ -28674,7 +28680,7 @@ yyreduce:
   case 1254:
 
 /* Line 1455 of yacc.c  */
-#line 8673 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8679 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(3) - (8)].item), (yyvsp[(6) - (8)].item), (yyvsp[(7) - (8)].interval), 0);
             if ((yyval.item) == NULL)
@@ -28685,7 +28691,7 @@ yyreduce:
   case 1255:
 
 /* Line 1455 of yacc.c  */
-#line 8679 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8685 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_curdate_local();
             if ((yyval.item) == NULL)
@@ -28697,7 +28703,7 @@ yyreduce:
   case 1256:
 
 /* Line 1455 of yacc.c  */
-#line 8686 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8692 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_curtime_local((yyvsp[(2) - (2)].num));
             if ((yyval.item) == NULL)
@@ -28709,7 +28715,7 @@ yyreduce:
   case 1257:
 
 /* Line 1455 of yacc.c  */
-#line 8694 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8700 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(3) - (8)].item),(yyvsp[(6) - (8)].item),(yyvsp[(7) - (8)].interval),0);
             if ((yyval.item) == NULL)
@@ -28720,7 +28726,7 @@ yyreduce:
   case 1258:
 
 /* Line 1455 of yacc.c  */
-#line 8701 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8707 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(3) - (8)].item),(yyvsp[(6) - (8)].item),(yyvsp[(7) - (8)].interval),1);
             if ((yyval.item) == NULL)
@@ -28731,7 +28737,7 @@ yyreduce:
   case 1259:
 
 /* Line 1455 of yacc.c  */
-#line 8707 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8713 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)=new (thd->mem_root) Item_extract( (yyvsp[(3) - (6)].interval), (yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28742,7 +28748,7 @@ yyreduce:
   case 1260:
 
 /* Line 1455 of yacc.c  */
-#line 8713 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8719 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_get_format((yyvsp[(3) - (6)].date_time_type), (yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28753,7 +28759,7 @@ yyreduce:
   case 1261:
 
 /* Line 1455 of yacc.c  */
-#line 8719 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8725 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_now_local((yyvsp[(2) - (2)].num));
             if ((yyval.item) == NULL)
@@ -28765,7 +28771,7 @@ yyreduce:
   case 1262:
 
 /* Line 1455 of yacc.c  */
-#line 8726 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8732 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item) = new (thd->mem_root) Item_func_locate((yyvsp[(5) - (6)].item),(yyvsp[(3) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28776,7 +28782,7 @@ yyreduce:
   case 1263:
 
 /* Line 1455 of yacc.c  */
-#line 8732 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8738 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].item),
                                                              INTERVAL_DAY, 1);
@@ -28788,7 +28794,7 @@ yyreduce:
   case 1264:
 
 /* Line 1455 of yacc.c  */
-#line 8739 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8745 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(3) - (8)].item), (yyvsp[(6) - (8)].item), (yyvsp[(7) - (8)].interval), 1);
             if ((yyval.item) == NULL)
@@ -28799,7 +28805,7 @@ yyreduce:
   case 1265:
 
 /* Line 1455 of yacc.c  */
-#line 8745 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8751 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_substr((yyvsp[(3) - (8)].item),(yyvsp[(5) - (8)].item),(yyvsp[(7) - (8)].item));
             if ((yyval.item) == NULL)
@@ -28810,7 +28816,7 @@ yyreduce:
   case 1266:
 
 /* Line 1455 of yacc.c  */
-#line 8751 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8757 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_substr((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28821,7 +28827,7 @@ yyreduce:
   case 1267:
 
 /* Line 1455 of yacc.c  */
-#line 8757 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8763 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_substr((yyvsp[(3) - (8)].item),(yyvsp[(5) - (8)].item),(yyvsp[(7) - (8)].item));
             if ((yyval.item) == NULL)
@@ -28832,7 +28838,7 @@ yyreduce:
   case 1268:
 
 /* Line 1455 of yacc.c  */
-#line 8763 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8769 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_substr((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28843,7 +28849,7 @@ yyreduce:
   case 1269:
 
 /* Line 1455 of yacc.c  */
-#line 8769 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8775 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               Unlike other time-related functions, SYSDATE() is
@@ -28866,7 +28872,7 @@ yyreduce:
   case 1270:
 
 /* Line 1455 of yacc.c  */
-#line 8787 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8793 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval((yyvsp[(7) - (8)].item),(yyvsp[(5) - (8)].item),(yyvsp[(3) - (8)].interval_time_st),0);
             if ((yyval.item) == NULL)
@@ -28877,7 +28883,7 @@ yyreduce:
   case 1271:
 
 /* Line 1455 of yacc.c  */
-#line 8793 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8799 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_timestamp_diff((yyvsp[(5) - (8)].item),(yyvsp[(7) - (8)].item),(yyvsp[(3) - (8)].interval_time_st));
             if ((yyval.item) == NULL)
@@ -28888,7 +28894,7 @@ yyreduce:
   case 1272:
 
 /* Line 1455 of yacc.c  */
-#line 8799 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8805 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_curdate_utc();
             if ((yyval.item) == NULL)
@@ -28900,7 +28906,7 @@ yyreduce:
   case 1273:
 
 /* Line 1455 of yacc.c  */
-#line 8806 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8812 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_curtime_utc((yyvsp[(2) - (2)].num));
             if ((yyval.item) == NULL)
@@ -28912,7 +28918,7 @@ yyreduce:
   case 1274:
 
 /* Line 1455 of yacc.c  */
-#line 8813 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8819 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_now_utc((yyvsp[(2) - (2)].num));
             if ((yyval.item) == NULL)
@@ -28924,7 +28930,7 @@ yyreduce:
   case 1275:
 
 /* Line 1455 of yacc.c  */
-#line 8821 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8827 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= create_func_dyncol_add(thd, (yyvsp[(3) - (6)].item), *(yyvsp[(5) - (6)].dyncol_def_list));
             if ((yyval.item) == NULL)
@@ -28935,7 +28941,7 @@ yyreduce:
   case 1276:
 
 /* Line 1455 of yacc.c  */
-#line 8828 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8834 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= create_func_dyncol_delete(thd, (yyvsp[(3) - (6)].item), *(yyvsp[(5) - (6)].item_list));
             if ((yyval.item) == NULL)
@@ -28946,7 +28952,7 @@ yyreduce:
   case 1277:
 
 /* Line 1455 of yacc.c  */
-#line 8835 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8841 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_dyncol_exists((yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -28957,7 +28963,7 @@ yyreduce:
   case 1278:
 
 /* Line 1455 of yacc.c  */
-#line 8842 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8848 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_dyncol_list((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -28968,7 +28974,7 @@ yyreduce:
   case 1279:
 
 /* Line 1455 of yacc.c  */
-#line 8849 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8855 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= create_func_dyncol_create(thd, *(yyvsp[(3) - (4)].dyncol_def_list));
             if ((yyval.item) == NULL)
@@ -28979,7 +28985,7 @@ yyreduce:
   case 1280:
 
 /* Line 1455 of yacc.c  */
-#line 8856 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8862 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             (yyval.item)= create_func_dyncol_get(thd, (yyvsp[(3) - (8)].item), (yyvsp[(5) - (8)].item), (yyvsp[(7) - (8)].cast_type),
@@ -28993,7 +28999,7 @@ yyreduce:
   case 1281:
 
 /* Line 1455 of yacc.c  */
-#line 8873 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8879 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_ascii((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29004,7 +29010,7 @@ yyreduce:
   case 1282:
 
 /* Line 1455 of yacc.c  */
-#line 8879 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8885 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_charset((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29015,7 +29021,7 @@ yyreduce:
   case 1283:
 
 /* Line 1455 of yacc.c  */
-#line 8885 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8891 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_coalesce(* (yyvsp[(3) - (4)].item_list));
             if ((yyval.item) == NULL)
@@ -29026,7 +29032,7 @@ yyreduce:
   case 1284:
 
 /* Line 1455 of yacc.c  */
-#line 8891 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8897 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_collation((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29037,7 +29043,7 @@ yyreduce:
   case 1285:
 
 /* Line 1455 of yacc.c  */
-#line 8897 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8903 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_database();
             if ((yyval.item) == NULL)
@@ -29049,7 +29055,7 @@ yyreduce:
   case 1286:
 
 /* Line 1455 of yacc.c  */
-#line 8904 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8910 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_if((yyvsp[(3) - (8)].item),(yyvsp[(5) - (8)].item),(yyvsp[(7) - (8)].item));
             if ((yyval.item) == NULL)
@@ -29060,7 +29066,7 @@ yyreduce:
   case 1287:
 
 /* Line 1455 of yacc.c  */
-#line 8910 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8916 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_last_value(* (yyvsp[(3) - (4)].item_list));
             if ((yyval.item) == NULL)
@@ -29071,7 +29077,7 @@ yyreduce:
   case 1288:
 
 /* Line 1455 of yacc.c  */
-#line 8916 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8922 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_microsecond((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29082,7 +29088,7 @@ yyreduce:
   case 1289:
 
 /* Line 1455 of yacc.c  */
-#line 8922 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8928 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item) = new (thd->mem_root) Item_func_mod((yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -29093,7 +29099,7 @@ yyreduce:
   case 1290:
 
 /* Line 1455 of yacc.c  */
-#line 8928 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8934 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)=  new (thd->mem_root) Item_func_old_password((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29104,7 +29110,7 @@ yyreduce:
   case 1291:
 
 /* Line 1455 of yacc.c  */
-#line 8934 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8940 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item* i1;
             if (thd->variables.old_passwords)
@@ -29120,7 +29126,7 @@ yyreduce:
   case 1292:
 
 /* Line 1455 of yacc.c  */
-#line 8945 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8951 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item) = new (thd->mem_root) Item_func_quarter((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29131,7 +29137,7 @@ yyreduce:
   case 1293:
 
 /* Line 1455 of yacc.c  */
-#line 8951 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8957 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_repeat((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -29142,7 +29148,7 @@ yyreduce:
   case 1294:
 
 /* Line 1455 of yacc.c  */
-#line 8957 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8963 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_replace((yyvsp[(3) - (8)].item),(yyvsp[(5) - (8)].item),(yyvsp[(7) - (8)].item));
             if ((yyval.item) == NULL)
@@ -29153,7 +29159,7 @@ yyreduce:
   case 1295:
 
 /* Line 1455 of yacc.c  */
-#line 8963 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8969 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_round((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item),1);
             if ((yyval.item) == NULL)
@@ -29164,7 +29170,7 @@ yyreduce:
   case 1296:
 
 /* Line 1455 of yacc.c  */
-#line 8969 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8975 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *i1= new (thd->mem_root) Item_int((char*) "0",
                                            thd->variables.default_week_format,
@@ -29180,7 +29186,7 @@ yyreduce:
   case 1297:
 
 /* Line 1455 of yacc.c  */
-#line 8980 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8986 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_week((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item));
             if ((yyval.item) == NULL)
@@ -29191,7 +29197,7 @@ yyreduce:
   case 1298:
 
 /* Line 1455 of yacc.c  */
-#line 8986 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 8992 "/home/buildbot/git/sql/sql_yacc.yy"
     {
 #ifdef HAVE_SPATIAL
             (yyval.item)= (yyvsp[(1) - (1)].item);
@@ -29209,7 +29215,7 @@ yyreduce:
   case 1299:
 
 /* Line 1455 of yacc.c  */
-#line 9002 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9008 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd,
                          Item_func_spatial_rel((yyvsp[(3) - (6)].item), (yyvsp[(5) - (6)].item),
@@ -29220,7 +29226,7 @@ yyreduce:
   case 1300:
 
 /* Line 1455 of yacc.c  */
-#line 9008 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9014 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd,
                          Item_func_spatial_collection(* (yyvsp[(3) - (4)].item_list),
@@ -29232,7 +29238,7 @@ yyreduce:
   case 1301:
 
 /* Line 1455 of yacc.c  */
-#line 9015 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9021 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd,
                          Item_func_spatial_collection(* (yyvsp[(3) - (4)].item_list),
@@ -29244,7 +29250,7 @@ yyreduce:
   case 1302:
 
 /* Line 1455 of yacc.c  */
-#line 9022 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9028 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd,
                          Item_func_spatial_collection(* (yyvsp[(3) - (4)].item_list),
@@ -29256,7 +29262,7 @@ yyreduce:
   case 1303:
 
 /* Line 1455 of yacc.c  */
-#line 9029 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9035 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd,
                          Item_func_spatial_collection(* (yyvsp[(3) - (4)].item_list),
@@ -29268,7 +29274,7 @@ yyreduce:
   case 1304:
 
 /* Line 1455 of yacc.c  */
-#line 9036 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9042 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd,
                          Item_func_spatial_collection(* (yyvsp[(3) - (4)].item_list),
@@ -29280,7 +29286,7 @@ yyreduce:
   case 1305:
 
 /* Line 1455 of yacc.c  */
-#line 9043 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9049 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd, Item_func_point((yyvsp[(3) - (6)].item),(yyvsp[(5) - (6)].item)));
           }
@@ -29289,7 +29295,7 @@ yyreduce:
   case 1306:
 
 /* Line 1455 of yacc.c  */
-#line 9047 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9053 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= GEOM_NEW(thd,
                          Item_func_spatial_collection(* (yyvsp[(3) - (4)].item_list),
@@ -29301,7 +29307,7 @@ yyreduce:
   case 1307:
 
 /* Line 1455 of yacc.c  */
-#line 9066 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9072 "/home/buildbot/git/sql/sql_yacc.yy"
     {
 #ifdef HAVE_DLOPEN
             udf_func *udf= 0;
@@ -29325,7 +29331,7 @@ yyreduce:
   case 1308:
 
 /* Line 1455 of yacc.c  */
-#line 9085 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9091 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Create_func *builder;
             Item *item= NULL;
@@ -29383,7 +29389,7 @@ yyreduce:
   case 1309:
 
 /* Line 1455 of yacc.c  */
-#line 9138 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9144 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Create_qfunc *builder;
             Item *item= NULL;
@@ -29426,63 +29432,63 @@ yyreduce:
   case 1310:
 
 /* Line 1455 of yacc.c  */
-#line 9179 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9185 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (yyvsp[(1) - (2)].num) | (yyvsp[(2) - (2)].num); }
     break;
 
   case 1311:
 
 /* Line 1455 of yacc.c  */
-#line 9181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9187 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= FT_BOOL; }
     break;
 
   case 1312:
 
 /* Line 1455 of yacc.c  */
-#line 9185 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9191 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= FT_NL; }
     break;
 
   case 1313:
 
 /* Line 1455 of yacc.c  */
-#line 9186 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9192 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= FT_NL; }
     break;
 
   case 1314:
 
 /* Line 1455 of yacc.c  */
-#line 9190 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9196 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0;         }
     break;
 
   case 1315:
 
 /* Line 1455 of yacc.c  */
-#line 9191 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9197 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= FT_EXPAND; }
     break;
 
   case 1316:
 
 /* Line 1455 of yacc.c  */
-#line 9195 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9201 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item_list)= NULL; }
     break;
 
   case 1317:
 
 /* Line 1455 of yacc.c  */
-#line 9196 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9202 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item_list)= (yyvsp[(1) - (1)].item_list); }
     break;
 
   case 1318:
 
 /* Line 1455 of yacc.c  */
-#line 9201 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9207 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item_list)= new (thd->mem_root) List<Item>;
             if ((yyval.item_list) == NULL)
@@ -29494,7 +29500,7 @@ yyreduce:
   case 1319:
 
 /* Line 1455 of yacc.c  */
-#line 9208 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9214 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(1) - (3)].item_list)->push_back((yyvsp[(3) - (3)].item));
             (yyval.item_list)= (yyvsp[(1) - (3)].item_list);
@@ -29504,7 +29510,7 @@ yyreduce:
   case 1320:
 
 /* Line 1455 of yacc.c  */
-#line 9216 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9222 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
              Use Item::name as a storage for the attribute value of user
@@ -29533,7 +29539,7 @@ yyreduce:
   case 1321:
 
 /* Line 1455 of yacc.c  */
-#line 9243 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9249 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_avg((yyvsp[(3) - (4)].item), FALSE);
             if ((yyval.item) == NULL)
@@ -29544,7 +29550,7 @@ yyreduce:
   case 1322:
 
 /* Line 1455 of yacc.c  */
-#line 9249 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9255 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_avg((yyvsp[(4) - (5)].item), TRUE);
             if ((yyval.item) == NULL)
@@ -29555,7 +29561,7 @@ yyreduce:
   case 1323:
 
 /* Line 1455 of yacc.c  */
-#line 9255 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9261 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_and((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29566,7 +29572,7 @@ yyreduce:
   case 1324:
 
 /* Line 1455 of yacc.c  */
-#line 9261 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9267 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_or((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29577,7 +29583,7 @@ yyreduce:
   case 1325:
 
 /* Line 1455 of yacc.c  */
-#line 9267 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9273 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_xor((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29588,7 +29594,7 @@ yyreduce:
   case 1326:
 
 /* Line 1455 of yacc.c  */
-#line 9273 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9279 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *item= new (thd->mem_root) Item_int((int32) 0L,1);
             if (item == NULL)
@@ -29602,7 +29608,7 @@ yyreduce:
   case 1327:
 
 /* Line 1455 of yacc.c  */
-#line 9282 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9288 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_count((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29613,21 +29619,21 @@ yyreduce:
   case 1328:
 
 /* Line 1455 of yacc.c  */
-#line 9288 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9294 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->in_sum_expr++; }
     break;
 
   case 1329:
 
 /* Line 1455 of yacc.c  */
-#line 9290 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9296 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->in_sum_expr--; }
     break;
 
   case 1330:
 
 /* Line 1455 of yacc.c  */
-#line 9292 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9298 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_count(* (yyvsp[(5) - (7)].item_list));
             if ((yyval.item) == NULL)
@@ -29638,7 +29644,7 @@ yyreduce:
   case 1331:
 
 /* Line 1455 of yacc.c  */
-#line 9298 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9304 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_min((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29649,7 +29655,7 @@ yyreduce:
   case 1332:
 
 /* Line 1455 of yacc.c  */
-#line 9309 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9315 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_min((yyvsp[(4) - (5)].item));
             if ((yyval.item) == NULL)
@@ -29660,7 +29666,7 @@ yyreduce:
   case 1333:
 
 /* Line 1455 of yacc.c  */
-#line 9315 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9321 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_max((yyvsp[(3) - (4)].item));
             if ((yyval.item) == NULL)
@@ -29671,7 +29677,7 @@ yyreduce:
   case 1334:
 
 /* Line 1455 of yacc.c  */
-#line 9321 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9327 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_max((yyvsp[(4) - (5)].item));
             if ((yyval.item) == NULL)
@@ -29682,7 +29688,7 @@ yyreduce:
   case 1335:
 
 /* Line 1455 of yacc.c  */
-#line 9327 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9333 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_std((yyvsp[(3) - (4)].item), 0);
             if ((yyval.item) == NULL)
@@ -29693,7 +29699,7 @@ yyreduce:
   case 1336:
 
 /* Line 1455 of yacc.c  */
-#line 9333 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9339 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_variance((yyvsp[(3) - (4)].item), 0);
             if ((yyval.item) == NULL)
@@ -29704,7 +29710,7 @@ yyreduce:
   case 1337:
 
 /* Line 1455 of yacc.c  */
-#line 9339 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9345 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_std((yyvsp[(3) - (4)].item), 1);
             if ((yyval.item) == NULL)
@@ -29715,7 +29721,7 @@ yyreduce:
   case 1338:
 
 /* Line 1455 of yacc.c  */
-#line 9345 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9351 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_variance((yyvsp[(3) - (4)].item), 1);
             if ((yyval.item) == NULL)
@@ -29726,7 +29732,7 @@ yyreduce:
   case 1339:
 
 /* Line 1455 of yacc.c  */
-#line 9351 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9357 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_sum((yyvsp[(3) - (4)].item), FALSE);
             if ((yyval.item) == NULL)
@@ -29737,7 +29743,7 @@ yyreduce:
   case 1340:
 
 /* Line 1455 of yacc.c  */
-#line 9357 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9363 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_sum_sum((yyvsp[(4) - (5)].item), TRUE);
             if ((yyval.item) == NULL)
@@ -29748,14 +29754,14 @@ yyreduce:
   case 1341:
 
 /* Line 1455 of yacc.c  */
-#line 9363 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9369 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->in_sum_expr++; }
     break;
 
   case 1342:
 
 /* Line 1455 of yacc.c  */
-#line 9367 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9373 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             sel->in_sum_expr--;
@@ -29772,7 +29778,7 @@ yyreduce:
   case 1343:
 
 /* Line 1455 of yacc.c  */
-#line 9382 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9388 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (! Lex->parsing_options.allows_variable)
             {
@@ -29785,7 +29791,7 @@ yyreduce:
   case 1344:
 
 /* Line 1455 of yacc.c  */
-#line 9390 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9396 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= (yyvsp[(3) - (3)].item);
           }
@@ -29794,7 +29800,7 @@ yyreduce:
   case 1345:
 
 /* Line 1455 of yacc.c  */
-#line 9397 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9403 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item_func_set_user_var *item;
             (yyval.item)= item= new (thd->mem_root) Item_func_set_user_var((yyvsp[(1) - (3)].lex_str), (yyvsp[(3) - (3)].item));
@@ -29809,7 +29815,7 @@ yyreduce:
   case 1346:
 
 /* Line 1455 of yacc.c  */
-#line 9407 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9413 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_func_get_user_var((yyvsp[(1) - (1)].lex_str));
             if ((yyval.item) == NULL)
@@ -29822,7 +29828,7 @@ yyreduce:
   case 1347:
 
 /* Line 1455 of yacc.c  */
-#line 9415 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9421 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* disallow "SELECT @@global.global.variable" */
             if ((yyvsp[(3) - (4)].lex_str).str && (yyvsp[(4) - (4)].lex_str).str && check_reserved_words(&(yyvsp[(3) - (4)].lex_str)))
@@ -29840,21 +29846,21 @@ yyreduce:
   case 1348:
 
 /* Line 1455 of yacc.c  */
-#line 9430 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9436 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) = 0; }
     break;
 
   case 1349:
 
 /* Line 1455 of yacc.c  */
-#line 9431 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9437 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) = 1; }
     break;
 
   case 1350:
 
 /* Line 1455 of yacc.c  */
-#line 9436 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9442 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1);
             if ((yyval.string) == NULL)
@@ -29865,14 +29871,14 @@ yyreduce:
   case 1351:
 
 /* Line 1455 of yacc.c  */
-#line 9441 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9447 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.string) = (yyvsp[(2) - (2)].string); }
     break;
 
   case 1353:
 
 /* Line 1455 of yacc.c  */
-#line 9447 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9453 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -29890,21 +29896,21 @@ yyreduce:
   case 1355:
 
 /* Line 1455 of yacc.c  */
-#line 9464 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9470 "/home/buildbot/git/sql/sql_yacc.yy"
     { if (add_gorder_to_list(thd, (yyvsp[(3) - (4)].item),(bool) (yyvsp[(4) - (4)].num))) MYSQL_YYABORT; }
     break;
 
   case 1356:
 
 /* Line 1455 of yacc.c  */
-#line 9466 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9472 "/home/buildbot/git/sql/sql_yacc.yy"
     { if (add_gorder_to_list(thd, (yyvsp[(1) - (2)].item),(bool) (yyvsp[(2) - (2)].num))) MYSQL_YYABORT; }
     break;
 
   case 1357:
 
 /* Line 1455 of yacc.c  */
-#line 9471 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9477 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->current_select->inc_in_sum_expr())
@@ -29918,7 +29924,7 @@ yyreduce:
   case 1358:
 
 /* Line 1455 of yacc.c  */
-#line 9480 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9486 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->in_sum_expr--;
             (yyval.item)= (yyvsp[(3) - (3)].item);
@@ -29928,70 +29934,70 @@ yyreduce:
   case 1359:
 
 /* Line 1455 of yacc.c  */
-#line 9488 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9494 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->charset= &my_charset_bin; Lex->dec= 0; }
     break;
 
   case 1360:
 
 /* Line 1455 of yacc.c  */
-#line 9490 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9496 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->dec= 0; }
     break;
 
   case 1361:
 
 /* Line 1455 of yacc.c  */
-#line 9492 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9498 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->charset= national_charset_info; Lex->dec=0; }
     break;
 
   case 1362:
 
 /* Line 1455 of yacc.c  */
-#line 9494 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9500 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
     break;
 
   case 1363:
 
 /* Line 1455 of yacc.c  */
-#line 9496 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9502 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
     break;
 
   case 1364:
 
 /* Line 1455 of yacc.c  */
-#line 9498 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9504 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
     break;
 
   case 1365:
 
 /* Line 1455 of yacc.c  */
-#line 9500 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9506 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
     break;
 
   case 1366:
 
 /* Line 1455 of yacc.c  */
-#line 9502 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9508 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
     break;
 
   case 1367:
 
 /* Line 1455 of yacc.c  */
-#line 9504 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9510 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_DATE; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
     break;
 
   case 1368:
 
 /* Line 1455 of yacc.c  */
-#line 9506 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9512 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.cast_type)=ITEM_CAST_TIME;
             LEX *lex= Lex;
@@ -30002,7 +30008,7 @@ yyreduce:
   case 1369:
 
 /* Line 1455 of yacc.c  */
-#line 9512 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9518 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.cast_type)=ITEM_CAST_DATETIME;
             LEX *lex= Lex;
@@ -30013,42 +30019,42 @@ yyreduce:
   case 1370:
 
 /* Line 1455 of yacc.c  */
-#line 9518 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9524 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_DECIMAL; Lex->charset= NULL; }
     break;
 
   case 1371:
 
 /* Line 1455 of yacc.c  */
-#line 9520 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9526 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->charset= NULL; Lex->length= Lex->dec= 0;}
     break;
 
   case 1372:
 
 /* Line 1455 of yacc.c  */
-#line 9522 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9528 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.cast_type)=ITEM_CAST_DOUBLE; }
     break;
 
   case 1373:
 
 /* Line 1455 of yacc.c  */
-#line 9525 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9531 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item_list)= NULL; }
     break;
 
   case 1374:
 
 /* Line 1455 of yacc.c  */
-#line 9526 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9532 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item_list)= (yyvsp[(1) - (1)].item_list);}
     break;
 
   case 1375:
 
 /* Line 1455 of yacc.c  */
-#line 9531 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9537 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item_list)= new (thd->mem_root) List<Item>;
             if ((yyval.item_list) == NULL)
@@ -30060,7 +30066,7 @@ yyreduce:
   case 1376:
 
 /* Line 1455 of yacc.c  */
-#line 9538 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9544 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(1) - (3)].item_list)->push_back((yyvsp[(3) - (3)].item));
             (yyval.item_list)= (yyvsp[(1) - (3)].item_list);
@@ -30070,21 +30076,21 @@ yyreduce:
   case 1377:
 
 /* Line 1455 of yacc.c  */
-#line 9545 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9551 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item_list)= (yyvsp[(1) - (1)].item_list); }
     break;
 
   case 1378:
 
 /* Line 1455 of yacc.c  */
-#line 9546 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9552 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item_list)= (yyvsp[(2) - (3)].item_list); }
     break;
 
   case 1379:
 
 /* Line 1455 of yacc.c  */
-#line 9551 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9557 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item_list)= new (thd->mem_root) List<Item>;
             if ((yyval.item_list) == NULL)
@@ -30096,7 +30102,7 @@ yyreduce:
   case 1380:
 
 /* Line 1455 of yacc.c  */
-#line 9558 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9564 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(1) - (3)].item_list)->push_back((yyvsp[(3) - (3)].item));
             (yyval.item_list)= (yyvsp[(1) - (3)].item_list);
@@ -30106,35 +30112,35 @@ yyreduce:
   case 1381:
 
 /* Line 1455 of yacc.c  */
-#line 9565 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9571 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= NULL; }
     break;
 
   case 1382:
 
 /* Line 1455 of yacc.c  */
-#line 9566 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9572 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= (yyvsp[(1) - (1)].item); }
     break;
 
   case 1383:
 
 /* Line 1455 of yacc.c  */
-#line 9570 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9576 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= NULL; }
     break;
 
   case 1384:
 
 /* Line 1455 of yacc.c  */
-#line 9571 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9577 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= (yyvsp[(2) - (2)].item); }
     break;
 
   case 1385:
 
 /* Line 1455 of yacc.c  */
-#line 9576 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9582 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item_list)= new List<Item>;
             if ((yyval.item_list) == NULL)
@@ -30147,7 +30153,7 @@ yyreduce:
   case 1386:
 
 /* Line 1455 of yacc.c  */
-#line 9584 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9590 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(1) - (5)].item_list)->push_back((yyvsp[(3) - (5)].item));
             (yyvsp[(1) - (5)].item_list)->push_back((yyvsp[(5) - (5)].item));
@@ -30158,14 +30164,14 @@ yyreduce:
   case 1387:
 
 /* Line 1455 of yacc.c  */
-#line 9594 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9600 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.table_list)=(yyvsp[(1) - (1)].table_list); }
     break;
 
   case 1388:
 
 /* Line 1455 of yacc.c  */
-#line 9596 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9602 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (!((yyval.table_list)= lex->current_select->nest_last_join(lex->thd)))
@@ -30179,35 +30185,35 @@ yyreduce:
   case 1389:
 
 /* Line 1455 of yacc.c  */
-#line 9607 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9613 "/home/buildbot/git/sql/sql_yacc.yy"
     { MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[(1) - (1)].table_list)); }
     break;
 
   case 1390:
 
 /* Line 1455 of yacc.c  */
-#line 9618 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9624 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.table_list)=(yyvsp[(1) - (1)].table_list); }
     break;
 
   case 1391:
 
 /* Line 1455 of yacc.c  */
-#line 9619 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9625 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.table_list)=(yyvsp[(3) - (4)].table_list); }
     break;
 
   case 1392:
 
 /* Line 1455 of yacc.c  */
-#line 9625 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9631 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.table_list)=(yyvsp[(1) - (1)].table_list); }
     break;
 
   case 1393:
 
 /* Line 1455 of yacc.c  */
-#line 9627 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9633 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (3)].table_list) && ((yyval.table_list)=(yyvsp[(3) - (3)].table_list)));
           }
@@ -30216,21 +30222,21 @@ yyreduce:
   case 1394:
 
 /* Line 1455 of yacc.c  */
-#line 9647 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9653 "/home/buildbot/git/sql/sql_yacc.yy"
     { MYSQL_YYABORT_UNLESS((yyvsp[(1) - (3)].table_list) && ((yyval.table_list)=(yyvsp[(3) - (3)].table_list))); }
     break;
 
   case 1395:
 
 /* Line 1455 of yacc.c  */
-#line 9649 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9655 "/home/buildbot/git/sql/sql_yacc.yy"
     { MYSQL_YYABORT_UNLESS((yyvsp[(1) - (3)].table_list) && ((yyval.table_list)=(yyvsp[(3) - (3)].table_list))); (yyvsp[(3) - (3)].table_list)->straight=1; }
     break;
 
   case 1396:
 
 /* Line 1455 of yacc.c  */
-#line 9652 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9658 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (4)].table_list) && (yyvsp[(3) - (4)].table_list));
             /* Change the current name resolution context to a local context. */
@@ -30243,7 +30249,7 @@ yyreduce:
   case 1397:
 
 /* Line 1455 of yacc.c  */
-#line 9660 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9666 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             add_join_on((yyvsp[(3) - (6)].table_list),(yyvsp[(6) - (6)].item));
             Lex->pop_context();
@@ -30254,7 +30260,7 @@ yyreduce:
   case 1398:
 
 /* Line 1455 of yacc.c  */
-#line 9667 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9673 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (4)].table_list) && (yyvsp[(3) - (4)].table_list));
             /* Change the current name resolution context to a local context. */
@@ -30267,7 +30273,7 @@ yyreduce:
   case 1399:
 
 /* Line 1455 of yacc.c  */
-#line 9675 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9681 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(3) - (6)].table_list)->straight=1;
             add_join_on((yyvsp[(3) - (6)].table_list),(yyvsp[(6) - (6)].item));
@@ -30279,7 +30285,7 @@ yyreduce:
   case 1400:
 
 /* Line 1455 of yacc.c  */
-#line 9683 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9689 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (4)].table_list) && (yyvsp[(3) - (4)].table_list));
           }
@@ -30288,14 +30294,14 @@ yyreduce:
   case 1401:
 
 /* Line 1455 of yacc.c  */
-#line 9687 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9693 "/home/buildbot/git/sql/sql_yacc.yy"
     { add_join_natural((yyvsp[(1) - (8)].table_list),(yyvsp[(3) - (8)].table_list),(yyvsp[(7) - (8)].string_list),Select); (yyval.table_list)=(yyvsp[(3) - (8)].table_list); }
     break;
 
   case 1402:
 
 /* Line 1455 of yacc.c  */
-#line 9689 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9695 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (4)].table_list) && ((yyval.table_list)=(yyvsp[(4) - (4)].table_list)));
             add_join_natural((yyvsp[(1) - (4)].table_list),(yyvsp[(4) - (4)].table_list),NULL,Select);
@@ -30305,7 +30311,7 @@ yyreduce:
   case 1403:
 
 /* Line 1455 of yacc.c  */
-#line 9697 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9703 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (6)].table_list) && (yyvsp[(5) - (6)].table_list));
             /* Change the current name resolution context to a local context. */
@@ -30318,7 +30324,7 @@ yyreduce:
   case 1404:
 
 /* Line 1455 of yacc.c  */
-#line 9705 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9711 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             add_join_on((yyvsp[(5) - (8)].table_list),(yyvsp[(8) - (8)].item));
             Lex->pop_context();
@@ -30331,7 +30337,7 @@ yyreduce:
   case 1405:
 
 /* Line 1455 of yacc.c  */
-#line 9713 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9719 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (5)].table_list) && (yyvsp[(5) - (5)].table_list));
           }
@@ -30340,7 +30346,7 @@ yyreduce:
   case 1406:
 
 /* Line 1455 of yacc.c  */
-#line 9717 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9723 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             add_join_natural((yyvsp[(1) - (10)].table_list),(yyvsp[(5) - (10)].table_list),(yyvsp[(9) - (10)].string_list),Select); 
             (yyvsp[(5) - (10)].table_list)->outer_join|=JOIN_TYPE_LEFT; 
@@ -30351,7 +30357,7 @@ yyreduce:
   case 1407:
 
 /* Line 1455 of yacc.c  */
-#line 9723 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9729 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (6)].table_list) && (yyvsp[(6) - (6)].table_list));
             add_join_natural((yyvsp[(1) - (6)].table_list),(yyvsp[(6) - (6)].table_list),NULL,Select);
@@ -30363,7 +30369,7 @@ yyreduce:
   case 1408:
 
 /* Line 1455 of yacc.c  */
-#line 9733 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9739 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (6)].table_list) && (yyvsp[(5) - (6)].table_list));
             /* Change the current name resolution context to a local context. */
@@ -30376,7 +30382,7 @@ yyreduce:
   case 1409:
 
 /* Line 1455 of yacc.c  */
-#line 9741 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9747 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (!((yyval.table_list)= lex->current_select->convert_right_join()))
@@ -30390,7 +30396,7 @@ yyreduce:
   case 1410:
 
 /* Line 1455 of yacc.c  */
-#line 9750 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9756 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (5)].table_list) && (yyvsp[(5) - (5)].table_list));
           }
@@ -30399,7 +30405,7 @@ yyreduce:
   case 1411:
 
 /* Line 1455 of yacc.c  */
-#line 9754 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9760 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (!((yyval.table_list)= lex->current_select->convert_right_join()))
@@ -30411,7 +30417,7 @@ yyreduce:
   case 1412:
 
 /* Line 1455 of yacc.c  */
-#line 9761 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9767 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (6)].table_list) && (yyvsp[(6) - (6)].table_list));
             add_join_natural((yyvsp[(6) - (6)].table_list),(yyvsp[(1) - (6)].table_list),NULL,Select);
@@ -30424,28 +30430,28 @@ yyreduce:
   case 1413:
 
 /* Line 1455 of yacc.c  */
-#line 9771 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9777 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1414:
 
 /* Line 1455 of yacc.c  */
-#line 9772 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9778 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1415:
 
 /* Line 1455 of yacc.c  */
-#line 9773 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9779 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1416:
 
 /* Line 1455 of yacc.c  */
-#line 9785 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9791 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             sel->table_join_options= 0;
@@ -30455,7 +30461,7 @@ yyreduce:
   case 1417:
 
 /* Line 1455 of yacc.c  */
-#line 9790 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9796 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[(2) - (4)].table), (yyvsp[(3) - (4)].lex_str_ptr),
                                                 Select->get_table_join_options(),
@@ -30470,7 +30476,7 @@ yyreduce:
   case 1418:
 
 /* Line 1455 of yacc.c  */
-#line 9800 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9806 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -30497,7 +30503,7 @@ yyreduce:
   case 1419:
 
 /* Line 1455 of yacc.c  */
-#line 9840 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9846 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* Use $2 instead of Lex->current_select as derived table will
                alter value of Lex->current_select. */
@@ -30565,7 +30571,7 @@ yyreduce:
   case 1420:
 
 /* Line 1455 of yacc.c  */
-#line 9925 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9931 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if ((yyvsp[(1) - (2)].table_list) && (yyvsp[(2) - (2)].is_not_empty))
             {
@@ -30578,7 +30584,7 @@ yyreduce:
   case 1421:
 
 /* Line 1455 of yacc.c  */
-#line 9935 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9941 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_select_to_union_list(Lex, (bool)(yyvsp[(3) - (3)].num), FALSE))
               MYSQL_YYABORT;
@@ -30588,7 +30594,7 @@ yyreduce:
   case 1422:
 
 /* Line 1455 of yacc.c  */
-#line 9940 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9946 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               Remove from the name resolution context stack the context of the
@@ -30601,7 +30607,7 @@ yyreduce:
   case 1423:
 
 /* Line 1455 of yacc.c  */
-#line 9948 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9954 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if ((yyvsp[(1) - (7)].table_list) != NULL)
             {
@@ -30614,7 +30620,7 @@ yyreduce:
   case 1424:
 
 /* Line 1455 of yacc.c  */
-#line 9960 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9966 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             SELECT_LEX * sel= lex->current_select;
@@ -30635,7 +30641,7 @@ yyreduce:
   case 1425:
 
 /* Line 1455 of yacc.c  */
-#line 9979 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9985 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -30648,7 +30654,7 @@ yyreduce:
   case 1426:
 
 /* Line 1455 of yacc.c  */
-#line 9987 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 9993 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= NO_MATTER;
           }
@@ -30657,7 +30663,7 @@ yyreduce:
   case 1428:
 
 /* Line 1455 of yacc.c  */
-#line 9996 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10002 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if ((yyvsp[(1) - (1)].select_lex)->init_nested_join(lex->thd))
@@ -30668,7 +30674,7 @@ yyreduce:
   case 1429:
 
 /* Line 1455 of yacc.c  */
-#line 10002 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10008 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             /* for normal joins, $3 != NULL and end_nested_join() != NULL,
@@ -30687,7 +30693,7 @@ yyreduce:
   case 1430:
 
 /* Line 1455 of yacc.c  */
-#line 10018 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10024 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->derived_tables|= DERIVED_SUBQUERY;
@@ -30709,7 +30715,7 @@ yyreduce:
   case 1431:
 
 /* Line 1455 of yacc.c  */
-#line 10035 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10041 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= NO_MATTER;
           }
@@ -30718,14 +30724,14 @@ yyreduce:
   case 1433:
 
 /* Line 1455 of yacc.c  */
-#line 10042 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10048 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.select_lex)= Select; }
     break;
 
   case 1434:
 
 /* Line 1455 of yacc.c  */
-#line 10047 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10053 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -30753,21 +30759,21 @@ yyreduce:
   case 1435:
 
 /* Line 1455 of yacc.c  */
-#line 10072 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10078 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1436:
 
 /* Line 1455 of yacc.c  */
-#line 10073 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10079 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1437:
 
 /* Line 1455 of yacc.c  */
-#line 10078 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10084 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)= thd->variables.old_mode ?  INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL; 
           }
@@ -30776,42 +30782,42 @@ yyreduce:
   case 1438:
 
 /* Line 1455 of yacc.c  */
-#line 10081 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10087 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= INDEX_HINT_MASK_JOIN;  }
     break;
 
   case 1439:
 
 /* Line 1455 of yacc.c  */
-#line 10082 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10088 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= INDEX_HINT_MASK_ORDER; }
     break;
 
   case 1440:
 
 /* Line 1455 of yacc.c  */
-#line 10083 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10089 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= INDEX_HINT_MASK_GROUP; }
     break;
 
   case 1441:
 
 /* Line 1455 of yacc.c  */
-#line 10087 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10093 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.index_hint)= INDEX_HINT_FORCE; }
     break;
 
   case 1442:
 
 /* Line 1455 of yacc.c  */
-#line 10088 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10094 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.index_hint)= INDEX_HINT_IGNORE; }
     break;
 
   case 1443:
 
 /* Line 1455 of yacc.c  */
-#line 10093 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10099 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->set_index_hint_type((yyvsp[(1) - (3)].index_hint), (yyvsp[(3) - (3)].num));
           }
@@ -30820,7 +30826,7 @@ yyreduce:
   case 1445:
 
 /* Line 1455 of yacc.c  */
-#line 10098 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10104 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[(3) - (3)].num));
           }
@@ -30829,49 +30835,49 @@ yyreduce:
   case 1450:
 
 /* Line 1455 of yacc.c  */
-#line 10111 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10117 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->alloc_index_hints(thd); }
     break;
 
   case 1452:
 
 /* Line 1455 of yacc.c  */
-#line 10115 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10121 "/home/buildbot/git/sql/sql_yacc.yy"
     {  Select->clear_index_hints(); }
     break;
 
   case 1454:
 
 /* Line 1455 of yacc.c  */
-#line 10120 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10126 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->add_index_hint(thd, NULL, 0); }
     break;
 
   case 1455:
 
 /* Line 1455 of yacc.c  */
-#line 10121 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10127 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1456:
 
 /* Line 1455 of yacc.c  */
-#line 10126 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10132 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->add_index_hint(thd, (yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); }
     break;
 
   case 1457:
 
 /* Line 1455 of yacc.c  */
-#line 10128 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10134 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->add_index_hint(thd, (char *)"PRIMARY", 7); }
     break;
 
   case 1460:
 
 /* Line 1455 of yacc.c  */
-#line 10138 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10144 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.string_list)= new List<String>))
               MYSQL_YYABORT;
@@ -30887,7 +30893,7 @@ yyreduce:
   case 1461:
 
 /* Line 1455 of yacc.c  */
-#line 10149 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10155 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             String *s= new (thd->mem_root) String((const char *) (yyvsp[(3) - (3)].lex_str).str,
                                                     (yyvsp[(3) - (3)].lex_str).length,
@@ -30902,189 +30908,189 @@ yyreduce:
   case 1462:
 
 /* Line 1455 of yacc.c  */
-#line 10161 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10167 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1463:
 
 /* Line 1455 of yacc.c  */
-#line 10162 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10168 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_DAY_HOUR; }
     break;
 
   case 1464:
 
 /* Line 1455 of yacc.c  */
-#line 10163 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10169 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
     break;
 
   case 1465:
 
 /* Line 1455 of yacc.c  */
-#line 10164 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10170 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_DAY_MINUTE; }
     break;
 
   case 1466:
 
 /* Line 1455 of yacc.c  */
-#line 10165 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10171 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_DAY_SECOND; }
     break;
 
   case 1467:
 
 /* Line 1455 of yacc.c  */
-#line 10166 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10172 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
     break;
 
   case 1468:
 
 /* Line 1455 of yacc.c  */
-#line 10167 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10173 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_HOUR_MINUTE; }
     break;
 
   case 1469:
 
 /* Line 1455 of yacc.c  */
-#line 10168 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10174 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_HOUR_SECOND; }
     break;
 
   case 1470:
 
 /* Line 1455 of yacc.c  */
-#line 10169 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10175 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
     break;
 
   case 1471:
 
 /* Line 1455 of yacc.c  */
-#line 10170 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10176 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_MINUTE_SECOND; }
     break;
 
   case 1472:
 
 /* Line 1455 of yacc.c  */
-#line 10171 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10177 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
     break;
 
   case 1473:
 
 /* Line 1455 of yacc.c  */
-#line 10172 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10178 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval)=INTERVAL_YEAR_MONTH; }
     break;
 
   case 1474:
 
 /* Line 1455 of yacc.c  */
-#line 10176 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10182 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_DAY; }
     break;
 
   case 1475:
 
 /* Line 1455 of yacc.c  */
-#line 10177 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10183 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_WEEK; }
     break;
 
   case 1476:
 
 /* Line 1455 of yacc.c  */
-#line 10178 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10184 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_HOUR; }
     break;
 
   case 1477:
 
 /* Line 1455 of yacc.c  */
-#line 10179 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10185 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_MINUTE; }
     break;
 
   case 1478:
 
 /* Line 1455 of yacc.c  */
-#line 10180 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10186 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_MONTH; }
     break;
 
   case 1479:
 
 /* Line 1455 of yacc.c  */
-#line 10181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10187 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_QUARTER; }
     break;
 
   case 1480:
 
 /* Line 1455 of yacc.c  */
-#line 10182 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10188 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_SECOND; }
     break;
 
   case 1481:
 
 /* Line 1455 of yacc.c  */
-#line 10183 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10189 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
     break;
 
   case 1482:
 
 /* Line 1455 of yacc.c  */
-#line 10184 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10190 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.interval_time_st)=INTERVAL_YEAR; }
     break;
 
   case 1483:
 
 /* Line 1455 of yacc.c  */
-#line 10188 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10194 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
     break;
 
   case 1484:
 
 /* Line 1455 of yacc.c  */
-#line 10189 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10195 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
     break;
 
   case 1485:
 
 /* Line 1455 of yacc.c  */
-#line 10190 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10196 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
     break;
 
   case 1486:
 
 /* Line 1455 of yacc.c  */
-#line 10191 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10197 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
     break;
 
   case 1490:
 
 /* Line 1455 of yacc.c  */
-#line 10201 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10207 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str_ptr)=0; }
     break;
 
   case 1491:
 
 /* Line 1455 of yacc.c  */
-#line 10203 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10209 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.lex_str_ptr)= (LEX_STRING*) sql_memdup(&(yyvsp[(2) - (2)].lex_str),sizeof(LEX_STRING));
             if ((yyval.lex_str_ptr) == NULL)
@@ -31095,14 +31101,14 @@ yyreduce:
   case 1494:
 
 /* Line 1455 of yacc.c  */
-#line 10216 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10222 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->where= 0; }
     break;
 
   case 1495:
 
 /* Line 1455 of yacc.c  */
-#line 10218 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10224 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= IN_WHERE;
           }
@@ -31111,7 +31117,7 @@ yyreduce:
   case 1496:
 
 /* Line 1455 of yacc.c  */
-#line 10222 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10228 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *select= Select;
             select->where= normalize_cond((yyvsp[(3) - (3)].item));
@@ -31124,7 +31130,7 @@ yyreduce:
   case 1498:
 
 /* Line 1455 of yacc.c  */
-#line 10234 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10240 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= IN_HAVING;
           }
@@ -31133,7 +31139,7 @@ yyreduce:
   case 1499:
 
 /* Line 1455 of yacc.c  */
-#line 10238 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10244 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             sel->having= normalize_cond((yyvsp[(3) - (3)].item));
@@ -31146,7 +31152,7 @@ yyreduce:
   case 1500:
 
 /* Line 1455 of yacc.c  */
-#line 10249 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10255 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->escape_used= TRUE;
             (yyval.item)= (yyvsp[(2) - (2)].item);
@@ -31156,7 +31162,7 @@ yyreduce:
   case 1501:
 
 /* Line 1455 of yacc.c  */
-#line 10254 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10260 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->escape_used= FALSE;
             (yyval.item)= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ?
@@ -31170,28 +31176,28 @@ yyreduce:
   case 1504:
 
 /* Line 1455 of yacc.c  */
-#line 10275 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10281 "/home/buildbot/git/sql/sql_yacc.yy"
     { if (add_group_to_list(thd, (yyvsp[(3) - (4)].item),(bool) (yyvsp[(4) - (4)].num))) MYSQL_YYABORT; }
     break;
 
   case 1505:
 
 /* Line 1455 of yacc.c  */
-#line 10277 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10283 "/home/buildbot/git/sql/sql_yacc.yy"
     { if (add_group_to_list(thd, (yyvsp[(1) - (2)].item),(bool) (yyvsp[(2) - (2)].num))) MYSQL_YYABORT; }
     break;
 
   case 1506:
 
 /* Line 1455 of yacc.c  */
-#line 10281 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10287 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1507:
 
 /* Line 1455 of yacc.c  */
-#line 10283 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10289 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               'WITH CUBE' is reserved in the MySQL syntax, but not implemented,
@@ -31216,7 +31222,7 @@ yyreduce:
   case 1508:
 
 /* Line 1455 of yacc.c  */
-#line 10303 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10309 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               'WITH ROLLUP' is needed for backward compatibility,
@@ -31239,7 +31245,7 @@ yyreduce:
   case 1512:
 
 /* Line 1455 of yacc.c  */
-#line 10337 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10343 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             bool ascending= ((yyvsp[(2) - (2)].num) == 1) ? true : false;
             if (add_order_to_list(thd, (yyvsp[(1) - (2)].item), ascending))
@@ -31250,7 +31256,7 @@ yyreduce:
   case 1515:
 
 /* Line 1455 of yacc.c  */
-#line 10355 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10361 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -31286,42 +31292,42 @@ yyreduce:
   case 1517:
 
 /* Line 1455 of yacc.c  */
-#line 10390 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10396 "/home/buildbot/git/sql/sql_yacc.yy"
     { if (add_order_to_list(thd, (yyvsp[(3) - (4)].item),(bool) (yyvsp[(4) - (4)].num))) MYSQL_YYABORT; }
     break;
 
   case 1518:
 
 /* Line 1455 of yacc.c  */
-#line 10392 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10398 "/home/buildbot/git/sql/sql_yacc.yy"
     { if (add_order_to_list(thd, (yyvsp[(1) - (2)].item),(bool) (yyvsp[(2) - (2)].num))) MYSQL_YYABORT; }
     break;
 
   case 1519:
 
 /* Line 1455 of yacc.c  */
-#line 10396 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10402 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) =  1; }
     break;
 
   case 1520:
 
 /* Line 1455 of yacc.c  */
-#line 10397 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10403 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) =1; }
     break;
 
   case 1521:
 
 /* Line 1455 of yacc.c  */
-#line 10398 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10404 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num) =0; }
     break;
 
   case 1522:
 
 /* Line 1455 of yacc.c  */
-#line 10403 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10409 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -31334,28 +31340,28 @@ yyreduce:
   case 1523:
 
 /* Line 1455 of yacc.c  */
-#line 10410 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10416 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1524:
 
 /* Line 1455 of yacc.c  */
-#line 10414 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10420 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1525:
 
 /* Line 1455 of yacc.c  */
-#line 10415 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10421 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1526:
 
 /* Line 1455 of yacc.c  */
-#line 10420 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10426 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
@@ -31364,7 +31370,7 @@ yyreduce:
   case 1527:
 
 /* Line 1455 of yacc.c  */
-#line 10424 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10430 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
@@ -31373,7 +31379,7 @@ yyreduce:
   case 1528:
 
 /* Line 1455 of yacc.c  */
-#line 10428 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10434 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
@@ -31382,7 +31388,7 @@ yyreduce:
   case 1529:
 
 /* Line 1455 of yacc.c  */
-#line 10435 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10441 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             sel->select_limit= (yyvsp[(1) - (1)].item);
@@ -31394,7 +31400,7 @@ yyreduce:
   case 1530:
 
 /* Line 1455 of yacc.c  */
-#line 10442 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10448 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             sel->select_limit= (yyvsp[(3) - (3)].item);
@@ -31406,7 +31412,7 @@ yyreduce:
   case 1531:
 
 /* Line 1455 of yacc.c  */
-#line 10449 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10455 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             sel->select_limit= (yyvsp[(1) - (3)].item);
@@ -31418,7 +31424,7 @@ yyreduce:
   case 1532:
 
 /* Line 1455 of yacc.c  */
-#line 10459 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10465 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           Item_splocal *splocal;
           LEX *lex= thd->lex;
@@ -31456,7 +31462,7 @@ yyreduce:
   case 1533:
 
 /* Line 1455 of yacc.c  */
-#line 10492 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10498 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           ((Item_param *) (yyvsp[(1) - (1)].item))->limit_clause_param= TRUE;
         }
@@ -31465,7 +31471,7 @@ yyreduce:
   case 1534:
 
 /* Line 1455 of yacc.c  */
-#line 10496 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10502 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_uint((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if ((yyval.item) == NULL)
@@ -31476,7 +31482,7 @@ yyreduce:
   case 1535:
 
 /* Line 1455 of yacc.c  */
-#line 10502 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10508 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_uint((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if ((yyval.item) == NULL)
@@ -31487,7 +31493,7 @@ yyreduce:
   case 1536:
 
 /* Line 1455 of yacc.c  */
-#line 10508 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10514 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_uint((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if ((yyval.item) == NULL)
@@ -31498,7 +31504,7 @@ yyreduce:
   case 1537:
 
 /* Line 1455 of yacc.c  */
-#line 10517 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10523 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             LEX *lex=Lex;
             lex->limit_rows_examined= (yyvsp[(1) - (1)].item);
@@ -31508,7 +31514,7 @@ yyreduce:
   case 1538:
 
 /* Line 1455 of yacc.c  */
-#line 10524 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10530 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->current_select->select_limit= 0;
@@ -31518,7 +31524,7 @@ yyreduce:
   case 1539:
 
 /* Line 1455 of yacc.c  */
-#line 10529 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10535 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             sel->select_limit= (yyvsp[(2) - (2)].item);
@@ -31530,210 +31536,210 @@ yyreduce:
   case 1540:
 
 /* Line 1455 of yacc.c  */
-#line 10535 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10541 "/home/buildbot/git/sql/sql_yacc.yy"
     { my_parse_error(ER(ER_SYNTAX_ERROR)); MYSQL_YYABORT; }
     break;
 
   case 1541:
 
 /* Line 1455 of yacc.c  */
-#line 10536 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10542 "/home/buildbot/git/sql/sql_yacc.yy"
     { my_parse_error(ER(ER_SYNTAX_ERROR)); MYSQL_YYABORT; }
     break;
 
   case 1542:
 
 /* Line 1455 of yacc.c  */
-#line 10540 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10546 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.num)= (int) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1543:
 
 /* Line 1455 of yacc.c  */
-#line 10541 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10547 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[(2) - (2)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1544:
 
 /* Line 1455 of yacc.c  */
-#line 10542 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10548 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[(2) - (2)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1545:
 
 /* Line 1455 of yacc.c  */
-#line 10546 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10552 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1546:
 
 /* Line 1455 of yacc.c  */
-#line 10547 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10553 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ulong_num)= (ulong) strtol((yyvsp[(1) - (1)].lex_str).str, (char**) 0, 16); }
     break;
 
   case 1547:
 
 /* Line 1455 of yacc.c  */
-#line 10548 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10554 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1548:
 
 /* Line 1455 of yacc.c  */
-#line 10549 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10555 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1549:
 
 /* Line 1455 of yacc.c  */
-#line 10550 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10556 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1550:
 
 /* Line 1455 of yacc.c  */
-#line 10551 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10557 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1551:
 
 /* Line 1455 of yacc.c  */
-#line 10555 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10561 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1552:
 
 /* Line 1455 of yacc.c  */
-#line 10556 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10562 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ulong_num)= (ulong) strtol((yyvsp[(1) - (1)].lex_str).str, (char**) 0, 16); }
     break;
 
   case 1553:
 
 /* Line 1455 of yacc.c  */
-#line 10557 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10563 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1554:
 
 /* Line 1455 of yacc.c  */
-#line 10558 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10564 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1555:
 
 /* Line 1455 of yacc.c  */
-#line 10559 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10565 "/home/buildbot/git/sql/sql_yacc.yy"
     { MYSQL_YYABORT; }
     break;
 
   case 1556:
 
 /* Line 1455 of yacc.c  */
-#line 10563 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10569 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1557:
 
 /* Line 1455 of yacc.c  */
-#line 10564 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10570 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1558:
 
 /* Line 1455 of yacc.c  */
-#line 10565 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10571 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1559:
 
 /* Line 1455 of yacc.c  */
-#line 10566 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10572 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1560:
 
 /* Line 1455 of yacc.c  */
-#line 10567 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10573 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1561:
 
 /* Line 1455 of yacc.c  */
-#line 10571 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10577 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1562:
 
 /* Line 1455 of yacc.c  */
-#line 10572 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10578 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1563:
 
 /* Line 1455 of yacc.c  */
-#line 10573 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10579 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ulonglong_number)= strtoull((yyvsp[(1) - (1)].lex_str).str, (char**) 0, 16); }
     break;
 
   case 1564:
 
 /* Line 1455 of yacc.c  */
-#line 10574 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10580 "/home/buildbot/git/sql/sql_yacc.yy"
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[(1) - (1)].lex_str).str, (char**) 0, &error); }
     break;
 
   case 1565:
 
 /* Line 1455 of yacc.c  */
-#line 10575 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10581 "/home/buildbot/git/sql/sql_yacc.yy"
     { MYSQL_YYABORT; }
     break;
 
   case 1566:
 
 /* Line 1455 of yacc.c  */
-#line 10580 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10586 "/home/buildbot/git/sql/sql_yacc.yy"
     { my_parse_error(ER(ER_ONLY_INTEGERS_ALLOWED)); }
     break;
 
   case 1569:
 
 /* Line 1455 of yacc.c  */
-#line 10589 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10595 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.choice)= (yyvsp[(1) - (1)].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
     break;
 
   case 1570:
 
 /* Line 1455 of yacc.c  */
-#line 10590 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10596 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.choice)= HA_CHOICE_UNDEF; }
     break;
 
   case 1572:
 
 /* Line 1455 of yacc.c  */
-#line 10596 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10602 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
 
@@ -31773,7 +31779,7 @@ yyreduce:
   case 1573:
 
 /* Line 1455 of yacc.c  */
-#line 10631 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10637 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* Subqueries are allowed from now.*/
             Lex->expr_allows_subselect= true;
@@ -31783,21 +31789,21 @@ yyreduce:
   case 1574:
 
 /* Line 1455 of yacc.c  */
-#line 10638 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10644 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1575:
 
 /* Line 1455 of yacc.c  */
-#line 10639 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10645 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1578:
 
 /* Line 1455 of yacc.c  */
-#line 10649 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10655 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_proc_to_list(thd, (yyvsp[(2) - (3)].item)))
               MYSQL_YYABORT;
@@ -31809,7 +31815,7 @@ yyreduce:
   case 1579:
 
 /* Line 1455 of yacc.c  */
-#line 10658 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10664 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (!lex->describe && (!(lex->result= new select_dumpvar())))
@@ -31820,21 +31826,21 @@ yyreduce:
   case 1580:
 
 /* Line 1455 of yacc.c  */
-#line 10664 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10670 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1582:
 
 /* Line 1455 of yacc.c  */
-#line 10669 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10675 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1583:
 
 /* Line 1455 of yacc.c  */
-#line 10674 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10680 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->result) 
@@ -31858,7 +31864,7 @@ yyreduce:
   case 1584:
 
 /* Line 1455 of yacc.c  */
-#line 10693 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10699 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             sp_variable_t *t;
@@ -31892,7 +31898,7 @@ yyreduce:
   case 1585:
 
 /* Line 1455 of yacc.c  */
-#line 10725 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10731 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (! Lex->parsing_options.allows_select_into)
             {
@@ -31905,7 +31911,7 @@ yyreduce:
   case 1587:
 
 /* Line 1455 of yacc.c  */
-#line 10737 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10743 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
@@ -31918,14 +31924,14 @@ yyreduce:
   case 1588:
 
 /* Line 1455 of yacc.c  */
-#line 10745 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10751 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->exchange->cs= (yyvsp[(4) - (4)].charset); }
     break;
 
   case 1590:
 
 /* Line 1455 of yacc.c  */
-#line 10748 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10754 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (!lex->describe)
@@ -31942,7 +31948,7 @@ yyreduce:
   case 1591:
 
 /* Line 1455 of yacc.c  */
-#line 10760 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10766 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
           }
@@ -31951,7 +31957,7 @@ yyreduce:
   case 1592:
 
 /* Line 1455 of yacc.c  */
-#line 10771 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10777 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_DO;
@@ -31962,7 +31968,7 @@ yyreduce:
   case 1593:
 
 /* Line 1455 of yacc.c  */
-#line 10777 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10783 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->insert_list= (yyvsp[(3) - (3)].item_list);
           }
@@ -31971,7 +31977,7 @@ yyreduce:
   case 1594:
 
 /* Line 1455 of yacc.c  */
-#line 10788 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10794 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_DROP_TABLE;
@@ -31985,21 +31991,21 @@ yyreduce:
   case 1595:
 
 /* Line 1455 of yacc.c  */
-#line 10797 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10803 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1596:
 
 /* Line 1455 of yacc.c  */
-#line 10798 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10804 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1597:
 
 /* Line 1455 of yacc.c  */
-#line 10799 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10805 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             Alter_drop *ad= new Alter_drop(Alter_drop::KEY, (yyvsp[(3) - (6)].lex_str).str);
@@ -32020,7 +32026,7 @@ yyreduce:
   case 1598:
 
 /* Line 1455 of yacc.c  */
-#line 10815 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10821 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_DROP_DB;
@@ -32032,7 +32038,7 @@ yyreduce:
   case 1599:
 
 /* Line 1455 of yacc.c  */
-#line 10822 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10828 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             sp_name *spname;
@@ -32059,7 +32065,7 @@ yyreduce:
   case 1600:
 
 /* Line 1455 of yacc.c  */
-#line 10844 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10850 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             LEX_STRING db= {0, 0};
@@ -32084,7 +32090,7 @@ yyreduce:
   case 1601:
 
 /* Line 1455 of yacc.c  */
-#line 10864 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10870 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->sphead)
@@ -32101,7 +32107,7 @@ yyreduce:
   case 1602:
 
 /* Line 1455 of yacc.c  */
-#line 10876 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10882 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_DROP_USER;
           }
@@ -32110,7 +32116,7 @@ yyreduce:
   case 1603:
 
 /* Line 1455 of yacc.c  */
-#line 10880 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10886 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_DROP_VIEW;
@@ -32123,14 +32129,14 @@ yyreduce:
   case 1604:
 
 /* Line 1455 of yacc.c  */
-#line 10888 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10894 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1605:
 
 /* Line 1455 of yacc.c  */
-#line 10890 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10896 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->drop_if_exists= (yyvsp[(3) - (4)].num);
             Lex->spname= (yyvsp[(4) - (4)].spname);
@@ -32141,7 +32147,7 @@ yyreduce:
   case 1606:
 
 /* Line 1455 of yacc.c  */
-#line 10896 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10902 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_DROP_TRIGGER;
@@ -32153,7 +32159,7 @@ yyreduce:
   case 1607:
 
 /* Line 1455 of yacc.c  */
-#line 10903 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10909 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE;
@@ -32163,7 +32169,7 @@ yyreduce:
   case 1608:
 
 /* Line 1455 of yacc.c  */
-#line 10908 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10914 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP;
@@ -32173,7 +32179,7 @@ yyreduce:
   case 1609:
 
 /* Line 1455 of yacc.c  */
-#line 10913 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10919 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_DROP_SERVER;
             Lex->drop_if_exists= (yyvsp[(3) - (4)].num);
@@ -32185,7 +32191,7 @@ yyreduce:
   case 1612:
 
 /* Line 1455 of yacc.c  */
-#line 10928 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10934 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!Select->add_table_to_list(thd, (yyvsp[(1) - (1)].table), NULL,
                                            TL_OPTION_UPDATING,
@@ -32198,7 +32204,7 @@ yyreduce:
   case 1615:
 
 /* Line 1455 of yacc.c  */
-#line 10944 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10950 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!Select->add_table_to_list(thd, (yyvsp[(1) - (1)].table), NULL,
                                            TL_OPTION_UPDATING | TL_OPTION_ALIAS,
@@ -32211,35 +32217,35 @@ yyreduce:
   case 1616:
 
 /* Line 1455 of yacc.c  */
-#line 10954 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10960 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 1617:
 
 /* Line 1455 of yacc.c  */
-#line 10955 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10961 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 1618:
 
 /* Line 1455 of yacc.c  */
-#line 10959 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10965 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 1619:
 
 /* Line 1455 of yacc.c  */
-#line 10960 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10966 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 1620:
 
 /* Line 1455 of yacc.c  */
-#line 10968 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10974 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSERT;
@@ -32251,7 +32257,7 @@ yyreduce:
   case 1621:
 
 /* Line 1455 of yacc.c  */
-#line 10976 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10982 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->set_lock_for_tables((yyvsp[(3) - (5)].lock_type));
             Lex->current_select= &Lex->select_lex;
@@ -32261,14 +32267,14 @@ yyreduce:
   case 1622:
 
 /* Line 1455 of yacc.c  */
-#line 10981 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10987 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1623:
 
 /* Line 1455 of yacc.c  */
-#line 10986 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10992 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_REPLACE;
@@ -32280,7 +32286,7 @@ yyreduce:
   case 1624:
 
 /* Line 1455 of yacc.c  */
-#line 10993 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 10999 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->set_lock_for_tables((yyvsp[(3) - (4)].lock_type));
             Lex->current_select= &Lex->select_lex;
@@ -32290,14 +32296,14 @@ yyreduce:
   case 1625:
 
 /* Line 1455 of yacc.c  */
-#line 10998 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11004 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1626:
 
 /* Line 1455 of yacc.c  */
-#line 11003 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11009 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               If it is SP we do not allow insert optimisation when result of
@@ -32311,14 +32317,14 @@ yyreduce:
   case 1627:
 
 /* Line 1455 of yacc.c  */
-#line 11011 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11017 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
     break;
 
   case 1628:
 
 /* Line 1455 of yacc.c  */
-#line 11013 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11019 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() -
                                                     thd->query());
@@ -32331,21 +32337,21 @@ yyreduce:
   case 1629:
 
 /* Line 1455 of yacc.c  */
-#line 11020 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11026 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lock_type)= TL_WRITE; }
     break;
 
   case 1630:
 
 /* Line 1455 of yacc.c  */
-#line 11024 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11030 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lock_type)= (yyvsp[(1) - (1)].lock_type); }
     break;
 
   case 1631:
 
 /* Line 1455 of yacc.c  */
-#line 11026 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11032 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() -
                                                     thd->query());
@@ -32358,21 +32364,21 @@ yyreduce:
   case 1632:
 
 /* Line 1455 of yacc.c  */
-#line 11036 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11042 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1633:
 
 /* Line 1455 of yacc.c  */
-#line 11037 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11043 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1634:
 
 /* Line 1455 of yacc.c  */
-#line 11042 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11048 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->field_list.empty();
@@ -32384,28 +32390,28 @@ yyreduce:
   case 1635:
 
 /* Line 1455 of yacc.c  */
-#line 11050 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11056 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1636:
 
 /* Line 1455 of yacc.c  */
-#line 11051 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11057 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1637:
 
 /* Line 1455 of yacc.c  */
-#line 11052 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11058 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1638:
 
 /* Line 1455 of yacc.c  */
-#line 11054 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11060 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (!(lex->insert_list = new List_item) ||
@@ -32417,63 +32423,63 @@ yyreduce:
   case 1640:
 
 /* Line 1455 of yacc.c  */
-#line 11064 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11070 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->field_list.push_back((yyvsp[(3) - (3)].item)); }
     break;
 
   case 1641:
 
 /* Line 1455 of yacc.c  */
-#line 11065 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11071 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->field_list.push_back((yyvsp[(1) - (1)].item)); }
     break;
 
   case 1642:
 
 /* Line 1455 of yacc.c  */
-#line 11069 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11075 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1643:
 
 /* Line 1455 of yacc.c  */
-#line 11070 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11076 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1644:
 
 /* Line 1455 of yacc.c  */
-#line 11072 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11078 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->set_braces(0);}
     break;
 
   case 1645:
 
 /* Line 1455 of yacc.c  */
-#line 11073 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11079 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1646:
 
 /* Line 1455 of yacc.c  */
-#line 11075 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11081 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->set_braces(1);}
     break;
 
   case 1647:
 
 /* Line 1455 of yacc.c  */
-#line 11076 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11082 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1652:
 
 /* Line 1455 of yacc.c  */
-#line 11091 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11097 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->field_list.push_back((yyvsp[(1) - (3)].item)) ||
@@ -32485,35 +32491,35 @@ yyreduce:
   case 1653:
 
 /* Line 1455 of yacc.c  */
-#line 11100 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11106 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1654:
 
 /* Line 1455 of yacc.c  */
-#line 11101 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11107 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1655:
 
 /* Line 1455 of yacc.c  */
-#line 11105 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11111 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1656:
 
 /* Line 1455 of yacc.c  */
-#line 11106 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11112 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1657:
 
 /* Line 1455 of yacc.c  */
-#line 11111 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11117 "/home/buildbot/git/sql/sql_yacc.yy"
     {
               if (!(Lex->insert_list = new List_item))
                 MYSQL_YYABORT;
@@ -32523,7 +32529,7 @@ yyreduce:
   case 1658:
 
 /* Line 1455 of yacc.c  */
-#line 11116 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11122 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->many_values.push_back(lex->insert_list))
@@ -32534,14 +32540,14 @@ yyreduce:
   case 1659:
 
 /* Line 1455 of yacc.c  */
-#line 11124 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11130 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1661:
 
 /* Line 1455 of yacc.c  */
-#line 11130 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11136 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->insert_list->push_back((yyvsp[(3) - (3)].item)))
               MYSQL_YYABORT;
@@ -32551,7 +32557,7 @@ yyreduce:
   case 1662:
 
 /* Line 1455 of yacc.c  */
-#line 11135 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11141 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->insert_list->push_back((yyvsp[(1) - (1)].item)))
               MYSQL_YYABORT;
@@ -32561,14 +32567,14 @@ yyreduce:
   case 1663:
 
 /* Line 1455 of yacc.c  */
-#line 11142 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11148 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= (yyvsp[(1) - (1)].item);}
     break;
 
   case 1664:
 
 /* Line 1455 of yacc.c  */
-#line 11144 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11150 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_default_value(Lex->current_context());
             if ((yyval.item) == NULL)
@@ -32579,14 +32585,14 @@ yyreduce:
   case 1666:
 
 /* Line 1455 of yacc.c  */
-#line 11153 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11159 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->duplicates= DUP_UPDATE; }
     break;
 
   case 1668:
 
 /* Line 1455 of yacc.c  */
-#line 11161 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11167 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             mysql_init_select(lex);
@@ -32598,7 +32604,7 @@ yyreduce:
   case 1669:
 
 /* Line 1455 of yacc.c  */
-#line 11169 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11175 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->select_lex.table_list.elements > 1)
@@ -32622,14 +32628,14 @@ yyreduce:
   case 1670:
 
 /* Line 1455 of yacc.c  */
-#line 11187 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11193 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1673:
 
 /* Line 1455 of yacc.c  */
-#line 11197 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11203 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_item_to_list(thd, (yyvsp[(1) - (3)].item)) || add_value_to_list(thd, (yyvsp[(3) - (3)].item)))
               MYSQL_YYABORT;
@@ -32639,7 +32645,7 @@ yyreduce:
   case 1676:
 
 /* Line 1455 of yacc.c  */
-#line 11210 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11216 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           LEX *lex= Lex;
           if (lex->update_list.push_back((yyvsp[(1) - (3)].item)) || 
@@ -32651,21 +32657,21 @@ yyreduce:
   case 1677:
 
 /* Line 1455 of yacc.c  */
-#line 11219 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11225 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lock_type)= TL_WRITE_DEFAULT; }
     break;
 
   case 1678:
 
 /* Line 1455 of yacc.c  */
-#line 11220 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11226 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
     break;
 
   case 1679:
 
 /* Line 1455 of yacc.c  */
-#line 11227 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11233 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_DELETE;
@@ -32681,7 +32687,7 @@ yyreduce:
   case 1681:
 
 /* Line 1455 of yacc.c  */
-#line 11242 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11248 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!Select->add_table_to_list(thd, (yyvsp[(2) - (2)].table), NULL, TL_OPTION_UPDATING,
                                            YYPS->m_lock_type,
@@ -32695,14 +32701,14 @@ yyreduce:
   case 1682:
 
 /* Line 1455 of yacc.c  */
-#line 11251 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11257 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1683:
 
 /* Line 1455 of yacc.c  */
-#line 11253 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11259 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             mysql_init_multi_delete(Lex);
             YYPS->m_lock_type= TL_READ_DEFAULT;
@@ -32713,7 +32719,7 @@ yyreduce:
   case 1684:
 
 /* Line 1455 of yacc.c  */
-#line 11259 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11265 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (multi_delete_set_locks_and_link_aux_tables(Lex))
               MYSQL_YYABORT;
@@ -32723,7 +32729,7 @@ yyreduce:
   case 1685:
 
 /* Line 1455 of yacc.c  */
-#line 11264 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11270 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             mysql_init_multi_delete(Lex);
             YYPS->m_lock_type= TL_READ_DEFAULT;
@@ -32734,7 +32740,7 @@ yyreduce:
   case 1686:
 
 /* Line 1455 of yacc.c  */
-#line 11270 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11276 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (multi_delete_set_locks_and_link_aux_tables(Lex))
               MYSQL_YYABORT;
@@ -32744,7 +32750,7 @@ yyreduce:
   case 1689:
 
 /* Line 1455 of yacc.c  */
-#line 11283 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11289 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Table_ident *ti= new Table_ident((yyvsp[(1) - (2)].lex_str));
             if (ti == NULL)
@@ -32762,7 +32768,7 @@ yyreduce:
   case 1690:
 
 /* Line 1455 of yacc.c  */
-#line 11296 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11302 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Table_ident *ti= new Table_ident(thd, (yyvsp[(1) - (4)].lex_str), (yyvsp[(3) - (4)].lex_str), 0);
             if (ti == NULL)
@@ -32780,56 +32786,56 @@ yyreduce:
   case 1691:
 
 /* Line 1455 of yacc.c  */
-#line 11311 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11317 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1692:
 
 /* Line 1455 of yacc.c  */
-#line 11312 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11318 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1693:
 
 /* Line 1455 of yacc.c  */
-#line 11316 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11322 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1694:
 
 /* Line 1455 of yacc.c  */
-#line 11317 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11323 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1695:
 
 /* Line 1455 of yacc.c  */
-#line 11321 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11327 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->options|= OPTION_QUICK; }
     break;
 
   case 1696:
 
 /* Line 1455 of yacc.c  */
-#line 11322 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11328 "/home/buildbot/git/sql/sql_yacc.yy"
     { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
     break;
 
   case 1697:
 
 /* Line 1455 of yacc.c  */
-#line 11323 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11329 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ignore= 1; }
     break;
 
   case 1698:
 
 /* Line 1455 of yacc.c  */
-#line 11328 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11334 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX* lex= Lex;
             lex->sql_command= SQLCOM_TRUNCATE;
@@ -32845,7 +32851,7 @@ yyreduce:
   case 1699:
 
 /* Line 1455 of yacc.c  */
-#line 11339 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11345 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_stmt);
@@ -32858,7 +32864,7 @@ yyreduce:
   case 1706:
 
 /* Line 1455 of yacc.c  */
-#line 11363 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11369 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_CPU;
     }
@@ -32867,7 +32873,7 @@ yyreduce:
   case 1707:
 
 /* Line 1455 of yacc.c  */
-#line 11367 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11373 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_MEMORY;
     }
@@ -32876,7 +32882,7 @@ yyreduce:
   case 1708:
 
 /* Line 1455 of yacc.c  */
-#line 11371 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11377 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_BLOCK_IO;
     }
@@ -32885,7 +32891,7 @@ yyreduce:
   case 1709:
 
 /* Line 1455 of yacc.c  */
-#line 11375 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11381 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_CONTEXT;
     }
@@ -32894,7 +32900,7 @@ yyreduce:
   case 1710:
 
 /* Line 1455 of yacc.c  */
-#line 11379 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11385 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_PAGE_FAULTS;
     }
@@ -32903,7 +32909,7 @@ yyreduce:
   case 1711:
 
 /* Line 1455 of yacc.c  */
-#line 11383 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11389 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_IPC;
     }
@@ -32912,7 +32918,7 @@ yyreduce:
   case 1712:
 
 /* Line 1455 of yacc.c  */
-#line 11387 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11393 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_SWAPS;
     }
@@ -32921,7 +32927,7 @@ yyreduce:
   case 1713:
 
 /* Line 1455 of yacc.c  */
-#line 11391 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11397 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_SOURCE;
     }
@@ -32930,7 +32936,7 @@ yyreduce:
   case 1714:
 
 /* Line 1455 of yacc.c  */
-#line 11395 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11401 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_options|= PROFILE_ALL;
     }
@@ -32939,7 +32945,7 @@ yyreduce:
   case 1715:
 
 /* Line 1455 of yacc.c  */
-#line 11402 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11408 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_query_id= 0;
     }
@@ -32948,7 +32954,7 @@ yyreduce:
   case 1716:
 
 /* Line 1455 of yacc.c  */
-#line 11406 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11412 "/home/buildbot/git/sql/sql_yacc.yy"
     {
       Lex->profile_query_id= atoi((yyvsp[(3) - (3)].lex_str).str);
     }
@@ -32957,7 +32963,7 @@ yyreduce:
   case 1717:
 
 /* Line 1455 of yacc.c  */
-#line 11415 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11421 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->wild=0;
@@ -32970,7 +32976,7 @@ yyreduce:
   case 1718:
 
 /* Line 1455 of yacc.c  */
-#line 11423 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11429 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= NO_MATTER;
           }
@@ -32979,7 +32985,7 @@ yyreduce:
   case 1719:
 
 /* Line 1455 of yacc.c  */
-#line 11430 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11436 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_DATABASES;
@@ -32991,7 +32997,7 @@ yyreduce:
   case 1720:
 
 /* Line 1455 of yacc.c  */
-#line 11437 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11443 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TABLES;
@@ -33004,7 +33010,7 @@ yyreduce:
   case 1721:
 
 /* Line 1455 of yacc.c  */
-#line 11445 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11451 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TRIGGERS;
@@ -33017,7 +33023,7 @@ yyreduce:
   case 1722:
 
 /* Line 1455 of yacc.c  */
-#line 11453 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11459 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_EVENTS;
@@ -33030,7 +33036,7 @@ yyreduce:
   case 1723:
 
 /* Line 1455 of yacc.c  */
-#line 11461 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11467 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
@@ -33043,7 +33049,7 @@ yyreduce:
   case 1724:
 
 /* Line 1455 of yacc.c  */
-#line 11469 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11475 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
@@ -33056,7 +33062,7 @@ yyreduce:
   case 1725:
 
 /* Line 1455 of yacc.c  */
-#line 11477 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11483 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_PLUGINS;
@@ -33068,21 +33074,21 @@ yyreduce:
   case 1726:
 
 /* Line 1455 of yacc.c  */
-#line 11484 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11490 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_info.db_type= (yyvsp[(2) - (3)].db_type); }
     break;
 
   case 1727:
 
 /* Line 1455 of yacc.c  */
-#line 11486 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11492 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_info.db_type= NULL; }
     break;
 
   case 1728:
 
 /* Line 1455 of yacc.c  */
-#line 11488 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11494 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_FIELDS;
@@ -33096,7 +33102,7 @@ yyreduce:
   case 1729:
 
 /* Line 1455 of yacc.c  */
-#line 11497 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11503 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_SHOW_BINLOGS;
           }
@@ -33105,7 +33111,7 @@ yyreduce:
   case 1730:
 
 /* Line 1455 of yacc.c  */
-#line 11501 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11507 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
           }
@@ -33114,7 +33120,7 @@ yyreduce:
   case 1731:
 
 /* Line 1455 of yacc.c  */
-#line 11505 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11511 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
@@ -33124,7 +33130,7 @@ yyreduce:
   case 1733:
 
 /* Line 1455 of yacc.c  */
-#line 11510 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11516 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
@@ -33134,7 +33140,7 @@ yyreduce:
   case 1735:
 
 /* Line 1455 of yacc.c  */
-#line 11515 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11521 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_KEYS;
@@ -33148,7 +33154,7 @@ yyreduce:
   case 1736:
 
 /* Line 1455 of yacc.c  */
-#line 11524 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11530 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
@@ -33160,7 +33166,7 @@ yyreduce:
   case 1737:
 
 /* Line 1455 of yacc.c  */
-#line 11531 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11537 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_AUTHORS;
@@ -33174,7 +33180,7 @@ yyreduce:
   case 1738:
 
 /* Line 1455 of yacc.c  */
-#line 11540 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11546 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
@@ -33188,7 +33194,7 @@ yyreduce:
   case 1739:
 
 /* Line 1455 of yacc.c  */
-#line 11549 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11555 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
@@ -33198,42 +33204,42 @@ yyreduce:
   case 1740:
 
 /* Line 1455 of yacc.c  */
-#line 11554 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11560 "/home/buildbot/git/sql/sql_yacc.yy"
     { (void) create_select_for_variable("warning_count"); }
     break;
 
   case 1741:
 
 /* Line 1455 of yacc.c  */
-#line 11556 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11562 "/home/buildbot/git/sql/sql_yacc.yy"
     { (void) create_select_for_variable("error_count"); }
     break;
 
   case 1742:
 
 /* Line 1455 of yacc.c  */
-#line 11558 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11564 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->sql_command = SQLCOM_SHOW_WARNS;}
     break;
 
   case 1743:
 
 /* Line 1455 of yacc.c  */
-#line 11560 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11566 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->sql_command = SQLCOM_SHOW_ERRORS;}
     break;
 
   case 1744:
 
 /* Line 1455 of yacc.c  */
-#line 11562 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11568 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->sql_command = SQLCOM_SHOW_PROFILES; }
     break;
 
   case 1745:
 
 /* Line 1455 of yacc.c  */
-#line 11564 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11570 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_PROFILE;
@@ -33245,7 +33251,7 @@ yyreduce:
   case 1746:
 
 /* Line 1455 of yacc.c  */
-#line 11571 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11577 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS;
@@ -33258,14 +33264,14 @@ yyreduce:
   case 1747:
 
 /* Line 1455 of yacc.c  */
-#line 11579 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11585 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
     break;
 
   case 1748:
 
 /* Line 1455 of yacc.c  */
-#line 11581 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11587 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_VARIABLES;
@@ -33278,7 +33284,7 @@ yyreduce:
   case 1749:
 
 /* Line 1455 of yacc.c  */
-#line 11589 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11595 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_CHARSETS;
@@ -33290,7 +33296,7 @@ yyreduce:
   case 1750:
 
 /* Line 1455 of yacc.c  */
-#line 11596 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11602 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_COLLATIONS;
@@ -33302,7 +33308,7 @@ yyreduce:
   case 1751:
 
 /* Line 1455 of yacc.c  */
-#line 11603 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11609 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_GRANTS;
@@ -33317,7 +33323,7 @@ yyreduce:
   case 1752:
 
 /* Line 1455 of yacc.c  */
-#line 11613 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11619 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_GRANTS;
@@ -33329,7 +33335,7 @@ yyreduce:
   case 1753:
 
 /* Line 1455 of yacc.c  */
-#line 11620 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11626 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command=SQLCOM_SHOW_CREATE_DB;
             Lex->create_info.options=(yyvsp[(3) - (4)].num);
@@ -33340,7 +33346,7 @@ yyreduce:
   case 1754:
 
 /* Line 1455 of yacc.c  */
-#line 11626 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11632 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -33353,7 +33359,7 @@ yyreduce:
   case 1755:
 
 /* Line 1455 of yacc.c  */
-#line 11634 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11640 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -33366,7 +33372,7 @@ yyreduce:
   case 1756:
 
 /* Line 1455 of yacc.c  */
-#line 11642 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11648 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_SHOW_MASTER_STAT;
           }
@@ -33375,7 +33381,7 @@ yyreduce:
   case 1757:
 
 /* Line 1455 of yacc.c  */
-#line 11646 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11652 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
           }
@@ -33384,7 +33390,7 @@ yyreduce:
   case 1758:
 
 /* Line 1455 of yacc.c  */
-#line 11650 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11656 "/home/buildbot/git/sql/sql_yacc.yy"
     {
            LEX *lex= Lex;
            lex->sql_command= SQLCOM_SHOW_CLIENT_STATS;
@@ -33396,7 +33402,7 @@ yyreduce:
   case 1759:
 
 /* Line 1455 of yacc.c  */
-#line 11657 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11663 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_USER_STATS;
@@ -33408,7 +33414,7 @@ yyreduce:
   case 1760:
 
 /* Line 1455 of yacc.c  */
-#line 11664 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11670 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TABLE_STATS;
@@ -33420,7 +33426,7 @@ yyreduce:
   case 1761:
 
 /* Line 1455 of yacc.c  */
-#line 11671 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11677 "/home/buildbot/git/sql/sql_yacc.yy"
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_INDEX_STATS;
@@ -33432,7 +33438,7 @@ yyreduce:
   case 1762:
 
 /* Line 1455 of yacc.c  */
-#line 11678 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11684 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -33444,7 +33450,7 @@ yyreduce:
   case 1763:
 
 /* Line 1455 of yacc.c  */
-#line 11685 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11691 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -33456,7 +33462,7 @@ yyreduce:
   case 1764:
 
 /* Line 1455 of yacc.c  */
-#line 11692 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11698 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
@@ -33467,7 +33473,7 @@ yyreduce:
   case 1765:
 
 /* Line 1455 of yacc.c  */
-#line 11698 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11704 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
@@ -33479,7 +33485,7 @@ yyreduce:
   case 1766:
 
 /* Line 1455 of yacc.c  */
-#line 11705 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11711 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
@@ -33491,7 +33497,7 @@ yyreduce:
   case 1767:
 
 /* Line 1455 of yacc.c  */
-#line 11712 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11718 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command= SQLCOM_SHOW_PROC_CODE;
             Lex->spname= (yyvsp[(3) - (3)].spname);
@@ -33501,7 +33507,7 @@ yyreduce:
   case 1768:
 
 /* Line 1455 of yacc.c  */
-#line 11717 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11723 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command= SQLCOM_SHOW_FUNC_CODE;
             Lex->spname= (yyvsp[(3) - (3)].spname);
@@ -33511,7 +33517,7 @@ yyreduce:
   case 1769:
 
 /* Line 1455 of yacc.c  */
-#line 11722 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11728 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->spname= (yyvsp[(3) - (3)].spname);
             Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
@@ -33521,84 +33527,84 @@ yyreduce:
   case 1770:
 
 /* Line 1455 of yacc.c  */
-#line 11730 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11736 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
     break;
 
   case 1771:
 
 /* Line 1455 of yacc.c  */
-#line 11732 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11738 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
     break;
 
   case 1772:
 
 /* Line 1455 of yacc.c  */
-#line 11734 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11740 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
     break;
 
   case 1777:
 
 /* Line 1455 of yacc.c  */
-#line 11748 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11754 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.simple_string)= 0; }
     break;
 
   case 1778:
 
 /* Line 1455 of yacc.c  */
-#line 11749 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11755 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.simple_string)= (yyvsp[(2) - (2)].lex_str).str; }
     break;
 
   case 1779:
 
 /* Line 1455 of yacc.c  */
-#line 11753 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11759 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->verbose=0; }
     break;
 
   case 1780:
 
 /* Line 1455 of yacc.c  */
-#line 11754 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11760 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->verbose=1; }
     break;
 
   case 1783:
 
 /* Line 1455 of yacc.c  */
-#line 11763 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11769 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->mi.log_file_name = 0; }
     break;
 
   case 1784:
 
 /* Line 1455 of yacc.c  */
-#line 11764 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11770 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->mi.log_file_name = (yyvsp[(2) - (2)].lex_str).str; }
     break;
 
   case 1785:
 
 /* Line 1455 of yacc.c  */
-#line 11768 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11774 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->mi.pos = 4; /* skip magic number */ }
     break;
 
   case 1786:
 
 /* Line 1455 of yacc.c  */
-#line 11769 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11775 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->mi.pos = (yyvsp[(2) - (2)].ulonglong_number); }
     break;
 
   case 1788:
 
 /* Line 1455 of yacc.c  */
-#line 11775 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11781 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->wild= new (thd->mem_root) String((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length,
                                                     system_charset_info);
@@ -33610,7 +33616,7 @@ yyreduce:
   case 1789:
 
 /* Line 1455 of yacc.c  */
-#line 11782 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11788 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->where= normalize_cond((yyvsp[(2) - (2)].item));
             if ((yyvsp[(2) - (2)].item))
@@ -33621,7 +33627,7 @@ yyreduce:
   case 1790:
 
 /* Line 1455 of yacc.c  */
-#line 11792 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11798 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             mysql_init_select(lex);
@@ -33637,7 +33643,7 @@ yyreduce:
   case 1791:
 
 /* Line 1455 of yacc.c  */
-#line 11803 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11809 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Select->parsing_place= NO_MATTER;
           }
@@ -33646,14 +33652,14 @@ yyreduce:
   case 1792:
 
 /* Line 1455 of yacc.c  */
-#line 11807 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11813 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->describe|= DESCRIBE_NORMAL; }
     break;
 
   case 1793:
 
 /* Line 1455 of yacc.c  */
-#line 11809 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11815 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->select_lex.options|= SELECT_DESCRIBE;
@@ -33663,42 +33669,42 @@ yyreduce:
   case 1796:
 
 /* Line 1455 of yacc.c  */
-#line 11821 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11827 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1797:
 
 /* Line 1455 of yacc.c  */
-#line 11822 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11828 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->describe|= DESCRIBE_EXTENDED; }
     break;
 
   case 1798:
 
 /* Line 1455 of yacc.c  */
-#line 11823 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11829 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->describe|= DESCRIBE_PARTITIONS; }
     break;
 
   case 1799:
 
 /* Line 1455 of yacc.c  */
-#line 11827 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11833 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1800:
 
 /* Line 1455 of yacc.c  */
-#line 11828 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11834 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->wild= (yyvsp[(1) - (1)].string); }
     break;
 
   case 1801:
 
 /* Line 1455 of yacc.c  */
-#line 11830 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11836 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[(1) - (1)].lex_str).str,
                                                     (yyvsp[(1) - (1)].lex_str).length,
@@ -33711,7 +33717,7 @@ yyreduce:
   case 1802:
 
 /* Line 1455 of yacc.c  */
-#line 11844 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11850 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_FLUSH;
@@ -33723,14 +33729,14 @@ yyreduce:
   case 1803:
 
 /* Line 1455 of yacc.c  */
-#line 11851 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11857 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1804:
 
 /* Line 1455 of yacc.c  */
-#line 11856 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11862 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->type|= REFRESH_TABLES;
             /*
@@ -33745,28 +33751,28 @@ yyreduce:
   case 1805:
 
 /* Line 1455 of yacc.c  */
-#line 11865 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11871 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1806:
 
 /* Line 1455 of yacc.c  */
-#line 11866 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11872 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1808:
 
 /* Line 1455 of yacc.c  */
-#line 11871 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11877 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1809:
 
 /* Line 1455 of yacc.c  */
-#line 11873 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11879 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             TABLE_LIST *tables= Lex->query_tables;
             Lex->type|= REFRESH_READ_LOCK | (yyvsp[(4) - (4)].num);
@@ -33782,91 +33788,91 @@ yyreduce:
   case 1811:
 
 /* Line 1455 of yacc.c  */
-#line 11888 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11894 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1812:
 
 /* Line 1455 of yacc.c  */
-#line 11893 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11899 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_ERROR_LOG; }
     break;
 
   case 1813:
 
 /* Line 1455 of yacc.c  */
-#line 11895 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11901 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_ENGINE_LOG; }
     break;
 
   case 1814:
 
 /* Line 1455 of yacc.c  */
-#line 11897 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11903 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_GENERAL_LOG; }
     break;
 
   case 1815:
 
 /* Line 1455 of yacc.c  */
-#line 11899 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11905 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_SLOW_LOG; }
     break;
 
   case 1816:
 
 /* Line 1455 of yacc.c  */
-#line 11901 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11907 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_BINARY_LOG; }
     break;
 
   case 1817:
 
 /* Line 1455 of yacc.c  */
-#line 11903 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11909 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_RELAY_LOG; }
     break;
 
   case 1818:
 
 /* Line 1455 of yacc.c  */
-#line 11905 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11911 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_QUERY_CACHE_FREE; }
     break;
 
   case 1819:
 
 /* Line 1455 of yacc.c  */
-#line 11907 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11913 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_HOSTS; }
     break;
 
   case 1820:
 
 /* Line 1455 of yacc.c  */
-#line 11909 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11915 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_GRANT; }
     break;
 
   case 1821:
 
 /* Line 1455 of yacc.c  */
-#line 11911 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11917 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_LOG; }
     break;
 
   case 1822:
 
 /* Line 1455 of yacc.c  */
-#line 11913 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11919 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_STATUS; }
     break;
 
   case 1823:
 
 /* Line 1455 of yacc.c  */
-#line 11915 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11921 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             Lex->type|= REFRESH_SLAVE;
             Lex->reset_slave_info.all= false;
@@ -33876,84 +33882,84 @@ yyreduce:
   case 1824:
 
 /* Line 1455 of yacc.c  */
-#line 11920 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11926 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_CLIENT_STATS; }
     break;
 
   case 1825:
 
 /* Line 1455 of yacc.c  */
-#line 11922 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11928 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_USER_STATS; }
     break;
 
   case 1826:
 
 /* Line 1455 of yacc.c  */
-#line 11924 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11930 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_TABLE_STATS; }
     break;
 
   case 1827:
 
 /* Line 1455 of yacc.c  */
-#line 11926 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11932 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_INDEX_STATS; }
     break;
 
   case 1828:
 
 /* Line 1455 of yacc.c  */
-#line 11928 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11934 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_MASTER; }
     break;
 
   case 1829:
 
 /* Line 1455 of yacc.c  */
-#line 11930 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11936 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_DES_KEY_FILE; }
     break;
 
   case 1830:
 
 /* Line 1455 of yacc.c  */
-#line 11932 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11938 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_USER_RESOURCES; }
     break;
 
   case 1831:
 
 /* Line 1455 of yacc.c  */
-#line 11936 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11942 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1832:
 
 /* Line 1455 of yacc.c  */
-#line 11937 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11943 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1833:
 
 /* Line 1455 of yacc.c  */
-#line 11941 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11947 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.num)= 0;}
     break;
 
   case 1834:
 
 /* Line 1455 of yacc.c  */
-#line 11942 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11948 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.num)= REFRESH_CHECKPOINT; }
     break;
 
   case 1835:
 
 /* Line 1455 of yacc.c  */
-#line 11946 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11952 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_RESET; lex->type=0;
@@ -33963,56 +33969,56 @@ yyreduce:
   case 1836:
 
 /* Line 1455 of yacc.c  */
-#line 11951 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11957 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1839:
 
 /* Line 1455 of yacc.c  */
-#line 11960 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11966 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_SLAVE; }
     break;
 
   case 1840:
 
 /* Line 1455 of yacc.c  */
-#line 11961 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11967 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 1841:
 
 /* Line 1455 of yacc.c  */
-#line 11962 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11968 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_MASTER; }
     break;
 
   case 1842:
 
 /* Line 1455 of yacc.c  */
-#line 11963 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11969 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->type|= REFRESH_QUERY_CACHE;}
     break;
 
   case 1843:
 
 /* Line 1455 of yacc.c  */
-#line 11967 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11973 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->reset_slave_info.all= false; }
     break;
 
   case 1844:
 
 /* Line 1455 of yacc.c  */
-#line 11968 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11974 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->reset_slave_info.all= true; }
     break;
 
   case 1845:
 
 /* Line 1455 of yacc.c  */
-#line 11973 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11979 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->type=0;
@@ -34023,14 +34029,14 @@ yyreduce:
   case 1846:
 
 /* Line 1455 of yacc.c  */
-#line 11979 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11985 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1848:
 
 /* Line 1455 of yacc.c  */
-#line 11988 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11994 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->to_log = (yyvsp[(2) - (2)].lex_str).str;
           }
@@ -34039,7 +34045,7 @@ yyreduce:
   case 1849:
 
 /* Line 1455 of yacc.c  */
-#line 11992 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 11998 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->value_list.empty();
@@ -34051,7 +34057,7 @@ yyreduce:
   case 1850:
 
 /* Line 1455 of yacc.c  */
-#line 12004 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12010 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->value_list.empty();
@@ -34063,7 +34069,7 @@ yyreduce:
   case 1851:
 
 /* Line 1455 of yacc.c  */
-#line 12011 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12017 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->kill_signal= (killed_state) ((yyvsp[(3) - (5)].num) | (yyvsp[(4) - (5)].num));
           }
@@ -34072,49 +34078,49 @@ yyreduce:
   case 1852:
 
 /* Line 1455 of yacc.c  */
-#line 12017 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12023 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (int) KILL_HARD_BIT; }
     break;
 
   case 1853:
 
 /* Line 1455 of yacc.c  */
-#line 12018 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12024 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (int) KILL_HARD_BIT; }
     break;
 
   case 1854:
 
 /* Line 1455 of yacc.c  */
-#line 12019 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12025 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 1855:
 
 /* Line 1455 of yacc.c  */
-#line 12022 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12028 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (int) KILL_CONNECTION; }
     break;
 
   case 1856:
 
 /* Line 1455 of yacc.c  */
-#line 12023 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12029 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (int) KILL_CONNECTION; }
     break;
 
   case 1857:
 
 /* Line 1455 of yacc.c  */
-#line 12024 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12030 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= (int) KILL_QUERY; }
     break;
 
   case 1858:
 
 /* Line 1455 of yacc.c  */
-#line 12029 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12035 "/home/buildbot/git/sql/sql_yacc.yy"
     {
           Lex->value_list.push_front((yyval.item));
           Lex->kill_type= KILL_TYPE_ID;
@@ -34124,7 +34130,7 @@ yyreduce:
   case 1859:
 
 /* Line 1455 of yacc.c  */
-#line 12034 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12040 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->users_list.push_back((yyvsp[(2) - (2)].lex_user));
             Lex->kill_type= KILL_TYPE_USER;
@@ -34134,7 +34140,7 @@ yyreduce:
   case 1860:
 
 /* Line 1455 of yacc.c  */
-#line 12044 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12050 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_CHANGE_DB;
@@ -34145,7 +34151,7 @@ yyreduce:
   case 1861:
 
 /* Line 1455 of yacc.c  */
-#line 12055 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12061 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
 
@@ -34161,7 +34167,7 @@ yyreduce:
   case 1862:
 
 /* Line 1455 of yacc.c  */
-#line 12066 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12072 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_LOAD;
@@ -34176,7 +34182,7 @@ yyreduce:
   case 1863:
 
 /* Line 1455 of yacc.c  */
-#line 12076 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12082 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (!Select->add_table_to_list(thd, (yyvsp[(12) - (12)].table), NULL, TL_OPTION_UPDATING,
@@ -34191,56 +34197,56 @@ yyreduce:
   case 1864:
 
 /* Line 1455 of yacc.c  */
-#line 12086 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12092 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->exchange->cs= (yyvsp[(14) - (14)].charset); }
     break;
 
   case 1865:
 
 /* Line 1455 of yacc.c  */
-#line 12090 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12096 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1866:
 
 /* Line 1455 of yacc.c  */
-#line 12094 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12100 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.filetype)= FILETYPE_CSV; }
     break;
 
   case 1867:
 
 /* Line 1455 of yacc.c  */
-#line 12095 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12101 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.filetype)= FILETYPE_XML; }
     break;
 
   case 1868:
 
 /* Line 1455 of yacc.c  */
-#line 12099 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12105 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=0;}
     break;
 
   case 1869:
 
 /* Line 1455 of yacc.c  */
-#line 12100 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12106 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=1;}
     break;
 
   case 1870:
 
 /* Line 1455 of yacc.c  */
-#line 12104 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12110 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lock_type)= TL_WRITE_DEFAULT; }
     break;
 
   case 1871:
 
 /* Line 1455 of yacc.c  */
-#line 12106 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12112 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               Ignore this option in SP to avoid problem with query cache and
@@ -34253,35 +34259,35 @@ yyreduce:
   case 1872:
 
 /* Line 1455 of yacc.c  */
-#line 12113 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12119 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
     break;
 
   case 1873:
 
 /* Line 1455 of yacc.c  */
-#line 12117 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12123 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->duplicates=DUP_ERROR; }
     break;
 
   case 1874:
 
 /* Line 1455 of yacc.c  */
-#line 12118 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12124 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->duplicates=DUP_REPLACE; }
     break;
 
   case 1875:
 
 /* Line 1455 of yacc.c  */
-#line 12119 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12125 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ignore= 1; }
     break;
 
   case 1880:
 
 /* Line 1455 of yacc.c  */
-#line 12134 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12140 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->field_term= (yyvsp[(3) - (3)].string);
@@ -34291,7 +34297,7 @@ yyreduce:
   case 1881:
 
 /* Line 1455 of yacc.c  */
-#line 12139 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12145 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             DBUG_ASSERT(lex->exchange != 0);
@@ -34303,7 +34309,7 @@ yyreduce:
   case 1882:
 
 /* Line 1455 of yacc.c  */
-#line 12146 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12152 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->enclosed= (yyvsp[(3) - (3)].string);
@@ -34313,7 +34319,7 @@ yyreduce:
   case 1883:
 
 /* Line 1455 of yacc.c  */
-#line 12151 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12157 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->escaped= (yyvsp[(3) - (3)].string);
@@ -34323,7 +34329,7 @@ yyreduce:
   case 1888:
 
 /* Line 1455 of yacc.c  */
-#line 12169 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12175 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->line_term= (yyvsp[(3) - (3)].string);
@@ -34333,7 +34339,7 @@ yyreduce:
   case 1889:
 
 /* Line 1455 of yacc.c  */
-#line 12174 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12180 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->line_start= (yyvsp[(3) - (3)].string);
@@ -34343,21 +34349,21 @@ yyreduce:
   case 1890:
 
 /* Line 1455 of yacc.c  */
-#line 12181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12187 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 1891:
 
 /* Line 1455 of yacc.c  */
-#line 12183 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12189 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->exchange->line_term = (yyvsp[(4) - (4)].string); }
     break;
 
   case 1893:
 
 /* Line 1455 of yacc.c  */
-#line 12188 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12194 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->skip_lines= atol((yyvsp[(2) - (3)].lex_str).str);
@@ -34367,63 +34373,63 @@ yyreduce:
   case 1894:
 
 /* Line 1455 of yacc.c  */
-#line 12195 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12201 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 1895:
 
 /* Line 1455 of yacc.c  */
-#line 12197 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12203 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 1896:
 
 /* Line 1455 of yacc.c  */
-#line 12201 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12207 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1897:
 
 /* Line 1455 of yacc.c  */
-#line 12202 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12208 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1898:
 
 /* Line 1455 of yacc.c  */
-#line 12203 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12209 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1899:
 
 /* Line 1455 of yacc.c  */
-#line 12208 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12214 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->field_list.push_back((yyvsp[(3) - (3)].item)); }
     break;
 
   case 1900:
 
 /* Line 1455 of yacc.c  */
-#line 12210 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12216 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->field_list.push_back((yyvsp[(1) - (1)].item)); }
     break;
 
   case 1901:
 
 /* Line 1455 of yacc.c  */
-#line 12214 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12220 "/home/buildbot/git/sql/sql_yacc.yy"
     {(yyval.item)= (yyvsp[(1) - (1)].item);}
     break;
 
   case 1902:
 
 /* Line 1455 of yacc.c  */
-#line 12216 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12222 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_user_var_as_out_param((yyvsp[(2) - (2)].lex_str));
             if ((yyval.item) == NULL)
@@ -34434,21 +34440,21 @@ yyreduce:
   case 1903:
 
 /* Line 1455 of yacc.c  */
-#line 12224 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12230 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1904:
 
 /* Line 1455 of yacc.c  */
-#line 12225 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12231 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1907:
 
 /* Line 1455 of yacc.c  */
-#line 12235 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12241 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->update_list.push_back((yyvsp[(1) - (5)].item)) || 
@@ -34461,7 +34467,7 @@ yyreduce:
   case 1908:
 
 /* Line 1455 of yacc.c  */
-#line 12248 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12254 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX_STRING tmp;
             CHARSET_INFO *cs_con= thd->variables.collation_connection;
@@ -34489,7 +34495,7 @@ yyreduce:
   case 1909:
 
 /* Line 1455 of yacc.c  */
-#line 12271 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12277 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             uint repertoire= Lex->text_string_is_7bit ?
                              MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30;
@@ -34506,7 +34512,7 @@ yyreduce:
   case 1910:
 
 /* Line 1455 of yacc.c  */
-#line 12283 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12289 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item_string *str= new (thd->mem_root) Item_string((yyvsp[(2) - (2)].lex_str).str,
                                                                 (yyvsp[(2) - (2)].lex_str).length, (yyvsp[(1) - (2)].charset));
@@ -34522,7 +34528,7 @@ yyreduce:
   case 1911:
 
 /* Line 1455 of yacc.c  */
-#line 12294 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12300 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item_string* item= (Item_string*) (yyvsp[(1) - (2)].item);
             item->append((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length);
@@ -34543,7 +34549,7 @@ yyreduce:
   case 1912:
 
 /* Line 1455 of yacc.c  */
-#line 12313 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12319 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.string)= new (thd->mem_root) String((yyvsp[(1) - (1)].lex_str).str,
                                              (yyvsp[(1) - (1)].lex_str).length,
@@ -34556,7 +34562,7 @@ yyreduce:
   case 1913:
 
 /* Line 1455 of yacc.c  */
-#line 12321 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12327 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *tmp= new (thd->mem_root) Item_hex_hybrid((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if (tmp == NULL)
@@ -34573,7 +34579,7 @@ yyreduce:
   case 1914:
 
 /* Line 1455 of yacc.c  */
-#line 12333 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12339 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *tmp= new (thd->mem_root) Item_hex_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if (tmp == NULL)
@@ -34586,7 +34592,7 @@ yyreduce:
   case 1915:
 
 /* Line 1455 of yacc.c  */
-#line 12341 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12347 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *tmp= new (thd->mem_root) Item_bin_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if (tmp == NULL)
@@ -34603,7 +34609,7 @@ yyreduce:
   case 1916:
 
 /* Line 1455 of yacc.c  */
-#line 12356 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12362 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -34625,21 +34631,21 @@ yyreduce:
   case 1917:
 
 /* Line 1455 of yacc.c  */
-#line 12375 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12381 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item) = (yyvsp[(1) - (1)].item); }
     break;
 
   case 1918:
 
 /* Line 1455 of yacc.c  */
-#line 12376 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12382 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item) = (yyvsp[(2) - (2)].item_num); }
     break;
 
   case 1919:
 
 /* Line 1455 of yacc.c  */
-#line 12378 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12384 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyvsp[(2) - (2)].item_num)->max_length++;
             (yyval.item)= (yyvsp[(2) - (2)].item_num)->neg();
@@ -34649,21 +34655,21 @@ yyreduce:
   case 1920:
 
 /* Line 1455 of yacc.c  */
-#line 12385 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12391 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item) = (yyvsp[(1) - (1)].item); }
     break;
 
   case 1921:
 
 /* Line 1455 of yacc.c  */
-#line 12386 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12392 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item) = (yyvsp[(1) - (1)].item_num); }
     break;
 
   case 1922:
 
 /* Line 1455 of yacc.c  */
-#line 12388 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12394 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item) = new (thd->mem_root) Item_null();
             if ((yyval.item) == NULL)
@@ -34675,7 +34681,7 @@ yyreduce:
   case 1923:
 
 /* Line 1455 of yacc.c  */
-#line 12395 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12401 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_int((char*) "FALSE",0,1);
             if ((yyval.item) == NULL)
@@ -34686,7 +34692,7 @@ yyreduce:
   case 1924:
 
 /* Line 1455 of yacc.c  */
-#line 12401 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12407 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_int((char*) "TRUE",1,1);
             if ((yyval.item) == NULL)
@@ -34697,7 +34703,7 @@ yyreduce:
   case 1925:
 
 /* Line 1455 of yacc.c  */
-#line 12407 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12413 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item) = new (thd->mem_root) Item_hex_hybrid((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if ((yyval.item) == NULL)
@@ -34708,7 +34714,7 @@ yyreduce:
   case 1926:
 
 /* Line 1455 of yacc.c  */
-#line 12413 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12419 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item) = new (thd->mem_root) Item_hex_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if ((yyval.item) == NULL)
@@ -34719,7 +34725,7 @@ yyreduce:
   case 1927:
 
 /* Line 1455 of yacc.c  */
-#line 12419 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12425 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)= new (thd->mem_root) Item_bin_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if ((yyval.item) == NULL)
@@ -34730,7 +34736,7 @@ yyreduce:
   case 1928:
 
 /* Line 1455 of yacc.c  */
-#line 12425 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12431 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *tmp= new (thd->mem_root) Item_hex_string((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length);
             if (tmp == NULL)
@@ -34764,7 +34770,7 @@ yyreduce:
   case 1929:
 
 /* Line 1455 of yacc.c  */
-#line 12454 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12460 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item *tmp= new (thd->mem_root) Item_bin_string((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length);
             if (tmp == NULL)
@@ -34797,28 +34803,28 @@ yyreduce:
   case 1930:
 
 /* Line 1455 of yacc.c  */
-#line 12481 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12487 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item) = (yyvsp[(2) - (2)].item); }
     break;
 
   case 1931:
 
 /* Line 1455 of yacc.c  */
-#line 12482 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12488 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item) = (yyvsp[(2) - (2)].item); }
     break;
 
   case 1932:
 
 /* Line 1455 of yacc.c  */
-#line 12483 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12489 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item) = (yyvsp[(2) - (2)].item); }
     break;
 
   case 1933:
 
 /* Line 1455 of yacc.c  */
-#line 12488 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12494 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             int error;
             (yyval.item_num)= new (thd->mem_root)
@@ -34833,7 +34839,7 @@ yyreduce:
   case 1934:
 
 /* Line 1455 of yacc.c  */
-#line 12498 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12504 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             int error;
             (yyval.item_num)= new (thd->mem_root)
@@ -34848,7 +34854,7 @@ yyreduce:
   case 1935:
 
 /* Line 1455 of yacc.c  */
-#line 12508 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12514 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item_num)= new (thd->mem_root) Item_uint((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if ((yyval.item_num) == NULL)
@@ -34859,7 +34865,7 @@ yyreduce:
   case 1936:
 
 /* Line 1455 of yacc.c  */
-#line 12514 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12520 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item_num)= new (thd->mem_root) Item_decimal((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length,
                                                    thd->charset());
@@ -34873,7 +34879,7 @@ yyreduce:
   case 1937:
 
 /* Line 1455 of yacc.c  */
-#line 12523 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12529 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item_num)= new (thd->mem_root) Item_float((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length);
             if (((yyval.item_num) == NULL) || (thd->is_error()))
@@ -34886,21 +34892,21 @@ yyreduce:
   case 1938:
 
 /* Line 1455 of yacc.c  */
-#line 12537 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12543 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)=(yyvsp[(1) - (1)].item); }
     break;
 
   case 1939:
 
 /* Line 1455 of yacc.c  */
-#line 12538 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12544 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)=(yyvsp[(1) - (1)].item); }
     break;
 
   case 1940:
 
 /* Line 1455 of yacc.c  */
-#line 12543 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12549 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             (yyval.item)= new (thd->mem_root) Item_field(Lex->current_context(),
@@ -34914,7 +34920,7 @@ yyreduce:
   case 1941:
 
 /* Line 1455 of yacc.c  */
-#line 12552 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12558 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel= Select;
             const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ?
@@ -34931,14 +34937,14 @@ yyreduce:
   case 1942:
 
 /* Line 1455 of yacc.c  */
-#line 12566 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12572 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)=(yyvsp[(1) - (1)].item); }
     break;
 
   case 1943:
 
 /* Line 1455 of yacc.c  */
-#line 12571 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12577 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -34989,14 +34995,14 @@ yyreduce:
   case 1944:
 
 /* Line 1455 of yacc.c  */
-#line 12616 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12622 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= (yyvsp[(1) - (1)].item); }
     break;
 
   case 1945:
 
 /* Line 1455 of yacc.c  */
-#line 12621 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12627 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             SELECT_LEX *sel=Select;
             if ((sel->parsing_place != IN_HAVING) ||
@@ -35018,14 +35024,14 @@ yyreduce:
   case 1946:
 
 /* Line 1455 of yacc.c  */
-#line 12637 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12643 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)= (yyvsp[(1) - (1)].item); }
     break;
 
   case 1947:
 
 /* Line 1455 of yacc.c  */
-#line 12642 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12648 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
 
@@ -35108,7 +35114,7 @@ yyreduce:
   case 1948:
 
 /* Line 1455 of yacc.c  */
-#line 12720 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12726 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             SELECT_LEX *sel= lex->current_select;
@@ -35137,7 +35143,7 @@ yyreduce:
   case 1949:
 
 /* Line 1455 of yacc.c  */
-#line 12744 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12750 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             SELECT_LEX *sel= lex->current_select;
@@ -35169,14 +35175,14 @@ yyreduce:
   case 1950:
 
 /* Line 1455 of yacc.c  */
-#line 12773 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12779 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);}
     break;
 
   case 1951:
 
 /* Line 1455 of yacc.c  */
-#line 12775 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12781 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             TABLE_LIST *table= Select->table_list.first;
             if (my_strcasecmp(table_alias_charset, (yyvsp[(1) - (5)].lex_str).str, table->db))
@@ -35197,7 +35203,7 @@ yyreduce:
   case 1952:
 
 /* Line 1455 of yacc.c  */
-#line 12791 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12797 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             TABLE_LIST *table= Select->table_list.first;
             if (my_strcasecmp(table_alias_charset, (yyvsp[(1) - (3)].lex_str).str, table->alias))
@@ -35212,14 +35218,14 @@ yyreduce:
   case 1953:
 
 /* Line 1455 of yacc.c  */
-#line 12800 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12806 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(2) - (2)].lex_str);}
     break;
 
   case 1954:
 
 /* Line 1455 of yacc.c  */
-#line 12805 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12811 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.table)= new Table_ident((yyvsp[(1) - (1)].lex_str));
             if ((yyval.table) == NULL)
@@ -35230,7 +35236,7 @@ yyreduce:
   case 1955:
 
 /* Line 1455 of yacc.c  */
-#line 12811 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12817 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.table)= new Table_ident(thd, (yyvsp[(1) - (3)].lex_str),(yyvsp[(3) - (3)].lex_str),0);
             if ((yyval.table) == NULL)
@@ -35241,7 +35247,7 @@ yyreduce:
   case 1956:
 
 /* Line 1455 of yacc.c  */
-#line 12817 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12823 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /* For Delphi */
             (yyval.table)= new Table_ident((yyvsp[(2) - (2)].lex_str));
@@ -35253,7 +35259,7 @@ yyreduce:
   case 1957:
 
 /* Line 1455 of yacc.c  */
-#line 12827 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12833 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.table)= new Table_ident((yyvsp[(1) - (2)].lex_str));
             if ((yyval.table) == NULL)
@@ -35264,7 +35270,7 @@ yyreduce:
   case 1958:
 
 /* Line 1455 of yacc.c  */
-#line 12833 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12839 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.table)= new Table_ident(thd, (yyvsp[(1) - (4)].lex_str),(yyvsp[(3) - (4)].lex_str),0);
             if ((yyval.table) == NULL)
@@ -35275,7 +35281,7 @@ yyreduce:
   case 1959:
 
 /* Line 1455 of yacc.c  */
-#line 12842 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12848 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX_STRING db={(char*) any_db,3};
             (yyval.table)= new Table_ident(thd, db,(yyvsp[(1) - (1)].lex_str),0);
@@ -35287,14 +35293,14 @@ yyreduce:
   case 1960:
 
 /* Line 1455 of yacc.c  */
-#line 12851 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12857 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 1961:
 
 /* Line 1455 of yacc.c  */
-#line 12853 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12859 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (thd->charset_is_system_charset)
             {
@@ -35324,7 +35330,7 @@ yyreduce:
   case 1962:
 
 /* Line 1455 of yacc.c  */
-#line 12881 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12887 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (thd->charset_is_system_charset)
               (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str);
@@ -35340,7 +35346,7 @@ yyreduce:
   case 1963:
 
 /* Line 1455 of yacc.c  */
-#line 12895 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12901 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (thd->charset_is_collation_connection)
               (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str);
@@ -35356,7 +35362,7 @@ yyreduce:
   case 1964:
 
 /* Line 1455 of yacc.c  */
-#line 12909 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12915 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (thd->charset_is_character_set_filesystem)
               (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str);
@@ -35373,14 +35379,14 @@ yyreduce:
   case 1965:
 
 /* Line 1455 of yacc.c  */
-#line 12923 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12929 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 1966:
 
 /* Line 1455 of yacc.c  */
-#line 12925 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12931 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.lex_str).str= thd->strmake((yyvsp[(1) - (1)].symbol).str, (yyvsp[(1) - (1)].symbol).length);
             if ((yyval.lex_str).str == NULL)
@@ -35392,14 +35398,14 @@ yyreduce:
   case 1967:
 
 /* Line 1455 of yacc.c  */
-#line 12934 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12940 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str); }
     break;
 
   case 1968:
 
 /* Line 1455 of yacc.c  */
-#line 12936 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12942 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.lex_str).str= thd->strmake((yyvsp[(1) - (1)].symbol).str, (yyvsp[(1) - (1)].symbol).length);
             if ((yyval.lex_str).str == NULL)
@@ -35411,28 +35417,28 @@ yyreduce:
   case 1969:
 
 /* Line 1455 of yacc.c  */
-#line 12945 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12951 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);}
     break;
 
   case 1970:
 
 /* Line 1455 of yacc.c  */
-#line 12946 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12952 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);}
     break;
 
   case 1971:
 
 /* Line 1455 of yacc.c  */
-#line 12947 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12953 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);}
     break;
 
   case 1972:
 
 /* Line 1455 of yacc.c  */
-#line 12952 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12958 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
               MYSQL_YYABORT;
@@ -35453,7 +35459,7 @@ yyreduce:
   case 1973:
 
 /* Line 1455 of yacc.c  */
-#line 12968 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12974 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
               MYSQL_YYABORT;
@@ -35479,7 +35485,7 @@ yyreduce:
   case 1974:
 
 /* Line 1455 of yacc.c  */
-#line 12989 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 12995 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
               MYSQL_YYABORT;
@@ -35495,2471 +35501,2471 @@ yyreduce:
   case 1975:
 
 /* Line 1455 of yacc.c  */
-#line 13003 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13009 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1976:
 
 /* Line 1455 of yacc.c  */
-#line 13004 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13010 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1977:
 
 /* Line 1455 of yacc.c  */
-#line 13005 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13011 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1978:
 
 /* Line 1455 of yacc.c  */
-#line 13006 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13012 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1979:
 
 /* Line 1455 of yacc.c  */
-#line 13007 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13013 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1980:
 
 /* Line 1455 of yacc.c  */
-#line 13008 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13014 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1981:
 
 /* Line 1455 of yacc.c  */
-#line 13009 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13015 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1982:
 
 /* Line 1455 of yacc.c  */
-#line 13010 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13016 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1983:
 
 /* Line 1455 of yacc.c  */
-#line 13011 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13017 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1984:
 
 /* Line 1455 of yacc.c  */
-#line 13012 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13018 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1985:
 
 /* Line 1455 of yacc.c  */
-#line 13013 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13019 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1986:
 
 /* Line 1455 of yacc.c  */
-#line 13014 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13020 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1987:
 
 /* Line 1455 of yacc.c  */
-#line 13015 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13021 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1988:
 
 /* Line 1455 of yacc.c  */
-#line 13016 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13022 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1989:
 
 /* Line 1455 of yacc.c  */
-#line 13017 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13023 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1990:
 
 /* Line 1455 of yacc.c  */
-#line 13018 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13024 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1991:
 
 /* Line 1455 of yacc.c  */
-#line 13019 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13025 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1992:
 
 /* Line 1455 of yacc.c  */
-#line 13020 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13026 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1993:
 
 /* Line 1455 of yacc.c  */
-#line 13021 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13027 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1994:
 
 /* Line 1455 of yacc.c  */
-#line 13022 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13028 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1995:
 
 /* Line 1455 of yacc.c  */
-#line 13023 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13029 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1996:
 
 /* Line 1455 of yacc.c  */
-#line 13024 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13030 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1997:
 
 /* Line 1455 of yacc.c  */
-#line 13025 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13031 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1998:
 
 /* Line 1455 of yacc.c  */
-#line 13026 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13032 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 1999:
 
 /* Line 1455 of yacc.c  */
-#line 13027 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13033 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2000:
 
 /* Line 1455 of yacc.c  */
-#line 13028 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13034 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2001:
 
 /* Line 1455 of yacc.c  */
-#line 13029 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13035 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2002:
 
 /* Line 1455 of yacc.c  */
-#line 13030 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13036 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2003:
 
 /* Line 1455 of yacc.c  */
-#line 13031 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13037 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2004:
 
 /* Line 1455 of yacc.c  */
-#line 13032 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13038 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2005:
 
 /* Line 1455 of yacc.c  */
-#line 13033 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13039 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2006:
 
 /* Line 1455 of yacc.c  */
-#line 13034 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13040 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2007:
 
 /* Line 1455 of yacc.c  */
-#line 13035 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13041 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2008:
 
 /* Line 1455 of yacc.c  */
-#line 13036 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13042 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2009:
 
 /* Line 1455 of yacc.c  */
-#line 13037 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13043 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2010:
 
 /* Line 1455 of yacc.c  */
-#line 13038 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13044 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2011:
 
 /* Line 1455 of yacc.c  */
-#line 13039 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13045 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2012:
 
 /* Line 1455 of yacc.c  */
-#line 13040 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13046 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2013:
 
 /* Line 1455 of yacc.c  */
-#line 13041 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13047 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2014:
 
 /* Line 1455 of yacc.c  */
-#line 13042 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13048 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2015:
 
 /* Line 1455 of yacc.c  */
-#line 13043 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13049 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2016:
 
 /* Line 1455 of yacc.c  */
-#line 13044 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13050 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2017:
 
 /* Line 1455 of yacc.c  */
-#line 13045 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13051 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2018:
 
 /* Line 1455 of yacc.c  */
-#line 13046 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13052 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2019:
 
 /* Line 1455 of yacc.c  */
-#line 13047 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13053 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2020:
 
 /* Line 1455 of yacc.c  */
-#line 13048 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13054 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2021:
 
 /* Line 1455 of yacc.c  */
-#line 13049 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13055 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2022:
 
 /* Line 1455 of yacc.c  */
-#line 13050 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13056 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2023:
 
 /* Line 1455 of yacc.c  */
-#line 13051 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13057 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2024:
 
 /* Line 1455 of yacc.c  */
-#line 13052 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13058 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2025:
 
 /* Line 1455 of yacc.c  */
-#line 13053 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13059 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2026:
 
 /* Line 1455 of yacc.c  */
-#line 13054 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13060 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2027:
 
 /* Line 1455 of yacc.c  */
-#line 13055 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13061 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2028:
 
 /* Line 1455 of yacc.c  */
-#line 13056 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13062 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2029:
 
 /* Line 1455 of yacc.c  */
-#line 13057 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13063 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2030:
 
 /* Line 1455 of yacc.c  */
-#line 13058 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13064 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2031:
 
 /* Line 1455 of yacc.c  */
-#line 13059 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13065 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2032:
 
 /* Line 1455 of yacc.c  */
-#line 13060 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13066 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2033:
 
 /* Line 1455 of yacc.c  */
-#line 13061 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13067 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2034:
 
 /* Line 1455 of yacc.c  */
-#line 13071 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13077 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2035:
 
 /* Line 1455 of yacc.c  */
-#line 13072 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13078 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2036:
 
 /* Line 1455 of yacc.c  */
-#line 13073 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13079 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2037:
 
 /* Line 1455 of yacc.c  */
-#line 13074 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13080 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2038:
 
 /* Line 1455 of yacc.c  */
-#line 13075 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13081 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2039:
 
 /* Line 1455 of yacc.c  */
-#line 13076 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13082 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2040:
 
 /* Line 1455 of yacc.c  */
-#line 13077 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13083 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2041:
 
 /* Line 1455 of yacc.c  */
-#line 13078 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13084 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2042:
 
 /* Line 1455 of yacc.c  */
-#line 13079 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13085 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2043:
 
 /* Line 1455 of yacc.c  */
-#line 13080 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13086 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2044:
 
 /* Line 1455 of yacc.c  */
-#line 13081 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13087 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2045:
 
 /* Line 1455 of yacc.c  */
-#line 13082 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13088 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2046:
 
 /* Line 1455 of yacc.c  */
-#line 13083 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13089 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2047:
 
 /* Line 1455 of yacc.c  */
-#line 13084 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13090 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2048:
 
 /* Line 1455 of yacc.c  */
-#line 13085 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13091 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2049:
 
 /* Line 1455 of yacc.c  */
-#line 13086 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13092 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2050:
 
 /* Line 1455 of yacc.c  */
-#line 13087 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13093 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2051:
 
 /* Line 1455 of yacc.c  */
-#line 13088 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13094 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2052:
 
 /* Line 1455 of yacc.c  */
-#line 13089 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13095 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2053:
 
 /* Line 1455 of yacc.c  */
-#line 13090 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13096 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2054:
 
 /* Line 1455 of yacc.c  */
-#line 13091 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13097 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2055:
 
 /* Line 1455 of yacc.c  */
-#line 13092 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13098 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2056:
 
 /* Line 1455 of yacc.c  */
-#line 13093 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13099 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2057:
 
 /* Line 1455 of yacc.c  */
-#line 13094 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13100 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2058:
 
 /* Line 1455 of yacc.c  */
-#line 13095 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13101 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2059:
 
 /* Line 1455 of yacc.c  */
-#line 13096 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13102 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2060:
 
 /* Line 1455 of yacc.c  */
-#line 13097 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13103 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2061:
 
 /* Line 1455 of yacc.c  */
-#line 13098 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13104 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2062:
 
 /* Line 1455 of yacc.c  */
-#line 13099 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13105 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2063:
 
 /* Line 1455 of yacc.c  */
-#line 13100 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13106 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2064:
 
 /* Line 1455 of yacc.c  */
-#line 13101 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13107 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2065:
 
 /* Line 1455 of yacc.c  */
-#line 13102 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13108 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2066:
 
 /* Line 1455 of yacc.c  */
-#line 13103 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13109 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2067:
 
 /* Line 1455 of yacc.c  */
-#line 13104 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13110 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2068:
 
 /* Line 1455 of yacc.c  */
-#line 13105 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13111 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2069:
 
 /* Line 1455 of yacc.c  */
-#line 13106 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13112 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2070:
 
 /* Line 1455 of yacc.c  */
-#line 13107 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13113 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2071:
 
 /* Line 1455 of yacc.c  */
-#line 13108 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13114 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2072:
 
 /* Line 1455 of yacc.c  */
-#line 13109 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13115 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2073:
 
 /* Line 1455 of yacc.c  */
-#line 13110 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13116 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2074:
 
 /* Line 1455 of yacc.c  */
-#line 13111 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13117 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2075:
 
 /* Line 1455 of yacc.c  */
-#line 13112 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13118 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2076:
 
 /* Line 1455 of yacc.c  */
-#line 13113 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13119 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2077:
 
 /* Line 1455 of yacc.c  */
-#line 13114 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13120 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2078:
 
 /* Line 1455 of yacc.c  */
-#line 13115 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13121 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2079:
 
 /* Line 1455 of yacc.c  */
-#line 13116 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13122 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2080:
 
 /* Line 1455 of yacc.c  */
-#line 13117 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13123 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2081:
 
 /* Line 1455 of yacc.c  */
-#line 13118 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13124 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2082:
 
 /* Line 1455 of yacc.c  */
-#line 13119 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13125 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2083:
 
 /* Line 1455 of yacc.c  */
-#line 13120 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13126 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2084:
 
 /* Line 1455 of yacc.c  */
-#line 13121 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13127 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2085:
 
 /* Line 1455 of yacc.c  */
-#line 13122 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13128 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2086:
 
 /* Line 1455 of yacc.c  */
-#line 13123 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13129 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2087:
 
 /* Line 1455 of yacc.c  */
-#line 13124 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13130 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2088:
 
 /* Line 1455 of yacc.c  */
-#line 13125 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13131 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2089:
 
 /* Line 1455 of yacc.c  */
-#line 13126 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13132 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2090:
 
 /* Line 1455 of yacc.c  */
-#line 13127 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13133 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2091:
 
 /* Line 1455 of yacc.c  */
-#line 13128 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13134 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2092:
 
 /* Line 1455 of yacc.c  */
-#line 13129 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13135 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2093:
 
 /* Line 1455 of yacc.c  */
-#line 13130 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13136 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2094:
 
 /* Line 1455 of yacc.c  */
-#line 13131 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13137 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2095:
 
 /* Line 1455 of yacc.c  */
-#line 13132 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13138 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2096:
 
 /* Line 1455 of yacc.c  */
-#line 13133 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13139 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2097:
 
 /* Line 1455 of yacc.c  */
-#line 13134 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13140 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2098:
 
 /* Line 1455 of yacc.c  */
-#line 13135 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13141 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2099:
 
 /* Line 1455 of yacc.c  */
-#line 13136 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13142 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2100:
 
 /* Line 1455 of yacc.c  */
-#line 13137 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13143 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2101:
 
 /* Line 1455 of yacc.c  */
-#line 13138 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13144 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2102:
 
 /* Line 1455 of yacc.c  */
-#line 13139 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13145 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2103:
 
 /* Line 1455 of yacc.c  */
-#line 13140 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13146 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2104:
 
 /* Line 1455 of yacc.c  */
-#line 13141 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13147 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2105:
 
 /* Line 1455 of yacc.c  */
-#line 13142 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13148 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2106:
 
 /* Line 1455 of yacc.c  */
-#line 13143 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13149 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2107:
 
 /* Line 1455 of yacc.c  */
-#line 13144 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13150 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2108:
 
 /* Line 1455 of yacc.c  */
-#line 13145 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13151 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2109:
 
 /* Line 1455 of yacc.c  */
-#line 13146 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13152 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2110:
 
 /* Line 1455 of yacc.c  */
-#line 13147 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13153 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2111:
 
 /* Line 1455 of yacc.c  */
-#line 13148 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13154 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2112:
 
 /* Line 1455 of yacc.c  */
-#line 13149 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13155 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2113:
 
 /* Line 1455 of yacc.c  */
-#line 13150 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13156 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2114:
 
 /* Line 1455 of yacc.c  */
-#line 13151 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13157 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2115:
 
 /* Line 1455 of yacc.c  */
-#line 13152 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13158 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2116:
 
 /* Line 1455 of yacc.c  */
-#line 13153 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13159 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2117:
 
 /* Line 1455 of yacc.c  */
-#line 13154 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13160 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2118:
 
 /* Line 1455 of yacc.c  */
-#line 13155 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13161 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2119:
 
 /* Line 1455 of yacc.c  */
-#line 13156 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13162 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2120:
 
 /* Line 1455 of yacc.c  */
-#line 13157 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13163 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2121:
 
 /* Line 1455 of yacc.c  */
-#line 13158 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13164 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2122:
 
 /* Line 1455 of yacc.c  */
-#line 13159 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13165 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2123:
 
 /* Line 1455 of yacc.c  */
-#line 13160 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13166 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2124:
 
 /* Line 1455 of yacc.c  */
-#line 13161 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13167 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2125:
 
 /* Line 1455 of yacc.c  */
-#line 13162 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13168 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2126:
 
 /* Line 1455 of yacc.c  */
-#line 13163 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13169 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2127:
 
 /* Line 1455 of yacc.c  */
-#line 13164 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13170 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2128:
 
 /* Line 1455 of yacc.c  */
-#line 13165 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13171 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2129:
 
 /* Line 1455 of yacc.c  */
-#line 13166 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13172 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2130:
 
 /* Line 1455 of yacc.c  */
-#line 13167 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13173 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2131:
 
 /* Line 1455 of yacc.c  */
-#line 13168 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13174 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2132:
 
 /* Line 1455 of yacc.c  */
-#line 13169 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13175 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2133:
 
 /* Line 1455 of yacc.c  */
-#line 13170 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13176 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2134:
 
 /* Line 1455 of yacc.c  */
-#line 13171 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13177 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2135:
 
 /* Line 1455 of yacc.c  */
-#line 13172 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13178 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2136:
 
 /* Line 1455 of yacc.c  */
-#line 13173 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13179 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2137:
 
 /* Line 1455 of yacc.c  */
-#line 13174 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13180 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2138:
 
 /* Line 1455 of yacc.c  */
-#line 13175 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13181 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2139:
 
 /* Line 1455 of yacc.c  */
-#line 13176 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13182 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2140:
 
 /* Line 1455 of yacc.c  */
-#line 13177 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13183 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2141:
 
 /* Line 1455 of yacc.c  */
-#line 13178 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13184 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2142:
 
 /* Line 1455 of yacc.c  */
-#line 13179 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13185 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2143:
 
 /* Line 1455 of yacc.c  */
-#line 13180 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13186 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2144:
 
 /* Line 1455 of yacc.c  */
-#line 13181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13187 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2145:
 
 /* Line 1455 of yacc.c  */
-#line 13182 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13188 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2146:
 
 /* Line 1455 of yacc.c  */
-#line 13183 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13189 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2147:
 
 /* Line 1455 of yacc.c  */
-#line 13184 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13190 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2148:
 
 /* Line 1455 of yacc.c  */
-#line 13185 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13191 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2149:
 
 /* Line 1455 of yacc.c  */
-#line 13186 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13192 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2150:
 
 /* Line 1455 of yacc.c  */
-#line 13187 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13193 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2151:
 
 /* Line 1455 of yacc.c  */
-#line 13188 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13194 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2152:
 
 /* Line 1455 of yacc.c  */
-#line 13189 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13195 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2153:
 
 /* Line 1455 of yacc.c  */
-#line 13190 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13196 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2154:
 
 /* Line 1455 of yacc.c  */
-#line 13191 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13197 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2155:
 
 /* Line 1455 of yacc.c  */
-#line 13192 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13198 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2156:
 
 /* Line 1455 of yacc.c  */
-#line 13193 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13199 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2157:
 
 /* Line 1455 of yacc.c  */
-#line 13194 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13200 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2158:
 
 /* Line 1455 of yacc.c  */
-#line 13195 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13201 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2159:
 
 /* Line 1455 of yacc.c  */
-#line 13196 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13202 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2160:
 
 /* Line 1455 of yacc.c  */
-#line 13197 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13203 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2161:
 
 /* Line 1455 of yacc.c  */
-#line 13198 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13204 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2162:
 
 /* Line 1455 of yacc.c  */
-#line 13199 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13205 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2163:
 
 /* Line 1455 of yacc.c  */
-#line 13200 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13206 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2164:
 
 /* Line 1455 of yacc.c  */
-#line 13201 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13207 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2165:
 
 /* Line 1455 of yacc.c  */
-#line 13202 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13208 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2166:
 
 /* Line 1455 of yacc.c  */
-#line 13203 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13209 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2167:
 
 /* Line 1455 of yacc.c  */
-#line 13204 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13210 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2168:
 
 /* Line 1455 of yacc.c  */
-#line 13205 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13211 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2169:
 
 /* Line 1455 of yacc.c  */
-#line 13206 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13212 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2170:
 
 /* Line 1455 of yacc.c  */
-#line 13207 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13213 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2171:
 
 /* Line 1455 of yacc.c  */
-#line 13208 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13214 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2172:
 
 /* Line 1455 of yacc.c  */
-#line 13209 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13215 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2173:
 
 /* Line 1455 of yacc.c  */
-#line 13210 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13216 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2174:
 
 /* Line 1455 of yacc.c  */
-#line 13211 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13217 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2175:
 
 /* Line 1455 of yacc.c  */
-#line 13212 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13218 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2176:
 
 /* Line 1455 of yacc.c  */
-#line 13213 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13219 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2177:
 
 /* Line 1455 of yacc.c  */
-#line 13214 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13220 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2178:
 
 /* Line 1455 of yacc.c  */
-#line 13215 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13221 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2179:
 
 /* Line 1455 of yacc.c  */
-#line 13216 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13222 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2180:
 
 /* Line 1455 of yacc.c  */
-#line 13217 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13223 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2181:
 
 /* Line 1455 of yacc.c  */
-#line 13218 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13224 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2182:
 
 /* Line 1455 of yacc.c  */
-#line 13219 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13225 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2183:
 
 /* Line 1455 of yacc.c  */
-#line 13220 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13226 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2184:
 
 /* Line 1455 of yacc.c  */
-#line 13221 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13227 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2185:
 
 /* Line 1455 of yacc.c  */
-#line 13222 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13228 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2186:
 
 /* Line 1455 of yacc.c  */
-#line 13223 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13229 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2187:
 
 /* Line 1455 of yacc.c  */
-#line 13224 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13230 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2188:
 
 /* Line 1455 of yacc.c  */
-#line 13225 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13231 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2189:
 
 /* Line 1455 of yacc.c  */
-#line 13226 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13232 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2190:
 
 /* Line 1455 of yacc.c  */
-#line 13227 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13233 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2191:
 
 /* Line 1455 of yacc.c  */
-#line 13228 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13234 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2192:
 
 /* Line 1455 of yacc.c  */
-#line 13229 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13235 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2193:
 
 /* Line 1455 of yacc.c  */
-#line 13230 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13236 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2194:
 
 /* Line 1455 of yacc.c  */
-#line 13231 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13237 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2195:
 
 /* Line 1455 of yacc.c  */
-#line 13232 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13238 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2196:
 
 /* Line 1455 of yacc.c  */
-#line 13233 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13239 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2197:
 
 /* Line 1455 of yacc.c  */
-#line 13234 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13240 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2198:
 
 /* Line 1455 of yacc.c  */
-#line 13235 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13241 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2199:
 
 /* Line 1455 of yacc.c  */
-#line 13236 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13242 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2200:
 
 /* Line 1455 of yacc.c  */
-#line 13237 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13243 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2201:
 
 /* Line 1455 of yacc.c  */
-#line 13238 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13244 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2202:
 
 /* Line 1455 of yacc.c  */
-#line 13239 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13245 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2203:
 
 /* Line 1455 of yacc.c  */
-#line 13240 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13246 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2204:
 
 /* Line 1455 of yacc.c  */
-#line 13241 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13247 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2205:
 
 /* Line 1455 of yacc.c  */
-#line 13242 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13248 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2206:
 
 /* Line 1455 of yacc.c  */
-#line 13243 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13249 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2207:
 
 /* Line 1455 of yacc.c  */
-#line 13244 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13250 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2208:
 
 /* Line 1455 of yacc.c  */
-#line 13245 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13251 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2209:
 
 /* Line 1455 of yacc.c  */
-#line 13246 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13252 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2210:
 
 /* Line 1455 of yacc.c  */
-#line 13247 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13253 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2211:
 
 /* Line 1455 of yacc.c  */
-#line 13248 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13254 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2212:
 
 /* Line 1455 of yacc.c  */
-#line 13249 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13255 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2213:
 
 /* Line 1455 of yacc.c  */
-#line 13250 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13256 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2214:
 
 /* Line 1455 of yacc.c  */
-#line 13251 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13257 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2215:
 
 /* Line 1455 of yacc.c  */
-#line 13252 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13258 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2216:
 
 /* Line 1455 of yacc.c  */
-#line 13253 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13259 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2217:
 
 /* Line 1455 of yacc.c  */
-#line 13254 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13260 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2218:
 
 /* Line 1455 of yacc.c  */
-#line 13255 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13261 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2219:
 
 /* Line 1455 of yacc.c  */
-#line 13256 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13262 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2220:
 
 /* Line 1455 of yacc.c  */
-#line 13257 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13263 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2221:
 
 /* Line 1455 of yacc.c  */
-#line 13258 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13264 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2222:
 
 /* Line 1455 of yacc.c  */
-#line 13259 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13265 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2223:
 
 /* Line 1455 of yacc.c  */
-#line 13260 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13266 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2224:
 
 /* Line 1455 of yacc.c  */
-#line 13261 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13267 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2225:
 
 /* Line 1455 of yacc.c  */
-#line 13262 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13268 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2226:
 
 /* Line 1455 of yacc.c  */
-#line 13263 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13269 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2227:
 
 /* Line 1455 of yacc.c  */
-#line 13264 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13270 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2228:
 
 /* Line 1455 of yacc.c  */
-#line 13265 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13271 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2229:
 
 /* Line 1455 of yacc.c  */
-#line 13266 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13272 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2230:
 
 /* Line 1455 of yacc.c  */
-#line 13267 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13273 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2231:
 
 /* Line 1455 of yacc.c  */
-#line 13268 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13274 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2232:
 
 /* Line 1455 of yacc.c  */
-#line 13269 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13275 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2233:
 
 /* Line 1455 of yacc.c  */
-#line 13270 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13276 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2234:
 
 /* Line 1455 of yacc.c  */
-#line 13271 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13277 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2235:
 
 /* Line 1455 of yacc.c  */
-#line 13272 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13278 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2236:
 
 /* Line 1455 of yacc.c  */
-#line 13273 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13279 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2237:
 
 /* Line 1455 of yacc.c  */
-#line 13274 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13280 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2238:
 
 /* Line 1455 of yacc.c  */
-#line 13275 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13281 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2239:
 
 /* Line 1455 of yacc.c  */
-#line 13276 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13282 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2240:
 
 /* Line 1455 of yacc.c  */
-#line 13277 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13283 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2241:
 
 /* Line 1455 of yacc.c  */
-#line 13278 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13284 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2242:
 
 /* Line 1455 of yacc.c  */
-#line 13279 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13285 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2243:
 
 /* Line 1455 of yacc.c  */
-#line 13280 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13286 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2244:
 
 /* Line 1455 of yacc.c  */
-#line 13281 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13287 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2245:
 
 /* Line 1455 of yacc.c  */
-#line 13282 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13288 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2246:
 
 /* Line 1455 of yacc.c  */
-#line 13283 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13289 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2247:
 
 /* Line 1455 of yacc.c  */
-#line 13284 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13290 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2248:
 
 /* Line 1455 of yacc.c  */
-#line 13285 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13291 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2249:
 
 /* Line 1455 of yacc.c  */
-#line 13286 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13292 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2250:
 
 /* Line 1455 of yacc.c  */
-#line 13287 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13293 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2251:
 
 /* Line 1455 of yacc.c  */
-#line 13288 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13294 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2252:
 
 /* Line 1455 of yacc.c  */
-#line 13289 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13295 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2253:
 
 /* Line 1455 of yacc.c  */
-#line 13290 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13296 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2254:
 
 /* Line 1455 of yacc.c  */
-#line 13291 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13297 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2255:
 
 /* Line 1455 of yacc.c  */
-#line 13292 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13298 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2256:
 
 /* Line 1455 of yacc.c  */
-#line 13293 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13299 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2257:
 
 /* Line 1455 of yacc.c  */
-#line 13294 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13300 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2258:
 
 /* Line 1455 of yacc.c  */
-#line 13295 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13301 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2259:
 
 /* Line 1455 of yacc.c  */
-#line 13296 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13302 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2260:
 
 /* Line 1455 of yacc.c  */
-#line 13297 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13303 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2261:
 
 /* Line 1455 of yacc.c  */
-#line 13298 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13304 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2262:
 
 /* Line 1455 of yacc.c  */
-#line 13299 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13305 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2263:
 
 /* Line 1455 of yacc.c  */
-#line 13300 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13306 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2264:
 
 /* Line 1455 of yacc.c  */
-#line 13301 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13307 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2265:
 
 /* Line 1455 of yacc.c  */
-#line 13302 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13308 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2266:
 
 /* Line 1455 of yacc.c  */
-#line 13303 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13309 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2267:
 
 /* Line 1455 of yacc.c  */
-#line 13304 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13310 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2268:
 
 /* Line 1455 of yacc.c  */
-#line 13305 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13311 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2269:
 
 /* Line 1455 of yacc.c  */
-#line 13306 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13312 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2270:
 
 /* Line 1455 of yacc.c  */
-#line 13307 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13313 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2271:
 
 /* Line 1455 of yacc.c  */
-#line 13308 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13314 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2272:
 
 /* Line 1455 of yacc.c  */
-#line 13309 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13315 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2273:
 
 /* Line 1455 of yacc.c  */
-#line 13310 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13316 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2274:
 
 /* Line 1455 of yacc.c  */
-#line 13311 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13317 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2275:
 
 /* Line 1455 of yacc.c  */
-#line 13312 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13318 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2276:
 
 /* Line 1455 of yacc.c  */
-#line 13313 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13319 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2277:
 
 /* Line 1455 of yacc.c  */
-#line 13314 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13320 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2278:
 
 /* Line 1455 of yacc.c  */
-#line 13315 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13321 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2279:
 
 /* Line 1455 of yacc.c  */
-#line 13316 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13322 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2280:
 
 /* Line 1455 of yacc.c  */
-#line 13317 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13323 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2281:
 
 /* Line 1455 of yacc.c  */
-#line 13318 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13324 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2282:
 
 /* Line 1455 of yacc.c  */
-#line 13319 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13325 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2283:
 
 /* Line 1455 of yacc.c  */
-#line 13320 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13326 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2284:
 
 /* Line 1455 of yacc.c  */
-#line 13321 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13327 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2285:
 
 /* Line 1455 of yacc.c  */
-#line 13322 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13328 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2286:
 
 /* Line 1455 of yacc.c  */
-#line 13323 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13329 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2287:
 
 /* Line 1455 of yacc.c  */
-#line 13324 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13330 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2288:
 
 /* Line 1455 of yacc.c  */
-#line 13325 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13331 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2289:
 
 /* Line 1455 of yacc.c  */
-#line 13326 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13332 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2290:
 
 /* Line 1455 of yacc.c  */
-#line 13327 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13333 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2291:
 
 /* Line 1455 of yacc.c  */
-#line 13328 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13334 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2292:
 
 /* Line 1455 of yacc.c  */
-#line 13329 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13335 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2293:
 
 /* Line 1455 of yacc.c  */
-#line 13330 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13336 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2294:
 
 /* Line 1455 of yacc.c  */
-#line 13331 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13337 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2295:
 
 /* Line 1455 of yacc.c  */
-#line 13332 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13338 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2296:
 
 /* Line 1455 of yacc.c  */
-#line 13333 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13339 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2297:
 
 /* Line 1455 of yacc.c  */
-#line 13334 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13340 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2298:
 
 /* Line 1455 of yacc.c  */
-#line 13335 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13341 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2299:
 
 /* Line 1455 of yacc.c  */
-#line 13336 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13342 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2300:
 
 /* Line 1455 of yacc.c  */
-#line 13337 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13343 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2301:
 
 /* Line 1455 of yacc.c  */
-#line 13338 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13344 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2302:
 
 /* Line 1455 of yacc.c  */
-#line 13339 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13345 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2303:
 
 /* Line 1455 of yacc.c  */
-#line 13340 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13346 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2304:
 
 /* Line 1455 of yacc.c  */
-#line 13341 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13347 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2305:
 
 /* Line 1455 of yacc.c  */
-#line 13342 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13348 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2306:
 
 /* Line 1455 of yacc.c  */
-#line 13343 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13349 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2307:
 
 /* Line 1455 of yacc.c  */
-#line 13344 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13350 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2308:
 
 /* Line 1455 of yacc.c  */
-#line 13345 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13351 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2309:
 
 /* Line 1455 of yacc.c  */
-#line 13346 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13352 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2310:
 
 /* Line 1455 of yacc.c  */
-#line 13347 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13353 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2311:
 
 /* Line 1455 of yacc.c  */
-#line 13348 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13354 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2312:
 
 /* Line 1455 of yacc.c  */
-#line 13349 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13355 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2313:
 
 /* Line 1455 of yacc.c  */
-#line 13350 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13356 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2314:
 
 /* Line 1455 of yacc.c  */
-#line 13351 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13357 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2315:
 
 /* Line 1455 of yacc.c  */
-#line 13352 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13358 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2316:
 
 /* Line 1455 of yacc.c  */
-#line 13353 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13359 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2317:
 
 /* Line 1455 of yacc.c  */
-#line 13354 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13360 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2318:
 
 /* Line 1455 of yacc.c  */
-#line 13355 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13361 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2319:
 
 /* Line 1455 of yacc.c  */
-#line 13356 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13362 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2320:
 
 /* Line 1455 of yacc.c  */
-#line 13357 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13363 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2321:
 
 /* Line 1455 of yacc.c  */
-#line 13358 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13364 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2322:
 
 /* Line 1455 of yacc.c  */
-#line 13359 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13365 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2323:
 
 /* Line 1455 of yacc.c  */
-#line 13360 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13366 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2324:
 
 /* Line 1455 of yacc.c  */
-#line 13361 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13367 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2325:
 
 /* Line 1455 of yacc.c  */
-#line 13362 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13368 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2326:
 
 /* Line 1455 of yacc.c  */
-#line 13363 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13369 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2327:
 
 /* Line 1455 of yacc.c  */
-#line 13370 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13376 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SET_OPTION;
@@ -37974,28 +37980,28 @@ yyreduce:
   case 2328:
 
 /* Line 1455 of yacc.c  */
-#line 13380 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13386 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2329:
 
 /* Line 1455 of yacc.c  */
-#line 13384 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13390 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2330:
 
 /* Line 1455 of yacc.c  */
-#line 13385 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13391 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2333:
 
 /* Line 1455 of yacc.c  */
-#line 13394 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13400 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -38030,7 +38036,7 @@ yyreduce:
   case 2334:
 
 /* Line 1455 of yacc.c  */
-#line 13424 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13430 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -38083,105 +38089,105 @@ yyreduce:
   case 2335:
 
 /* Line 1455 of yacc.c  */
-#line 13474 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13480 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2336:
 
 /* Line 1455 of yacc.c  */
-#line 13475 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13481 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_GLOBAL; }
     break;
 
   case 2337:
 
 /* Line 1455 of yacc.c  */
-#line 13476 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13482 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_SESSION; }
     break;
 
   case 2338:
 
 /* Line 1455 of yacc.c  */
-#line 13477 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13483 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_SESSION; }
     break;
 
   case 2339:
 
 /* Line 1455 of yacc.c  */
-#line 13481 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13487 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= OPT_DEFAULT; }
     break;
 
   case 2340:
 
 /* Line 1455 of yacc.c  */
-#line 13482 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13488 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->one_shot_set= 1; (yyval.num)= OPT_SESSION; }
     break;
 
   case 2341:
 
 /* Line 1455 of yacc.c  */
-#line 13486 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13492 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_SESSION; }
     break;
 
   case 2342:
 
 /* Line 1455 of yacc.c  */
-#line 13487 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13493 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_GLOBAL; }
     break;
 
   case 2343:
 
 /* Line 1455 of yacc.c  */
-#line 13488 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13494 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_SESSION; }
     break;
 
   case 2344:
 
 /* Line 1455 of yacc.c  */
-#line 13489 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13495 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_SESSION; }
     break;
 
   case 2345:
 
 /* Line 1455 of yacc.c  */
-#line 13493 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13499 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_DEFAULT; }
     break;
 
   case 2346:
 
 /* Line 1455 of yacc.c  */
-#line 13494 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13500 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_GLOBAL; }
     break;
 
   case 2347:
 
 /* Line 1455 of yacc.c  */
-#line 13495 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13501 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_SESSION; }
     break;
 
   case 2348:
 
 /* Line 1455 of yacc.c  */
-#line 13496 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13502 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.var_type)=OPT_SESSION; }
     break;
 
   case 2351:
 
 /* Line 1455 of yacc.c  */
-#line 13506 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13512 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             LEX_STRING *name= &(yyvsp[(2) - (4)].variable).base_name;
@@ -38227,7 +38233,7 @@ yyreduce:
   case 2352:
 
 /* Line 1455 of yacc.c  */
-#line 13547 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13553 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->option_type= (yyvsp[(1) - (5)].var_type);
@@ -38247,7 +38253,7 @@ yyreduce:
   case 2353:
 
 /* Line 1455 of yacc.c  */
-#line 13565 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13571 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Item_func_set_user_var *item;
             item= new (thd->mem_root) Item_func_set_user_var((yyvsp[(2) - (4)].lex_str), (yyvsp[(4) - (4)].item));
@@ -38263,7 +38269,7 @@ yyreduce:
   case 2354:
 
 /* Line 1455 of yacc.c  */
-#line 13576 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13582 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             struct sys_var_with_base tmp= (yyvsp[(4) - (6)].variable);
             /* Lookup if necessary: must be a system variable. */
@@ -38280,7 +38286,7 @@ yyreduce:
   case 2355:
 
 /* Line 1455 of yacc.c  */
-#line 13588 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13594 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             CHARSET_INFO *cs2;
@@ -38298,7 +38304,7 @@ yyreduce:
   case 2356:
 
 /* Line 1455 of yacc.c  */
-#line 13601 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13607 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             sp_pcontext *spc= lex->spcont;
@@ -38318,7 +38324,7 @@ yyreduce:
   case 2357:
 
 /* Line 1455 of yacc.c  */
-#line 13616 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13622 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             CHARSET_INFO *cs2;
@@ -38342,7 +38348,7 @@ yyreduce:
   case 2358:
 
 /* Line 1455 of yacc.c  */
-#line 13635 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13641 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             LEX_USER *user;
@@ -38373,7 +38379,7 @@ yyreduce:
   case 2359:
 
 /* Line 1455 of yacc.c  */
-#line 13661 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13667 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             set_var_password *var= new set_var_password((yyvsp[(3) - (5)].lex_user),(yyvsp[(5) - (5)].simple_string));
             if (var == NULL)
@@ -38388,7 +38394,7 @@ yyreduce:
   case 2360:
 
 /* Line 1455 of yacc.c  */
-#line 13674 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13680 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             sp_pcontext *spc= thd->lex->spcont;
             sp_variable_t *spv;
@@ -38419,7 +38425,7 @@ yyreduce:
   case 2361:
 
 /* Line 1455 of yacc.c  */
-#line 13700 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13706 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (check_reserved_words(&(yyvsp[(1) - (3)].lex_str)))
@@ -38467,7 +38473,7 @@ yyreduce:
   case 2362:
 
 /* Line 1455 of yacc.c  */
-#line 13743 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13749 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             sys_var *tmp=find_sys_var(thd, (yyvsp[(3) - (3)].lex_str).str, (yyvsp[(3) - (3)].lex_str).length);
             if (!tmp)
@@ -38483,42 +38489,42 @@ yyreduce:
   case 2363:
 
 /* Line 1455 of yacc.c  */
-#line 13756 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13762 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
     break;
 
   case 2364:
 
 /* Line 1455 of yacc.c  */
-#line 13757 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13763 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.tx_isolation)= ISO_READ_COMMITTED; }
     break;
 
   case 2365:
 
 /* Line 1455 of yacc.c  */
-#line 13758 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13764 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
     break;
 
   case 2366:
 
 /* Line 1455 of yacc.c  */
-#line 13759 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13765 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.tx_isolation)= ISO_SERIALIZABLE; }
     break;
 
   case 2367:
 
 /* Line 1455 of yacc.c  */
-#line 13763 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13769 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.simple_string)=(yyvsp[(1) - (1)].lex_str).str;}
     break;
 
   case 2368:
 
 /* Line 1455 of yacc.c  */
-#line 13765 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13771 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.simple_string)= (yyvsp[(3) - (4)].lex_str).length ? thd->variables.old_passwords ?
               Item_func_old_password::alloc(thd, (yyvsp[(3) - (4)].lex_str).str, (yyvsp[(3) - (4)].lex_str).length) :
@@ -38532,7 +38538,7 @@ yyreduce:
   case 2369:
 
 /* Line 1455 of yacc.c  */
-#line 13774 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13780 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.simple_string)= (yyvsp[(3) - (4)].lex_str).length ? Item_func_old_password::alloc(thd, (yyvsp[(3) - (4)].lex_str).str,
                                                           (yyvsp[(3) - (4)].lex_str).length) :
@@ -38545,21 +38551,21 @@ yyreduce:
   case 2370:
 
 /* Line 1455 of yacc.c  */
-#line 13785 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13791 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)=(yyvsp[(1) - (1)].item); }
     break;
 
   case 2371:
 
 /* Line 1455 of yacc.c  */
-#line 13786 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13792 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.item)=0; }
     break;
 
   case 2372:
 
 /* Line 1455 of yacc.c  */
-#line 13788 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13794 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)=new (thd->mem_root) Item_string("ON",  2, system_charset_info);
             if ((yyval.item) == NULL)
@@ -38570,7 +38576,7 @@ yyreduce:
   case 2373:
 
 /* Line 1455 of yacc.c  */
-#line 13794 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13800 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)=new (thd->mem_root) Item_string("ALL", 3, system_charset_info);
             if ((yyval.item) == NULL)
@@ -38581,7 +38587,7 @@ yyreduce:
   case 2374:
 
 /* Line 1455 of yacc.c  */
-#line 13800 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13806 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.item)=new (thd->mem_root) Item_string("binary", 6, system_charset_info);
             if ((yyval.item) == NULL)
@@ -38592,7 +38598,7 @@ yyreduce:
   case 2375:
 
 /* Line 1455 of yacc.c  */
-#line 13811 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13817 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -38608,28 +38614,28 @@ yyreduce:
   case 2376:
 
 /* Line 1455 of yacc.c  */
-#line 13822 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13828 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2377:
 
 /* Line 1455 of yacc.c  */
-#line 13826 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13832 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 2378:
 
 /* Line 1455 of yacc.c  */
-#line 13827 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13833 "/home/buildbot/git/sql/sql_yacc.yy"
     { }
     break;
 
   case 2381:
 
 /* Line 1455 of yacc.c  */
-#line 13837 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13843 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             thr_lock_type lock_type= (thr_lock_type) (yyvsp[(3) - (3)].num);
             bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE);
@@ -38646,21 +38652,21 @@ yyreduce:
   case 2382:
 
 /* Line 1455 of yacc.c  */
-#line 13851 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13857 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= TL_READ_NO_INSERT; }
     break;
 
   case 2383:
 
 /* Line 1455 of yacc.c  */
-#line 13852 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13858 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= TL_WRITE_DEFAULT; }
     break;
 
   case 2384:
 
 /* Line 1455 of yacc.c  */
-#line 13854 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13860 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
           }
@@ -38669,21 +38675,21 @@ yyreduce:
   case 2385:
 
 /* Line 1455 of yacc.c  */
-#line 13858 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13864 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= TL_WRITE_LOW_PRIORITY; }
     break;
 
   case 2386:
 
 /* Line 1455 of yacc.c  */
-#line 13859 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13865 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= TL_READ; }
     break;
 
   case 2387:
 
 /* Line 1455 of yacc.c  */
-#line 13864 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13870 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
 
@@ -38699,14 +38705,14 @@ yyreduce:
   case 2388:
 
 /* Line 1455 of yacc.c  */
-#line 13875 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13881 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2389:
 
 /* Line 1455 of yacc.c  */
-#line 13884 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13890 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->sphead)
@@ -38723,7 +38729,7 @@ yyreduce:
   case 2390:
 
 /* Line 1455 of yacc.c  */
-#line 13896 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13902 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->sphead)
@@ -38740,7 +38746,7 @@ yyreduce:
   case 2391:
 
 /* Line 1455 of yacc.c  */
-#line 13908 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13914 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->sphead)
@@ -38765,7 +38771,7 @@ yyreduce:
   case 2392:
 
 /* Line 1455 of yacc.c  */
-#line 13928 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13934 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->expr_allows_subselect= TRUE;
             /* Stored functions are not supported for HANDLER READ. */
@@ -38781,63 +38787,63 @@ yyreduce:
   case 2393:
 
 /* Line 1455 of yacc.c  */
-#line 13941 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13947 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ident= null_lex_str; }
     break;
 
   case 2394:
 
 /* Line 1455 of yacc.c  */
-#line 13942 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13948 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ident= (yyvsp[(1) - (2)].lex_str); }
     break;
 
   case 2395:
 
 /* Line 1455 of yacc.c  */
-#line 13946 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13952 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ha_read_mode = RFIRST; }
     break;
 
   case 2396:
 
 /* Line 1455 of yacc.c  */
-#line 13947 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13953 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ha_read_mode = RNEXT;  }
     break;
 
   case 2397:
 
 /* Line 1455 of yacc.c  */
-#line 13951 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13957 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ha_read_mode = RFIRST; }
     break;
 
   case 2398:
 
 /* Line 1455 of yacc.c  */
-#line 13952 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13958 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ha_read_mode = RNEXT;  }
     break;
 
   case 2399:
 
 /* Line 1455 of yacc.c  */
-#line 13953 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13959 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ha_read_mode = RPREV;  }
     break;
 
   case 2400:
 
 /* Line 1455 of yacc.c  */
-#line 13954 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13960 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->ha_read_mode = RLAST;  }
     break;
 
   case 2401:
 
 /* Line 1455 of yacc.c  */
-#line 13956 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13962 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->ha_read_mode = RKEY;
@@ -38850,56 +38856,56 @@ yyreduce:
   case 2402:
 
 /* Line 1455 of yacc.c  */
-#line 13964 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13970 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2403:
 
 /* Line 1455 of yacc.c  */
-#line 13968 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13974 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT;   }
     break;
 
   case 2404:
 
 /* Line 1455 of yacc.c  */
-#line 13969 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13975 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
     break;
 
   case 2405:
 
 /* Line 1455 of yacc.c  */
-#line 13970 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13976 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
     break;
 
   case 2406:
 
 /* Line 1455 of yacc.c  */
-#line 13971 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13977 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY;   }
     break;
 
   case 2407:
 
 /* Line 1455 of yacc.c  */
-#line 13972 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13978 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY;  }
     break;
 
   case 2408:
 
 /* Line 1455 of yacc.c  */
-#line 13979 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13985 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2409:
 
 /* Line 1455 of yacc.c  */
-#line 13984 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13990 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_REVOKE;
@@ -38910,7 +38916,7 @@ yyreduce:
   case 2410:
 
 /* Line 1455 of yacc.c  */
-#line 13990 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 13996 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->columns.elements)
@@ -38926,7 +38932,7 @@ yyreduce:
   case 2411:
 
 /* Line 1455 of yacc.c  */
-#line 14001 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14007 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->columns.elements)
@@ -38942,7 +38948,7 @@ yyreduce:
   case 2412:
 
 /* Line 1455 of yacc.c  */
-#line 14012 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14018 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_REVOKE_ALL;
           }
@@ -38951,7 +38957,7 @@ yyreduce:
   case 2413:
 
 /* Line 1455 of yacc.c  */
-#line 14016 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14022 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->users_list.push_front ((yyvsp[(3) - (5)].lex_user));
@@ -38963,14 +38969,14 @@ yyreduce:
   case 2414:
 
 /* Line 1455 of yacc.c  */
-#line 14026 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14032 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2415:
 
 /* Line 1455 of yacc.c  */
-#line 14032 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14038 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_GRANT;
@@ -38981,7 +38987,7 @@ yyreduce:
   case 2416:
 
 /* Line 1455 of yacc.c  */
-#line 14039 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14045 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->columns.elements)
@@ -38997,7 +39003,7 @@ yyreduce:
   case 2417:
 
 /* Line 1455 of yacc.c  */
-#line 14051 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14057 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             if (lex->columns.elements)
@@ -39013,7 +39019,7 @@ yyreduce:
   case 2418:
 
 /* Line 1455 of yacc.c  */
-#line 14062 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14068 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->users_list.push_front ((yyvsp[(3) - (6)].lex_user));
@@ -39025,14 +39031,14 @@ yyreduce:
   case 2421:
 
 /* Line 1455 of yacc.c  */
-#line 14076 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14082 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2422:
 
 /* Line 1455 of yacc.c  */
-#line 14078 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14084 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             Lex->all_privileges= 1; 
             Lex->grant= GLOBAL_ACLS;
@@ -39042,259 +39048,259 @@ yyreduce:
   case 2427:
 
 /* Line 1455 of yacc.c  */
-#line 14096 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14102 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->which_columns = SELECT_ACL;}
     break;
 
   case 2428:
 
 /* Line 1455 of yacc.c  */
-#line 14097 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14103 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2429:
 
 /* Line 1455 of yacc.c  */
-#line 14099 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14105 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->which_columns = INSERT_ACL;}
     break;
 
   case 2430:
 
 /* Line 1455 of yacc.c  */
-#line 14100 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14106 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2431:
 
 /* Line 1455 of yacc.c  */
-#line 14102 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14108 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->which_columns = UPDATE_ACL; }
     break;
 
   case 2432:
 
 /* Line 1455 of yacc.c  */
-#line 14103 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14109 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2433:
 
 /* Line 1455 of yacc.c  */
-#line 14105 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14111 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->which_columns = REFERENCES_ACL;}
     break;
 
   case 2434:
 
 /* Line 1455 of yacc.c  */
-#line 14106 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14112 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2435:
 
 /* Line 1455 of yacc.c  */
-#line 14107 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14113 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= DELETE_ACL;}
     break;
 
   case 2436:
 
 /* Line 1455 of yacc.c  */
-#line 14108 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14114 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2437:
 
 /* Line 1455 of yacc.c  */
-#line 14109 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14115 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= INDEX_ACL;}
     break;
 
   case 2438:
 
 /* Line 1455 of yacc.c  */
-#line 14110 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14116 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= ALTER_ACL;}
     break;
 
   case 2439:
 
 /* Line 1455 of yacc.c  */
-#line 14111 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14117 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= CREATE_ACL;}
     break;
 
   case 2440:
 
 /* Line 1455 of yacc.c  */
-#line 14112 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14118 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= DROP_ACL;}
     break;
 
   case 2441:
 
 /* Line 1455 of yacc.c  */
-#line 14113 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14119 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= EXECUTE_ACL;}
     break;
 
   case 2442:
 
 /* Line 1455 of yacc.c  */
-#line 14114 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14120 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= RELOAD_ACL;}
     break;
 
   case 2443:
 
 /* Line 1455 of yacc.c  */
-#line 14115 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14121 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= SHUTDOWN_ACL;}
     break;
 
   case 2444:
 
 /* Line 1455 of yacc.c  */
-#line 14116 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14122 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= PROCESS_ACL;}
     break;
 
   case 2445:
 
 /* Line 1455 of yacc.c  */
-#line 14117 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14123 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= FILE_ACL;}
     break;
 
   case 2446:
 
 /* Line 1455 of yacc.c  */
-#line 14118 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14124 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= GRANT_ACL;}
     break;
 
   case 2447:
 
 /* Line 1455 of yacc.c  */
-#line 14119 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14125 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= SHOW_DB_ACL;}
     break;
 
   case 2448:
 
 /* Line 1455 of yacc.c  */
-#line 14120 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14126 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= SUPER_ACL;}
     break;
 
   case 2449:
 
 /* Line 1455 of yacc.c  */
-#line 14121 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14127 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= CREATE_TMP_ACL;}
     break;
 
   case 2450:
 
 /* Line 1455 of yacc.c  */
-#line 14122 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14128 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= LOCK_TABLES_ACL; }
     break;
 
   case 2451:
 
 /* Line 1455 of yacc.c  */
-#line 14123 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14129 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= REPL_SLAVE_ACL; }
     break;
 
   case 2452:
 
 /* Line 1455 of yacc.c  */
-#line 14124 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14130 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= REPL_CLIENT_ACL; }
     break;
 
   case 2453:
 
 /* Line 1455 of yacc.c  */
-#line 14125 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14131 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= CREATE_VIEW_ACL; }
     break;
 
   case 2454:
 
 /* Line 1455 of yacc.c  */
-#line 14126 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14132 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= SHOW_VIEW_ACL; }
     break;
 
   case 2455:
 
 /* Line 1455 of yacc.c  */
-#line 14127 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14133 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= CREATE_PROC_ACL; }
     break;
 
   case 2456:
 
 /* Line 1455 of yacc.c  */
-#line 14128 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14134 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= ALTER_PROC_ACL; }
     break;
 
   case 2457:
 
 /* Line 1455 of yacc.c  */
-#line 14129 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14135 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= CREATE_USER_ACL; }
     break;
 
   case 2458:
 
 /* Line 1455 of yacc.c  */
-#line 14130 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14136 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= EVENT_ACL;}
     break;
 
   case 2459:
 
 /* Line 1455 of yacc.c  */
-#line 14131 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14137 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= TRIGGER_ACL; }
     break;
 
   case 2460:
 
 /* Line 1455 of yacc.c  */
-#line 14132 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14138 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= CREATE_TABLESPACE_ACL; }
     break;
 
   case 2461:
 
 /* Line 1455 of yacc.c  */
-#line 14136 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14142 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2462:
 
 /* Line 1455 of yacc.c  */
-#line 14137 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14143 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2465:
 
 /* Line 1455 of yacc.c  */
-#line 14147 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14153 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->x509_subject)
@@ -39309,7 +39315,7 @@ yyreduce:
   case 2466:
 
 /* Line 1455 of yacc.c  */
-#line 14157 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14163 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->x509_issuer)
@@ -39324,7 +39330,7 @@ yyreduce:
   case 2467:
 
 /* Line 1455 of yacc.c  */
-#line 14167 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14173 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (lex->ssl_cipher)
@@ -39339,7 +39345,7 @@ yyreduce:
   case 2468:
 
 /* Line 1455 of yacc.c  */
-#line 14180 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14186 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             size_t dummy;
@@ -39359,7 +39365,7 @@ yyreduce:
   case 2469:
 
 /* Line 1455 of yacc.c  */
-#line 14195 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14201 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->current_select->db = (yyvsp[(1) - (3)].lex_str).str;
@@ -39377,7 +39383,7 @@ yyreduce:
   case 2470:
 
 /* Line 1455 of yacc.c  */
-#line 14208 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14214 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->current_select->db = NULL;
@@ -39395,7 +39401,7 @@ yyreduce:
   case 2471:
 
 /* Line 1455 of yacc.c  */
-#line 14221 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14227 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (!lex->current_select->add_table_to_list(lex->thd, (yyvsp[(1) - (1)].table),NULL,
@@ -39409,7 +39415,7 @@ yyreduce:
   case 2472:
 
 /* Line 1455 of yacc.c  */
-#line 14233 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14239 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->users_list.push_back((yyvsp[(1) - (1)].lex_user)))
               MYSQL_YYABORT;
@@ -39419,7 +39425,7 @@ yyreduce:
   case 2473:
 
 /* Line 1455 of yacc.c  */
-#line 14238 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14244 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->users_list.push_back((yyvsp[(3) - (3)].lex_user)))
               MYSQL_YYABORT;
@@ -39429,7 +39435,7 @@ yyreduce:
   case 2474:
 
 /* Line 1455 of yacc.c  */
-#line 14246 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14252 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->users_list.push_back((yyvsp[(1) - (1)].lex_user)))
               MYSQL_YYABORT;
@@ -39439,7 +39445,7 @@ yyreduce:
   case 2475:
 
 /* Line 1455 of yacc.c  */
-#line 14251 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14257 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (Lex->users_list.push_back((yyvsp[(3) - (3)].lex_user)))
               MYSQL_YYABORT;
@@ -39449,7 +39455,7 @@ yyreduce:
   case 2480:
 
 /* Line 1455 of yacc.c  */
-#line 14262 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14268 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.lex_user)=(yyvsp[(1) - (4)].lex_user); (yyvsp[(1) - (4)].lex_user)->password=(yyvsp[(4) - (4)].lex_str);
             if ((yyvsp[(4) - (4)].lex_str).length)
@@ -39481,7 +39487,7 @@ yyreduce:
   case 2481:
 
 /* Line 1455 of yacc.c  */
-#line 14289 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14295 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             (yyval.lex_user)= (yyvsp[(1) - (5)].lex_user); 
             (yyvsp[(1) - (5)].lex_user)->password= (yyvsp[(5) - (5)].lex_str); 
@@ -39491,7 +39497,7 @@ yyreduce:
   case 2482:
 
 /* Line 1455 of yacc.c  */
-#line 14294 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14300 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.lex_user)= (yyvsp[(1) - (4)].lex_user);
             (yyvsp[(1) - (4)].lex_user)->plugin= (yyvsp[(4) - (4)].lex_str);
@@ -39502,7 +39508,7 @@ yyreduce:
   case 2483:
 
 /* Line 1455 of yacc.c  */
-#line 14300 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14306 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.lex_user)= (yyvsp[(1) - (6)].lex_user);
             (yyvsp[(1) - (6)].lex_user)->plugin= (yyvsp[(4) - (6)].lex_str);
@@ -39513,14 +39519,14 @@ yyreduce:
   case 2484:
 
 /* Line 1455 of yacc.c  */
-#line 14306 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14312 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.lex_user)= (yyvsp[(1) - (1)].lex_user); (yyvsp[(1) - (1)].lex_user)->password= null_lex_str; }
     break;
 
   case 2485:
 
 /* Line 1455 of yacc.c  */
-#line 14311 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14317 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->grant |= lex->which_columns;
@@ -39530,7 +39536,7 @@ yyreduce:
   case 2489:
 
 /* Line 1455 of yacc.c  */
-#line 14325 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14331 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             String *new_str = new (thd->mem_root) String((const char*) (yyvsp[(1) - (1)].lex_str).str,(yyvsp[(1) - (1)].lex_str).length,system_charset_info);
             if (new_str == NULL)
@@ -39560,7 +39566,7 @@ yyreduce:
   case 2491:
 
 /* Line 1455 of yacc.c  */
-#line 14354 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14360 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->ssl_type=SSL_TYPE_SPECIFIED;
           }
@@ -39569,7 +39575,7 @@ yyreduce:
   case 2492:
 
 /* Line 1455 of yacc.c  */
-#line 14358 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14364 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->ssl_type=SSL_TYPE_ANY;
           }
@@ -39578,7 +39584,7 @@ yyreduce:
   case 2493:
 
 /* Line 1455 of yacc.c  */
-#line 14362 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14368 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->ssl_type=SSL_TYPE_X509;
           }
@@ -39587,7 +39593,7 @@ yyreduce:
   case 2494:
 
 /* Line 1455 of yacc.c  */
-#line 14366 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14372 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->ssl_type=SSL_TYPE_NONE;
           }
@@ -39596,49 +39602,49 @@ yyreduce:
   case 2495:
 
 /* Line 1455 of yacc.c  */
-#line 14372 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14378 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2497:
 
 /* Line 1455 of yacc.c  */
-#line 14377 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14383 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2498:
 
 /* Line 1455 of yacc.c  */
-#line 14378 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14384 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= GRANT_ACL;}
     break;
 
   case 2499:
 
 /* Line 1455 of yacc.c  */
-#line 14382 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14388 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2500:
 
 /* Line 1455 of yacc.c  */
-#line 14383 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14389 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2501:
 
 /* Line 1455 of yacc.c  */
-#line 14387 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14393 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->grant |= GRANT_ACL;}
     break;
 
   case 2502:
 
 /* Line 1455 of yacc.c  */
-#line 14389 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14395 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->mqh.questions=(yyvsp[(2) - (2)].ulong_num);
@@ -39649,7 +39655,7 @@ yyreduce:
   case 2503:
 
 /* Line 1455 of yacc.c  */
-#line 14395 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14401 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->mqh.updates=(yyvsp[(2) - (2)].ulong_num);
@@ -39660,7 +39666,7 @@ yyreduce:
   case 2504:
 
 /* Line 1455 of yacc.c  */
-#line 14401 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14407 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->mqh.conn_per_hour= (yyvsp[(2) - (2)].ulong_num);
@@ -39671,7 +39677,7 @@ yyreduce:
   case 2505:
 
 /* Line 1455 of yacc.c  */
-#line 14407 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14413 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->mqh.user_conn= (yyvsp[(2) - (2)].num);
@@ -39682,7 +39688,7 @@ yyreduce:
   case 2506:
 
 /* Line 1455 of yacc.c  */
-#line 14416 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14422 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_BEGIN;
@@ -39693,84 +39699,84 @@ yyreduce:
   case 2507:
 
 /* Line 1455 of yacc.c  */
-#line 14421 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14427 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2508:
 
 /* Line 1455 of yacc.c  */
-#line 14425 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14431 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2509:
 
 /* Line 1455 of yacc.c  */
-#line 14426 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14432 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2510:
 
 /* Line 1455 of yacc.c  */
-#line 14431 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14437 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
     break;
 
   case 2511:
 
 /* Line 1455 of yacc.c  */
-#line 14432 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14438 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_yes_no_unk)= TVL_NO; }
     break;
 
   case 2512:
 
 /* Line 1455 of yacc.c  */
-#line 14433 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14439 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_yes_no_unk)= TVL_YES; }
     break;
 
   case 2513:
 
 /* Line 1455 of yacc.c  */
-#line 14438 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14444 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
     break;
 
   case 2514:
 
 /* Line 1455 of yacc.c  */
-#line 14439 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14445 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_yes_no_unk)= TVL_YES; }
     break;
 
   case 2515:
 
 /* Line 1455 of yacc.c  */
-#line 14440 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14446 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.m_yes_no_unk)= TVL_NO; }
     break;
 
   case 2516:
 
 /* Line 1455 of yacc.c  */
-#line 14444 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14450 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2517:
 
 /* Line 1455 of yacc.c  */
-#line 14445 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14451 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2518:
 
 /* Line 1455 of yacc.c  */
-#line 14450 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14456 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_COMMIT;
@@ -39784,7 +39790,7 @@ yyreduce:
   case 2519:
 
 /* Line 1455 of yacc.c  */
-#line 14462 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14468 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK;
@@ -39798,7 +39804,7 @@ yyreduce:
   case 2520:
 
 /* Line 1455 of yacc.c  */
-#line 14472 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14478 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
@@ -39809,7 +39815,7 @@ yyreduce:
   case 2521:
 
 /* Line 1455 of yacc.c  */
-#line 14481 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14487 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SAVEPOINT;
@@ -39820,7 +39826,7 @@ yyreduce:
   case 2522:
 
 /* Line 1455 of yacc.c  */
-#line 14490 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14496 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
@@ -39831,14 +39837,14 @@ yyreduce:
   case 2523:
 
 /* Line 1455 of yacc.c  */
-#line 14503 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14509 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2525:
 
 /* Line 1455 of yacc.c  */
-#line 14509 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14515 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_select_to_union_list(Lex, (bool)(yyvsp[(2) - (2)].num), TRUE))
               MYSQL_YYABORT;
@@ -39848,7 +39854,7 @@ yyreduce:
   case 2526:
 
 /* Line 1455 of yacc.c  */
-#line 14514 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14520 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               Remove from the name resolution context stack the context of the
@@ -39861,42 +39867,42 @@ yyreduce:
   case 2527:
 
 /* Line 1455 of yacc.c  */
-#line 14524 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14530 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 0; }
     break;
 
   case 2528:
 
 /* Line 1455 of yacc.c  */
-#line 14525 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14531 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 2529:
 
 /* Line 1455 of yacc.c  */
-#line 14526 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14532 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)= 1; }
     break;
 
   case 2530:
 
 /* Line 1455 of yacc.c  */
-#line 14530 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14536 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.is_not_empty)= false; }
     break;
 
   case 2531:
 
 /* Line 1455 of yacc.c  */
-#line 14531 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14537 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.is_not_empty)= true; }
     break;
 
   case 2532:
 
 /* Line 1455 of yacc.c  */
-#line 14535 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14541 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
@@ -39916,7 +39922,7 @@ yyreduce:
   case 2533:
 
 /* Line 1455 of yacc.c  */
-#line 14550 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14556 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             thd->lex->current_select->no_table_names_allowed= 0;
             thd->where= "";
@@ -39926,28 +39932,28 @@ yyreduce:
   case 2536:
 
 /* Line 1455 of yacc.c  */
-#line 14562 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14568 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=1; }
     break;
 
   case 2537:
 
 /* Line 1455 of yacc.c  */
-#line 14563 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14569 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=1; }
     break;
 
   case 2538:
 
 /* Line 1455 of yacc.c  */
-#line 14564 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14570 "/home/buildbot/git/sql/sql_yacc.yy"
     { (yyval.num)=0; }
     break;
 
   case 2539:
 
 /* Line 1455 of yacc.c  */
-#line 14569 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14575 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
@@ -39956,7 +39962,7 @@ yyreduce:
   case 2540:
 
 /* Line 1455 of yacc.c  */
-#line 14573 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14579 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
@@ -39965,7 +39971,7 @@ yyreduce:
   case 2542:
 
 /* Line 1455 of yacc.c  */
-#line 14582 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14588 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (add_select_to_union_list(Lex, (bool)(yyvsp[(3) - (3)].num), FALSE))
               MYSQL_YYABORT;
@@ -39975,7 +39981,7 @@ yyreduce:
   case 2543:
 
 /* Line 1455 of yacc.c  */
-#line 14588 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14594 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->pop_context();
             (yyval.select_lex)= (yyvsp[(1) - (6)].select_lex);
@@ -39985,7 +39991,7 @@ yyreduce:
   case 2544:
 
 /* Line 1455 of yacc.c  */
-#line 14597 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14603 "/home/buildbot/git/sql/sql_yacc.yy"
     { 
             (yyval.select_lex)= (yyvsp[(2) - (3)].select_lex);
           }
@@ -39994,7 +40000,7 @@ yyreduce:
   case 2545:
 
 /* Line 1455 of yacc.c  */
-#line 14603 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14609 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
             if (!lex->expr_allows_subselect ||
@@ -40018,7 +40024,7 @@ yyreduce:
   case 2546:
 
 /* Line 1455 of yacc.c  */
-#line 14624 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14630 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex=Lex;
 
@@ -40046,14 +40052,14 @@ yyreduce:
   case 2551:
 
 /* Line 1455 of yacc.c  */
-#line 14659 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14665 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->options|= SELECT_STRAIGHT_JOIN; }
     break;
 
   case 2552:
 
 /* Line 1455 of yacc.c  */
-#line 14661 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14667 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (check_simple_select())
               MYSQL_YYABORT;
@@ -40066,28 +40072,28 @@ yyreduce:
   case 2553:
 
 /* Line 1455 of yacc.c  */
-#line 14668 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14674 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->options|= SELECT_DISTINCT; }
     break;
 
   case 2554:
 
 /* Line 1455 of yacc.c  */
-#line 14669 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14675 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->options|= SELECT_SMALL_RESULT; }
     break;
 
   case 2555:
 
 /* Line 1455 of yacc.c  */
-#line 14670 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14676 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->options|= SELECT_BIG_RESULT; }
     break;
 
   case 2556:
 
 /* Line 1455 of yacc.c  */
-#line 14672 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14678 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (check_simple_select())
               MYSQL_YYABORT;
@@ -40098,7 +40104,7 @@ yyreduce:
   case 2557:
 
 /* Line 1455 of yacc.c  */
-#line 14678 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14684 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             if (check_simple_select())
               MYSQL_YYABORT;
@@ -40109,35 +40115,35 @@ yyreduce:
   case 2558:
 
 /* Line 1455 of yacc.c  */
-#line 14683 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14689 "/home/buildbot/git/sql/sql_yacc.yy"
     { Select->options|= SELECT_ALL; }
     break;
 
   case 2559:
 
 /* Line 1455 of yacc.c  */
-#line 14694 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14700 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2560:
 
 /* Line 1455 of yacc.c  */
-#line 14696 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14702 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2561:
 
 /* Line 1455 of yacc.c  */
-#line 14698 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14704 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2575:
 
 /* Line 1455 of yacc.c  */
-#line 14731 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14737 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             /*
               We have to distinguish missing DEFINER-clause from case when
@@ -40153,7 +40159,7 @@ yyreduce:
   case 2576:
 
 /* Line 1455 of yacc.c  */
-#line 14745 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14751 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             thd->lex->definer= get_current_user(thd, (yyvsp[(3) - (3)].lex_user));
           }
@@ -40162,77 +40168,77 @@ yyreduce:
   case 2577:
 
 /* Line 1455 of yacc.c  */
-#line 14758 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14764 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2578:
 
 /* Line 1455 of yacc.c  */
-#line 14760 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14766 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2579:
 
 /* Line 1455 of yacc.c  */
-#line 14762 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14768 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2580:
 
 /* Line 1455 of yacc.c  */
-#line 14767 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14773 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_mode= VIEW_CREATE_OR_REPLACE; }
     break;
 
   case 2581:
 
 /* Line 1455 of yacc.c  */
-#line 14772 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14778 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; }
     break;
 
   case 2582:
 
 /* Line 1455 of yacc.c  */
-#line 14774 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14780 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_algorithm= VIEW_ALGORITHM_MERGE; }
     break;
 
   case 2583:
 
 /* Line 1455 of yacc.c  */
-#line 14776 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14782 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; }
     break;
 
   case 2584:
 
 /* Line 1455 of yacc.c  */
-#line 14781 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14787 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_suid= VIEW_SUID_DEFAULT; }
     break;
 
   case 2585:
 
 /* Line 1455 of yacc.c  */
-#line 14783 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14789 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_suid= VIEW_SUID_DEFINER; }
     break;
 
   case 2586:
 
 /* Line 1455 of yacc.c  */
-#line 14785 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14791 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_suid= VIEW_SUID_INVOKER; }
     break;
 
   case 2587:
 
 /* Line 1455 of yacc.c  */
-#line 14790 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14796 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             lex->sql_command= SQLCOM_CREATE_VIEW;
@@ -40249,14 +40255,14 @@ yyreduce:
   case 2589:
 
 /* Line 1455 of yacc.c  */
-#line 14806 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14812 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2591:
 
 /* Line 1455 of yacc.c  */
-#line 14812 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14818 "/home/buildbot/git/sql/sql_yacc.yy"
     {
               Lex->view_list.push_back((LEX_STRING*)
               sql_memdup(&(yyvsp[(1) - (1)].lex_str), sizeof(LEX_STRING)));
@@ -40266,7 +40272,7 @@ yyreduce:
   case 2592:
 
 /* Line 1455 of yacc.c  */
-#line 14817 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14823 "/home/buildbot/git/sql/sql_yacc.yy"
     {
               Lex->view_list.push_back((LEX_STRING*)
               sql_memdup(&(yyvsp[(3) - (3)].lex_str), sizeof(LEX_STRING)));
@@ -40276,7 +40282,7 @@ yyreduce:
   case 2593:
 
 /* Line 1455 of yacc.c  */
-#line 14824 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14830 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->parsing_options.allows_variable= FALSE;
@@ -40290,7 +40296,7 @@ yyreduce:
   case 2594:
 
 /* Line 1455 of yacc.c  */
-#line 14833 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14839 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str;
@@ -40308,35 +40314,35 @@ yyreduce:
   case 2597:
 
 /* Line 1455 of yacc.c  */
-#line 14854 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14860 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_check= VIEW_CHECK_NONE; }
     break;
 
   case 2598:
 
 /* Line 1455 of yacc.c  */
-#line 14856 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14862 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_check= VIEW_CHECK_CASCADED; }
     break;
 
   case 2599:
 
 /* Line 1455 of yacc.c  */
-#line 14858 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14864 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_check= VIEW_CHECK_CASCADED; }
     break;
 
   case 2600:
 
 /* Line 1455 of yacc.c  */
-#line 14860 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14866 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->create_view_check= VIEW_CHECK_LOCAL; }
     break;
 
   case 2601:
 
 /* Line 1455 of yacc.c  */
-#line 14877 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14883 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $8 */
             Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
           }
@@ -40345,7 +40351,7 @@ yyreduce:
   case 2602:
 
 /* Line 1455 of yacc.c  */
-#line 14883 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14889 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $12 */
             Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
           }
@@ -40354,7 +40360,7 @@ yyreduce:
   case 2603:
 
 /* Line 1455 of yacc.c  */
-#line 14888 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14894 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $15 */
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -40388,7 +40394,7 @@ yyreduce:
   case 2604:
 
 /* Line 1455 of yacc.c  */
-#line 14917 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14923 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $17 */
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -40417,7 +40423,7 @@ yyreduce:
   case 2605:
 
 /* Line 1455 of yacc.c  */
-#line 14951 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14957 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             if (is_native_function(thd, & (yyvsp[(4) - (8)].lex_str)))
@@ -40438,7 +40444,7 @@ yyreduce:
   case 2606:
 
 /* Line 1455 of yacc.c  */
-#line 14968 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14974 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             if (is_native_function(thd, & (yyvsp[(3) - (7)].lex_str)))
@@ -40459,7 +40465,7 @@ yyreduce:
   case 2607:
 
 /* Line 1455 of yacc.c  */
-#line 14990 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 14996 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $5 */
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -40494,7 +40500,7 @@ yyreduce:
   case 2608:
 
 /* Line 1455 of yacc.c  */
-#line 15021 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15027 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $8 */
             Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
           }
@@ -40503,7 +40509,7 @@ yyreduce:
   case 2609:
 
 /* Line 1455 of yacc.c  */
-#line 15025 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15031 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $10 */
             LEX *lex= Lex;
             lex->charset= NULL;
@@ -40517,7 +40523,7 @@ yyreduce:
   case 2610:
 
 /* Line 1455 of yacc.c  */
-#line 15034 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15040 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $12 */
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -40545,7 +40551,7 @@ yyreduce:
   case 2611:
 
 /* Line 1455 of yacc.c  */
-#line 15057 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15063 "/home/buildbot/git/sql/sql_yacc.yy"
     { /* $14 */
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -40558,7 +40564,7 @@ yyreduce:
   case 2612:
 
 /* Line 1455 of yacc.c  */
-#line 15065 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15071 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
             sp_head *sp= lex->sphead;
@@ -40615,7 +40621,7 @@ yyreduce:
   case 2613:
 
 /* Line 1455 of yacc.c  */
-#line 15120 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15126 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             sp_head *sp;
@@ -40644,7 +40650,7 @@ yyreduce:
   case 2614:
 
 /* Line 1455 of yacc.c  */
-#line 15144 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15150 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             const char* tmp_param_begin;
 
@@ -40657,7 +40663,7 @@ yyreduce:
   case 2615:
 
 /* Line 1455 of yacc.c  */
-#line 15153 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15159 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
 
@@ -40669,7 +40675,7 @@ yyreduce:
   case 2616:
 
 /* Line 1455 of yacc.c  */
-#line 15160 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15166 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= thd->lex;
 
@@ -40681,7 +40687,7 @@ yyreduce:
   case 2617:
 
 /* Line 1455 of yacc.c  */
-#line 15167 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15173 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -40695,7 +40701,7 @@ yyreduce:
   case 2618:
 
 /* Line 1455 of yacc.c  */
-#line 15181 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15187 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_XA_START;
           }
@@ -40704,7 +40710,7 @@ yyreduce:
   case 2619:
 
 /* Line 1455 of yacc.c  */
-#line 15185 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15191 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_XA_END;
           }
@@ -40713,7 +40719,7 @@ yyreduce:
   case 2620:
 
 /* Line 1455 of yacc.c  */
-#line 15189 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15195 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_XA_PREPARE;
           }
@@ -40722,7 +40728,7 @@ yyreduce:
   case 2621:
 
 /* Line 1455 of yacc.c  */
-#line 15193 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15199 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_XA_COMMIT;
           }
@@ -40731,7 +40737,7 @@ yyreduce:
   case 2622:
 
 /* Line 1455 of yacc.c  */
-#line 15197 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15203 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_XA_ROLLBACK;
           }
@@ -40740,7 +40746,7 @@ yyreduce:
   case 2623:
 
 /* Line 1455 of yacc.c  */
-#line 15201 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15207 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             Lex->sql_command = SQLCOM_XA_RECOVER;
           }
@@ -40749,7 +40755,7 @@ yyreduce:
   case 2624:
 
 /* Line 1455 of yacc.c  */
-#line 15208 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15214 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (1)].string)->length() <= MAXGTRIDSIZE);
             if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
@@ -40761,7 +40767,7 @@ yyreduce:
   case 2625:
 
 /* Line 1455 of yacc.c  */
-#line 15215 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15221 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (3)].string)->length() <= MAXGTRIDSIZE && (yyvsp[(3) - (3)].string)->length() <= MAXBQUALSIZE);
             if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
@@ -40773,7 +40779,7 @@ yyreduce:
   case 2626:
 
 /* Line 1455 of yacc.c  */
-#line 15222 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15228 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             MYSQL_YYABORT_UNLESS((yyvsp[(1) - (5)].string)->length() <= MAXGTRIDSIZE && (yyvsp[(3) - (5)].string)->length() <= MAXBQUALSIZE);
             if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
@@ -40785,84 +40791,84 @@ yyreduce:
   case 2627:
 
 /* Line 1455 of yacc.c  */
-#line 15231 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15237 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2628:
 
 /* Line 1455 of yacc.c  */
-#line 15232 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15238 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2629:
 
 /* Line 1455 of yacc.c  */
-#line 15236 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15242 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_NONE;        }
     break;
 
   case 2630:
 
 /* Line 1455 of yacc.c  */
-#line 15237 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15243 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_JOIN;        }
     break;
 
   case 2631:
 
 /* Line 1455 of yacc.c  */
-#line 15238 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15244 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_RESUME;      }
     break;
 
   case 2632:
 
 /* Line 1455 of yacc.c  */
-#line 15242 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15248 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_NONE;        }
     break;
 
   case 2633:
 
 /* Line 1455 of yacc.c  */
-#line 15243 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15249 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_ONE_PHASE;   }
     break;
 
   case 2634:
 
 /* Line 1455 of yacc.c  */
-#line 15248 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15254 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_NONE;        }
     break;
 
   case 2635:
 
 /* Line 1455 of yacc.c  */
-#line 15250 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15256 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_SUSPEND;     }
     break;
 
   case 2637:
 
 /* Line 1455 of yacc.c  */
-#line 15255 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15261 "/home/buildbot/git/sql/sql_yacc.yy"
     {}
     break;
 
   case 2638:
 
 /* Line 1455 of yacc.c  */
-#line 15256 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15262 "/home/buildbot/git/sql/sql_yacc.yy"
     { Lex->xa_opt=XA_FOR_MIGRATE; }
     break;
 
   case 2639:
 
 /* Line 1455 of yacc.c  */
-#line 15261 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15267 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSTALL_PLUGIN;
@@ -40874,7 +40880,7 @@ yyreduce:
   case 2640:
 
 /* Line 1455 of yacc.c  */
-#line 15268 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15274 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSTALL_PLUGIN;
@@ -40886,7 +40892,7 @@ yyreduce:
   case 2641:
 
 /* Line 1455 of yacc.c  */
-#line 15278 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15284 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
@@ -40897,7 +40903,7 @@ yyreduce:
   case 2642:
 
 /* Line 1455 of yacc.c  */
-#line 15284 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15290 "/home/buildbot/git/sql/sql_yacc.yy"
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
@@ -40909,7 +40915,7 @@ yyreduce:
   case 2643:
 
 /* Line 1455 of yacc.c  */
-#line 15295 "/home/buildbot/git/sql/sql_yacc.yy"
+#line 15301 "/home/buildbot/git/sql/sql_yacc.yy"
     {
 	  YYERROR;
 	}
@@ -40918,7 +40924,7 @@ yyreduce:
 
 
 /* Line 1455 of yacc.c  */
-#line 40922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc"
+#line 40928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 50484e0..35c7203 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -4670,6 +4670,8 @@ part_name:
           {
             partition_info *part_info= Lex->part_info;
             partition_element *p_elem= part_info->curr_part_elem;
+            if (check_ident_length(&$1))
+              MYSQL_YYABORT;
             p_elem->partition_name= $1.str;
           }
         ;
@@ -4964,7 +4966,11 @@ sub_part_definition:
 
 sub_name:
           ident_or_text
-          { Lex->part_info->curr_part_elem->partition_name= $1.str; }
+          {
+            if (check_ident_length(&$1))
+              MYSQL_YYABORT;
+            Lex->part_info->curr_part_elem->partition_name= $1.str;
+          }
         ;
 
 opt_part_options:
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 7b89890..3599752 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -31,6 +31,7 @@
 #include "my_global.h"                          /* NO_EMBEDDED_ACCESS_CHECKS */
 #include "sql_priv.h"
 #include "sql_class.h"                          // set_var.h: THD
+#include "sql_parse.h"
 #include "sys_vars.h"
 
 #include "events.h"
@@ -445,7 +446,7 @@ static bool check_cs_client(sys_var *self, THD *thd, set_var *var)
     return true;
 
   // Currently, UCS-2 cannot be used as a client character set
-  if (((CHARSET_INFO *)(var->save_result.ptr))->mbminlen > 1)
+  if (!is_supported_parser_charset((CHARSET_INFO *)(var->save_result.ptr)))
     return true;
 
   return false;
diff --git a/storage/innobase/mach/mach0data.c b/storage/innobase/mach/mach0data.c
index 95b135b..9669516 100644
--- a/storage/innobase/mach/mach0data.c
+++ b/storage/innobase/mach/mach0data.c
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 
 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
@@ -55,8 +55,22 @@ mach_parse_compressed(
 	if (flag < 0x80UL) {
 		*val = flag;
 		return(ptr + 1);
+	}
+
+	/* Workaround GCC bug
+	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77673:
+	the compiler moves mach_read_from_4 right to the beginning of the
+	function, causing and out-of-bounds read if we are reading a short
+	integer close to the end of buffer. */
+#if defined(__GNUC__) && (__GNUC__ >= 5) && !defined(__clang__)
+#define DEPLOY_FENCE
+#endif
+
+#ifdef DEPLOY_FENCE
+	__atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
 
-	} else if (flag < 0xC0UL) {
+	if (flag < 0xC0UL) {
 		if (end_ptr < ptr + 2) {
 			return(NULL);
 		}
@@ -64,8 +78,13 @@ mach_parse_compressed(
 		*val = mach_read_from_2(ptr) & 0x7FFFUL;
 
 		return(ptr + 2);
+	}
+
+#ifdef DEPLOY_FENCE
+	__atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
 
-	} else if (flag < 0xE0UL) {
+	if (flag < 0xE0UL) {
 		if (end_ptr < ptr + 3) {
 			return(NULL);
 		}
@@ -73,7 +92,13 @@ mach_parse_compressed(
 		*val = mach_read_from_3(ptr) & 0x3FFFFFUL;
 
 		return(ptr + 3);
-	} else if (flag < 0xF0UL) {
+	}
+
+#ifdef DEPLOY_FENCE
+	__atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
+
+	if (flag < 0xF0UL) {
 		if (end_ptr < ptr + 4) {
 			return(NULL);
 		}
@@ -81,14 +106,20 @@ mach_parse_compressed(
 		*val = mach_read_from_4(ptr) & 0x1FFFFFFFUL;
 
 		return(ptr + 4);
-	} else {
-		ut_ad(flag == 0xF0UL);
+	}
 
-		if (end_ptr < ptr + 5) {
-			return(NULL);
-		}
+#ifdef DEPLOY_FENCE
+	__atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
+
+#undef DEPLOY_FENCE
+
+	ut_ad(flag == 0xF0UL);
 
-		*val = mach_read_from_4(ptr + 1);
-		return(ptr + 5);
+	if (end_ptr < ptr + 5) {
+		return(NULL);
 	}
+
+	*val = mach_read_from_4(ptr + 1);
+	return(ptr + 5);
 }
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
index b67f1ea..16432d0 100644
--- a/storage/myisam/ft_boolean_search.c
+++ b/storage/myisam/ft_boolean_search.c
@@ -195,12 +195,7 @@ static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param,
   switch (info->type) {
     case FT_TOKEN_WORD:
       ftbw= (FTB_WORD *)alloc_root(&ftb_param->ftb->mem_root,
-                                   sizeof(FTB_WORD) +
-                                   (info->trunc ? HA_MAX_KEY_BUFF :
-                                    (word_len + 1) *
-                                    ftb_param->ftb->charset->mbmaxlen +
-                                    HA_FT_WLEN +
-                                    ftb_param->ftb->info->s->rec_reflength));
+                                   sizeof(FTB_WORD) + HA_MAX_KEY_BUFF);
       ftbw->len= word_len + 1;
       ftbw->flags= 0;
       ftbw->off= 0;
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_decimal.result b/storage/tokudb/mysql-test/tokudb/r/type_decimal.result
index 5d271bc..4540c24 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_decimal.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_decimal.result
@@ -222,7 +222,6 @@ drop  table t1;
 create table t1 (a decimal(10,2) unsigned);
 insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 2
 Warning	1264	Out of range value for column 'a' at row 6
 insert into t1 values ("-.1"),("+.1"),(".1");
 Warnings:
@@ -281,7 +280,6 @@ drop  table t1;
 create table t1 (a decimal(10,2) zerofill);
 insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
 Warnings:
-Warning	1264	Out of range value for column 'a' at row 2
 Warning	1264	Out of range value for column 'a' at row 6
 insert into t1 values ("-.1"),("+.1"),(".1");
 Warnings:
diff --git a/strings/decimal.c b/strings/decimal.c
index b0c57d3..3d90a58 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -928,6 +928,8 @@ internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed)
         error= decimal_shift(to, (int) exponent);
     }
   }
+  if (to->sign && decimal_is_zero(to))
+    to->sign= 0;
   return error;
 
 fatal_error:
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index d4fff33..a4034de 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -157,15 +157,9 @@ parse_server_arguments() {
 
 # Get arguments from the my.cnf file,
 # the only group, which is read from now on is [mysqld]
-if test -x ./bin/my_print_defaults
-then
-  print_defaults="./bin/my_print_defaults"
-elif test -x $bindir/my_print_defaults
+if test -x $bindir/my_print_defaults
 then
   print_defaults="$bindir/my_print_defaults"
-elif test -x $bindir/mysql_print_defaults
-then
-  print_defaults="$bindir/mysql_print_defaults"
 else
   # Try to find basedir in /etc/my.cnf
   conf=/etc/my.cnf
diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in
index b716bbf..f60c0bb 100644
--- a/win/packaging/extra.wxs.in
+++ b/win/packaging/extra.wxs.in
@@ -463,9 +463,24 @@
         <RegistryValue Root='HKLM'
            Key='SOFTWARE\@MANUFACTURER@\@CPACK_WIX_PACKAGE_NAME@'
            Name='DATADIR' Value='[DATADIR]' Type='string' KeyPath='yes'/>
+          <CreateFolder>
+            <util:PermissionEx User="NetworkService" GenericAll="yes" />
+          </CreateFolder>
+      </Component>
+
+      <Component Id="C.datadir.permissions" Directory="DATADIR">
+         <Condition>
+          <!--
+             Skip setting permissions for LogonUser, if package is installed by
+             service user (e.g LocalSystem)
+          -->
+          <![CDATA[ (UserSID <> "S-1-5-18") AND (UserSID <> "S-1-5-19") AND (UserSID <> "S-1-5-20") ]]>
+         </Condition>
+         <RegistryValue Root='HKLM'
+           Key='SOFTWARE\Monty Program AB\@CPACK_WIX_PACKAGE_NAME@'
+           Name='InstalledBy' Value='[USER_DOMAIN]\[LogonUser]' Type='string' KeyPath='yes'/>
         <CreateFolder>
           <util:PermissionEx User="[LogonUser]" Domain="[USER_DOMAIN]" GenericAll="yes" />
-          <util:PermissionEx User="NetworkService" GenericAll="yes" />
         </CreateFolder>
       </Component>
 
diff --git a/win/packaging/heidisql.cmake b/win/packaging/heidisql.cmake
index e2636eb..772834e 100644
--- a/win/packaging/heidisql.cmake
+++ b/win/packaging/heidisql.cmake
@@ -1,4 +1,4 @@
-SET(HEIDISQL_BASE_NAME "HeidiSQL_9.3_Portable")
+SET(HEIDISQL_BASE_NAME "HeidiSQL_9.4_Portable")
 SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
 SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}")
 SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})
diff --git a/win/packaging/heidisql.wxi.in b/win/packaging/heidisql.wxi.in
index 4f07a07..1d5c443 100644
--- a/win/packaging/heidisql.wxi.in
+++ b/win/packaging/heidisql.wxi.in
@@ -45,14 +45,20 @@
     <Component Id="component.HeidiSQL_ssleay32.dll" Guid="*" Win64="no">
       <File Id="heidisql.ssleay32.dll" Name="ssleay32.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\ssleay32.dll" />
     </Component>
-    <Component Id="component.HeidiSQL_libintl.dll" Guid="*" Win64="no">
-      <File Id="heidisql.libintl.dll" Name="libintl.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libintl.dll" />
+    <Component Id="component.HeidiSQL_libintl_8.dll" Guid="*" Win64="no">
+      <File Id="heidisql.libintl_8.dll" Name="libintl-8.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libintl-8.dll" />
+    </Component>
+    <Component Id="component.HeidiSQL_libiconv_2.dll" Guid="*" Win64="no">
+      <File Id="heidisql.libiconv_2.dll" Name="libiconv-2.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libiconv-2.dll" />
     </Component>
 
     <Directory Id="D.HeidiSQL.plugins" Name="plugins">
       <Component Id="component.HeidiSQL_dialog.dll" Guid="*" Win64="no">
         <File Id="heidisql.dialog.dll" Name="dialog.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\plugins\dialog.dll" />
       </Component>
+      <Component Id="component.HeidiSQL_auth_gssapi_client.dll" Guid="*" Win64="no">
+        <File Id="heidisql.auth_gssapi_client.dll" Name="auth_gssapi_client.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\plugins\auth_gssapi_client.dll" />
+      </Component>
     </Directory>
 
     <Component Id="component.HeidiSQL_CleanupSettings" Guid="*" Win64="no">
@@ -70,8 +76,10 @@
   <ComponentRef Id="component.HeidiSQL_libeay32.dll" />
   <ComponentRef Id="component.HeidiSQL_libpq.dll" />
   <ComponentRef Id="component.HeidiSQL_ssleay32.dll" />
-  <ComponentRef Id="component.HeidiSQL_libintl.dll" />
+  <ComponentRef Id="component.HeidiSQL_libintl_8.dll" />
+  <ComponentRef Id="component.HeidiSQL_libiconv_2.dll" />
   <ComponentRef Id="component.HeidiSQL_dialog.dll" />
+  <ComponentRef Id="component.HeidiSQL_auth_gssapi_client.dll" />
   <ComponentRef Id="component.HeidiSQL_CleanupSettings"/>
 </ComponentGroup>
 </Include>

-- 
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-mysql/mariadb-5.5.git



More information about the Pkg-mysql-commits mailing list