Commit 525c3c24 authored by Sergei Golubchik's avatar Sergei Golubchik

TokuDB: make the default value for the table compression= attribute to come

from the variable @@session.tokudb_row_format
parent 4574cf43
...@@ -245,9 +245,7 @@ extern "C" { ...@@ -245,9 +245,7 @@ extern "C" {
ha_create_table_option tokudb_table_options[]= ha_create_table_option tokudb_table_options[]=
{ {
HA_TOPTION_ENUM("compression", row_format, HA_TOPTION_SYSVAR("compression", row_format, row_format),
"TOKUDB_UNCOMPRESSED,TOKUDB_ZLIB,TOKUDB_QUICKLZ,"
"TOKUDB_LZMA,TOKUDB_FAST,TOKUDB_SMALL", 0),
HA_TOPTION_END HA_TOPTION_END
}; };
......
...@@ -376,7 +376,7 @@ t1 CREATE TABLE `t1` ( ...@@ -376,7 +376,7 @@ t1 CREATE TABLE `t1` (
`t1_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `t1_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`t1_id`), PRIMARY KEY (`t1_id`),
KEY `t1_name` (`t1_name`) KEY `t1_name` (`t1_name`)
) ENGINE=TokuDB AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE `t1`; DROP TABLE `t1`;
create table t1(a int not null auto_increment primary key); create table t1(a int not null auto_increment primary key);
create table t2(a int not null auto_increment primary key, t1a int); create table t2(a int not null auto_increment primary key, t1a int);
......
...@@ -7,19 +7,19 @@ Table Create Table ...@@ -7,19 +7,19 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` char(100) NOT NULL DEFAULT '', `a` char(100) NOT NULL DEFAULT '',
`b` binary(200) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' `b` binary(200) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a CHAR(101) NOT NULL DEFAULT 'a'; ALTER TABLE t CHANGE COLUMN a a CHAR(101) NOT NULL DEFAULT 'a';
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` char(101) NOT NULL DEFAULT 'a', `a` char(101) NOT NULL DEFAULT 'a',
`b` binary(200) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' `b` binary(200) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN b b BINARY(201) NOT NULL DEFAULT 'b'; ALTER TABLE t CHANGE COLUMN b b BINARY(201) NOT NULL DEFAULT 'b';
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` char(101) NOT NULL DEFAULT 'a', `a` char(101) NOT NULL DEFAULT 'a',
`b` binary(201) NOT NULL DEFAULT 'b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' `b` binary(201) NOT NULL DEFAULT 'b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE t; DROP TABLE t;
...@@ -7,31 +7,31 @@ SHOW CREATE TABLE t; ...@@ -7,31 +7,31 @@ SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` tinyint(4) DEFAULT '100' `a` tinyint(4) DEFAULT '100'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a SMALLINT DEFAULT 200; ALTER TABLE t CHANGE COLUMN a a SMALLINT DEFAULT 200;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` smallint(6) DEFAULT '200' `a` smallint(6) DEFAULT '200'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT DEFAULT 300; ALTER TABLE t CHANGE COLUMN a a MEDIUMINT DEFAULT 300;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` mediumint(9) DEFAULT '300' `a` mediumint(9) DEFAULT '300'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a INT DEFAULT 400; ALTER TABLE t CHANGE COLUMN a a INT DEFAULT 400;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) DEFAULT '400' `a` int(11) DEFAULT '400'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a BIGINT DEFAULT 500; ALTER TABLE t CHANGE COLUMN a a BIGINT DEFAULT 500;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` bigint(20) DEFAULT '500' `a` bigint(20) DEFAULT '500'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE t; DROP TABLE t;
CREATE TABLE t (a TINYINT NOT NULL DEFAULT 1); CREATE TABLE t (a TINYINT NOT NULL DEFAULT 1);
ALTER TABLE t CHANGE COLUMN a a TINYINT NOT NULL DEFAULT 100; ALTER TABLE t CHANGE COLUMN a a TINYINT NOT NULL DEFAULT 100;
...@@ -39,31 +39,31 @@ SHOW CREATE TABLE t; ...@@ -39,31 +39,31 @@ SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` tinyint(4) NOT NULL DEFAULT '100' `a` tinyint(4) NOT NULL DEFAULT '100'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a SMALLINT NOT NULL DEFAULT 200; ALTER TABLE t CHANGE COLUMN a a SMALLINT NOT NULL DEFAULT 200;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` smallint(6) NOT NULL DEFAULT '200' `a` smallint(6) NOT NULL DEFAULT '200'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT NOT NULL DEFAULT 300; ALTER TABLE t CHANGE COLUMN a a MEDIUMINT NOT NULL DEFAULT 300;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` mediumint(9) NOT NULL DEFAULT '300' `a` mediumint(9) NOT NULL DEFAULT '300'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a INT NOT NULL DEFAULT 400; ALTER TABLE t CHANGE COLUMN a a INT NOT NULL DEFAULT 400;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) NOT NULL DEFAULT '400' `a` int(11) NOT NULL DEFAULT '400'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a BIGINT NOT NULL DEFAULT 500; ALTER TABLE t CHANGE COLUMN a a BIGINT NOT NULL DEFAULT 500;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` bigint(20) NOT NULL DEFAULT '500' `a` bigint(20) NOT NULL DEFAULT '500'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE t; DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED DEFAULT 1); CREATE TABLE t (a TINYINT UNSIGNED DEFAULT 1);
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED DEFAULT 100; ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED DEFAULT 100;
...@@ -71,31 +71,31 @@ SHOW CREATE TABLE t; ...@@ -71,31 +71,31 @@ SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` tinyint(3) unsigned DEFAULT '100' `a` tinyint(3) unsigned DEFAULT '100'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED DEFAULT 200; ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED DEFAULT 200;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` smallint(5) unsigned DEFAULT '200' `a` smallint(5) unsigned DEFAULT '200'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED DEFAULT 300; ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED DEFAULT 300;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` mediumint(8) unsigned DEFAULT '300' `a` mediumint(8) unsigned DEFAULT '300'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED DEFAULT 400; ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED DEFAULT 400;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(10) unsigned DEFAULT '400' `a` int(10) unsigned DEFAULT '400'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED DEFAULT 500; ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED DEFAULT 500;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` bigint(20) unsigned DEFAULT '500' `a` bigint(20) unsigned DEFAULT '500'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE t; DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED NOT NULL DEFAULT 1); CREATE TABLE t (a TINYINT UNSIGNED NOT NULL DEFAULT 1);
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED NOT NULL DEFAULT 100; ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED NOT NULL DEFAULT 100;
...@@ -103,29 +103,29 @@ SHOW CREATE TABLE t; ...@@ -103,29 +103,29 @@ SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` tinyint(3) unsigned NOT NULL DEFAULT '100' `a` tinyint(3) unsigned NOT NULL DEFAULT '100'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED NOT NULL DEFAULT 200; ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED NOT NULL DEFAULT 200;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` smallint(5) unsigned NOT NULL DEFAULT '200' `a` smallint(5) unsigned NOT NULL DEFAULT '200'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED NOT NULL DEFAULT 300; ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED NOT NULL DEFAULT 300;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` mediumint(8) unsigned NOT NULL DEFAULT '300' `a` mediumint(8) unsigned NOT NULL DEFAULT '300'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED NOT NULL DEFAULT 400; ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED NOT NULL DEFAULT 400;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(10) unsigned NOT NULL DEFAULT '400' `a` int(10) unsigned NOT NULL DEFAULT '400'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED NOT NULL DEFAULT 500; ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED NOT NULL DEFAULT 500;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` bigint(20) unsigned NOT NULL DEFAULT '500' `a` bigint(20) unsigned NOT NULL DEFAULT '500'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE t; DROP TABLE t;
...@@ -5,7 +5,7 @@ SHOW CREATE TABLE t; ...@@ -5,7 +5,7 @@ SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varbinary(1) DEFAULT NULL `a` varbinary(1) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARBINARY(2); ALTER TABLE t CHANGE COLUMN a a VARBINARY(2);
ALTER TABLE t CHANGE COLUMN a a VARBINARY(2); ALTER TABLE t CHANGE COLUMN a a VARBINARY(2);
ALTER TABLE t CHANGE COLUMN a a VARBINARY(3); ALTER TABLE t CHANGE COLUMN a a VARBINARY(3);
......
...@@ -6,21 +6,21 @@ Table Create Table ...@@ -6,21 +6,21 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varbinary(100) NOT NULL DEFAULT '', `a` varbinary(100) NOT NULL DEFAULT '',
`b` varbinary(256) NOT NULL DEFAULT '' `b` varbinary(256) NOT NULL DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARBINARY(255) NOT NULL DEFAULT 'a'; ALTER TABLE t CHANGE COLUMN a a VARBINARY(255) NOT NULL DEFAULT 'a';
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varbinary(255) NOT NULL DEFAULT 'a', `a` varbinary(255) NOT NULL DEFAULT 'a',
`b` varbinary(256) NOT NULL DEFAULT '' `b` varbinary(256) NOT NULL DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARBINARY(256) NOT NULL DEFAULT 'b'; ALTER TABLE t CHANGE COLUMN a a VARBINARY(256) NOT NULL DEFAULT 'b';
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varbinary(256) NOT NULL DEFAULT 'b', `a` varbinary(256) NOT NULL DEFAULT 'b',
`b` varbinary(256) NOT NULL DEFAULT '' `b` varbinary(256) NOT NULL DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN b b VARBINARY(255) NOT NULL DEFAULT 'c'; ALTER TABLE t CHANGE COLUMN b b VARBINARY(255) NOT NULL DEFAULT 'c';
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN b b VARBINARY(1024) NOT NULL DEFAULT 'd'; ALTER TABLE t CHANGE COLUMN b b VARBINARY(1024) NOT NULL DEFAULT 'd';
...@@ -29,7 +29,7 @@ Table Create Table ...@@ -29,7 +29,7 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varbinary(256) NOT NULL DEFAULT 'b', `a` varbinary(256) NOT NULL DEFAULT 'b',
`b` varbinary(1024) NOT NULL DEFAULT 'd' `b` varbinary(1024) NOT NULL DEFAULT 'd'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN b b VARBINARY(256) NOT NULL DEFAULT 'e'; ALTER TABLE t CHANGE COLUMN b b VARBINARY(256) NOT NULL DEFAULT 'e';
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t; DROP TABLE t;
...@@ -12,14 +12,14 @@ Table Create Table ...@@ -12,14 +12,14 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varbinary(101) DEFAULT NULL, `a` varbinary(101) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL `b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARBINARY(200); ALTER TABLE t CHANGE COLUMN a a VARBINARY(200);
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varbinary(200) DEFAULT NULL, `a` varbinary(200) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL `b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SELECT * FROM t; SELECT * FROM t;
a b a b
hi there hi there
...@@ -38,7 +38,7 @@ t CREATE TABLE `t` ( ...@@ -38,7 +38,7 @@ t CREATE TABLE `t` (
`i` int(11) DEFAULT NULL, `i` int(11) DEFAULT NULL,
`a` varbinary(101) DEFAULT NULL, `a` varbinary(101) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL `b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARBINARY(200); ALTER TABLE t CHANGE COLUMN a a VARBINARY(200);
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
...@@ -46,7 +46,7 @@ t CREATE TABLE `t` ( ...@@ -46,7 +46,7 @@ t CREATE TABLE `t` (
`i` int(11) DEFAULT NULL, `i` int(11) DEFAULT NULL,
`a` varbinary(200) DEFAULT NULL, `a` varbinary(200) DEFAULT NULL,
`b` varbinary(100) DEFAULT NULL `b` varbinary(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SELECT * FROM t; SELECT * FROM t;
i a b i a b
1 hi there 1 hi there
......
...@@ -5,7 +5,7 @@ SHOW CREATE TABLE t; ...@@ -5,7 +5,7 @@ SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varchar(1) DEFAULT NULL `a` varchar(1) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARCHAR(2); ALTER TABLE t CHANGE COLUMN a a VARCHAR(2);
ALTER TABLE t CHANGE COLUMN a a VARCHAR(2); ALTER TABLE t CHANGE COLUMN a a VARCHAR(2);
ALTER TABLE t CHANGE COLUMN a a VARCHAR(3); ALTER TABLE t CHANGE COLUMN a a VARCHAR(3);
......
...@@ -6,21 +6,21 @@ Table Create Table ...@@ -6,21 +6,21 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varchar(100) NOT NULL DEFAULT '', `a` varchar(100) NOT NULL DEFAULT '',
`b` varchar(256) NOT NULL DEFAULT '' `b` varchar(256) NOT NULL DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARCHAR(255) NOT NULL DEFAULT 'a'; ALTER TABLE t CHANGE COLUMN a a VARCHAR(255) NOT NULL DEFAULT 'a';
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varchar(255) NOT NULL DEFAULT 'a', `a` varchar(255) NOT NULL DEFAULT 'a',
`b` varchar(256) NOT NULL DEFAULT '' `b` varchar(256) NOT NULL DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARCHAR(256) NOT NULL DEFAULT 'b'; ALTER TABLE t CHANGE COLUMN a a VARCHAR(256) NOT NULL DEFAULT 'b';
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varchar(256) NOT NULL DEFAULT 'b', `a` varchar(256) NOT NULL DEFAULT 'b',
`b` varchar(256) NOT NULL DEFAULT '' `b` varchar(256) NOT NULL DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN b b VARCHAR(255) NOT NULL DEFAULT 'c'; ALTER TABLE t CHANGE COLUMN b b VARCHAR(255) NOT NULL DEFAULT 'c';
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN b b VARCHAR(1024) NOT NULL DEFAULT 'd'; ALTER TABLE t CHANGE COLUMN b b VARCHAR(1024) NOT NULL DEFAULT 'd';
...@@ -29,7 +29,7 @@ Table Create Table ...@@ -29,7 +29,7 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varchar(256) NOT NULL DEFAULT 'b', `a` varchar(256) NOT NULL DEFAULT 'b',
`b` varchar(1024) NOT NULL DEFAULT 'd' `b` varchar(1024) NOT NULL DEFAULT 'd'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN b b VARCHAR(256) NOT NULL DEFAULT 'e'; ALTER TABLE t CHANGE COLUMN b b VARCHAR(256) NOT NULL DEFAULT 'e';
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t; DROP TABLE t;
...@@ -8,7 +8,7 @@ t CREATE TABLE `t` ( ...@@ -8,7 +8,7 @@ t CREATE TABLE `t` (
`a` varchar(32) DEFAULT NULL, `a` varchar(32) DEFAULT NULL,
`b` varchar(32) DEFAULT NULL, `b` varchar(32) DEFAULT NULL,
KEY `a` (`a`(2)) KEY `a` (`a`(2))
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARCHAR(100); ALTER TABLE t CHANGE COLUMN a a VARCHAR(100);
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a VARCHAR(256); ALTER TABLE t CHANGE COLUMN a a VARCHAR(256);
......
...@@ -8,7 +8,7 @@ t CREATE TABLE `t` ( ...@@ -8,7 +8,7 @@ t CREATE TABLE `t` (
`a` varchar(32) DEFAULT NULL, `a` varchar(32) DEFAULT NULL,
`b` varchar(32) DEFAULT NULL, `b` varchar(32) DEFAULT NULL,
KEY `a` (`a`(2)) KEY `a` (`a`(2))
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN b b VARCHAR(100); ALTER TABLE t CHANGE COLUMN b b VARCHAR(100);
ALTER TABLE t CHANGE COLUMN b b VARCHAR(256); ALTER TABLE t CHANGE COLUMN b b VARCHAR(256);
DROP TABLE t; DROP TABLE t;
...@@ -12,14 +12,14 @@ Table Create Table ...@@ -12,14 +12,14 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varchar(101) DEFAULT NULL, `a` varchar(101) DEFAULT NULL,
`b` varchar(100) DEFAULT NULL `b` varchar(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARCHAR(200); ALTER TABLE t CHANGE COLUMN a a VARCHAR(200);
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` varchar(200) DEFAULT NULL, `a` varchar(200) DEFAULT NULL,
`b` varchar(100) DEFAULT NULL `b` varchar(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SELECT * FROM t; SELECT * FROM t;
a b a b
hi there hi there
...@@ -38,7 +38,7 @@ t CREATE TABLE `t` ( ...@@ -38,7 +38,7 @@ t CREATE TABLE `t` (
`i` int(11) DEFAULT NULL, `i` int(11) DEFAULT NULL,
`a` varchar(101) DEFAULT NULL, `a` varchar(101) DEFAULT NULL,
`b` varchar(100) DEFAULT NULL `b` varchar(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t CHANGE COLUMN a a VARCHAR(200); ALTER TABLE t CHANGE COLUMN a a VARCHAR(200);
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
...@@ -46,7 +46,7 @@ t CREATE TABLE `t` ( ...@@ -46,7 +46,7 @@ t CREATE TABLE `t` (
`i` int(11) DEFAULT NULL, `i` int(11) DEFAULT NULL,
`a` varchar(200) DEFAULT NULL, `a` varchar(200) DEFAULT NULL,
`b` varchar(100) DEFAULT NULL `b` varchar(100) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SELECT * FROM t; SELECT * FROM t;
i a b i a b
1 hi there 1 hi there
......
...@@ -1009,14 +1009,14 @@ s CREATE TABLE `s` ( ...@@ -1009,14 +1009,14 @@ s CREATE TABLE `s` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t where s.b = t.b; explain select straight_join * from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 1000 1 SIMPLE s ALL NULL NULL NULL NULL 1000
...@@ -1030,7 +1030,7 @@ s CREATE TABLE `s` ( ...@@ -1030,7 +1030,7 @@ s CREATE TABLE `s` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) `clustering`=yes KEY `b` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1038,7 +1038,7 @@ t CREATE TABLE `t` ( ...@@ -1038,7 +1038,7 @@ t CREATE TABLE `t` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) `clustering`=yes KEY `b` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t where s.b = t.b; explain select straight_join * from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b b 5 NULL 1000 Using where; Using index 1 SIMPLE s index b b 5 NULL 1000 Using where; Using index
......
...@@ -1009,14 +1009,14 @@ s CREATE TABLE `s` ( ...@@ -1009,14 +1009,14 @@ s CREATE TABLE `s` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t where s.b = t.b; explain select straight_join * from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 1000 1 SIMPLE s ALL NULL NULL NULL NULL 1000
...@@ -1030,7 +1030,7 @@ s CREATE TABLE `s` ( ...@@ -1030,7 +1030,7 @@ s CREATE TABLE `s` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1038,7 +1038,7 @@ t CREATE TABLE `t` ( ...@@ -1038,7 +1038,7 @@ t CREATE TABLE `t` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t where s.b = t.b; explain select straight_join * from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL b NULL NULL NULL 1000 Using where 1 SIMPLE s ALL b NULL NULL NULL 1000 Using where
...@@ -1057,7 +1057,7 @@ s CREATE TABLE `s` ( ...@@ -1057,7 +1057,7 @@ s CREATE TABLE `s` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`) `clustering`=yes KEY `b_2` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1066,7 +1066,7 @@ t CREATE TABLE `t` ( ...@@ -1066,7 +1066,7 @@ t CREATE TABLE `t` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`) `clustering`=yes KEY `b_2` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t where s.b = t.b; explain select straight_join * from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b,b_2 b_2 5 NULL 1000 Using where; Using index 1 SIMPLE s index b,b_2 b_2 5 NULL 1000 Using where; Using index
...@@ -1080,7 +1080,7 @@ s CREATE TABLE `s` ( ...@@ -1080,7 +1080,7 @@ s CREATE TABLE `s` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b_2` (`b`) `clustering`=yes KEY `b_2` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1088,7 +1088,7 @@ t CREATE TABLE `t` ( ...@@ -1088,7 +1088,7 @@ t CREATE TABLE `t` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b_2` (`b`) `clustering`=yes KEY `b_2` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t where s.b = t.b; explain select straight_join * from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b_2 b_2 5 NULL 1000 Using where; Using index 1 SIMPLE s index b_2 b_2 5 NULL 1000 Using where; Using index
...@@ -1107,7 +1107,7 @@ s CREATE TABLE `s` ( ...@@ -1107,7 +1107,7 @@ s CREATE TABLE `s` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b_2` (`b`) `clustering`=yes, KEY `b_2` (`b`) `clustering`=yes,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1116,7 +1116,7 @@ t CREATE TABLE `t` ( ...@@ -1116,7 +1116,7 @@ t CREATE TABLE `t` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b_2` (`b`) `clustering`=yes, KEY `b_2` (`b`) `clustering`=yes,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t where s.b = t.b; explain select straight_join * from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b_2,b b_2 5 NULL 1000 Using where; Using index 1 SIMPLE s index b_2,b b_2 5 NULL 1000 Using where; Using index
......
...@@ -1009,14 +1009,14 @@ s CREATE TABLE `s` ( ...@@ -1009,14 +1009,14 @@ s CREATE TABLE `s` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join s.a,t.a from s,t where s.b = t.b; explain select straight_join s.a,t.a from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 1000 1 SIMPLE s ALL NULL NULL NULL NULL 1000
...@@ -1030,7 +1030,7 @@ s CREATE TABLE `s` ( ...@@ -1030,7 +1030,7 @@ s CREATE TABLE `s` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1038,7 +1038,7 @@ t CREATE TABLE `t` ( ...@@ -1038,7 +1038,7 @@ t CREATE TABLE `t` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join s.a,t.a from s,t where s.b = t.b; explain select straight_join s.a,t.a from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL b NULL NULL NULL 1000 Using where 1 SIMPLE s ALL b NULL NULL NULL 1000 Using where
...@@ -1053,7 +1053,7 @@ s CREATE TABLE `s` ( ...@@ -1053,7 +1053,7 @@ s CREATE TABLE `s` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`,`a`) KEY `b_2` (`b`,`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1062,7 +1062,7 @@ t CREATE TABLE `t` ( ...@@ -1062,7 +1062,7 @@ t CREATE TABLE `t` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`,`a`) KEY `b_2` (`b`,`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join s.a,t.a from s,t where s.b = t.b; explain select straight_join s.a,t.a from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b,b_2 b_2 10 NULL 1000 Using where; Using index 1 SIMPLE s index b,b_2 b_2 10 NULL 1000 Using where; Using index
...@@ -1082,7 +1082,7 @@ s CREATE TABLE `s` ( ...@@ -1082,7 +1082,7 @@ s CREATE TABLE `s` (
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`,`a`), KEY `b_2` (`b`,`a`),
KEY `b_3` (`b`) `clustering`=yes KEY `b_3` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1092,7 +1092,7 @@ t CREATE TABLE `t` ( ...@@ -1092,7 +1092,7 @@ t CREATE TABLE `t` (
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`,`a`), KEY `b_2` (`b`,`a`),
KEY `b_3` (`b`) `clustering`=yes KEY `b_3` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join s.a,t.a from s,t where s.b = t.b; explain select straight_join s.a,t.a from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b,b_2,b_3 b_2 10 NULL 1000 Using where; Using index 1 SIMPLE s index b,b_2,b_3 b_2 10 NULL 1000 Using where; Using index
...@@ -1107,7 +1107,7 @@ s CREATE TABLE `s` ( ...@@ -1107,7 +1107,7 @@ s CREATE TABLE `s` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_3` (`b`) `clustering`=yes KEY `b_3` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1116,7 +1116,7 @@ t CREATE TABLE `t` ( ...@@ -1116,7 +1116,7 @@ t CREATE TABLE `t` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_3` (`b`) `clustering`=yes KEY `b_3` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join s.a,t.a from s,t where s.b = t.b; explain select straight_join s.a,t.a from s,t where s.b = t.b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s index b,b_3 b_3 5 NULL 1000 Using where; Using index 1 SIMPLE s index b,b_3 b_3 5 NULL 1000 Using where; Using index
......
...@@ -1012,21 +1012,21 @@ s CREATE TABLE `s` ( ...@@ -1012,21 +1012,21 @@ s CREATE TABLE `s` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table u; show create table u;
Table Create Table Table Create Table
u CREATE TABLE `u` ( u CREATE TABLE `u` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t,u where s.b = t.b and s.c = t.c; explain select straight_join * from s,t,u where s.b = t.b and s.c = t.c;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 1000 1 SIMPLE s ALL NULL NULL NULL NULL 1000
...@@ -1042,7 +1042,7 @@ s CREATE TABLE `s` ( ...@@ -1042,7 +1042,7 @@ s CREATE TABLE `s` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1050,7 +1050,7 @@ t CREATE TABLE `t` ( ...@@ -1050,7 +1050,7 @@ t CREATE TABLE `t` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table u; show create table u;
Table Create Table Table Create Table
u CREATE TABLE `u` ( u CREATE TABLE `u` (
...@@ -1058,7 +1058,7 @@ u CREATE TABLE `u` ( ...@@ -1058,7 +1058,7 @@ u CREATE TABLE `u` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `c` (`c`) KEY `c` (`c`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t,u where s.b = t.b and s.c = u.c; explain select straight_join * from s,t,u where s.b = t.b and s.c = u.c;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL b NULL NULL NULL 1000 Using where 1 SIMPLE s ALL b NULL NULL NULL 1000 Using where
...@@ -1081,7 +1081,7 @@ s CREATE TABLE `s` ( ...@@ -1081,7 +1081,7 @@ s CREATE TABLE `s` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`) `clustering`=yes KEY `b_2` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table t; show create table t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
...@@ -1090,7 +1090,7 @@ t CREATE TABLE `t` ( ...@@ -1090,7 +1090,7 @@ t CREATE TABLE `t` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`) `clustering`=yes KEY `b_2` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table u; show create table u;
Table Create Table Table Create Table
u CREATE TABLE `u` ( u CREATE TABLE `u` (
...@@ -1099,7 +1099,7 @@ u CREATE TABLE `u` ( ...@@ -1099,7 +1099,7 @@ u CREATE TABLE `u` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `c` (`c`), KEY `c` (`c`),
KEY `c_2` (`c`) `clustering`=yes KEY `c_2` (`c`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select straight_join * from s,t,u where s.b = t.b and s.c = u.c; explain select straight_join * from s,t,u where s.b = t.b and s.c = u.c;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL b,b_2 NULL NULL NULL 1000 Using where 1 SIMPLE s ALL b,b_2 NULL NULL NULL 1000 Using where
......
...@@ -11,7 +11,7 @@ t1 CREATE TABLE `t1` ( ...@@ -11,7 +11,7 @@ t1 CREATE TABLE `t1` (
`d` int(11) DEFAULT NULL, `d` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) `clustering`=yes KEY `b` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
create index foo on t1(c,d) clustering=yes; create index foo on t1(c,d) clustering=yes;
show create table t1; show create table t1;
Table Create Table Table Create Table
...@@ -23,7 +23,7 @@ t1 CREATE TABLE `t1` ( ...@@ -23,7 +23,7 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) `clustering`=yes, KEY `b` (`b`) `clustering`=yes,
KEY `foo` (`c`,`d`) `clustering`=yes KEY `foo` (`c`,`d`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table t1 drop primary key; alter table t1 drop primary key;
alter table t1 add primary key (a,b,c,d); alter table t1 add primary key (a,b,c,d);
alter table t1 add key bar(d,c,b,a) clustering=yes; alter table t1 add key bar(d,c,b,a) clustering=yes;
...@@ -38,7 +38,7 @@ t1 CREATE TABLE `t1` ( ...@@ -38,7 +38,7 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`) `clustering`=yes, KEY `b` (`b`) `clustering`=yes,
KEY `foo` (`c`,`d`) `clustering`=yes, KEY `foo` (`c`,`d`) `clustering`=yes,
KEY `bar` (`d`,`c`,`b`,`a`) `clustering`=yes KEY `bar` (`d`,`c`,`b`,`a`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 value (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(32,54,12,56); insert into t1 value (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(32,54,12,56);
explain select * from t1; explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
......
...@@ -486,7 +486,7 @@ SHOW CREATE TABLE t1; ...@@ -486,7 +486,7 @@ SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`latin1_f` char(32) NOT NULL `latin1_f` char(32) NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW FIELDS FROM t1; SHOW FIELDS FROM t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
latin1_f char(32) NO NULL latin1_f char(32) NO NULL
...@@ -496,7 +496,7 @@ SHOW CREATE TABLE t1; ...@@ -496,7 +496,7 @@ SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`latin1_f` char(32) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL `latin1_f` char(32) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW FIELDS FROM t1; SHOW FIELDS FROM t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
latin1_f char(32) YES NULL latin1_f char(32) YES NULL
...@@ -505,7 +505,7 @@ SHOW CREATE TABLE t1; ...@@ -505,7 +505,7 @@ SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`latin1_f` char(32) COLLATE latin1_bin DEFAULT NULL `latin1_f` char(32) COLLATE latin1_bin DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ) ENGINE=TokuDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin `compression`='tokudb_zlib'
SHOW FIELDS FROM t1; SHOW FIELDS FROM t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
latin1_f char(32) YES NULL latin1_f char(32) YES NULL
......
...@@ -85,7 +85,7 @@ Table Create Table ...@@ -85,7 +85,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`name` varchar(10) DEFAULT NULL, `name` varchar(10) DEFAULT NULL,
`level` smallint(5) unsigned DEFAULT NULL `level` smallint(5) unsigned DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=cp1250 ) ENGINE=TokuDB DEFAULT CHARSET=cp1250 `compression`='tokudb_zlib'
insert into t1 values ('string',1); insert into t1 values ('string',1);
select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; select concat(name,space(level)), concat(name, repeat(' ',level)) from t1;
concat(name,space(level)) concat(name, repeat(' ',level)) concat(name,space(level)) concat(name, repeat(' ',level))
...@@ -178,7 +178,7 @@ Table Create Table ...@@ -178,7 +178,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`name` varchar(10) COLLATE cp1250_czech_cs DEFAULT NULL, `name` varchar(10) COLLATE cp1250_czech_cs DEFAULT NULL,
`level` smallint(5) unsigned DEFAULT NULL `level` smallint(5) unsigned DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_czech_cs ) ENGINE=TokuDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_czech_cs `compression`='tokudb_zlib'
insert into t1 values ('string',1); insert into t1 values ('string',1);
select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; select concat(name,space(level)), concat(name, repeat(' ',level)) from t1;
concat(name,space(level)) concat(name, repeat(' ',level)) concat(name,space(level)) concat(name, repeat(' ',level))
......
...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` ( ...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` varchar(100) DEFAULT NULL, `b` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
select * from foo; select * from foo;
......
...@@ -6,7 +6,7 @@ show create table foo; ...@@ -6,7 +6,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1); insert into foo values (1);
begin; begin;
insert into foo values (2); insert into foo values (2);
......
...@@ -7,7 +7,7 @@ show create table foo; ...@@ -7,7 +7,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1); insert into foo values (1);
begin; begin;
select * from foo; select * from foo;
......
...@@ -7,7 +7,7 @@ show create table foo; ...@@ -7,7 +7,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
begin; begin;
select * from foo; select * from foo;
a a
......
...@@ -7,7 +7,7 @@ show create table foo; ...@@ -7,7 +7,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
begin; begin;
select * from foo; select * from foo;
a a
......
...@@ -7,7 +7,7 @@ show create table foo; ...@@ -7,7 +7,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
begin; begin;
select * from foo; select * from foo;
a a
......
...@@ -7,7 +7,7 @@ show create table foo; ...@@ -7,7 +7,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
begin; begin;
select * from foo; select * from foo;
a a
......
...@@ -8,7 +8,7 @@ show create table foo; ...@@ -8,7 +8,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session tokudb_load_save_space=0; set session tokudb_load_save_space=0;
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
......
...@@ -8,7 +8,7 @@ show create table foo; ...@@ -8,7 +8,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session tokudb_load_save_space=1; set session tokudb_load_save_space=1;
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
......
...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` ( ...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` varchar(100) DEFAULT NULL, `b` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
select * from foo; select * from foo;
......
...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` ( ...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` varchar(100) DEFAULT NULL, `b` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
select * from foo; select * from foo;
......
...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` ( ...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` varchar(100) DEFAULT NULL, `b` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
select * from foo; select * from foo;
......
...@@ -10,14 +10,14 @@ foo CREATE TABLE `foo` ( ...@@ -10,14 +10,14 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` varchar(100) DEFAULT NULL, `b` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table bar; show create table bar;
Table Create Table Table Create Table
bar CREATE TABLE `bar` ( bar CREATE TABLE `bar` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` varchar(100) DEFAULT NULL, `b` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
# should be empty # should be empty
......
...@@ -10,7 +10,7 @@ foo CREATE TABLE `foo` ( ...@@ -10,7 +10,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,1); insert into foo values (1,1);
begin; begin;
select * from foo; select * from foo;
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900); insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900);
begin; begin;
select * from foo; select * from foo;
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900); insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900);
begin; begin;
select * from foo; select * from foo;
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900); insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900);
begin; begin;
select * from foo; select * from foo;
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900); insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900);
begin; begin;
select * from foo; select * from foo;
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900); insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900);
begin; begin;
select * from foo; select * from foo;
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
create table foo_isam (a int, b int, c int) engine=MyISAM; create table foo_isam (a int, b int, c int) engine=MyISAM;
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900); insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900);
begin; begin;
......
...@@ -7,7 +7,7 @@ show create table foo; ...@@ -7,7 +7,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1),(2),(3); insert into foo values (1),(2),(3);
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
#should read (1,1) #should read (1,1)
select * from foo; select * from foo;
a b a b
......
...@@ -7,7 +7,7 @@ show create table foo; ...@@ -7,7 +7,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1),(2),(3); insert into foo values (1),(2),(3);
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
......
...@@ -9,7 +9,7 @@ foo CREATE TABLE `foo` ( ...@@ -9,7 +9,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,1); insert into foo values (1,1);
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
......
...@@ -10,7 +10,7 @@ foo CREATE TABLE `foo` ( ...@@ -10,7 +10,7 @@ foo CREATE TABLE `foo` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (100,100); insert into foo values (100,100);
begin; begin;
insert into foo values (1,100); insert into foo values (1,100);
......
...@@ -9,7 +9,7 @@ foo CREATE TABLE `foo` ( ...@@ -9,7 +9,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,100); insert into foo values (1,100);
select * from foo; select * from foo;
a b a b
......
...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` ( ...@@ -11,7 +11,7 @@ foo CREATE TABLE `foo` (
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500); insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500);
create table foo_isam (a int, b int, c int); create table foo_isam (a int, b int, c int);
# should use key b # should use key b
......
...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` ( ...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` varchar(100) DEFAULT NULL, `b` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
set session transaction isolation level repeatable read; set session transaction isolation level repeatable read;
begin; begin;
select * from foo; select * from foo;
......
...@@ -6,7 +6,7 @@ show create table foo; ...@@ -6,7 +6,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values (1),(2),(3); insert into foo values (1),(2),(3);
begin; begin;
insert into foo values (4); insert into foo values (4);
......
...@@ -25,7 +25,7 @@ Table Create Table ...@@ -25,7 +25,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`s1` varbinary(20) DEFAULT NULL, `s1` varbinary(20) DEFAULT NULL,
`s2` varbinary(20) DEFAULT NULL `s2` varbinary(20) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (0x41,0x4100),(0x41,0x4120),(0x4100,0x4120); insert into t1 values (0x41,0x4100),(0x41,0x4120),(0x4100,0x4120);
select hex(s1), hex(s2) from t1; select hex(s1), hex(s2) from t1;
hex(s1) hex(s2) hex(s1) hex(s2)
......
...@@ -43,7 +43,7 @@ show create table t1; ...@@ -43,7 +43,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(1) DEFAULT NULL `a` bit(1) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (a bit(64)); create table t1 (a bit(64));
insert into t1 values insert into t1 values
...@@ -498,7 +498,7 @@ show create table t2; ...@@ -498,7 +498,7 @@ show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` bit(7) DEFAULT NULL `a` bit(7) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1, t2; drop table t1, t2;
create table t1 (id1 int(11), b1 bit(1)); create table t1 (id1 int(11), b1 bit(1));
create table t2 (id2 int(11), b2 bit(1)); create table t2 (id2 int(11), b2 bit(1));
...@@ -701,6 +701,6 @@ Table Create Table ...@@ -701,6 +701,6 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(8) DEFAULT NULL, `a` bit(8) DEFAULT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
End of 5.1 tests End of 5.1 tests
...@@ -26,12 +26,12 @@ Table Create Table ...@@ -26,12 +26,12 @@ Table Create Table
t3 CREATE TABLE `t3` ( t3 CREATE TABLE `t3` (
`a` mediumtext, `a` mediumtext,
`b` mediumblob `b` mediumblob
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create TABLE t4; show create TABLE t4;
Table Create Table Table Create Table
t4 CREATE TABLE `t4` ( t4 CREATE TABLE `t4` (
`c` mediumtext CHARACTER SET utf8 NOT NULL `c` mediumtext CHARACTER SET utf8 NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
CREATE TABLE t1 (a char(257) default "hello"); CREATE TABLE t1 (a char(257) default "hello");
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
...@@ -365,7 +365,7 @@ Table Create Table ...@@ -365,7 +365,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` text, `a` text,
KEY `a` (`a`(2100)) KEY `a` (`a`(2100))
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
t1_id bigint(21) NOT NULL auto_increment, t1_id bigint(21) NOT NULL auto_increment,
...@@ -672,7 +672,7 @@ t1 CREATE TABLE `t1` ( ...@@ -672,7 +672,7 @@ t1 CREATE TABLE `t1` (
`e` int(11) DEFAULT NULL, `e` int(11) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`(255),`d`), PRIMARY KEY (`a`,`b`,`c`(255),`d`),
KEY `a` (`a`,`b`,`d`,`e`) KEY `a` (`a`,`b`,`d`,`e`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
CREATE table t1 (a blob); CREATE table t1 (a blob);
insert into t1 values ('b'),('a\0'),('a'),('a '),('aa'),(NULL); insert into t1 values ('b'),('a\0'),('a'),('a '),('aa'),(NULL);
...@@ -751,7 +751,7 @@ show create table t1; ...@@ -751,7 +751,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` text `a` text
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (default); insert into t1 values (default);
select * from t1; select * from t1;
a a
......
...@@ -204,7 +204,7 @@ Table Create Table ...@@ -204,7 +204,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`da` date DEFAULT '1962-03-03', `da` date DEFAULT '1962-03-03',
`dt` datetime DEFAULT '1962-03-03 00:00:00' `dt` datetime DEFAULT '1962-03-03 00:00:00'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (); insert into t1 values ();
insert into t1 values ('2007-03-23 13:49:38','2007-03-23 13:49:38'); insert into t1 values ('2007-03-23 13:49:38','2007-03-23 13:49:38');
Warnings: Warnings:
...@@ -572,7 +572,7 @@ Table Create Table ...@@ -572,7 +572,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`da` date DEFAULT '1962-03-03', `da` date DEFAULT '1962-03-03',
`dt` datetime DEFAULT '1962-03-03 00:00:00' `dt` datetime DEFAULT '1962-03-03 00:00:00'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (); insert into t1 values ();
insert into t1 values ('2007-03-23 13:49:38','2007-03-23 13:49:38'); insert into t1 values ('2007-03-23 13:49:38','2007-03-23 13:49:38');
Warnings: Warnings:
......
...@@ -712,14 +712,14 @@ show create table t1; ...@@ -712,14 +712,14 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`d` decimal(5,0) DEFAULT NULL `d` decimal(5,0) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (d decimal); create table t1 (d decimal);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`d` decimal(10,0) DEFAULT NULL `d` decimal(10,0) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (d decimal(66,0)); create table t1 (d decimal(66,0));
ERROR 42000: Too big precision 66 specified for 'd'. Maximum is 65. ERROR 42000: Too big precision 66 specified for 'd'. Maximum is 65.
...@@ -880,7 +880,7 @@ Table Create Table ...@@ -880,7 +880,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` decimal(10,0) DEFAULT NULL, `a` decimal(10,0) DEFAULT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select round(a,b) as c from t1 order by c; select round(a,b) as c from t1 order by c;
c c
1000 1000
......
...@@ -1628,14 +1628,14 @@ show create table t1; ...@@ -1628,14 +1628,14 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` enum('','a','b') NOT NULL `a` enum('','a','b') NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (a enum (' ','a','b ') not null default 'b '); create table t1 (a enum (' ','a','b ') not null default 'b ');
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` enum('','a','b') NOT NULL DEFAULT 'b' `a` enum('','a','b') NOT NULL DEFAULT 'b'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (a enum ('0','1')); create table t1 (a enum ('0','1'));
insert into t1 set a='foobar'; insert into t1 set a='foobar';
...@@ -1660,7 +1660,7 @@ show create table t1; ...@@ -1660,7 +1660,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` enum('','1','2') NOT NULL DEFAULT '' `a` enum('','1','2') NOT NULL DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
set names latin1; set names latin1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -1672,7 +1672,7 @@ Table Create Table ...@@ -1672,7 +1672,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT '1', `a` int(11) DEFAULT '1',
`b` enum('value','_value','') NOT NULL `b` enum('value','_value','') NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a int(11) YES 1 a int(11) YES 1
...@@ -1701,7 +1701,7 @@ show create table t1; ...@@ -1701,7 +1701,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` enum('','','') CHARACTER SET utf8 DEFAULT '' `a` enum('','','') CHARACTER SET utf8 DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (''), (''), (''); insert into t1 values (''), (''), ('');
select a from t1 order by a; select a from t1 order by a;
a a
...@@ -1719,7 +1719,7 @@ show create table t1; ...@@ -1719,7 +1719,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` enum('','','') DEFAULT '' `a` enum('','','') DEFAULT ''
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select a from t1 order by a; select a from t1 order by a;
a a
...@@ -1753,28 +1753,28 @@ Table Create Table ...@@ -1753,28 +1753,28 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL, `f1` int(11) DEFAULT NULL,
`f2` enum('') DEFAULT NULL `f2` enum('') DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1(russian enum('E','F','EF','FE') NOT NULL DEFAULT'E'); create table t1(russian enum('E','F','EF','FE') NOT NULL DEFAULT'E');
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`russian` enum('E','F','EF','FE') NOT NULL DEFAULT 'E' `russian` enum('E','F','EF','FE') NOT NULL DEFAULT 'E'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1(denormal enum('E','F','E,F','F,E') NOT NULL DEFAULT'E'); create table t1(denormal enum('E','F','E,F','F,E') NOT NULL DEFAULT'E');
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`denormal` enum('E','F','E,F','F,E') NOT NULL DEFAULT 'E' `denormal` enum('E','F','E,F','F,E') NOT NULL DEFAULT 'E'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1(russian_deviant enum('E','F','EF','F,E') NOT NULL DEFAULT'E'); create table t1(russian_deviant enum('E','F','EF','F,E') NOT NULL DEFAULT'E');
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`russian_deviant` enum('E','F','EF','F,E') NOT NULL DEFAULT 'E' `russian_deviant` enum('E','F','EF','F,E') NOT NULL DEFAULT 'E'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY, id INT AUTO_INCREMENT PRIMARY KEY,
......
...@@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` ( ...@@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` (
`col2` double(22,5) DEFAULT NULL, `col2` double(22,5) DEFAULT NULL,
`col3` double DEFAULT NULL, `col3` double DEFAULT NULL,
`col4` double DEFAULT NULL `col4` double DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1,t2; drop table t1,t2;
create table t1 (a float); create table t1 (a float);
insert into t1 values (1); insert into t1 values (1);
...@@ -239,7 +239,7 @@ show create table t3; ...@@ -239,7 +239,7 @@ show create table t3;
Table Create Table Table Create Table
t3 CREATE TABLE `t3` ( t3 CREATE TABLE `t3` (
`d` double DEFAULT NULL `d` double DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1, t2, t3; drop table t1, t2, t3;
create table t1 select 105213674794682365.00 + 0.0 x; create table t1 select 105213674794682365.00 + 0.0 x;
show warnings; show warnings;
......
...@@ -5,47 +5,47 @@ show create table t1; ...@@ -5,47 +5,47 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` char(10) CHARACTER SET utf8 DEFAULT NULL `c` char(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (c national char(10)); create table t1 (c national char(10));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` char(10) CHARACTER SET utf8 DEFAULT NULL `c` char(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (c national varchar(10)); create table t1 (c national varchar(10));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` varchar(10) CHARACTER SET utf8 DEFAULT NULL `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (c nvarchar(10)); create table t1 (c nvarchar(10));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` varchar(10) CHARACTER SET utf8 DEFAULT NULL `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (c nchar varchar(10)); create table t1 (c nchar varchar(10));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` varchar(10) CHARACTER SET utf8 DEFAULT NULL `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (c national character varying(10)); create table t1 (c national character varying(10));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` varchar(10) CHARACTER SET utf8 DEFAULT NULL `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (c nchar varying(10)); create table t1 (c nchar varying(10));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c` varchar(10) CHARACTER SET utf8 DEFAULT NULL `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
...@@ -60,7 +60,7 @@ t1 CREATE TABLE `t1` ( ...@@ -60,7 +60,7 @@ t1 CREATE TABLE `t1` (
`if(0, NULL, 1.2)` decimal(2,1) DEFAULT NULL, `if(0, NULL, 1.2)` decimal(2,1) DEFAULT NULL,
`if(1, 0.22e1, 1.1)` double NOT NULL DEFAULT '0', `if(1, 0.22e1, 1.1)` double NOT NULL DEFAULT '0',
`if(1E0, 1.1, 1.2)` decimal(2,1) NOT NULL DEFAULT '0.0' `if(1E0, 1.1, 1.2)` decimal(2,1) NOT NULL DEFAULT '0.0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 select nullif(1.1, 1.1), nullif(1.1, 1.2), nullif(1.1, 0.11e1), nullif(1.0, 1), nullif(1, 1.0), nullif(1, 1.1); create table t1 select nullif(1.1, 1.1), nullif(1.1, 1.2), nullif(1.1, 0.11e1), nullif(1.0, 1), nullif(1, 1.0), nullif(1, 1.1);
select * from t1; select * from t1;
...@@ -75,7 +75,7 @@ t1 CREATE TABLE `t1` ( ...@@ -75,7 +75,7 @@ t1 CREATE TABLE `t1` (
`nullif(1.0, 1)` decimal(2,1) DEFAULT NULL, `nullif(1.0, 1)` decimal(2,1) DEFAULT NULL,
`nullif(1, 1.0)` int(1) DEFAULT NULL, `nullif(1, 1.0)` int(1) DEFAULT NULL,
`nullif(1, 1.1)` int(1) DEFAULT NULL `nullif(1, 1.1)` int(1) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (a decimal(4,2)); create table t1 (a decimal(4,2));
insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); insert into t1 value (10000), (1.1e10), ("11111"), (100000.1);
...@@ -179,7 +179,7 @@ t1 CREATE TABLE `t1` ( ...@@ -179,7 +179,7 @@ t1 CREATE TABLE `t1` (
`truncate(-5678.123451,-3)` decimal(4,0) NOT NULL DEFAULT '0', `truncate(-5678.123451,-3)` decimal(4,0) NOT NULL DEFAULT '0',
`abs(-1.1)` decimal(3,1) NOT NULL DEFAULT '0.0', `abs(-1.1)` decimal(3,1) NOT NULL DEFAULT '0.0',
`-(-1.1)` decimal(2,1) NOT NULL DEFAULT '0.0' `-(-1.1)` decimal(2,1) NOT NULL DEFAULT '0.0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
set session sql_mode='traditional'; set session sql_mode='traditional';
select 1e10/0e0; select 1e10/0e0;
...@@ -773,7 +773,7 @@ show create table t1; ...@@ -773,7 +773,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`0.5` decimal(2,1) NOT NULL DEFAULT '0.0' `0.5` decimal(2,1) NOT NULL DEFAULT '0.0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
select round(1.5),round(2.5); select round(1.5),round(2.5);
round(1.5) round(2.5) round(1.5) round(2.5)
...@@ -936,14 +936,14 @@ show create table t1; ...@@ -936,14 +936,14 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`sl` decimal(5,5) DEFAULT NULL `sl` decimal(5,5) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (sl decimal(65, 30)); create table t1 (sl decimal(65, 30));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`sl` decimal(65,30) DEFAULT NULL `sl` decimal(65,30) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 ( create table t1 (
f1 decimal unsigned not null default 17.49, f1 decimal unsigned not null default 17.49,
...@@ -976,7 +976,7 @@ Table Create Table ...@@ -976,7 +976,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f0` decimal(30,30) unsigned zerofill NOT NULL DEFAULT '0.000000000000000000000000000000', `f0` decimal(30,30) unsigned zerofill NOT NULL DEFAULT '0.000000000000000000000000000000',
`f1` decimal(10,0) unsigned zerofill NOT NULL DEFAULT '0000000000' `f1` decimal(10,0) unsigned zerofill NOT NULL DEFAULT '0000000000'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
drop procedure if exists wg2; drop procedure if exists wg2;
create procedure wg2() create procedure wg2()
...@@ -1026,7 +1026,7 @@ t1 CREATE TABLE `t1` ( ...@@ -1026,7 +1026,7 @@ t1 CREATE TABLE `t1` (
`my_double` double DEFAULT NULL, `my_double` double DEFAULT NULL,
`my_varchar` varchar(50) DEFAULT NULL, `my_varchar` varchar(50) DEFAULT NULL,
`my_decimal` decimal(65,30) DEFAULT NULL `my_decimal` decimal(65,30) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
INSERT INTO t1 SET my_float = 1.175494345e-32, INSERT INTO t1 SET my_float = 1.175494345e-32,
my_double = 1.175494345e-32, my_double = 1.175494345e-32,
my_varchar = '1.175494345e-32'; my_varchar = '1.175494345e-32';
...@@ -1540,7 +1540,7 @@ show create table t1; ...@@ -1540,7 +1540,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`5.05 / 0.014` decimal(10,6) DEFAULT NULL `5.05 / 0.014` decimal(10,6) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select * from t1; select * from t1;
5.05 / 0.014 5.05 / 0.014
360.714286 360.714286
......
...@@ -5,14 +5,14 @@ show create table t1; ...@@ -5,14 +5,14 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` set('','a','b') NOT NULL `a` set('','a','b') NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
create table t1 (a set (' ','a','b ') not null default 'b '); create table t1 (a set (' ','a','b ') not null default 'b ');
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` set('','a','b') NOT NULL DEFAULT 'b' `a` set('','a','b') NOT NULL DEFAULT 'b'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
CREATE TABLE t1 ( user varchar(64) NOT NULL default '', path varchar(255) NOT NULL default '', privilege set('select','RESERVED30','RESERVED29','RESERVED28','RESERVED27','RESERVED26', 'RESERVED25','RESERVED24','data.delete','RESERVED22','RESERVED21', 'RESERVED20','data.insert.none','data.insert.approve', 'data.insert.delete','data.insert.move','data.insert.propose', 'data.insert.reject','RESERVED13','RESERVED12','RESERVED11','RESERVED10', 'RESERVED09','data.update','RESERVED07','RESERVED06','RESERVED05', 'RESERVED04','metadata.delete','metadata.put','RESERVED01','RESERVED00') NOT NULL default '', KEY user (user) ) ENGINE=MyISAM CHARSET=utf8; CREATE TABLE t1 ( user varchar(64) NOT NULL default '', path varchar(255) NOT NULL default '', privilege set('select','RESERVED30','RESERVED29','RESERVED28','RESERVED27','RESERVED26', 'RESERVED25','RESERVED24','data.delete','RESERVED22','RESERVED21', 'RESERVED20','data.insert.none','data.insert.approve', 'data.insert.delete','data.insert.move','data.insert.propose', 'data.insert.reject','RESERVED13','RESERVED12','RESERVED11','RESERVED10', 'RESERVED09','data.update','RESERVED07','RESERVED06','RESERVED05', 'RESERVED04','metadata.delete','metadata.put','RESERVED01','RESERVED00') NOT NULL default '', KEY user (user) ) ENGINE=MyISAM CHARSET=utf8;
DROP TABLE t1; DROP TABLE t1;
...@@ -22,7 +22,7 @@ show create table t1; ...@@ -22,7 +22,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`s` set('a','A') CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL `s` set('a','A') CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values ('a'),('a,A'),('A,a'),('A'); insert into t1 values ('a'),('a,A'),('A,a'),('A');
select s from t1 order by s; select s from t1 order by s;
s s
...@@ -84,5 +84,5 @@ show create table t1; ...@@ -84,5 +84,5 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1') DEFAULT NULL `f1` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1') DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
...@@ -195,7 +195,7 @@ t1 CREATE TABLE `t1` ( ...@@ -195,7 +195,7 @@ t1 CREATE TABLE `t1` (
`t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00', `t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00',
`t2` datetime DEFAULT NULL, `t2` datetime DEFAULT NULL,
`t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' `t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
t1 timestamp NO 2003-01-01 00:00:00 t1 timestamp NO 2003-01-01 00:00:00
...@@ -219,7 +219,7 @@ t1 CREATE TABLE `t1` ( ...@@ -219,7 +219,7 @@ t1 CREATE TABLE `t1` (
`t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`t2` datetime DEFAULT NULL, `t2` datetime DEFAULT NULL,
`t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' `t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
t1 timestamp NO CURRENT_TIMESTAMP t1 timestamp NO CURRENT_TIMESTAMP
...@@ -245,7 +245,7 @@ Table Create Table ...@@ -245,7 +245,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP, `t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`t2` datetime DEFAULT NULL `t2` datetime DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
t1 timestamp NO 2003-01-01 00:00:00 on update CURRENT_TIMESTAMP t1 timestamp NO 2003-01-01 00:00:00 on update CURRENT_TIMESTAMP
...@@ -270,7 +270,7 @@ Table Create Table ...@@ -270,7 +270,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`t2` datetime DEFAULT NULL `t2` datetime DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
...@@ -296,7 +296,7 @@ t1 CREATE TABLE `t1` ( ...@@ -296,7 +296,7 @@ t1 CREATE TABLE `t1` (
`t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`t2` datetime DEFAULT NULL, `t2` datetime DEFAULT NULL,
`t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' `t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
...@@ -322,7 +322,7 @@ Table Create Table ...@@ -322,7 +322,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`t2` datetime DEFAULT NULL `t2` datetime DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show columns from t1; show columns from t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
...@@ -377,7 +377,7 @@ Table Create Table ...@@ -377,7 +377,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL, `a` timestamp NULL DEFAULT NULL,
`b` timestamp NULL DEFAULT NULL `b` timestamp NULL DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (NULL, NULL); insert into t1 values (NULL, NULL);
SET TIMESTAMP=1000000017; SET TIMESTAMP=1000000017;
insert into t1 values (); insert into t1 values ();
...@@ -392,7 +392,7 @@ Table Create Table ...@@ -392,7 +392,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `a` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`b` timestamp NULL DEFAULT NULL `b` timestamp NULL DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (NULL, NULL); insert into t1 values (NULL, NULL);
SET TIMESTAMP=1000000018; SET TIMESTAMP=1000000018;
insert into t1 values (); insert into t1 values ();
...@@ -407,7 +407,7 @@ Table Create Table ...@@ -407,7 +407,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL, `a` timestamp NULL DEFAULT NULL,
`b` timestamp NULL DEFAULT '2003-01-01 00:00:00' `b` timestamp NULL DEFAULT '2003-01-01 00:00:00'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (NULL, NULL); insert into t1 values (NULL, NULL);
insert into t1 values (DEFAULT, DEFAULT); insert into t1 values (DEFAULT, DEFAULT);
select * from t1; select * from t1;
......
...@@ -9,7 +9,7 @@ t1 CREATE TABLE `t1` ( ...@@ -9,7 +9,7 @@ t1 CREATE TABLE `t1` (
`c` char(3) DEFAULT NULL, `c` char(3) DEFAULT NULL,
`e` enum('abc','def','ghi') DEFAULT NULL, `e` enum('abc','def','ghi') DEFAULT NULL,
`t` text `t` text
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table vchar; show create table vchar;
Table Create Table Table Create Table
vchar CREATE TABLE `vchar` ( vchar CREATE TABLE `vchar` (
...@@ -400,21 +400,21 @@ Table Create Table ...@@ -400,21 +400,21 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` varchar(65500) DEFAULT NULL, `f1` varchar(65500) DEFAULT NULL,
KEY `index1` (`f1`(10)) KEY `index1` (`f1`(10))
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table t1 modify f1 varchar(255); alter table t1 modify f1 varchar(255);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` varchar(255) DEFAULT NULL, `f1` varchar(255) DEFAULT NULL,
KEY `index1` (`f1`(10)) KEY `index1` (`f1`(10))
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table t1 modify f1 tinytext; alter table t1 modify f1 tinytext;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` tinytext, `f1` tinytext,
KEY `index1` (`f1`(10)) KEY `index1` (`f1`(10))
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1; drop table t1;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1(f1 VARCHAR(100) DEFAULT 'test'); CREATE TABLE t1(f1 VARCHAR(100) DEFAULT 'test');
...@@ -423,37 +423,6 @@ DROP TABLE IF EXISTS t1; ...@@ -423,37 +423,6 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(f1 CHAR(100) DEFAULT 'test'); CREATE TABLE t1(f1 CHAR(100) DEFAULT 'test');
INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3)); INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
drop table if exists t1, t2, t3;
create table t3 (
id int(11),
en varchar(255) character set utf8,
cz varchar(255) character set utf8
);
truncate table t3;
insert into t3 (id, en, cz) values
(1,'en string 1','cz string 1'),
(2,'en string 2','cz string 2'),
(3,'en string 3','cz string 3');
create table t1 (
id int(11),
name_id int(11)
);
insert into t1 (id, name_id) values (1,1), (2,3), (3,3);
create table t2 (id int(11));
insert into t2 (id) values (1), (2), (3);
select t1.*, t2.id, t3.en, t3.cz from t1 left join t2 on t1.id=t2.id
left join t3 on t1.id=t3.id order by t3.id;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 t1 id id 3 11 1 Y 32768 0 63
def test t1 t1 name_id name_id 3 11 1 Y 32768 0 63
def test t2 t2 id id 3 11 1 Y 32768 0 63
def test t3 t3 en en 253 255 11 Y 0 0 8
def test t3 t3 cz cz 253 255 11 Y 0 0 8
id name_id id en cz
1 1 1 en string 1 cz string 1
2 3 2 en string 2 cz string 2
3 3 3 en string 3 cz string 3
drop table t1, t2, t3;
CREATE TABLE t1 (a CHAR(2)); CREATE TABLE t1 (a CHAR(2));
INSERT INTO t1 VALUES (10), (50), (30), ('1a'), (60), ('t'); INSERT INTO t1 VALUES (10), (50), (30), ('1a'), (60), ('t');
SELECT a,(a + 0) FROM t1 ORDER BY a; SELECT a,(a + 0) FROM t1 ORDER BY a;
......
...@@ -150,48 +150,6 @@ CREATE TABLE t1(f1 CHAR(100) DEFAULT 'test'); ...@@ -150,48 +150,6 @@ CREATE TABLE t1(f1 CHAR(100) DEFAULT 'test');
INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3)); INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
#
# Bug#14897 "ResultSet.getString("table.column") sometimes doesn't find the
# column"
# Test that after upgrading an old 4.1 VARCHAR column to 5.0 VARCHAR we preserve
# the original column metadata.
#
--disable_warnings
drop table if exists t1, t2, t3;
--enable_warnings
create table t3 (
id int(11),
en varchar(255) character set utf8,
cz varchar(255) character set utf8
);
#remove_file $MYSQLD_DATADIR/test/t3.frm;
copy_file $MYSQL_TEST_DIR/std_data/14897.frm $MYSQLD_DATADIR/test/t3.frm;
truncate table t3;
insert into t3 (id, en, cz) values
(1,'en string 1','cz string 1'),
(2,'en string 2','cz string 2'),
(3,'en string 3','cz string 3');
create table t1 (
id int(11),
name_id int(11)
);
insert into t1 (id, name_id) values (1,1), (2,3), (3,3);
create table t2 (id int(11));
insert into t2 (id) values (1), (2), (3);
# max_length is different for varchar fields in ps-protocol and we can't
# replace a single metadata column, disable PS protocol
--disable_ps_protocol
--enable_metadata
select t1.*, t2.id, t3.en, t3.cz from t1 left join t2 on t1.id=t2.id
left join t3 on t1.id=t3.id order by t3.id;
--disable_metadata
--enable_ps_protocol
drop table t1, t2, t3;
# #
# Bug #11927: Warnings shown for CAST( chr as signed) but not (chr + 0) # Bug #11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
# #
......
...@@ -9,7 +9,7 @@ foo CREATE TABLE `foo` ( ...@@ -9,7 +9,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY HASH (a) /*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */ PARTITIONS 2 */
ALTER TABLE foo ADD KEY(b); ALTER TABLE foo ADD KEY(b);
...@@ -20,7 +20,7 @@ foo CREATE TABLE `foo` ( ...@@ -20,7 +20,7 @@ foo CREATE TABLE `foo` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY HASH (a) /*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */ PARTITIONS 2 */
DROP TABLE foo; DROP TABLE foo;
...@@ -7,33 +7,33 @@ Table Create Table ...@@ -7,33 +7,33 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE foo ALTER COLUMN a SET DEFAULT 100; ALTER TABLE foo ALTER COLUMN a SET DEFAULT 100;
SHOW CREATE TABLE foo; SHOW CREATE TABLE foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '100', `a` int(11) NOT NULL DEFAULT '100',
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE foo ALTER COLUMN a DROP DEFAULT; ALTER TABLE foo ALTER COLUMN a DROP DEFAULT;
SHOW CREATE TABLE foo; SHOW CREATE TABLE foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE foo ALTER COLUMN b SET DEFAULT 42; ALTER TABLE foo ALTER COLUMN b SET DEFAULT 42;
SHOW CREATE TABLE foo; SHOW CREATE TABLE foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) DEFAULT '42' `b` int(11) DEFAULT '42'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE foo ALTER COLUMN b DROP DEFAULT; ALTER TABLE foo ALTER COLUMN b DROP DEFAULT;
SHOW CREATE TABLE foo; SHOW CREATE TABLE foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) `b` int(11)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE foo; DROP TABLE foo;
...@@ -15,7 +15,7 @@ foo CREATE TABLE `foo` ( ...@@ -15,7 +15,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL AUTO_INCREMENT, `a` int(11) NOT NULL AUTO_INCREMENT,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo (b) values (11),(21),(32); insert into foo (b) values (11),(21),(32);
select * from foo; select * from foo;
a b a b
...@@ -31,7 +31,7 @@ foo CREATE TABLE `foo` ( ...@@ -31,7 +31,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL AUTO_INCREMENT, `a` int(11) NOT NULL AUTO_INCREMENT,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table foo auto_increment=10; alter table foo auto_increment=10;
insert into foo (b) values (11),(21),(32); insert into foo (b) values (11),(21),(32);
select * from foo; select * from foo;
...@@ -51,7 +51,7 @@ foo CREATE TABLE `foo` ( ...@@ -51,7 +51,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL AUTO_INCREMENT, `a` int(11) NOT NULL AUTO_INCREMENT,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB AUTO_INCREMENT=1006 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=1006 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table foo auto_increment=100000, add column c int; alter table foo auto_increment=100000, add column c int;
ERROR 42000: Table 'foo' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'foo' uses an extension that doesn't exist in this XYZ version
alter table foo auto_increment=100000, drop column b; alter table foo auto_increment=100000, drop column b;
......
...@@ -33,7 +33,7 @@ foo CREATE TABLE `foo` ( ...@@ -33,7 +33,7 @@ foo CREATE TABLE `foo` (
`e` timestamp(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000', `e` timestamp(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`f` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000', `f` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`g` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' `g` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table foo change b b timestamp(1); alter table foo change b b timestamp(1);
alter table foo change b b timestamp(3); alter table foo change b b timestamp(3);
ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
...@@ -86,7 +86,7 @@ foo CREATE TABLE `foo` ( ...@@ -86,7 +86,7 @@ foo CREATE TABLE `foo` (
`e` datetime(4) DEFAULT NULL, `e` datetime(4) DEFAULT NULL,
`f` datetime(5) DEFAULT NULL, `f` datetime(5) DEFAULT NULL,
`g` datetime(6) DEFAULT NULL `g` datetime(6) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table foo change b b datetime(1); alter table foo change b b datetime(1);
alter table foo change b b datetime(3); alter table foo change b b datetime(3);
ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
...@@ -136,7 +136,7 @@ foo CREATE TABLE `foo` ( ...@@ -136,7 +136,7 @@ foo CREATE TABLE `foo` (
`e` time(4) DEFAULT NULL, `e` time(4) DEFAULT NULL,
`f` time(5) DEFAULT NULL, `f` time(5) DEFAULT NULL,
`g` time(6) DEFAULT NULL `g` time(6) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table foo change b b time(1); alter table foo change b b time(1);
alter table foo change b b time(3); alter table foo change b b time(3);
ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
......
...@@ -6,14 +6,14 @@ Table Create Table ...@@ -6,14 +6,14 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
CREATE TABLE bar LIKE foo; CREATE TABLE bar LIKE foo;
SHOW CREATE TABLE bar; SHOW CREATE TABLE bar;
Table Create Table Table Create Table
bar CREATE TABLE `bar` ( bar CREATE TABLE `bar` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE foo ADD COLUMN a INT; ALTER TABLE foo ADD COLUMN a INT;
SHOW CREATE TABLE foo; SHOW CREATE TABLE foo;
Table Create Table Table Create Table
...@@ -21,7 +21,7 @@ foo CREATE TABLE `foo` ( ...@@ -21,7 +21,7 @@ foo CREATE TABLE `foo` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
FLUSH TABLES; FLUSH TABLES;
SHOW CREATE TABLE foo; SHOW CREATE TABLE foo;
Table Create Table Table Create Table
...@@ -29,5 +29,5 @@ foo CREATE TABLE `foo` ( ...@@ -29,5 +29,5 @@ foo CREATE TABLE `foo` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE foo, bar; DROP TABLE foo, bar;
...@@ -4,7 +4,7 @@ SHOW CREATE TABLE s; ...@@ -4,7 +4,7 @@ SHOW CREATE TABLE s;
Table Create Table Table Create Table
s CREATE TABLE `s` ( s CREATE TABLE `s` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SET tokudb_disable_slow_alter=1; SET tokudb_disable_slow_alter=1;
ALTER TABLE s RENAME TO t, ADD COLUMN b INT; ALTER TABLE s RENAME TO t, ADD COLUMN b INT;
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
...@@ -12,5 +12,5 @@ Table Create Table ...@@ -12,5 +12,5 @@ Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE t; DROP TABLE t;
...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` ( ...@@ -8,7 +8,7 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY HASH (a) /*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */ PARTITIONS 2 */
ALTER TABLE foo ADD COLUMN c INT; ALTER TABLE foo ADD COLUMN c INT;
...@@ -19,7 +19,7 @@ foo CREATE TABLE `foo` ( ...@@ -19,7 +19,7 @@ foo CREATE TABLE `foo` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY HASH (a) /*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */ PARTITIONS 2 */
DROP TABLE foo; DROP TABLE foo;
...@@ -33,7 +33,7 @@ foo CREATE TABLE `foo` ( ...@@ -33,7 +33,7 @@ foo CREATE TABLE `foo` (
`b` varchar(10) DEFAULT NULL, `b` varchar(10) DEFAULT NULL,
`c` blob, `c` blob,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select * from foo; select * from foo;
a b c a b c
1 bb cccc 1 bb cccc
......
...@@ -18,7 +18,7 @@ foo CREATE TABLE `foo` ( ...@@ -18,7 +18,7 @@ foo CREATE TABLE `foo` (
PRIMARY KEY (`aa`), PRIMARY KEY (`aa`),
KEY `b` (`b`), KEY `b` (`b`),
KEY `d` (`d`) `clustering`=yes KEY `d` (`d`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select * from foo; select * from foo;
aa b c d e aa b c d e
1 10 cc dddd eeeee 1 10 cc dddd eeeee
...@@ -40,7 +40,7 @@ foo CREATE TABLE `foo` ( ...@@ -40,7 +40,7 @@ foo CREATE TABLE `foo` (
PRIMARY KEY (`aa`), PRIMARY KEY (`aa`),
KEY `b` (`bb`), KEY `b` (`bb`),
KEY `d` (`d`) `clustering`=yes KEY `d` (`d`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select bb from foo FORCE INDEX (b) where bb > 5; explain select bb from foo FORCE INDEX (b) where bb > 5;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo index b b 9 NULL 1 Using where; Using index 1 SIMPLE foo index b b 9 NULL 1 Using where; Using index
...@@ -59,7 +59,7 @@ foo CREATE TABLE `foo` ( ...@@ -59,7 +59,7 @@ foo CREATE TABLE `foo` (
PRIMARY KEY (`aa`), PRIMARY KEY (`aa`),
KEY `b` (`bb`), KEY `b` (`bb`),
KEY `d` (`dd`) `clustering`=yes KEY `d` (`dd`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
explain select * from foo where dd > "d"; explain select * from foo where dd > "d";
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo index d d 13 NULL 1 Using where; Using index 1 SIMPLE foo index d d 13 NULL 1 Using where; Using index
......
...@@ -63,7 +63,7 @@ foo CREATE TABLE `foo` ( ...@@ -63,7 +63,7 @@ foo CREATE TABLE `foo` (
UNIQUE KEY `c` (`c`), UNIQUE KEY `c` (`c`),
KEY `d` (`d`), KEY `d` (`d`),
KEY `b` (`b`) `clustering`=yes KEY `b` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table foo change column aa aa int NOT NULL; alter table foo change column aa aa int NOT NULL;
ERROR 42000: Table 'foo' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 'foo' uses an extension that doesn't exist in this XYZ version
alter table foo change column aa aa varchar(20); alter table foo change column aa aa varchar(20);
......
...@@ -62,7 +62,7 @@ foo CREATE TABLE `foo` ( ...@@ -62,7 +62,7 @@ foo CREATE TABLE `foo` (
UNIQUE KEY `c` (`c`), UNIQUE KEY `c` (`c`),
KEY `d` (`d`), KEY `d` (`d`),
KEY `b` (`b`) `clustering`=yes KEY `b` (`b`) `clustering`=yes
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table foo_isam; show create table foo_isam;
Table Create Table Table Create Table
foo_isam CREATE TABLE `foo_isam` ( foo_isam CREATE TABLE `foo_isam` (
...@@ -80,7 +80,7 @@ foo_isam CREATE TABLE `foo_isam` ( ...@@ -80,7 +80,7 @@ foo_isam CREATE TABLE `foo_isam` (
UNIQUE KEY `c` (`c`), UNIQUE KEY `c` (`c`),
KEY `d` (`d`), KEY `d` (`d`),
KEY `b` (`b`) `clustering`=yes KEY `b` (`b`) `clustering`=yes
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table foo change column aa aa int NOT NULL; alter table foo change column aa aa int NOT NULL;
alter table foo_isam change column aa aa int NOT NULL; alter table foo_isam change column aa aa int NOT NULL;
include/diff_tables.inc [test.foo, test.foo_isam] include/diff_tables.inc [test.foo, test.foo_isam]
......
...@@ -10,7 +10,7 @@ Table Create Table ...@@ -10,7 +10,7 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
PRIMARY KEY (`c1`) PRIMARY KEY (`c1`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE foo compression=tokudb_lzma, add column c2 int not null; ALTER TABLE foo compression=tokudb_lzma, add column c2 int not null;
SELECT CREATE_OPTIONS SELECT CREATE_OPTIONS
FROM INFORMATION_SCHEMA.TABLES WHERE (table_name LIKE 'foo'); FROM INFORMATION_SCHEMA.TABLES WHERE (table_name LIKE 'foo');
......
...@@ -12,7 +12,7 @@ foo CREATE TABLE `foo` ( ...@@ -12,7 +12,7 @@ foo CREATE TABLE `foo` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
begin; begin;
insert into foo values (1,10,100),(2,20,200),(3,30,300); insert into foo values (1,10,100),(2,20,200),(3,30,300);
set session transaction isolation level read uncommitted; set session transaction isolation level read uncommitted;
...@@ -35,7 +35,7 @@ foo CREATE TABLE `foo` ( ...@@ -35,7 +35,7 @@ foo CREATE TABLE `foo` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
begin; begin;
insert into foo values (1,10,100),(2,20,200),(3,30,300); insert into foo values (1,10,100),(2,20,200),(3,30,300);
insert into foo values (100,100,100); insert into foo values (100,100,100);
...@@ -56,7 +56,7 @@ foo CREATE TABLE `foo` ( ...@@ -56,7 +56,7 @@ foo CREATE TABLE `foo` (
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
begin; begin;
insert into foo values (1,10,100),(2,20,200),(3,30,300); insert into foo values (1,10,100),(2,20,200),(3,30,300);
insert into foo values (100,100,100); insert into foo values (100,100,100);
......
...@@ -4,7 +4,7 @@ SHOW CREATE TABLE t; ...@@ -4,7 +4,7 @@ SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY KEY (a) /*!50100 PARTITION BY KEY (a)
(PARTITION part0 ENGINE = TokuDB, (PARTITION part0 ENGINE = TokuDB,
PARTITION part1 ENGINE = TokuDB) */ PARTITION part1 ENGINE = TokuDB) */
......
...@@ -6,7 +6,7 @@ t1 CREATE TABLE `t1` ( ...@@ -6,7 +6,7 @@ t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c2` int(11) NOT NULL, `c2` int(11) NOT NULL,
PRIMARY KEY (`c1`) PRIMARY KEY (`c1`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 (c1,c2) values (1,1),(2,2); insert into t1 (c1,c2) values (1,1),(2,2);
alter table t1 compression=tokudb_lzma; alter table t1 compression=tokudb_lzma;
show create table t1; show create table t1;
......
...@@ -8,7 +8,7 @@ Table Create Table ...@@ -8,7 +8,7 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values(1); insert into foo values(1);
select * from foo; select * from foo;
a a
...@@ -20,7 +20,7 @@ Table Create Table ...@@ -20,7 +20,7 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select * from foo; select * from foo;
a a
1 1
...@@ -45,7 +45,7 @@ Table Create Table ...@@ -45,7 +45,7 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select * from foo; select * from foo;
a a
1 1
...@@ -67,7 +67,7 @@ Table Create Table ...@@ -67,7 +67,7 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into foo values(1); insert into foo values(1);
select * from foo; select * from foo;
a a
...@@ -84,7 +84,7 @@ show create table fooff; ...@@ -84,7 +84,7 @@ show create table fooff;
Table Create Table Table Create Table
fooff CREATE TABLE `fooff` ( fooff CREATE TABLE `fooff` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table fooff; drop table fooff;
begin; begin;
select * from bar; select * from bar;
...@@ -100,7 +100,7 @@ show create table foo; ...@@ -100,7 +100,7 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`abra` int(11) DEFAULT NULL `abra` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select * from foo; select * from foo;
abra abra
drop table foo; drop table foo;
......
...@@ -26,7 +26,7 @@ foo CREATE TABLE `foo` ( ...@@ -26,7 +26,7 @@ foo CREATE TABLE `foo` (
`b` datetime(4) DEFAULT NULL, `b` datetime(4) DEFAULT NULL,
`c` datetime(5) DEFAULT NULL, `c` datetime(5) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
select * from foo; select * from foo;
a b c a b c
2010-12-10 14:12:09.123451 2010-12-10 14:12:09.1234 2010-12-10 14:12:09.12345 2010-12-10 14:12:09.123451 2010-12-10 14:12:09.1234 2010-12-10 14:12:09.12345
......
...@@ -7,23 +7,23 @@ Table Create Table ...@@ -7,23 +7,23 @@ Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table bar; show create table bar;
Table Create Table Table Create Table
bar CREATE TABLE `bar` ( bar CREATE TABLE `bar` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table foo; show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table bar; show create table bar;
Table Create Table Table Create Table
bar CREATE TABLE `bar` ( bar CREATE TABLE `bar` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE foo,bar; DROP TABLE foo,bar;
...@@ -9,12 +9,12 @@ show create table foo; ...@@ -9,12 +9,12 @@ show create table foo;
Table Create Table Table Create Table
foo CREATE TABLE `foo` ( foo CREATE TABLE `foo` (
`b` bigint(20) DEFAULT NULL `b` bigint(20) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table bar; show create table bar;
Table Create Table Table Create Table
bar CREATE TABLE `bar` ( bar CREATE TABLE `bar` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE foo,bar; DROP TABLE foo,bar;
...@@ -10,11 +10,11 @@ foo CREATE TABLE `foo` ( ...@@ -10,11 +10,11 @@ foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0', `a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
show create table bar; show create table bar;
Table Create Table Table Create Table
bar CREATE TABLE `bar` ( bar CREATE TABLE `bar` (
`a` bigint(20) DEFAULT NULL, `a` bigint(20) DEFAULT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
DROP TABLE foo,bar; DROP TABLE foo,bar;
...@@ -8,7 +8,7 @@ show create table t1; ...@@ -8,7 +8,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2(a int); create table t2(a int);
insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C; insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C;
......
...@@ -9,7 +9,7 @@ show create table t1; ...@@ -9,7 +9,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2(a int); create table t2(a int);
insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C; insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C;
......
...@@ -9,7 +9,7 @@ Table Create Table ...@@ -9,7 +9,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL, `i` int(11) DEFAULT NULL,
`j` int(11) DEFAULT '0' `j` int(11) DEFAULT '0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table t1 modify i int default '1'; alter table t1 modify i int default '1';
select * from t1; select * from t1;
i j i j
...@@ -19,7 +19,7 @@ Table Create Table ...@@ -19,7 +19,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT '1', `i` int(11) DEFAULT '1',
`j` int(11) DEFAULT '0' `j` int(11) DEFAULT '0'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
alter table t1 modify j int default '2', rename t2; alter table t1 modify j int default '2', rename t2;
select * from t1; select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
...@@ -31,5 +31,5 @@ Table Create Table ...@@ -31,5 +31,5 @@ Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`i` int(11) DEFAULT '1', `i` int(11) DEFAULT '1',
`j` int(11) DEFAULT '2' `j` int(11) DEFAULT '2'
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t2; drop table t2;
...@@ -7,7 +7,7 @@ t1 CREATE TABLE `t1` ( ...@@ -7,7 +7,7 @@ t1 CREATE TABLE `t1` (
`c` text, `c` text,
KEY `a` (`a`) `clustering`=yes, KEY `a` (`a`) `clustering`=yes,
KEY `b` (`b`) KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
insert t1 values (1, 1, 1); insert t1 values (1, 1, 1);
insert t1 select a+1, a+1, a+1 from t1; insert t1 select a+1, a+1, a+1 from t1;
insert t1 select a+2, a+2, a+2 from t1; insert t1 select a+2, a+2, a+2 from t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment