create table t1 (f1 int not null, f2 int not null, f3 int not null, f4 int not null, primary key(f1,f2,f3,f4)) engine=myisam; insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0),(1,3,1,0),(1,3,2,0),(1,3,3,0),(1,1,1,1),(1,1,2,1),(1,1,3,1),(1,2,1,1),(1,2,2,1),(1,2,3,1),(1,3,1,1),(1,3,2,1),(1,3,3,1); -- Here we enable metadata just to check that the collation of the -- resultset is non-binary for string type. This should be changed -- after Bug#29394 is implemented. analyze table t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def Table 253 512 7 Y 0 31 255 def Op 253 40 7 Y 0 31 255 def Msg_type 253 40 6 Y 0 31 255 def Msg_text 250 1572864 2 Y 0 31 255 Table Op Msg_type Msg_text test.t1 analyze status OK show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression t1 0 PRIMARY 1 f1 A 1 NULL NULL BTREE YES NULL t1 0 PRIMARY 2 f2 A 3 NULL NULL BTREE YES NULL t1 0 PRIMARY 3 f3 A 9 NULL NULL BTREE YES NULL t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE YES NULL -- Here we enable metadata just to check that the collation of the -- resultset is non-binary for string type. This should be changed -- after Bug#29394 is implemented. repair table t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def Table 253 512 7 Y 0 31 255 def Op 253 40 6 Y 0 31 255 def Msg_type 253 40 6 Y 0 31 255 def Msg_text 250 1572864 2 Y 0 31 255 Table Op Msg_type Msg_text test.t1 repair status OK show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression t1 0 PRIMARY 1 f1 A 1 NULL NULL BTREE YES NULL t1 0 PRIMARY 2 f2 A 3 NULL NULL BTREE YES NULL t1 0 PRIMARY 3 f3 A 9 NULL NULL BTREE YES NULL t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE YES NULL drop table t1; create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(10) DEFAULT NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' alter table t1 MAX_ROWS=200 ROW_FORMAT=dynamic PACK_KEYS=0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(10) DEFAULT NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci MIN_ROWS=10 MAX_ROWS=200 AVG_ROW_LENGTH=10 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='test' ALTER TABLE t1 AVG_ROW_LENGTH=0 CHECKSUM=0 COMMENT="" MIN_ROWS=0 MAX_ROWS=0 PACK_KEYS=DEFAULT DELAY_KEY_WRITE=0 ROW_FORMAT=default; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(10) DEFAULT NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci drop table t1; SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1 ( type_bool bool not null default 0, type_tiny tinyint not null auto_increment primary key, type_short smallint(3), type_mediumint mediumint, type_bigint bigint, type_decimal decimal(5,2), type_numeric numeric(5,2), empty_char char(0), type_char char(2), type_varchar varchar(10), type_timestamp timestamp not null default current_timestamp on update current_timestamp, type_date date not null default '0000-00-00', type_time time not null default '00:00:00', type_datetime datetime not null default '0000-00-00 00:00:00', type_year year, type_enum enum ('red', 'green', 'blue'), type_set enum ('red', 'green', 'blue'), type_tinyblob tinyblob, type_blob blob, type_medium_blob mediumblob, type_long_blob longblob, index(type_short) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed CHARSET=latin1; Warnings: Warning 1681 Integer display width is deprecated and will be removed in a future release. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `type_bool` tinyint(1) NOT NULL DEFAULT '0', `type_tiny` tinyint(4) NOT NULL AUTO_INCREMENT, `type_short` smallint(3) DEFAULT NULL, `type_mediumint` mediumint(9) DEFAULT NULL, `type_bigint` bigint(20) DEFAULT NULL, `type_decimal` decimal(5,2) DEFAULT NULL, `type_numeric` decimal(5,2) DEFAULT NULL, `empty_char` char(0) DEFAULT NULL, `type_char` char(2) DEFAULT NULL, `type_varchar` varchar(10) DEFAULT NULL, `type_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `type_date` date NOT NULL DEFAULT '0000-00-00', `type_time` time NOT NULL DEFAULT '00:00:00', `type_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `type_year` year(4) DEFAULT NULL, `type_enum` enum('red','green','blue') DEFAULT NULL, `type_set` enum('red','green','blue') DEFAULT NULL, `type_tinyblob` tinyblob, `type_blob` blob, `type_medium_blob` mediumblob, `type_long_blob` longblob, PRIMARY KEY (`type_tiny`), KEY `type_short` (`type_short`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' insert into t1 (type_timestamp) values ("2003-02-07 10:00:01"); select * from t1; type_bool type_tiny type_short type_mediumint type_bigint type_decimal type_numeric empty_char type_char type_varchar type_timestamp type_date type_time type_datetime type_year type_enum type_set type_tinyblob type_blob type_medium_blob type_long_blob 0 1 NULL NULL NULL NULL NULL NULL NULL NULL 2003-02-07 10:00:01 0000-00-00 00:00:00 0000-00-00 00:00:00 NULL NULL NULL NULL NULL NULL NULL drop table t1; SET sql_mode = default; CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DROP TABLE t1; CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) USING HASH ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DROP TABLE t1; CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) USING BTREE ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DROP TABLE t1; CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DROP TABLE t1; CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DROP TABLE t1; CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ALTER TABLE t1 ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DROP TABLE t1; CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ALTER TABLE t1 ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, KEY `i` (`i`) USING BTREE ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DROP TABLE t1; flush status; show variables like "log_queries_not_using_indexes"; Variable_name Value log_queries_not_using_indexes ON CREATE TABLE `tab1` ( `c1` int(11) default NULL, `c2` char(20) default NULL, `c3` char(20) default NULL, KEY `k1` (`c2`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Warnings: Warning 1681 Integer display width is deprecated and will be removed in a future release. INSERT INTO tab1 values(1, "hello", "world"); INSERT INTO tab1 values(2, "hello2", "world2"); INSERT INTO tab1 values(3, "hello3", "world3"); select SQL_NO_CACHE * from tab1; c1 c2 c3 1 hello world 2 hello2 world2 3 hello3 world3 Warnings: Warning 1681 'SQL_NO_CACHE' is deprecated and will be removed in a future release. show status like 'slow_queries'; Variable_name Value Slow_queries 1 set global log_queries_not_using_indexes=OFF; show variables like "log_queries_not_using_indexes"; Variable_name Value log_queries_not_using_indexes OFF select SQL_NO_CACHE * from tab1; c1 c2 c3 1 hello world 2 hello2 world2 3 hello3 world3 Warnings: Warning 1681 'SQL_NO_CACHE' is deprecated and will be removed in a future release. show status like 'slow_queries'; Variable_name Value Slow_queries 1 set global log_queries_not_using_indexes=ON; show variables like "log_queries_not_using_indexes"; Variable_name Value log_queries_not_using_indexes ON select SQL_NO_CACHE * from tab1; c1 c2 c3 1 hello world 2 hello2 world2 3 hello3 world3 Warnings: Warning 1681 'SQL_NO_CACHE' is deprecated and will be removed in a future release. show status like 'slow_queries'; Variable_name Value Slow_queries 2 drop table tab1; show variables like 'myisam_recover_options'; Variable_name Value myisam_recover_options OFF CREATE TABLE t1 ( Codigo int(10) unsigned NOT NULL auto_increment, Nombre varchar(255) default NULL, Telefono varchar(255) default NULL, Observaciones longtext, Direccion varchar(255) default NULL, Dni varchar(255) default NULL, CP int(11) default NULL, Provincia varchar(255) default NULL, Poblacion varchar(255) default NULL, PRIMARY KEY (Codigo) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; Warnings: Warning 1681 Integer display width is deprecated and will be removed in a future release. Warning 1681 Integer display width is deprecated and will be removed in a future release. Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. show create table t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def Table 253 256 2 N 1 31 255 def Create Table 253 4096 445 N 1 31 255 Table Create Table t1 CREATE TABLE `t1` ( `Codigo` int(10) unsigned NOT NULL AUTO_INCREMENT, `Nombre` varchar(255) DEFAULT NULL, `Telefono` varchar(255) DEFAULT NULL, `Observaciones` longtext, `Direccion` varchar(255) DEFAULT NULL, `Dni` varchar(255) DEFAULT NULL, `CP` int(11) DEFAULT NULL, `Provincia` varchar(255) DEFAULT NULL, `Poblacion` varchar(255) DEFAULT NULL, PRIMARY KEY (`Codigo`) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 drop table t1;