Merge lp:~laurynas-biveinis/percona-server/tokudb-compression into lp:percona-server/5.6

Proposed by Laurynas Biveinis on 2013-12-16
Status: Merged
Approved by: Stewart Smith on 2013-12-17
Approved revision: 517
Merged at revision: 519
Proposed branch: lp:~laurynas-biveinis/percona-server/tokudb-compression
Merge into: lp:percona-server/5.6
Diff against target: 379 lines (+151/-14)
13 files modified
Percona-Server/mysql-test/r/information_schema.result (+1/-1)
Percona-Server/mysql-test/r/mysqldump.result (+1/-1)
Percona-Server/mysql-test/r/show_check.result (+2/-2)
Percona-Server/mysql-test/r/tokudb_zip_grammar.result (+37/-0)
Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result (+4/-4)
Percona-Server/mysql-test/suite/funcs_1/r/is_tables.result (+3/-3)
Percona-Server/mysql-test/t/tokudb_zip_grammar.test (+50/-0)
Percona-Server/sql/handler.cc (+2/-0)
Percona-Server/sql/handler.h (+4/-1)
Percona-Server/sql/lex.h (+6/-0)
Percona-Server/sql/sql_show.cc (+20/-2)
Percona-Server/sql/sql_yacc.yy (+18/-0)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+3/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/tokudb-compression
Reviewer Review Type Date Requested Status
Stewart Smith (community) 2013-12-16 Approve on 2013-12-17
George Ormond Lorch III g2 2013-12-16 Pending
Review via email: mp+199152@code.launchpad.net

This proposal supersedes a proposal from 2013-12-02.

Description of the change

2nd MP:

Added a test that the new reserved words are usable as identifiers
Rebased on the current trunk

http://jenkins.percona.com/job/percona-server-5.6-param/453/

1st MP:

Add TokuDB compression format ROW_TYPE support, implementing
https://blueprints.launchpad.net/percona-server/+spec/support-tokudb-compression-algorithms.

Add new lexer symbols TOKUDB_UNCOMPRESSED, TOKUDB_ZLIB,
TOKUDB_QUICKLZ, TOKUDB_LZMA, TOKUDB_FAST, TOKUDB_SMALL, accept them as
valid ROW_TYPE option values in the parser, add corresponding values
to enum row_type.

Add support for them to get_schema_tables_record() so that
INFORMATION_SCHEMA.TABLES can return them, as well as bump
ROW_FORMAT field length for I_S.TABLES and I_S.FILES tables to
accomodate longer strings.

In InnoDB, handle the new option values as unsupported in
get_row_format_name(), create_options_are_invalid(),
innobase_table_flags(). Other SEs do not require this.

Add a testcase innodb_zip_grammar to test the grammar changes and
InnoDB/MyISAM/Memory handling of compression formats as unsupported
create options. Re-record information_schema, mysqldump, show_check,
funcs_1.is_tables, and funcs_1.is_columns_is for the changed
I_S.*.ROW_FORMAT width.

http://jenkins.percona.com/job/percona-server-5.6-param/427/

To post a comment you must log in.
George Ormond Lorch III (gl-az) : Posted in a previous version of this proposal
review: Approve (g2)
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal

I'd like to see a test where we use the strings as identifiers/column names just to test that we're not unintentionally making these being needed to be quoted.

Otherwise approved.

review: Needs Fixing
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/mysql-test/r/information_schema.result'
--- Percona-Server/mysql-test/r/information_schema.result 2013-05-27 03:01:29 +0000
+++ Percona-Server/mysql-test/r/information_schema.result 2013-12-16 16:21:05 +0000
@@ -1227,7 +1227,7 @@
1227column_type GROUP_CONCAT(table_schema, '.', table_name) num1227column_type GROUP_CONCAT(table_schema, '.', table_name) num
1228varchar(7) information_schema.ROUTINES,information_schema.VIEWS 21228varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2
1229varchar(30) information_schema.COLUMNS,information_schema.PROFILING,information_schema.PROFILING 31229varchar(30) information_schema.COLUMNS,information_schema.PROFILING,information_schema.PROFILING 3
1230varchar(20) information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING 61230varchar(20) information_schema.FILES,information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING,information_schema.TABLES 8
1231create table t1(f1 char(1) not null, f2 char(9) not null)1231create table t1(f1 char(1) not null, f2 char(9) not null)
1232default character set utf8;1232default character set utf8;
1233select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from1233select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
12341234
=== modified file 'Percona-Server/mysql-test/r/mysqldump.result'
--- Percona-Server/mysql-test/r/mysqldump.result 2013-10-23 08:48:28 +0000
+++ Percona-Server/mysql-test/r/mysqldump.result 2013-12-16 16:21:05 +0000
@@ -3617,7 +3617,7 @@
3617 `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '',3617 `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '',
3618 `ENGINE` varchar(64) DEFAULT NULL,3618 `ENGINE` varchar(64) DEFAULT NULL,
3619 `VERSION` bigint(21) unsigned DEFAULT NULL,3619 `VERSION` bigint(21) unsigned DEFAULT NULL,
3620 `ROW_FORMAT` varchar(10) DEFAULT NULL,3620 `ROW_FORMAT` varchar(20) DEFAULT NULL,
3621 `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL,3621 `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL,
3622 `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL,3622 `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL,
3623 `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL,3623 `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL,
36243624
=== modified file 'Percona-Server/mysql-test/r/show_check.result'
--- Percona-Server/mysql-test/r/show_check.result 2013-06-25 13:13:06 +0000
+++ Percona-Server/mysql-test/r/show_check.result 2013-12-16 16:21:05 +0000
@@ -120,7 +120,7 @@
120def information_schema TABLES TABLES TABLE_NAME Name 253 64 0 N 1 0 8120def information_schema TABLES TABLES TABLE_NAME Name 253 64 0 N 1 0 8
121def information_schema TABLES TABLES ENGINE Engine 253 64 0 Y 0 0 8121def information_schema TABLES TABLES ENGINE Engine 253 64 0 Y 0 0 8
122def information_schema TABLES TABLES VERSION Version 8 21 0 Y 32800 0 63122def information_schema TABLES TABLES VERSION Version 8 21 0 Y 32800 0 63
123def information_schema TABLES TABLES ROW_FORMAT Row_format 253 10 0 Y 0 0 8123def information_schema TABLES TABLES ROW_FORMAT Row_format 253 20 0 Y 0 0 8
124def information_schema TABLES TABLES TABLE_ROWS Rows 8 21 0 Y 32800 0 63124def information_schema TABLES TABLES TABLE_ROWS Rows 8 21 0 Y 32800 0 63
125def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32800 0 63125def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32800 0 63
126def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 32800 0 63126def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 32800 0 63
@@ -928,7 +928,7 @@
928def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33928def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
929def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33929def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33
930def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 0 0 33930def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 0 0 33
931def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 30 5 Y 0 0 33931def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 60 5 Y 0 0 33
932def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 96 17 Y 0 0 33932def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 96 17 Y 0 0 33
933def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 765 0 Y 0 0 33933def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 765 0 Y 0 0 33
934def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 6144 0 N 1 0 33934def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 6144 0 N 1 0 33
935935
=== added file 'Percona-Server/mysql-test/r/tokudb_zip_grammar.result'
--- Percona-Server/mysql-test/r/tokudb_zip_grammar.result 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/r/tokudb_zip_grammar.result 2013-12-16 16:21:05 +0000
@@ -0,0 +1,37 @@
1CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=TOKUDB_UNCOMPRESSED;
2Warnings:
3Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
4ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB;
5Warnings:
6Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
7ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ;
8Warnings:
9Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
10ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA;
11Warnings:
12Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
13ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST;
14Warnings:
15Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
16ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL;
17Warnings:
18Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
19ALTER TABLE t1 ROW_FORMAT=TOKUDB_UNDEFINED;
20ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TOKUDB_UNDEFINED' at line 1
21SET @@SESSION.innodb_strict_mode=ON;
22ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB;
23ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
24ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ;
25ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
26ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA;
27ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
28ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST;
29ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
30ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL;
31ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
32SET @@SESSION.innodb_strict_mode=DEFAULT;
33CREATE TABLE t2 (a INT) ENGINE=MyISAM ROW_FORMAT=TOKUDB_ZLIB;
34CREATE TABLE t3 (a INT) ENGINE=MEMORY ROW_FORMAT=TOKUDB_QUICKLZ;
35DROP TABLE t1, t2, t3;
36CREATE TABLE TOKUDB_UNCOMPRESSED(TOKUDB_ZLIB INT, TOKUDB_QUICKLZ INT, TOKUDB_LZMA INT, TOKUDB_FAST INT, TOKUDB_SMALL INT);
37DROP TABLE TOKUDB_UNCOMPRESSED;
038
=== modified file 'Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result'
--- Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result 2013-05-30 19:00:08 +0000
+++ Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result 2013-12-16 16:21:05 +0000
@@ -120,7 +120,7 @@
120def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select 120def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
121def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select 121def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
122def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select 122def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select
123def information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select 123def information_schema FILES ROW_FORMAT 26 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select
124def information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select 124def information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select
125def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select 125def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
126def information_schema FILES TABLE_CATALOG 5 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select 126def information_schema FILES TABLE_CATALOG 5 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -313,7 +313,7 @@
313def information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select 313def information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
314def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select 314def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
315def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select 315def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
316def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select 316def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select
317def information_schema TABLES TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select 317def information_schema TABLES TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
318def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select 318def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
319def information_schema TABLES TABLE_COMMENT 21 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select 319def information_schema TABLES TABLE_COMMENT 21 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
@@ -629,7 +629,7 @@
629NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4)629NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4)
630NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4)630NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4)
631NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned631NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
6323.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10)6323.0000 information_schema FILES ROW_FORMAT varchar 20 60 utf8 utf8_general_ci varchar(20)
633NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned633NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
634NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned634NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
635NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned635NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
@@ -818,7 +818,7 @@
8183.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)8183.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
8193.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)8193.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)
820NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned820NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
8213.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10)8213.0000 information_schema TABLES ROW_FORMAT varchar 20 60 utf8 utf8_general_ci varchar(20)
822NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned822NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
823NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned823NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
824NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned824NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
825825
=== modified file 'Percona-Server/mysql-test/suite/funcs_1/r/is_tables.result'
--- Percona-Server/mysql-test/suite/funcs_1/r/is_tables.result 2010-02-20 10:07:32 +0000
+++ Percona-Server/mysql-test/suite/funcs_1/r/is_tables.result 2013-12-16 16:21:05 +0000
@@ -34,7 +34,7 @@
34TABLE_TYPE varchar(64) NO 34TABLE_TYPE varchar(64) NO
35ENGINE varchar(64) YES NULL 35ENGINE varchar(64) YES NULL
36VERSION bigint(21) unsigned YES NULL 36VERSION bigint(21) unsigned YES NULL
37ROW_FORMAT varchar(10) YES NULL 37ROW_FORMAT varchar(20) YES NULL
38TABLE_ROWS bigint(21) unsigned YES NULL 38TABLE_ROWS bigint(21) unsigned YES NULL
39AVG_ROW_LENGTH bigint(21) unsigned YES NULL 39AVG_ROW_LENGTH bigint(21) unsigned YES NULL
40DATA_LENGTH bigint(21) unsigned YES NULL 40DATA_LENGTH bigint(21) unsigned YES NULL
@@ -58,7 +58,7 @@
58 `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '',58 `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '',
59 `ENGINE` varchar(64) DEFAULT NULL,59 `ENGINE` varchar(64) DEFAULT NULL,
60 `VERSION` bigint(21) unsigned DEFAULT NULL,60 `VERSION` bigint(21) unsigned DEFAULT NULL,
61 `ROW_FORMAT` varchar(10) DEFAULT NULL,61 `ROW_FORMAT` varchar(20) DEFAULT NULL,
62 `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL,62 `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL,
63 `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL,63 `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL,
64 `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL,64 `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL,
@@ -82,7 +82,7 @@
82TABLE_TYPE varchar(64) NO 82TABLE_TYPE varchar(64) NO
83ENGINE varchar(64) YES NULL 83ENGINE varchar(64) YES NULL
84VERSION bigint(21) unsigned YES NULL 84VERSION bigint(21) unsigned YES NULL
85ROW_FORMAT varchar(10) YES NULL 85ROW_FORMAT varchar(20) YES NULL
86TABLE_ROWS bigint(21) unsigned YES NULL 86TABLE_ROWS bigint(21) unsigned YES NULL
87AVG_ROW_LENGTH bigint(21) unsigned YES NULL 87AVG_ROW_LENGTH bigint(21) unsigned YES NULL
88DATA_LENGTH bigint(21) unsigned YES NULL 88DATA_LENGTH bigint(21) unsigned YES NULL
8989
=== added file 'Percona-Server/mysql-test/t/tokudb_zip_grammar.test'
--- Percona-Server/mysql-test/t/tokudb_zip_grammar.test 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/t/tokudb_zip_grammar.test 2013-12-16 16:21:05 +0000
@@ -0,0 +1,50 @@
1#
2# Test TokuDB compression option additions to row_format
3#
4--source include/have_innodb.inc
5
6#
7# InnoDB returns a warning on unsupported format if InnoDB strict mode off
8#
9
10CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=TOKUDB_UNCOMPRESSED;
11
12ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB;
13ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ;
14ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA;
15ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST;
16ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL;
17
18--error ER_PARSE_ERROR
19ALTER TABLE t1 ROW_FORMAT=TOKUDB_UNDEFINED;
20
21SET @@SESSION.innodb_strict_mode=ON;
22
23--error ER_ILLEGAL_HA_CREATE_OPTION
24ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB;
25--error ER_ILLEGAL_HA_CREATE_OPTION
26ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ;
27--error ER_ILLEGAL_HA_CREATE_OPTION
28ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA;
29--error ER_ILLEGAL_HA_CREATE_OPTION
30ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST;
31--error ER_ILLEGAL_HA_CREATE_OPTION
32ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL;
33
34SET @@SESSION.innodb_strict_mode=DEFAULT;
35
36#
37# Other storage engines silently convert unsupported formats to default
38#
39
40CREATE TABLE t2 (a INT) ENGINE=MyISAM ROW_FORMAT=TOKUDB_ZLIB;
41
42CREATE TABLE t3 (a INT) ENGINE=MEMORY ROW_FORMAT=TOKUDB_QUICKLZ;
43
44DROP TABLE t1, t2, t3;
45
46#
47# Test that the new ROW_FORMAT types are still usable as identifiers
48#
49CREATE TABLE TOKUDB_UNCOMPRESSED(TOKUDB_ZLIB INT, TOKUDB_QUICKLZ INT, TOKUDB_LZMA INT, TOKUDB_FAST INT, TOKUDB_SMALL INT);
50DROP TABLE TOKUDB_UNCOMPRESSED;
051
=== modified file 'Percona-Server/sql/handler.cc'
--- Percona-Server/sql/handler.cc 2013-12-16 08:45:31 +0000
+++ Percona-Server/sql/handler.cc 2013-12-16 16:21:05 +0000
@@ -94,6 +94,8 @@
94const char *ha_row_type[] = {94const char *ha_row_type[] = {
95 "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT",95 "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT",
96 /* Reserved to be "PAGE" in future versions */ "?",96 /* Reserved to be "PAGE" in future versions */ "?",
97 "TOKUDB_UNCOMPRESSED", "TOKUDB_ZLIB", "TOKUDB_QUICKLZ", "TOKUDB_LZMA",
98 "TOKUDB_FAST", "TOKUDB_SMALL",
97 "?","?","?"99 "?","?","?"
98};100};
99101
100102
=== modified file 'Percona-Server/sql/handler.h'
--- Percona-Server/sql/handler.h 2013-12-05 17:23:10 +0000
+++ Percona-Server/sql/handler.h 2013-12-16 16:21:05 +0000
@@ -404,7 +404,10 @@
404 ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,404 ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
405 ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT,405 ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT,
406 /** Unused. Reserved for future versions. */406 /** Unused. Reserved for future versions. */
407 ROW_TYPE_PAGE };407 ROW_TYPE_PAGE,
408 ROW_TYPE_TOKU_UNCOMPRESSED, ROW_TYPE_TOKU_ZLIB,
409 ROW_TYPE_TOKU_QUICKLZ, ROW_TYPE_TOKU_LZMA,
410 ROW_TYPE_TOKU_FAST, ROW_TYPE_TOKU_SMALL };
408411
409/* Specifies data storage format for individual columns */412/* Specifies data storage format for individual columns */
410enum column_format_type {413enum column_format_type {
411414
=== modified file 'Percona-Server/sql/lex.h'
--- Percona-Server/sql/lex.h 2013-09-27 17:47:04 +0000
+++ Percona-Server/sql/lex.h 2013-12-16 16:21:05 +0000
@@ -596,6 +596,12 @@
596 { "TINYINT", SYM(TINYINT)},596 { "TINYINT", SYM(TINYINT)},
597 { "TINYTEXT", SYM(TINYTEXT)},597 { "TINYTEXT", SYM(TINYTEXT)},
598 { "TO", SYM(TO_SYM)},598 { "TO", SYM(TO_SYM)},
599 { "TOKUDB_UNCOMPRESSED", SYM(TOKU_UNCOMPRESSED_SYM)},
600 { "TOKUDB_ZLIB", SYM(TOKU_ZLIB_SYM)},
601 { "TOKUDB_QUICKLZ", SYM(TOKU_QUICKLZ_SYM)},
602 { "TOKUDB_LZMA", SYM(TOKU_LZMA_SYM)},
603 { "TOKUDB_FAST", SYM(TOKU_FAST_SYM)},
604 { "TOKUDB_SMALL", SYM(TOKU_SMALL_SYM)},
599 { "TRAILING", SYM(TRAILING)},605 { "TRAILING", SYM(TRAILING)},
600 { "TRANSACTION", SYM(TRANSACTION_SYM)},606 { "TRANSACTION", SYM(TRANSACTION_SYM)},
601 { "TRIGGER", SYM(TRIGGER_SYM)},607 { "TRIGGER", SYM(TRIGGER_SYM)},
602608
=== modified file 'Percona-Server/sql/sql_show.cc'
--- Percona-Server/sql/sql_show.cc 2013-12-16 08:45:31 +0000
+++ Percona-Server/sql/sql_show.cc 2013-12-16 16:21:05 +0000
@@ -4901,6 +4901,24 @@
4901 case ROW_TYPE_PAGE:4901 case ROW_TYPE_PAGE:
4902 tmp_buff= "Paged";4902 tmp_buff= "Paged";
4903 break;4903 break;
4904 case ROW_TYPE_TOKU_UNCOMPRESSED:
4905 tmp_buff= "tokudb_uncompressed";
4906 break;
4907 case ROW_TYPE_TOKU_ZLIB:
4908 tmp_buff= "tokudb_zlib";
4909 break;
4910 case ROW_TYPE_TOKU_QUICKLZ:
4911 tmp_buff= "tokudb_quicklz";
4912 break;
4913 case ROW_TYPE_TOKU_LZMA:
4914 tmp_buff= "tokudb_lzma";
4915 break;
4916 case ROW_TYPE_TOKU_FAST:
4917 tmp_buff= "tokudb_fast";
4918 break;
4919 case ROW_TYPE_TOKU_SMALL:
4920 tmp_buff= "tokudb_small";
4921 break;
4904 }4922 }
49054923
4906 table->field[6]->store(tmp_buff, strlen(tmp_buff), cs);4924 table->field[6]->store(tmp_buff, strlen(tmp_buff), cs);
@@ -7895,7 +7913,7 @@
7895 {"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Engine", OPEN_FRM_ONLY},7913 {"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Engine", OPEN_FRM_ONLY},
7896 {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,7914 {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
7897 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Version", OPEN_FRM_ONLY},7915 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Version", OPEN_FRM_ONLY},
7898 {"ROW_FORMAT", 10, MYSQL_TYPE_STRING, 0, 1, "Row_format", OPEN_FULL_TABLE},7916 {"ROW_FORMAT", 20, MYSQL_TYPE_STRING, 0, 1, "Row_format", OPEN_FULL_TABLE},
7899 {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,7917 {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
7900 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Rows", OPEN_FULL_TABLE},7918 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Rows", OPEN_FULL_TABLE},
7901 {"AVG_ROW_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, 7919 {"AVG_ROW_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
@@ -8607,7 +8625,7 @@
8607 {"TRANSACTION_COUNTER", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0, SKIP_OPEN_TABLE},8625 {"TRANSACTION_COUNTER", 4, MYSQL_TYPE_LONGLONG, 0, 1, 0, SKIP_OPEN_TABLE},
8608 {"VERSION", 21 , MYSQL_TYPE_LONGLONG, 0,8626 {"VERSION", 21 , MYSQL_TYPE_LONGLONG, 0,
8609 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Version", SKIP_OPEN_TABLE},8627 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Version", SKIP_OPEN_TABLE},
8610 {"ROW_FORMAT", 10, MYSQL_TYPE_STRING, 0, 1, "Row_format", SKIP_OPEN_TABLE},8628 {"ROW_FORMAT", 20, MYSQL_TYPE_STRING, 0, 1, "Row_format", SKIP_OPEN_TABLE},
8611 {"TABLE_ROWS", 21 , MYSQL_TYPE_LONGLONG, 0,8629 {"TABLE_ROWS", 21 , MYSQL_TYPE_LONGLONG, 0,
8612 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Rows", SKIP_OPEN_TABLE},8630 (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "Rows", SKIP_OPEN_TABLE},
8613 {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, 8631 {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0,
86148632
=== modified file 'Percona-Server/sql/sql_yacc.yy'
--- Percona-Server/sql/sql_yacc.yy 2013-12-05 17:23:10 +0000
+++ Percona-Server/sql/sql_yacc.yy 2013-12-16 16:21:05 +0000
@@ -1610,6 +1610,12 @@
1610%token TINYINT1610%token TINYINT
1611%token TINYTEXT1611%token TINYTEXT
1612%token TO_SYM /* SQL-2003-R */1612%token TO_SYM /* SQL-2003-R */
1613%token TOKU_UNCOMPRESSED_SYM
1614%token TOKU_ZLIB_SYM
1615%token TOKU_QUICKLZ_SYM
1616%token TOKU_LZMA_SYM
1617%token TOKU_FAST_SYM
1618%token TOKU_SMALL_SYM
1613%token TRAILING /* SQL-2003-R */1619%token TRAILING /* SQL-2003-R */
1614%token TRANSACTION_SYM1620%token TRANSACTION_SYM
1615%token TRIGGERS_SYM1621%token TRIGGERS_SYM
@@ -6269,6 +6275,12 @@
6269 | COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; }6275 | COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; }
6270 | REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; }6276 | REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; }
6271 | COMPACT_SYM { $$= ROW_TYPE_COMPACT; }6277 | COMPACT_SYM { $$= ROW_TYPE_COMPACT; }
6278 | TOKU_UNCOMPRESSED_SYM { $$= ROW_TYPE_TOKU_UNCOMPRESSED; }
6279 | TOKU_ZLIB_SYM { $$= ROW_TYPE_TOKU_ZLIB; }
6280 | TOKU_QUICKLZ_SYM { $$= ROW_TYPE_TOKU_QUICKLZ; }
6281 | TOKU_LZMA_SYM { $$= ROW_TYPE_TOKU_LZMA; }
6282 | TOKU_FAST_SYM { $$= ROW_TYPE_TOKU_FAST; }
6283 | TOKU_SMALL_SYM { $$= ROW_TYPE_TOKU_SMALL; }
6272 ;6284 ;
62736285
6274merge_insert_types:6286merge_insert_types:
@@ -14513,6 +14525,12 @@
14513 | TIMESTAMP_ADD {}14525 | TIMESTAMP_ADD {}
14514 | TIMESTAMP_DIFF {}14526 | TIMESTAMP_DIFF {}
14515 | TIME_SYM {}14527 | TIME_SYM {}
14528 | TOKU_UNCOMPRESSED_SYM {}
14529 | TOKU_ZLIB_SYM {}
14530 | TOKU_QUICKLZ_SYM {}
14531 | TOKU_LZMA_SYM {}
14532 | TOKU_SMALL_SYM {}
14533 | TOKU_FAST_SYM {}
14516 | TYPES_SYM {}14534 | TYPES_SYM {}
14517 | TYPE_SYM {}14535 | TYPE_SYM {}
14518 | UDF_RETURNS_SYM {}14536 | UDF_RETURNS_SYM {}
1451914537
=== modified file 'Percona-Server/storage/innobase/handler/ha_innodb.cc'
--- Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-12-16 08:45:31 +0000
+++ Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-12-16 16:21:05 +0000
@@ -9471,6 +9471,7 @@
9471 return("FIXED");9471 return("FIXED");
9472 case ROW_TYPE_PAGE:9472 case ROW_TYPE_PAGE:
9473 case ROW_TYPE_NOT_USED:9473 case ROW_TYPE_NOT_USED:
9474 default:
9474 break;9475 break;
9475 }9476 }
9476 return("NOT USED");9477 return("NOT USED");
@@ -9616,6 +9617,7 @@
9616 case ROW_TYPE_FIXED:9617 case ROW_TYPE_FIXED:
9617 case ROW_TYPE_PAGE:9618 case ROW_TYPE_PAGE:
9618 case ROW_TYPE_NOT_USED:9619 case ROW_TYPE_NOT_USED:
9620 default:
9619 push_warning(9621 push_warning(
9620 thd, Sql_condition::WARN_LEVEL_WARN,9622 thd, Sql_condition::WARN_LEVEL_WARN,
9621 ER_ILLEGAL_HA_CREATE_OPTION, \9623 ER_ILLEGAL_HA_CREATE_OPTION, \
@@ -9989,6 +9991,7 @@
9989 case ROW_TYPE_NOT_USED:9991 case ROW_TYPE_NOT_USED:
9990 case ROW_TYPE_FIXED:9992 case ROW_TYPE_FIXED:
9991 case ROW_TYPE_PAGE:9993 case ROW_TYPE_PAGE:
9994 default:
9992 push_warning(9995 push_warning(
9993 thd, Sql_condition::WARN_LEVEL_WARN,9996 thd, Sql_condition::WARN_LEVEL_WARN,
9994 ER_ILLEGAL_HA_CREATE_OPTION,9997 ER_ILLEGAL_HA_CREATE_OPTION,

Subscribers

People subscribed via source and target branches