Skip to content
Permalink
Browse files

Merge 10.3 into 10.4

  • Loading branch information...
dr-m committed Jun 19, 2019
2 parents efbfcc8 + 192aa29 commit 02979daab48d871e8c43a227b8f4462128439f17
Showing with 4,013 additions and 519 deletions.
  1. +1 −1 BUILD/SETUP.sh
  2. +1 −1 BUILD/compile-dist
  3. +1 −1 BUILD/compile-pentium-icc
  4. +1 −1 BUILD/compile-pentium-icc-yassl
  5. +1 −1 BUILD/compile-pentium-pgcc
  6. +1 −1 BUILD/compile-pentium32-icc-valgrind-max
  7. +1 −1 BUILD/compile-solaris-sparc
  8. +1 −1 BUILD/compile-solaris-sparc-debug
  9. +1 −1 BUILD/compile-solaris-sparc-purify
  10. +3 −1 client/mysql.cc
  11. +4 −1 client/mysqladmin.cc
  12. +4 −2 client/mysqlcheck.c
  13. +5 −2 client/mysqlimport.c
  14. +3 −1 client/mysqlshow.c
  15. +1 −0 include/my_sys.h
  16. +61 −0 mysql-test/include/column_compression_syntax_varbinary.inc
  17. +99 −0 mysql-test/include/column_compression_syntax_varchar.inc
  18. +2 −0 mysql-test/main/charset_client_win.result
  19. +2 −0 mysql-test/main/charset_client_win.test
  20. +1,190 −13 mysql-test/main/column_compression.result
  21. +82 −8 mysql-test/main/column_compression.test
  22. +33 −0 mysql-test/main/keywords.result
  23. +36 −0 mysql-test/main/keywords.test
  24. +37 −1 mysql-test/main/mysqldump_restore.result
  25. +23 −1 mysql-test/main/mysqldump_restore.test
  26. +27 −0 mysql-test/main/sp.result
  27. +26 −0 mysql-test/main/sp.test
  28. +1,324 −0 mysql-test/suite/compat/oracle/r/column_compression.result
  29. +26 −0 mysql-test/suite/compat/oracle/r/keywords.result
  30. +38 −0 mysql-test/suite/compat/oracle/r/mysqldump_restore.result
  31. +73 −0 mysql-test/suite/compat/oracle/t/column_compression.test
  32. +29 −0 mysql-test/suite/compat/oracle/t/keywords.test
  33. +30 −0 mysql-test/suite/compat/oracle/t/mysqldump_restore.test
  34. +2 −2 mysql-test/suite/innodb/r/instant_alter_charset.result
  35. +2 −2 mysql-test/suite/innodb/t/instant_alter_charset.test
  36. +43 −0 mysql-test/suite/maria/alter.result
  37. +35 −0 mysql-test/suite/maria/alter.test
  38. +23 −0 mysql-test/suite/maria/temporary.result
  39. +20 −0 mysql-test/suite/maria/temporary.test
  40. +40 −2 mysql-test/suite/vcol/r/vcol_misc.result
  41. +38 −4 mysql-test/suite/vcol/t/vcol_misc.test
  42. +217 −1 mysys/charset.c
  43. +2 −0 mysys/my_pread.c
  44. +6 −246 sql-common/client.c
  45. +37 −9 sql/field.cc
  46. +4 −0 sql/field.h
  47. +1 −2 sql/records.cc
  48. +1 −1 sql/set_var.cc
  49. +16 −12 sql/sql_admin.cc
  50. +1 −1 sql/sql_handler.cc
  51. +3 −0 sql/sql_insert.cc
  52. +7 −2 sql/sql_parse.cc
  53. +2 −0 sql/sql_table.cc
  54. +73 −35 sql/sql_yacc.yy
  55. +76 −37 sql/sql_yacc_ora.yy
  56. +3 −0 sql/temporary_tables.cc
  57. +1 −1 storage/innobase/handler/handler0alter.cc
  58. +19 −1 storage/innobase/include/dyn0buf.h
  59. +1 −1 storage/innobase/include/mtr0mtr.h
  60. +15 −1 storage/innobase/include/mtr0mtr.ic
  61. +3 −1 storage/innobase/include/mtr0types.h
  62. +56 −62 storage/innobase/mtr/mtr0mtr.cc
  63. +5 −2 storage/maria/ha_maria.cc
  64. +2 −0 storage/maria/ma_blockrec.c
  65. +1 −4 storage/maria/ma_close.c
  66. +5 −2 storage/maria/ma_delete_all.c
  67. +7 −2 storage/maria/ma_packrec.c
  68. +1 −2 storage/maria/ma_pagecache.c
  69. +5 −0 storage/maria/ma_test1.c
  70. +8 −0 storage/maria/maria_def.h
  71. +39 −14 storage/rocksdb/ha_rocksdb.cc
  72. +1 −25 storage/rocksdb/ha_rocksdb.h
  73. +10 −1 storage/rocksdb/mysql-test/rocksdb/r/mariadb_misc_binlog.result
  74. +2 −2 storage/rocksdb/mysql-test/rocksdb/r/rpl_statement.result
  75. +11 −1 storage/rocksdb/mysql-test/rocksdb/t/mariadb_misc_binlog.test
  76. +2 −2 storage/rocksdb/mysql-test/rocksdb/t/rpl_statement.test
@@ -170,7 +170,7 @@ debug_cflags="-DEXTRA_DEBUG -DSAFE_MUTEX -DSAFEMALLOC"
error_inject="--with-error-inject "
#
# Base C++ flags for all builds
base_cxxflags="-felide-constructors -fexceptions -fno-rtti"
base_cxxflags="-felide-constructors -fexceptions"
#
# Flags for optimizing builds.
# Be as fast as we can be without losing our ability to backtrace.
@@ -48,7 +48,7 @@ if test -z "$CXX" ; then
# Set some required compile options
if test -z "$CXXFLAGS" ; then
export CXXFLAGS
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
CXXFLAGS="-felide-constructors -fno-exceptions"
fi
fi

@@ -34,7 +34,7 @@ extra_flags="$fast_cflags -unroll2 -ip -mp -restrict"
# IPO link: can not find "-lstdc++_shared"
# icpc: error: problem during multi-file optimization compilation (code 1)
extra_flags="$extra_flags -no-ipo"
base_cxxflags="-fno-exceptions -fno-rtti"
base_cxxflags="-fno-exceptions"
extra_configs="$pentium_configs $static_link $disable_64_bit_plugins"

. "$path/FINISH.sh"
@@ -34,7 +34,7 @@ extra_flags="$fast_cflags -unroll2 -ip -mp -restrict"
# IPO link: can not find "-lstdc++_shared"
# icpc: error: problem during multi-file optimization compilation (code 1)
extra_flags="$extra_flags -no-ipo"
base_cxxflags="-fno-exceptions -fno-rtti"
base_cxxflags="-fno-exceptions"
extra_configs="$pentium_configs $static_link --with-yassl"

. "$path/FINISH.sh"
@@ -8,7 +8,7 @@ path=`dirname $0`
. "$path/autorun.sh"

export PATH=/usr/local/pgcc/bin:$PATH
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static

gmake -j 4

@@ -57,7 +57,7 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"

c_warnings="-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
cxx_warnings="$c_warnings -wd869,874"
base_cxxflags="-fno-exceptions -fno-rtti"
base_cxxflags="-fno-exceptions"
extra_configs="$pentium_configs $debug_configs $valgrind_configs"

. "$path/FINISH.sh"
@@ -24,6 +24,6 @@ PATH=$PATH:/usr/ccs/bin:/usr/local/bin
path=`dirname $0`
. "$path/autorun.sh"

CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client

make -j 4
@@ -6,6 +6,6 @@ make -k clean || true
path=`dirname $0`
. "$path/autorun.sh"

CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug

make -j 4
@@ -37,7 +37,7 @@ make -k maintainer-clean || true
path=`dirname $0`
. "$path/autorun.sh"

CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_valgrind -DEXTRA_DEBUG -O2" CXX=g++ CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_valgrind -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_valgrind -DEXTRA_DEBUG -O2" CXX=g++ CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -DHAVE_valgrind -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS

make -j 4

@@ -40,6 +40,7 @@
#include "my_readline.h"
#include <signal.h>
#include <violite.h>
#include <my_sys.h>
#include <source_revision.h>
#if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H)
#include <locale.h>
@@ -4694,7 +4695,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
select_limit,max_join_size);
mysql_options(&mysql, MYSQL_INIT_COMMAND, init_command);
}

if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);

my_bool can_handle_expired= opt_connect_expired_password || !status.batch;
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2010, 2017, MariaDB
Copyright (c) 2010, 2019, 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
@@ -26,6 +26,7 @@
#include <welcome_copyright_notice.h>
#include <my_rnd.h>
#include <password.h>
#include <my_sys.h>

#define ADMIN_VERSION "9.1"
#define MAX_MYSQL_VAR 512
@@ -366,6 +367,8 @@ int main(int argc,char *argv[])
#endif
if (opt_protocol)
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
error_flags= (myf)(opt_nobeep ? 0 : ME_BELL);

@@ -434,8 +434,10 @@ static int get_options(int *argc, char ***argv)
else
default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME;
}
if (strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME) &&
!get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))
if (!strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();

if (!get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))
{
printf("Unsupported character set: %s\n", default_charset);
DBUG_RETURN(1);
@@ -30,6 +30,8 @@
#define IMPORT_VERSION "3.7"

#include "client_priv.h"
#include <my_sys.h>

#include "mysql_version.h"

#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
@@ -461,8 +463,9 @@ static MYSQL *db_connect(char *host, char *database,

if (opt_default_auth && *opt_default_auth)
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);

mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset);
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, my_default_csname());
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
"program_name", "mysqlimport");
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2010, 2017, MariaDB
Copyright (c) 2010, 2019, 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
@@ -130,6 +130,8 @@ int main(int argc, char **argv)
if (opt_protocol)
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);

if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);

if (opt_plugin_dir && *opt_plugin_dir)
@@ -1049,6 +1049,7 @@ extern char *get_tty_password(const char *opt_message);
/* File system character set */
extern CHARSET_INFO *fs_character_set(void);
#endif
extern const char *my_default_csname(void);
extern size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length);
@@ -0,0 +1,61 @@
--echo #
--echo # The following statements run without warnings.
--echo #

--eval CREATE TABLE t1 (a $type COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;


--echo #
--echo # The following statements run without warnings.
--echo # They have extra column attributes (or GENERATED) after COMPRESSED.
--echo #

--eval CREATE TABLE t1 (a $type COMPRESSED DEFAULT '')
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED NULL)
SHOW CREATE TABLE t1;
DROP TABLE t1;

--eval CREATE TABLE t1 (a $type COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10)))
SHOW CREATE TABLE t1;
DROP TABLE t1;


--echo #
--echo # The following statements return deprecated syntax warnings
--echo #

--eval CREATE TABLE t1 (a $type DEFAULT '' COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type NULL COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;


--echo #
--echo # The following statements fail by the grammar,
--echo # because COMPRESSED immediately follows 'field_type'.
--echo #

--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED COMPRESSED)

--echo #
--echo # The following statements are not prohibited by the *.yy grammar,
--echo # because the sequence `field_type attribute COMPRESSED` is allowed
--echo # (notice there is at least one attribute after `field_type`).
--echo # The first COMPRESSED is parsed inside `field_type`.
--echo # The second COMPRESSED passes through the parser but then is caught
--echo # inside Column_definition::set_compressed_deprecated_with_type_check()
--echo # and a syntax error is raised.
--echo #

--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED DEFAULT '' COMPRESSED)
--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED NULL COMPRESSED)
--error ER_PARSE_ERROR
@@ -0,0 +1,99 @@
--echo #
--echo # The following statements run without warnings.
--echo # The `compressed opt_binary` grammar sequence is covered.
--echo #

--eval CREATE TABLE t1 (a $type COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED BINARY)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED BINARY ASCII)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED BYTE)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED ASCII)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED UNICODE)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED CHARACTER SET utf8)
SHOW CREATE TABLE t1;
DROP TABLE t1;


--echo #
--echo # The following statements run without warnings.
--echo # They have extra column attributes (or GENERATED) after COMPRESSED.
--echo #

--eval CREATE TABLE t1 (a $type COMPRESSED BYTE DEFAULT '')
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED BINARY DEFAULT '')
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED ASCII DEFAULT '')
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type COMPRESSED CHARACTER SET utf8 DEFAULT '')
SHOW CREATE TABLE t1;
DROP TABLE t1;

--eval CREATE TABLE t1 (a $type COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100)))
SHOW CREATE TABLE t1;
DROP TABLE t1;


--echo #
--echo # The following statements return deprecated syntax warnings
--echo #

--eval CREATE TABLE t1 (a $type BINARY COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type ASCII COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type BYTE COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;


--echo #
--echo # The following statements fail by the grammar,
--echo # because COMPRESSED immediately follows 'field_type'.
--echo #

--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED BYTE COMPRESSED)
--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED BINARY COMPRESSED)
--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED ASCII COMPRESSED)
--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED CHARACTER SET utf8 COMPRESSED)


--echo #
--echo # The following statements are not prohibited by the *.yy grammar,
--echo # because the sequence `field_type attribute COMPRESSED` is allowed
--echo # (notice there is at least one attribute after `field_type`).
--echo # The first COMPRESSED is parsed inside `field_type`.
--echo # The second COMPRESSED passes through the parser but then is caught
--echo # inside Column_definition::set_compressed_deprecated_with_type_check()
--echo # and a syntax error is raised.
--echo #

--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED BYTE DEFAULT '' COMPRESSED)
--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED BINARY DEFAULT '' COMPRESSED)
--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED ASCII DEFAULT '' COMPRESSED)
--error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type COMPRESSED CHARACTER SET utf8 DEFAULT '' COMPRESSED)
@@ -0,0 +1,2 @@
@@character_set_client
cp1257
@@ -0,0 +1,2 @@
--source include/windows.inc
--exec chcp 1257 > NUL && $MYSQL --default-character-set=auto -e "select @@character_set_client"

0 comments on commit 02979da

Please sign in to comment.
You can’t perform that action at this time.