Merge lp:~laurynas-biveinis/percona-server/tokudb-compression into lp:percona-server/5.6
- tokudb-compression
- Merge into 5.6
Status: | Merged |
---|---|
Approved by: | Stewart Smith |
Approved revision: | no longer in the source branch. |
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 |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
George Ormond Lorch III | g2 | Pending | |
Review via email: mp+199152@code.launchpad.net |
This proposal supersedes a proposal from 2013-12-02.
Commit message
Description of the change
2nd MP:
Added a test that the new reserved words are usable as identifiers
Rebased on the current trunk
http://
1st MP:
Add TokuDB compression format ROW_TYPE support, implementing
https:/
Add new lexer symbols TOKUDB_
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_
INFORMATION_
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_
innobase_
Add a testcase innodb_zip_grammar to test the grammar changes and
InnoDB/
create options. Re-record information_schema, mysqldump, show_check,
funcs_1.is_tables, and funcs_1.
I_S.*.ROW_FORMAT width.
http://
George Ormond Lorch III (gl-az) : Posted in a previous version of this proposal | # |
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal | # |
Stewart Smith (stewart) : | # |
Preview Diff
1 | === modified file 'Percona-Server/mysql-test/r/information_schema.result' | |||
2 | --- Percona-Server/mysql-test/r/information_schema.result 2013-05-27 03:01:29 +0000 | |||
3 | +++ Percona-Server/mysql-test/r/information_schema.result 2013-12-16 16:21:05 +0000 | |||
4 | @@ -1227,7 +1227,7 @@ | |||
5 | 1227 | column_type GROUP_CONCAT(table_schema, '.', table_name) num | 1227 | column_type GROUP_CONCAT(table_schema, '.', table_name) num |
6 | 1228 | varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2 | 1228 | varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2 |
7 | 1229 | varchar(30) information_schema.COLUMNS,information_schema.PROFILING,information_schema.PROFILING 3 | 1229 | varchar(30) information_schema.COLUMNS,information_schema.PROFILING,information_schema.PROFILING 3 |
9 | 1230 | varchar(20) information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING 6 | 1230 | varchar(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 |
10 | 1231 | create table t1(f1 char(1) not null, f2 char(9) not null) | 1231 | create table t1(f1 char(1) not null, f2 char(9) not null) |
11 | 1232 | default character set utf8; | 1232 | default character set utf8; |
12 | 1233 | select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from | 1233 | select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from |
13 | 1234 | 1234 | ||
14 | === modified file 'Percona-Server/mysql-test/r/mysqldump.result' | |||
15 | --- Percona-Server/mysql-test/r/mysqldump.result 2013-10-23 08:48:28 +0000 | |||
16 | +++ Percona-Server/mysql-test/r/mysqldump.result 2013-12-16 16:21:05 +0000 | |||
17 | @@ -3617,7 +3617,7 @@ | |||
18 | 3617 | `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', | 3617 | `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', |
19 | 3618 | `ENGINE` varchar(64) DEFAULT NULL, | 3618 | `ENGINE` varchar(64) DEFAULT NULL, |
20 | 3619 | `VERSION` bigint(21) unsigned DEFAULT NULL, | 3619 | `VERSION` bigint(21) unsigned DEFAULT NULL, |
22 | 3620 | `ROW_FORMAT` varchar(10) DEFAULT NULL, | 3620 | `ROW_FORMAT` varchar(20) DEFAULT NULL, |
23 | 3621 | `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, | 3621 | `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, |
24 | 3622 | `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, | 3622 | `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, |
25 | 3623 | `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, | 3623 | `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, |
26 | 3624 | 3624 | ||
27 | === modified file 'Percona-Server/mysql-test/r/show_check.result' | |||
28 | --- Percona-Server/mysql-test/r/show_check.result 2013-06-25 13:13:06 +0000 | |||
29 | +++ Percona-Server/mysql-test/r/show_check.result 2013-12-16 16:21:05 +0000 | |||
30 | @@ -120,7 +120,7 @@ | |||
31 | 120 | def information_schema TABLES TABLES TABLE_NAME Name 253 64 0 N 1 0 8 | 120 | def information_schema TABLES TABLES TABLE_NAME Name 253 64 0 N 1 0 8 |
32 | 121 | def information_schema TABLES TABLES ENGINE Engine 253 64 0 Y 0 0 8 | 121 | def information_schema TABLES TABLES ENGINE Engine 253 64 0 Y 0 0 8 |
33 | 122 | def information_schema TABLES TABLES VERSION Version 8 21 0 Y 32800 0 63 | 122 | def information_schema TABLES TABLES VERSION Version 8 21 0 Y 32800 0 63 |
35 | 123 | def information_schema TABLES TABLES ROW_FORMAT Row_format 253 10 0 Y 0 0 8 | 123 | def information_schema TABLES TABLES ROW_FORMAT Row_format 253 20 0 Y 0 0 8 |
36 | 124 | def information_schema TABLES TABLES TABLE_ROWS Rows 8 21 0 Y 32800 0 63 | 124 | def information_schema TABLES TABLES TABLE_ROWS Rows 8 21 0 Y 32800 0 63 |
37 | 125 | def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32800 0 63 | 125 | def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32800 0 63 |
38 | 126 | def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 32800 0 63 | 126 | def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 32800 0 63 |
39 | @@ -928,7 +928,7 @@ | |||
40 | 928 | def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 | 928 | def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 |
41 | 929 | def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33 | 929 | def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33 |
42 | 930 | def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 0 0 33 | 930 | def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 0 0 33 |
44 | 931 | def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 30 5 Y 0 0 33 | 931 | def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 60 5 Y 0 0 33 |
45 | 932 | def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 96 17 Y 0 0 33 | 932 | def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 96 17 Y 0 0 33 |
46 | 933 | def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 765 0 Y 0 0 33 | 933 | def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 765 0 Y 0 0 33 |
47 | 934 | def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 6144 0 N 1 0 33 | 934 | def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 6144 0 N 1 0 33 |
48 | 935 | 935 | ||
49 | === added file 'Percona-Server/mysql-test/r/tokudb_zip_grammar.result' | |||
50 | --- Percona-Server/mysql-test/r/tokudb_zip_grammar.result 1970-01-01 00:00:00 +0000 | |||
51 | +++ Percona-Server/mysql-test/r/tokudb_zip_grammar.result 2013-12-16 16:21:05 +0000 | |||
52 | @@ -0,0 +1,37 @@ | |||
53 | 1 | CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=TOKUDB_UNCOMPRESSED; | ||
54 | 2 | Warnings: | ||
55 | 3 | Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. | ||
56 | 4 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB; | ||
57 | 5 | Warnings: | ||
58 | 6 | Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. | ||
59 | 7 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ; | ||
60 | 8 | Warnings: | ||
61 | 9 | Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. | ||
62 | 10 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA; | ||
63 | 11 | Warnings: | ||
64 | 12 | Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. | ||
65 | 13 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST; | ||
66 | 14 | Warnings: | ||
67 | 15 | Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. | ||
68 | 16 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL; | ||
69 | 17 | Warnings: | ||
70 | 18 | Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. | ||
71 | 19 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_UNDEFINED; | ||
72 | 20 | ERROR 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 | ||
73 | 21 | SET @@SESSION.innodb_strict_mode=ON; | ||
74 | 22 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB; | ||
75 | 23 | ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' | ||
76 | 24 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ; | ||
77 | 25 | ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' | ||
78 | 26 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA; | ||
79 | 27 | ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' | ||
80 | 28 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST; | ||
81 | 29 | ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' | ||
82 | 30 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL; | ||
83 | 31 | ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' | ||
84 | 32 | SET @@SESSION.innodb_strict_mode=DEFAULT; | ||
85 | 33 | CREATE TABLE t2 (a INT) ENGINE=MyISAM ROW_FORMAT=TOKUDB_ZLIB; | ||
86 | 34 | CREATE TABLE t3 (a INT) ENGINE=MEMORY ROW_FORMAT=TOKUDB_QUICKLZ; | ||
87 | 35 | DROP TABLE t1, t2, t3; | ||
88 | 36 | CREATE TABLE TOKUDB_UNCOMPRESSED(TOKUDB_ZLIB INT, TOKUDB_QUICKLZ INT, TOKUDB_LZMA INT, TOKUDB_FAST INT, TOKUDB_SMALL INT); | ||
89 | 37 | DROP TABLE TOKUDB_UNCOMPRESSED; | ||
90 | 0 | 38 | ||
91 | === modified file 'Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result' | |||
92 | --- Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result 2013-05-30 19:00:08 +0000 | |||
93 | +++ Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result 2013-12-16 16:21:05 +0000 | |||
94 | @@ -120,7 +120,7 @@ | |||
95 | 120 | def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select | 120 | def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select |
96 | 121 | def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select | 121 | def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select |
97 | 122 | def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select | 122 | def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select |
99 | 123 | def information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select | 123 | def information_schema FILES ROW_FORMAT 26 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select |
100 | 124 | def information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select | 124 | def information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select |
101 | 125 | def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select | 125 | def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select |
102 | 126 | def information_schema FILES TABLE_CATALOG 5 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select | 126 | def information_schema FILES TABLE_CATALOG 5 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select |
103 | @@ -313,7 +313,7 @@ | |||
104 | 313 | def information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select | 313 | def information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select |
105 | 314 | def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select | 314 | def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select |
106 | 315 | def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select | 315 | def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select |
108 | 316 | def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select | 316 | def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select |
109 | 317 | def information_schema TABLES TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select | 317 | def information_schema TABLES TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select |
110 | 318 | def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select | 318 | def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select |
111 | 319 | def information_schema TABLES TABLE_COMMENT 21 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select | 319 | def information_schema TABLES TABLE_COMMENT 21 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select |
112 | @@ -629,7 +629,7 @@ | |||
113 | 629 | NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4) | 629 | NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4) |
114 | 630 | NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4) | 630 | NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4) |
115 | 631 | NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned | 631 | NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned |
117 | 632 | 3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) | 632 | 3.0000 information_schema FILES ROW_FORMAT varchar 20 60 utf8 utf8_general_ci varchar(20) |
118 | 633 | NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned | 633 | NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned |
119 | 634 | NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned | 634 | NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned |
120 | 635 | NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned | 635 | NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned |
121 | @@ -818,7 +818,7 @@ | |||
122 | 818 | 3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) | 818 | 3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) |
123 | 819 | 3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) | 819 | 3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) |
124 | 820 | NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned | 820 | NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned |
126 | 821 | 3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) | 821 | 3.0000 information_schema TABLES ROW_FORMAT varchar 20 60 utf8 utf8_general_ci varchar(20) |
127 | 822 | NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned | 822 | NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned |
128 | 823 | NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned | 823 | NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned |
129 | 824 | NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned | 824 | NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned |
130 | 825 | 825 | ||
131 | === modified file 'Percona-Server/mysql-test/suite/funcs_1/r/is_tables.result' | |||
132 | --- Percona-Server/mysql-test/suite/funcs_1/r/is_tables.result 2010-02-20 10:07:32 +0000 | |||
133 | +++ Percona-Server/mysql-test/suite/funcs_1/r/is_tables.result 2013-12-16 16:21:05 +0000 | |||
134 | @@ -34,7 +34,7 @@ | |||
135 | 34 | TABLE_TYPE varchar(64) NO | 34 | TABLE_TYPE varchar(64) NO |
136 | 35 | ENGINE varchar(64) YES NULL | 35 | ENGINE varchar(64) YES NULL |
137 | 36 | VERSION bigint(21) unsigned YES NULL | 36 | VERSION bigint(21) unsigned YES NULL |
139 | 37 | ROW_FORMAT varchar(10) YES NULL | 37 | ROW_FORMAT varchar(20) YES NULL |
140 | 38 | TABLE_ROWS bigint(21) unsigned YES NULL | 38 | TABLE_ROWS bigint(21) unsigned YES NULL |
141 | 39 | AVG_ROW_LENGTH bigint(21) unsigned YES NULL | 39 | AVG_ROW_LENGTH bigint(21) unsigned YES NULL |
142 | 40 | DATA_LENGTH bigint(21) unsigned YES NULL | 40 | DATA_LENGTH bigint(21) unsigned YES NULL |
143 | @@ -58,7 +58,7 @@ | |||
144 | 58 | `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', | 58 | `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', |
145 | 59 | `ENGINE` varchar(64) DEFAULT NULL, | 59 | `ENGINE` varchar(64) DEFAULT NULL, |
146 | 60 | `VERSION` bigint(21) unsigned DEFAULT NULL, | 60 | `VERSION` bigint(21) unsigned DEFAULT NULL, |
148 | 61 | `ROW_FORMAT` varchar(10) DEFAULT NULL, | 61 | `ROW_FORMAT` varchar(20) DEFAULT NULL, |
149 | 62 | `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, | 62 | `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, |
150 | 63 | `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, | 63 | `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, |
151 | 64 | `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, | 64 | `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, |
152 | @@ -82,7 +82,7 @@ | |||
153 | 82 | TABLE_TYPE varchar(64) NO | 82 | TABLE_TYPE varchar(64) NO |
154 | 83 | ENGINE varchar(64) YES NULL | 83 | ENGINE varchar(64) YES NULL |
155 | 84 | VERSION bigint(21) unsigned YES NULL | 84 | VERSION bigint(21) unsigned YES NULL |
157 | 85 | ROW_FORMAT varchar(10) YES NULL | 85 | ROW_FORMAT varchar(20) YES NULL |
158 | 86 | TABLE_ROWS bigint(21) unsigned YES NULL | 86 | TABLE_ROWS bigint(21) unsigned YES NULL |
159 | 87 | AVG_ROW_LENGTH bigint(21) unsigned YES NULL | 87 | AVG_ROW_LENGTH bigint(21) unsigned YES NULL |
160 | 88 | DATA_LENGTH bigint(21) unsigned YES NULL | 88 | DATA_LENGTH bigint(21) unsigned YES NULL |
161 | 89 | 89 | ||
162 | === added file 'Percona-Server/mysql-test/t/tokudb_zip_grammar.test' | |||
163 | --- Percona-Server/mysql-test/t/tokudb_zip_grammar.test 1970-01-01 00:00:00 +0000 | |||
164 | +++ Percona-Server/mysql-test/t/tokudb_zip_grammar.test 2013-12-16 16:21:05 +0000 | |||
165 | @@ -0,0 +1,50 @@ | |||
166 | 1 | # | ||
167 | 2 | # Test TokuDB compression option additions to row_format | ||
168 | 3 | # | ||
169 | 4 | --source include/have_innodb.inc | ||
170 | 5 | |||
171 | 6 | # | ||
172 | 7 | # InnoDB returns a warning on unsupported format if InnoDB strict mode off | ||
173 | 8 | # | ||
174 | 9 | |||
175 | 10 | CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=TOKUDB_UNCOMPRESSED; | ||
176 | 11 | |||
177 | 12 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB; | ||
178 | 13 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ; | ||
179 | 14 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA; | ||
180 | 15 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST; | ||
181 | 16 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL; | ||
182 | 17 | |||
183 | 18 | --error ER_PARSE_ERROR | ||
184 | 19 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_UNDEFINED; | ||
185 | 20 | |||
186 | 21 | SET @@SESSION.innodb_strict_mode=ON; | ||
187 | 22 | |||
188 | 23 | --error ER_ILLEGAL_HA_CREATE_OPTION | ||
189 | 24 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_ZLIB; | ||
190 | 25 | --error ER_ILLEGAL_HA_CREATE_OPTION | ||
191 | 26 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_QUICKLZ; | ||
192 | 27 | --error ER_ILLEGAL_HA_CREATE_OPTION | ||
193 | 28 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_LZMA; | ||
194 | 29 | --error ER_ILLEGAL_HA_CREATE_OPTION | ||
195 | 30 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_FAST; | ||
196 | 31 | --error ER_ILLEGAL_HA_CREATE_OPTION | ||
197 | 32 | ALTER TABLE t1 ROW_FORMAT=TOKUDB_SMALL; | ||
198 | 33 | |||
199 | 34 | SET @@SESSION.innodb_strict_mode=DEFAULT; | ||
200 | 35 | |||
201 | 36 | # | ||
202 | 37 | # Other storage engines silently convert unsupported formats to default | ||
203 | 38 | # | ||
204 | 39 | |||
205 | 40 | CREATE TABLE t2 (a INT) ENGINE=MyISAM ROW_FORMAT=TOKUDB_ZLIB; | ||
206 | 41 | |||
207 | 42 | CREATE TABLE t3 (a INT) ENGINE=MEMORY ROW_FORMAT=TOKUDB_QUICKLZ; | ||
208 | 43 | |||
209 | 44 | DROP TABLE t1, t2, t3; | ||
210 | 45 | |||
211 | 46 | # | ||
212 | 47 | # Test that the new ROW_FORMAT types are still usable as identifiers | ||
213 | 48 | # | ||
214 | 49 | CREATE TABLE TOKUDB_UNCOMPRESSED(TOKUDB_ZLIB INT, TOKUDB_QUICKLZ INT, TOKUDB_LZMA INT, TOKUDB_FAST INT, TOKUDB_SMALL INT); | ||
215 | 50 | DROP TABLE TOKUDB_UNCOMPRESSED; | ||
216 | 0 | 51 | ||
217 | === modified file 'Percona-Server/sql/handler.cc' | |||
218 | --- Percona-Server/sql/handler.cc 2013-12-16 08:45:31 +0000 | |||
219 | +++ Percona-Server/sql/handler.cc 2013-12-16 16:21:05 +0000 | |||
220 | @@ -94,6 +94,8 @@ | |||
221 | 94 | const char *ha_row_type[] = { | 94 | const char *ha_row_type[] = { |
222 | 95 | "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", | 95 | "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", |
223 | 96 | /* Reserved to be "PAGE" in future versions */ "?", | 96 | /* Reserved to be "PAGE" in future versions */ "?", |
224 | 97 | "TOKUDB_UNCOMPRESSED", "TOKUDB_ZLIB", "TOKUDB_QUICKLZ", "TOKUDB_LZMA", | ||
225 | 98 | "TOKUDB_FAST", "TOKUDB_SMALL", | ||
226 | 97 | "?","?","?" | 99 | "?","?","?" |
227 | 98 | }; | 100 | }; |
228 | 99 | 101 | ||
229 | 100 | 102 | ||
230 | === modified file 'Percona-Server/sql/handler.h' | |||
231 | --- Percona-Server/sql/handler.h 2013-12-05 17:23:10 +0000 | |||
232 | +++ Percona-Server/sql/handler.h 2013-12-16 16:21:05 +0000 | |||
233 | @@ -404,7 +404,10 @@ | |||
234 | 404 | ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED, | 404 | ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED, |
235 | 405 | ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT, | 405 | ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT, |
236 | 406 | /** Unused. Reserved for future versions. */ | 406 | /** Unused. Reserved for future versions. */ |
238 | 407 | ROW_TYPE_PAGE }; | 407 | ROW_TYPE_PAGE, |
239 | 408 | ROW_TYPE_TOKU_UNCOMPRESSED, ROW_TYPE_TOKU_ZLIB, | ||
240 | 409 | ROW_TYPE_TOKU_QUICKLZ, ROW_TYPE_TOKU_LZMA, | ||
241 | 410 | ROW_TYPE_TOKU_FAST, ROW_TYPE_TOKU_SMALL }; | ||
242 | 408 | 411 | ||
243 | 409 | /* Specifies data storage format for individual columns */ | 412 | /* Specifies data storage format for individual columns */ |
244 | 410 | enum column_format_type { | 413 | enum column_format_type { |
245 | 411 | 414 | ||
246 | === modified file 'Percona-Server/sql/lex.h' | |||
247 | --- Percona-Server/sql/lex.h 2013-09-27 17:47:04 +0000 | |||
248 | +++ Percona-Server/sql/lex.h 2013-12-16 16:21:05 +0000 | |||
249 | @@ -596,6 +596,12 @@ | |||
250 | 596 | { "TINYINT", SYM(TINYINT)}, | 596 | { "TINYINT", SYM(TINYINT)}, |
251 | 597 | { "TINYTEXT", SYM(TINYTEXT)}, | 597 | { "TINYTEXT", SYM(TINYTEXT)}, |
252 | 598 | { "TO", SYM(TO_SYM)}, | 598 | { "TO", SYM(TO_SYM)}, |
253 | 599 | { "TOKUDB_UNCOMPRESSED", SYM(TOKU_UNCOMPRESSED_SYM)}, | ||
254 | 600 | { "TOKUDB_ZLIB", SYM(TOKU_ZLIB_SYM)}, | ||
255 | 601 | { "TOKUDB_QUICKLZ", SYM(TOKU_QUICKLZ_SYM)}, | ||
256 | 602 | { "TOKUDB_LZMA", SYM(TOKU_LZMA_SYM)}, | ||
257 | 603 | { "TOKUDB_FAST", SYM(TOKU_FAST_SYM)}, | ||
258 | 604 | { "TOKUDB_SMALL", SYM(TOKU_SMALL_SYM)}, | ||
259 | 599 | { "TRAILING", SYM(TRAILING)}, | 605 | { "TRAILING", SYM(TRAILING)}, |
260 | 600 | { "TRANSACTION", SYM(TRANSACTION_SYM)}, | 606 | { "TRANSACTION", SYM(TRANSACTION_SYM)}, |
261 | 601 | { "TRIGGER", SYM(TRIGGER_SYM)}, | 607 | { "TRIGGER", SYM(TRIGGER_SYM)}, |
262 | 602 | 608 | ||
263 | === modified file 'Percona-Server/sql/sql_show.cc' | |||
264 | --- Percona-Server/sql/sql_show.cc 2013-12-16 08:45:31 +0000 | |||
265 | +++ Percona-Server/sql/sql_show.cc 2013-12-16 16:21:05 +0000 | |||
266 | @@ -4901,6 +4901,24 @@ | |||
267 | 4901 | case ROW_TYPE_PAGE: | 4901 | case ROW_TYPE_PAGE: |
268 | 4902 | tmp_buff= "Paged"; | 4902 | tmp_buff= "Paged"; |
269 | 4903 | break; | 4903 | break; |
270 | 4904 | case ROW_TYPE_TOKU_UNCOMPRESSED: | ||
271 | 4905 | tmp_buff= "tokudb_uncompressed"; | ||
272 | 4906 | break; | ||
273 | 4907 | case ROW_TYPE_TOKU_ZLIB: | ||
274 | 4908 | tmp_buff= "tokudb_zlib"; | ||
275 | 4909 | break; | ||
276 | 4910 | case ROW_TYPE_TOKU_QUICKLZ: | ||
277 | 4911 | tmp_buff= "tokudb_quicklz"; | ||
278 | 4912 | break; | ||
279 | 4913 | case ROW_TYPE_TOKU_LZMA: | ||
280 | 4914 | tmp_buff= "tokudb_lzma"; | ||
281 | 4915 | break; | ||
282 | 4916 | case ROW_TYPE_TOKU_FAST: | ||
283 | 4917 | tmp_buff= "tokudb_fast"; | ||
284 | 4918 | break; | ||
285 | 4919 | case ROW_TYPE_TOKU_SMALL: | ||
286 | 4920 | tmp_buff= "tokudb_small"; | ||
287 | 4921 | break; | ||
288 | 4904 | } | 4922 | } |
289 | 4905 | 4923 | ||
290 | 4906 | table->field[6]->store(tmp_buff, strlen(tmp_buff), cs); | 4924 | table->field[6]->store(tmp_buff, strlen(tmp_buff), cs); |
291 | @@ -7895,7 +7913,7 @@ | |||
292 | 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}, |
293 | 7896 | {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, | 7914 | {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, |
294 | 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}, |
296 | 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}, |
297 | 7899 | {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, | 7917 | {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, |
298 | 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}, |
299 | 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, |
300 | @@ -8607,7 +8625,7 @@ | |||
301 | 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}, |
302 | 8608 | {"VERSION", 21 , MYSQL_TYPE_LONGLONG, 0, | 8626 | {"VERSION", 21 , MYSQL_TYPE_LONGLONG, 0, |
303 | 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}, |
305 | 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}, |
306 | 8611 | {"TABLE_ROWS", 21 , MYSQL_TYPE_LONGLONG, 0, | 8629 | {"TABLE_ROWS", 21 , MYSQL_TYPE_LONGLONG, 0, |
307 | 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}, |
308 | 8613 | {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, | 8631 | {"AVG_ROW_LENGTH", 21 , MYSQL_TYPE_LONGLONG, 0, |
309 | 8614 | 8632 | ||
310 | === modified file 'Percona-Server/sql/sql_yacc.yy' | |||
311 | --- Percona-Server/sql/sql_yacc.yy 2013-12-05 17:23:10 +0000 | |||
312 | +++ Percona-Server/sql/sql_yacc.yy 2013-12-16 16:21:05 +0000 | |||
313 | @@ -1610,6 +1610,12 @@ | |||
314 | 1610 | %token TINYINT | 1610 | %token TINYINT |
315 | 1611 | %token TINYTEXT | 1611 | %token TINYTEXT |
316 | 1612 | %token TO_SYM /* SQL-2003-R */ | 1612 | %token TO_SYM /* SQL-2003-R */ |
317 | 1613 | %token TOKU_UNCOMPRESSED_SYM | ||
318 | 1614 | %token TOKU_ZLIB_SYM | ||
319 | 1615 | %token TOKU_QUICKLZ_SYM | ||
320 | 1616 | %token TOKU_LZMA_SYM | ||
321 | 1617 | %token TOKU_FAST_SYM | ||
322 | 1618 | %token TOKU_SMALL_SYM | ||
323 | 1613 | %token TRAILING /* SQL-2003-R */ | 1619 | %token TRAILING /* SQL-2003-R */ |
324 | 1614 | %token TRANSACTION_SYM | 1620 | %token TRANSACTION_SYM |
325 | 1615 | %token TRIGGERS_SYM | 1621 | %token TRIGGERS_SYM |
326 | @@ -6269,6 +6275,12 @@ | |||
327 | 6269 | | COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; } | 6275 | | COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; } |
328 | 6270 | | REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; } | 6276 | | REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; } |
329 | 6271 | | COMPACT_SYM { $$= ROW_TYPE_COMPACT; } | 6277 | | COMPACT_SYM { $$= ROW_TYPE_COMPACT; } |
330 | 6278 | | TOKU_UNCOMPRESSED_SYM { $$= ROW_TYPE_TOKU_UNCOMPRESSED; } | ||
331 | 6279 | | TOKU_ZLIB_SYM { $$= ROW_TYPE_TOKU_ZLIB; } | ||
332 | 6280 | | TOKU_QUICKLZ_SYM { $$= ROW_TYPE_TOKU_QUICKLZ; } | ||
333 | 6281 | | TOKU_LZMA_SYM { $$= ROW_TYPE_TOKU_LZMA; } | ||
334 | 6282 | | TOKU_FAST_SYM { $$= ROW_TYPE_TOKU_FAST; } | ||
335 | 6283 | | TOKU_SMALL_SYM { $$= ROW_TYPE_TOKU_SMALL; } | ||
336 | 6272 | ; | 6284 | ; |
337 | 6273 | 6285 | ||
338 | 6274 | merge_insert_types: | 6286 | merge_insert_types: |
339 | @@ -14513,6 +14525,12 @@ | |||
340 | 14513 | | TIMESTAMP_ADD {} | 14525 | | TIMESTAMP_ADD {} |
341 | 14514 | | TIMESTAMP_DIFF {} | 14526 | | TIMESTAMP_DIFF {} |
342 | 14515 | | TIME_SYM {} | 14527 | | TIME_SYM {} |
343 | 14528 | | TOKU_UNCOMPRESSED_SYM {} | ||
344 | 14529 | | TOKU_ZLIB_SYM {} | ||
345 | 14530 | | TOKU_QUICKLZ_SYM {} | ||
346 | 14531 | | TOKU_LZMA_SYM {} | ||
347 | 14532 | | TOKU_SMALL_SYM {} | ||
348 | 14533 | | TOKU_FAST_SYM {} | ||
349 | 14516 | | TYPES_SYM {} | 14534 | | TYPES_SYM {} |
350 | 14517 | | TYPE_SYM {} | 14535 | | TYPE_SYM {} |
351 | 14518 | | UDF_RETURNS_SYM {} | 14536 | | UDF_RETURNS_SYM {} |
352 | 14519 | 14537 | ||
353 | === modified file 'Percona-Server/storage/innobase/handler/ha_innodb.cc' | |||
354 | --- Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-12-16 08:45:31 +0000 | |||
355 | +++ Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-12-16 16:21:05 +0000 | |||
356 | @@ -9471,6 +9471,7 @@ | |||
357 | 9471 | return("FIXED"); | 9471 | return("FIXED"); |
358 | 9472 | case ROW_TYPE_PAGE: | 9472 | case ROW_TYPE_PAGE: |
359 | 9473 | case ROW_TYPE_NOT_USED: | 9473 | case ROW_TYPE_NOT_USED: |
360 | 9474 | default: | ||
361 | 9474 | break; | 9475 | break; |
362 | 9475 | } | 9476 | } |
363 | 9476 | return("NOT USED"); | 9477 | return("NOT USED"); |
364 | @@ -9616,6 +9617,7 @@ | |||
365 | 9616 | case ROW_TYPE_FIXED: | 9617 | case ROW_TYPE_FIXED: |
366 | 9617 | case ROW_TYPE_PAGE: | 9618 | case ROW_TYPE_PAGE: |
367 | 9618 | case ROW_TYPE_NOT_USED: | 9619 | case ROW_TYPE_NOT_USED: |
368 | 9620 | default: | ||
369 | 9619 | push_warning( | 9621 | push_warning( |
370 | 9620 | thd, Sql_condition::WARN_LEVEL_WARN, | 9622 | thd, Sql_condition::WARN_LEVEL_WARN, |
371 | 9621 | ER_ILLEGAL_HA_CREATE_OPTION, \ | 9623 | ER_ILLEGAL_HA_CREATE_OPTION, \ |
372 | @@ -9989,6 +9991,7 @@ | |||
373 | 9989 | case ROW_TYPE_NOT_USED: | 9991 | case ROW_TYPE_NOT_USED: |
374 | 9990 | case ROW_TYPE_FIXED: | 9992 | case ROW_TYPE_FIXED: |
375 | 9991 | case ROW_TYPE_PAGE: | 9993 | case ROW_TYPE_PAGE: |
376 | 9994 | default: | ||
377 | 9992 | push_warning( | 9995 | push_warning( |
378 | 9993 | thd, Sql_condition::WARN_LEVEL_WARN, | 9996 | thd, Sql_condition::WARN_LEVEL_WARN, |
379 | 9994 | ER_ILLEGAL_HA_CREATE_OPTION, | 9997 | ER_ILLEGAL_HA_CREATE_OPTION, |
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.