From d2b8d744d9f9ab32478416885d7929ad00d3b276 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Apr 2006 16:45:10 +0300 Subject: Added storage/maria (based on MyISAM). WL#3245 Moved things into ft_global.h, my_handler.h and myisamchk.h to allow MyISAM and Maria to share code and defines Rename of not properly renamed functions in MyISAM and my_handler.c Renamed some MI_ defines to HA_ to allow MyISAM and Maria to share Added maria variables to mysqld.cc and set_var.cc Fixed compiler warnings BitKeeper/etc/ignore: added storage/maria/*.MAI BUILD/SETUP.sh: Compile maria by default BitKeeper/triggers/post-commit: No public maria emails. Mark changesets emails with 'maria' configure.in: Add maria include/ft_global.h: Move defines needed by maria and MyISAM here include/keycache.h: Add support for default key_cache if cache not found include/my_base.h: Add invalidator_by_filename include/my_handler.h: Remove duplicate header files Add defines that are typical for handlers (MyISAM and Maria) include/myisam.h: Move things to my_handler.h to allow Maria and MyISAM to share things (Some things needed to be shared to allow sharing of HA_CHECK structure) libmysqld/Makefile.am: Added ha_maria.cc mysys/mf_keycaches.c: Added default value for multi_key_cache_search mysys/my_handler.c: mi_compare_text -> ha_compare_text Removed compiler warnings sql/ha_myisam.cc: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisam.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/ha_myisammrg.h: MI_CHECK -> HA_CHECK MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH sql/handler.h: Added MARIA Added inclusion of my_handler.h sql/item_func.h: Remove duplicate include sql/mysql_priv.h: Added maria variables sql/mysqld.cc: Added maria sql/set_var.cc: Added maria status variables sql/set_var.h: Added maria sql/sql_class.h: Added maria status variables sql/sql_sort.h: Remove duplicate BUFFPEK struct storage/Makefile.am: Added maria storage/csv/ha_tina.cc: Removed compiler warning storage/myisam/Makefile.am: Added ft_myisam.c storage/myisam/ft_boolean_search.c: mi_compare_text -> ha_compare_text MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF Remove compiler warnings storage/myisam/ft_nlq_search.c: mi_compare_text -> ha_compare_text storage/myisam/ft_parser.c: mi_compare_text -> ha_compare_text storage/myisam/ft_static.c: Move ft_init_search() to ft_myisam.c to make ft_static.c independent of MyISAM storage/myisam/ft_stopwords.c: mi_compare_text -> ha_compare_text storage/myisam/ft_update.c: mi_compare_text -> ha_compare_text storage/myisam/fulltext.h: Move things to ft_global.h to allow to share more things between MyISAM and Maria storage/myisam/mi_check.c: MI_CHECK -> HA_CHECK storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_delete_all.c: Remove not used variable storage/myisam/mi_dynrec.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_key.c: _my_store_blob_length -> _mi_store_blob_length storage/myisam/mi_log.c: _my_calc_total_blob_length -> _mi_calc_total_blob_length storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_SEG -> HA_MAX_KEY_SEG MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF my_n_base_info_read -> mi_n_base_info_read storage/myisam/mi_packrec.c: Made read_pack_length static _my_store_blob_length -> _mi_store_blob_length Remove not used variable storage/myisam/mi_range.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_search.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_test1.c: MI_MAX_KEY_LENGTH -> HA_MAX_KEY_LENGTH storage/myisam/mi_test2.c: Fixed compiler warning storage/myisam/mi_unique.c: Fixed compiler warning mi_compare_text -> ha_compare_text storage/myisam/mi_update.c: MI_MAX_KEY_BUFF -> HA_MAX_KEY_BUFF storage/myisam/mi_write.c: Rename of defines and functions storage/myisam/myisamchk.c: Rename of defines and functions storage/myisam/myisamdef.h: Remove tabs Indentation fixes (Large changes as I did run indent-ex on the file) Move some things to myisamchk.h Added missing functions that gave compiler warnings storage/myisam/myisamlog.c: Rename of defines and functions storage/myisam/myisampack.c: Remove compiler warning storage/myisam/rt_index.c: Rename of defines and functions storage/myisam/sort.c: Rename of defines, functions and structures config/ac-macros/ha_maria.m4: New BitKeeper file ``config/ac-macros/ha_maria.m4'' include/maria.h: New BitKeeper file ``include/maria.h'' include/myisamchk.h: New BitKeeper file ``include/myisamchk.h'' libmysqld/ha_maria.cc: New BitKeeper file ``libmysqld/ha_maria.cc'' mysql-test/include/have_maria.inc: New BitKeeper file ``mysql-test/include/have_maria.inc'' mysql-test/r/have_maria.require: New BitKeeper file ``mysql-test/r/have_maria.require'' mysql-test/r/maria.result: New BitKeeper file ``mysql-test/r/maria.result'' mysql-test/r/ps_maria.result: New BitKeeper file ``mysql-test/r/ps_maria.result'' mysql-test/t/maria.test: New BitKeeper file ``mysql-test/t/maria.test'' mysql-test/t/ps_maria.test: New BitKeeper file ``mysql-test/t/ps_maria.test'' sql/ha_maria.cc: New BitKeeper file ``sql/ha_maria.cc'' sql/ha_maria.h: New BitKeeper file ``sql/ha_maria.h'' storage/maria/Makefile.am: New BitKeeper file ``storage/maria/Makefile.am'' storage/maria/cmakelists.txt: New BitKeeper file ``storage/maria/cmakelists.txt'' storage/maria/ft_maria.c: New BitKeeper file ``storage/maria/ft_maria.c'' storage/maria/ma_cache.c: New BitKeeper file ``storage/maria/ma_cache.c'' storage/maria/ma_changed.c: New BitKeeper file ``storage/maria/ma_changed.c'' storage/maria/ma_check.c: New BitKeeper file ``storage/maria/ma_check.c'' storage/maria/ma_checksum.c: New BitKeeper file ``storage/maria/ma_checksum.c'' storage/maria/ma_close.c: New BitKeeper file ``storage/maria/ma_close.c'' storage/maria/ma_create.c: New BitKeeper file ``storage/maria/ma_create.c'' storage/maria/ma_dbug.c: New BitKeeper file ``storage/maria/ma_dbug.c'' storage/maria/ma_delete.c: New BitKeeper file ``storage/maria/ma_delete.c'' storage/maria/ma_delete_all.c: New BitKeeper file ``storage/maria/ma_delete_all.c'' storage/maria/ma_delete_table.c: New BitKeeper file ``storage/maria/ma_delete_table.c'' storage/maria/ma_dynrec.c: New BitKeeper file ``storage/maria/ma_dynrec.c'' storage/maria/ma_extra.c: New BitKeeper file ``storage/maria/ma_extra.c'' storage/maria/ma_ft_boolean_search.c: New BitKeeper file ``storage/maria/ma_ft_boolean_search.c'' storage/maria/ma_ft_eval.c: New BitKeeper file ``storage/maria/ma_ft_eval.c'' storage/maria/ma_ft_eval.h: New BitKeeper file ``storage/maria/ma_ft_eval.h'' storage/maria/ma_ft_nlq_search.c: New BitKeeper file ``storage/maria/ma_ft_nlq_search.c'' storage/maria/ma_ft_parser.c: New BitKeeper file ``storage/maria/ma_ft_parser.c'' storage/maria/ma_ft_stem.c: New BitKeeper file ``storage/maria/ma_ft_stem.c'' storage/maria/ma_ft_test1.c: New BitKeeper file ``storage/maria/ma_ft_test1.c'' storage/maria/ma_ft_test1.h: New BitKeeper file ``storage/maria/ma_ft_test1.h'' storage/maria/ma_ft_update.c: New BitKeeper file ``storage/maria/ma_ft_update.c'' storage/maria/ma_ftdefs.h: New BitKeeper file ``storage/maria/ma_ftdefs.h'' storage/maria/ma_fulltext.h: New BitKeeper file ``storage/maria/ma_fulltext.h'' storage/maria/ma_info.c: New BitKeeper file ``storage/maria/ma_info.c'' storage/maria/ma_init.c: New BitKeeper file ``storage/maria/ma_init.c'' storage/maria/ma_key.c: New BitKeeper file ``storage/maria/ma_key.c'' storage/maria/ma_keycache.c: New BitKeeper file ``storage/maria/ma_keycache.c'' storage/maria/ma_locking.c: New BitKeeper file ``storage/maria/ma_locking.c'' storage/maria/ma_log.c: New BitKeeper file ``storage/maria/ma_log.c'' storage/maria/ma_open.c: New BitKeeper file ``storage/maria/ma_open.c'' storage/maria/ma_packrec.c: New BitKeeper file ``storage/maria/ma_packrec.c'' storage/maria/ma_page.c: New BitKeeper file ``storage/maria/ma_page.c'' storage/maria/ma_panic.c: New BitKeeper file ``storage/maria/ma_panic.c'' storage/maria/ma_preload.c: New BitKeeper file ``storage/maria/ma_preload.c'' storage/maria/ma_range.c: New BitKeeper file ``storage/maria/ma_range.c'' storage/maria/ma_rename.c: New BitKeeper file ``storage/maria/ma_rename.c'' storage/maria/ma_rfirst.c: New BitKeeper file ``storage/maria/ma_rfirst.c'' storage/maria/ma_rkey.c: New BitKeeper file ``storage/maria/ma_rkey.c'' storage/maria/ma_rlast.c: New BitKeeper file ``storage/maria/ma_rlast.c'' storage/maria/ma_rnext.c: New BitKeeper file ``storage/maria/ma_rnext.c'' storage/maria/ma_rnext_same.c: New BitKeeper file ``storage/maria/ma_rnext_same.c'' storage/maria/ma_rprev.c: New BitKeeper file ``storage/maria/ma_rprev.c'' storage/maria/ma_rrnd.c: New BitKeeper file ``storage/maria/ma_rrnd.c'' storage/maria/ma_rsame.c: New BitKeeper file ``storage/maria/ma_rsame.c'' storage/maria/ma_rsamepos.c: New BitKeeper file ``storage/maria/ma_rsamepos.c'' storage/maria/ma_rt_index.c: New BitKeeper file ``storage/maria/ma_rt_index.c'' storage/maria/ma_rt_index.h: New BitKeeper file ``storage/maria/ma_rt_index.h'' storage/maria/ma_rt_key.c: New BitKeeper file ``storage/maria/ma_rt_key.c'' storage/maria/ma_rt_key.h: New BitKeeper file ``storage/maria/ma_rt_key.h'' storage/maria/ma_rt_mbr.c: New BitKeeper file ``storage/maria/ma_rt_mbr.c'' storage/maria/ma_rt_mbr.h: New BitKeeper file ``storage/maria/ma_rt_mbr.h'' storage/maria/ma_rt_split.c: New BitKeeper file ``storage/maria/ma_rt_split.c'' storage/maria/ma_rt_test.c: New BitKeeper file ``storage/maria/ma_rt_test.c'' storage/maria/ma_scan.c: New BitKeeper file ``storage/maria/ma_scan.c'' storage/maria/ma_search.c: New BitKeeper file ``storage/maria/ma_search.c'' storage/maria/ma_sort.c: New BitKeeper file ``storage/maria/ma_sort.c'' storage/maria/ma_sp_defs.h: New BitKeeper file ``storage/maria/ma_sp_defs.h'' storage/maria/ma_sp_key.c: New BitKeeper file ``storage/maria/ma_sp_key.c'' storage/maria/ma_sp_test.c: New BitKeeper file ``storage/maria/ma_sp_test.c'' storage/maria/ma_static.c: New BitKeeper file ``storage/maria/ma_static.c'' storage/maria/ma_statrec.c: New BitKeeper file ``storage/maria/ma_statrec.c'' storage/maria/ma_test1.c: New BitKeeper file ``storage/maria/ma_test1.c'' storage/maria/ma_test2.c: New BitKeeper file ``storage/maria/ma_test2.c'' storage/maria/ma_test3.c: New BitKeeper file ``storage/maria/ma_test3.c'' storage/maria/ma_test_all.sh: New BitKeeper file ``storage/maria/ma_test_all.sh'' storage/maria/ma_unique.c: New BitKeeper file ``storage/maria/ma_unique.c'' storage/maria/ma_update.c: New BitKeeper file ``storage/maria/ma_update.c'' storage/maria/ma_write.c: New BitKeeper file ``storage/maria/ma_write.c'' storage/maria/maria_chk.c: New BitKeeper file ``storage/maria/maria_chk.c'' storage/maria/maria_def.h: New BitKeeper file ``storage/maria/maria_def.h'' storage/maria/maria_ftdump.c: New BitKeeper file ``storage/maria/maria_ftdump.c'' storage/maria/maria_log.c: New BitKeeper file ``storage/maria/maria_log.c'' storage/maria/maria_pack.c: New BitKeeper file ``storage/maria/maria_pack.c'' storage/maria/maria_rename.sh: New BitKeeper file ``storage/maria/maria_rename.sh'' storage/maria/test_pack: New BitKeeper file ``storage/maria/test_pack'' storage/myisam/ft_myisam.c: New BitKeeper file ``storage/myisam/ft_myisam.c'' --- mysql-test/r/have_maria.require | 2 + mysql-test/r/maria.result | 1417 ++++++++++++++++++ mysql-test/r/ps_maria.result | 3137 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 4556 insertions(+) create mode 100644 mysql-test/r/have_maria.require create mode 100644 mysql-test/r/maria.result create mode 100644 mysql-test/r/ps_maria.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/have_maria.require b/mysql-test/r/have_maria.require new file mode 100644 index 00000000000..02988af6976 --- /dev/null +++ b/mysql-test/r/have_maria.require @@ -0,0 +1,2 @@ +Variable_name Value +have_maria YES diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result new file mode 100644 index 00000000000..3b360873c36 --- /dev/null +++ b/mysql-test/r/maria.result @@ -0,0 +1,1417 @@ +drop table if exists t1,t2; +SET SQL_WARNINGS=1; +CREATE TABLE t1 ( +STRING_DATA char(255) default NULL, +KEY string_data (STRING_DATA) +) ENGINE=MARIA; +INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); +INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); +INSERT INTO t1 VALUES ('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'); +INSERT INTO t1 VALUES ('FGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG'); +INSERT INTO t1 VALUES ('HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH'); +INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW'); +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)) engine=maria; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +delete from t1 where (a & 1); +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)) engine=maria; +insert into t1 (b) values (1),(2),(2),(2),(2); +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize 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 +t1 0 PRIMARY 1 a A 5 NULL NULL BTREE +t1 1 b 1 b A 1 NULL NULL BTREE +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status Table is already up to date +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 5 NULL NULL BTREE +t1 1 b 1 b A 1 NULL NULL BTREE +drop table t1; +create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=maria; +insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); +explain select * from t1 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select * from t1 order by b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select * from t1 order by c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select a from t1 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 4 Using index +explain select b from t1 order by b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL b 4 NULL 4 Using index +explain select a,b from t1 order by b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select a,b from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 +explain select a,b,c from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 +drop table t1; +CREATE TABLE t1 (a INT) engine=maria; +INSERT INTO t1 VALUES (1), (2), (3); +LOCK TABLES t1 WRITE; +INSERT INTO t1 VALUES (1), (2), (3); +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +DROP TABLE t1; +create table t1 ( t1 char(255), key(t1(250))) engine=maria; +insert t1 values ('137513751375137513751375137513751375137569516951695169516951695169516951695169'); +insert t1 values ('178417841784178417841784178417841784178403420342034203420342034203420342034203'); +insert t1 values ('213872387238723872387238723872387238723867376737673767376737673767376737673767'); +insert t1 values ('242624262426242624262426242624262426242607890789078907890789078907890789078907'); +insert t1 values ('256025602560256025602560256025602560256011701170117011701170117011701170117011'); +insert t1 values ('276027602760276027602760276027602760276001610161016101610161016101610161016101'); +insert t1 values ('281528152815281528152815281528152815281564956495649564956495649564956495649564'); +insert t1 values ('292129212921292129212921292129212921292102100210021002100210021002100210021002'); +insert t1 values ('380638063806380638063806380638063806380634483448344834483448344834483448344834'); +insert t1 values ('411641164116411641164116411641164116411616301630163016301630163016301630163016'); +insert t1 values ('420842084208420842084208420842084208420899889988998899889988998899889988998899'); +insert t1 values ('438443844384438443844384438443844384438482448244824482448244824482448244824482'); +insert t1 values ('443244324432443244324432443244324432443239613961396139613961396139613961396139'); +insert t1 values ('485448544854485448544854485448544854485477847784778477847784778477847784778477'); +insert t1 values ('494549454945494549454945494549454945494555275527552755275527552755275527552755'); +insert t1 values ('538647864786478647864786478647864786478688918891889188918891889188918891889188'); +insert t1 values ('565556555655565556555655565556555655565554845484548454845484548454845484548454'); +insert t1 values ('607860786078607860786078607860786078607856665666566656665666566656665666566656'); +insert t1 values ('640164016401640164016401640164016401640141274127412741274127412741274127412741'); +insert t1 values ('719471947194719471947194719471947194719478717871787178717871787178717871787178'); +insert t1 values ('742574257425742574257425742574257425742549604960496049604960496049604960496049'); +insert t1 values ('887088708870887088708870887088708870887035963596359635963596359635963596359635'); +insert t1 values ('917791779177917791779177917791779177917773857385738573857385738573857385738573'); +insert t1 values ('933293329332933293329332933293329332933278987898789878987898789878987898789878'); +insert t1 values ('963896389638963896389638963896389638963877807780778077807780778077807780778077'); +delete from t1 where t1>'2'; +insert t1 values ('70'), ('84'), ('60'), ('20'), ('76'), ('89'), ('49'), ('50'), +('88'), ('61'), ('42'), ('98'), ('39'), ('30'), ('25'), ('66'), ('61'), ('48'), +('80'), ('84'), ('98'), ('19'), ('91'), ('42'), ('47'); +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 +int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 +int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, +i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 +int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, +i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 +int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, +i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 +int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, +i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 +int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, +i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 +int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 +int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 +int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 +int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 +int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 +int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 +int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 +int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 +int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 +int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 +int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 +int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 +int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 +int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 +int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 +int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 +int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 +int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 +int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 +int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 +int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 +int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 +int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 +int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 +int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 +int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 +int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 +int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 +int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 +int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 +int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 +int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 +int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 +int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 +int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 +int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 +int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 +int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 +int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 +int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 +int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 +int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 +int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 +int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 +int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 +int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 +int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 +int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 +int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 +int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 +int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 +int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 +int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 +int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 +int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 +int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 +int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 +int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 +int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 +int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 +int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 +int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 +int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 +int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 +int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 +int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 +int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 +int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 +int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 +int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 +int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 +int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 +int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 +int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 +int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 +int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 +int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 +int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 +int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 +int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 +int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 +int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 +int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 +int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 +int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 +int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 +int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 +int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 +int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 +int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 +int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 +int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 +int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 +int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 +int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 +int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 +int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 +int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 +int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 +int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 +int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 +int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 +int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 +int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 +int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 +int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 +int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 +int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 +int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 +int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 +int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 +int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 +int, i999 int, i1000 int, b blob) row_format=dynamic engine=maria; +insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "Sergei"); +update t1 set b=repeat('a',256); +update t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +delete from t1 where i8=1; +select i1,i2 from t1; +i1 i2 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +CREATE TABLE `t1` ( +`post_id` mediumint(8) unsigned NOT NULL auto_increment, +`topic_id` mediumint(8) unsigned NOT NULL default '0', +`post_time` datetime NOT NULL default '0000-00-00 00:00:00', +`post_text` text NOT NULL, +`icon_url` varchar(10) NOT NULL default '', +`sign` tinyint(1) unsigned NOT NULL default '0', +`post_edit` varchar(150) NOT NULL default '', +`poster_login` varchar(35) NOT NULL default '', +`ip` varchar(15) NOT NULL default '', +PRIMARY KEY (`post_id`), +KEY `post_time` (`post_time`), +KEY `ip` (`ip`), +KEY `poster_login` (`poster_login`), +KEY `topic_id` (`topic_id`), +FULLTEXT KEY `post_text` (`post_text`) +) ENGINE=MARIA; +INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'); +REPAIR TABLE t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e)) engine=maria; +ERROR 42000: Specified key was too long; max key length is 1000 bytes +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255)) engine=maria; +ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e); +ERROR 42000: Specified key was too long; max key length is 1000 bytes +DROP TABLE t1; +CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)) engine=maria; +INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4); +create table t2 (a int not null, b int, c int, key(b), key(c), key(a)) engine=maria; +INSERT into t2 values (1,1,1), (2,2,2); +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize 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 +t1 1 b 1 b A 5 NULL NULL YES BTREE +t1 1 c 1 c A 5 NULL NULL YES BTREE +t1 1 a 1 a A 1 NULL NULL BTREE +t1 1 a 2 b A 5 NULL NULL YES BTREE +t1 1 c_2 1 c A 5 NULL NULL YES BTREE +t1 1 c_2 2 a A 5 NULL NULL BTREE +explain select * from t1,t2 where t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL a NULL NULL NULL 2 +1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where +explain select * from t1,t2 force index(a) where t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL a NULL NULL NULL 2 +1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where +explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL a NULL NULL NULL 2 +1 SIMPLE t1 ref a a 4 test.t2.a 3 +explain select * from t1,t2 where t1.b=t2.b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL b NULL NULL NULL 2 +1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where +explain select * from t1,t2 force index(c) where t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where +explain select * from t1 where a=0 or a=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +explain select * from t1 force index (a) where a=0 or a=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 4 NULL 4 Using where +explain select * from t1 where c=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c,c_2 c 5 const 1 Using where +explain select * from t1 use index() where c=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +drop table t1,t2; +create table t1 (a int not null auto_increment primary key, b varchar(255)) engine=maria; +insert into t1 (b) values (repeat('a',100)),(repeat('b',100)),(repeat('c',100)); +update t1 set b=repeat(left(b,1),200) where a=1; +delete from t1 where (a & 1)= 0; +update t1 set b=repeat('e',200) where a=1; +flush tables; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +update t1 set b=repeat(left(b,1),255) where a between 1 and 5; +update t1 set b=repeat(left(b,1),10) where a between 32 and 43; +update t1 set b=repeat(left(b,1),2) where a between 64 and 66; +update t1 set b=repeat(left(b,1),65) where a between 67 and 70; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +insert into t1 (b) values (repeat('z',100)); +update t1 set b="test" where left(b,1) > 'n'; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 ( a text not null, key a (a(20))) engine=maria; +insert into t1 values ('aaa '),('aaa'),('aa'); +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +select concat(a,'.') from t1 where a='aaa'; +concat(a,'.') +aaa . +aaa. +select concat(a,'.') from t1 where binary a='aaa'; +concat(a,'.') +aaa. +update t1 set a='bbb' where a='aaa'; +select concat(a,'.') from t1; +concat(a,'.') +bbb. +bbb. +aa. +drop table t1; +create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))) engine=maria; +insert into t1 values('807780', '477', '165'); +insert into t1 values('807780', '477', '162'); +insert into t1 values('807780', '472', '162'); +select * from t1 where a='807780' and b='477' and c='165'; +a b c +807780 477 165 +drop table t1; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)) engine=maria; +INSERT t1 VALUES ("can \tcan"); +INSERT t1 VALUES ("can can"); +INSERT t1 VALUES ("can"); +SELECT * FROM t1; +a +can can +can +can can +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +create table t1 (a blob) engine=maria; +insert into t1 values('a '),('a'); +select concat(a,'.') from t1 where a='a'; +concat(a,'.') +a. +select concat(a,'.') from t1 where a='a '; +concat(a,'.') +a . +alter table t1 add key(a(2)); +select concat(a,'.') from t1 where a='a'; +concat(a,'.') +a. +select concat(a,'.') from t1 where a='a '; +concat(a,'.') +a . +drop table t1; +create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))) engine=maria; +insert into t1 (b) values ('a'),('b'),('c'); +select concat(b,'.') from t1; +concat(b,'.') +a. +b. +c. +update t1 set b='b ' where a=2; +update t1 set b='b ' where a > 1; +ERROR 23000: Duplicate entry 'b ' for key 'b' +insert into t1 (b) values ('b'); +ERROR 23000: Duplicate entry 'b' for key 'b' +select * from t1; +a b +1 a +2 b +3 c +delete from t1 where b='b'; +select a,concat(b,'.') from t1; +a concat(b,'.') +1 a. +3 c. +drop table t1; +create table t1 (a int not null) engine=maria; +create table t2 (a int not null, primary key (a)) engine=maria; +insert into t1 values (1); +insert into t2 values (1),(2); +select sql_big_result distinct t1.a from t1,t2 order by t2.a; +a +1 +select distinct t1.a from t1,t2 order by t2.a; +a +1 +select sql_big_result distinct t1.a from t1,t2; +a +1 +explain select sql_big_result distinct t1.a from t1,t2 order by t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary +1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct +explain select distinct t1.a from t1,t2 order by t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary +1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct +drop table t1,t2; +create table t1 ( +c1 varchar(32), +key (c1) +) engine=maria; +alter table t1 disable keys; +insert into t1 values ('a'), ('b'); +select c1 from t1 order by c1 limit 1; +c1 +a +drop table t1; +CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MARIA; +Got one of the listed errors +create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=maria; +create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=maria; +insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, ""); +insert t2 select * from t1; +checksum table t1, t2, t3 quick; +Table Checksum +test.t1 2948697075 +test.t2 NULL +test.t3 NULL +Warnings: +Error 1146 Table 'test.t3' doesn't exist +checksum table t1, t2, t3; +Table Checksum +test.t1 2948697075 +test.t2 2948697075 +test.t3 NULL +Warnings: +Error 1146 Table 'test.t3' doesn't exist +checksum table t1, t2, t3 extended; +Table Checksum +test.t1 2948697075 +test.t2 2948697075 +test.t3 NULL +Warnings: +Error 1146 Table 'test.t3' doesn't exist +drop table t1,t2; +create table t1 (a int, key (a)) engine=maria; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A NULL NULL NULL YES BTREE +alter table t1 disable keys; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A NULL NULL NULL YES BTREE disabled +create table t2 (a int) engine=maria; +set @@rand_seed1=31415926,@@rand_seed2=2718281828; +insert t1 select * from t2; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A NULL NULL NULL YES BTREE disabled +alter table t1 enable keys; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A 1000 NULL NULL YES BTREE +alter table t1 engine=heap; +alter table t1 disable keys; +Warnings: +Note 1031 Table storage engine for 't1' doesn't have this option +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a NULL 500 NULL NULL YES HASH +drop table t1,t2; +create table t1 ( a tinytext, b char(1), index idx (a(1),b)) engine=maria; +insert into t1 values (null,''), (null,''); +explain select count(*) from t1 where a is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx idx 4 const 1 Using where +select count(*) from t1 where a is null; +count(*) +2 +drop table t1; +create table t1 (c1 int, c2 varchar(4) not null default '', +key(c2(3))) default charset=utf8 engine=maria; +insert into t1 values (1,'A'), (2, 'B'), (3, 'A'); +update t1 set c2='A B' where c1=2; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (c1 int) engine=maria; +insert into t1 values (1),(2),(3),(4); +checksum table t1; +Table Checksum +test.t1 149057747 +delete from t1 where c1 = 1; +create table t2 engine=maria as select * from t1; +checksum table t1; +Table Checksum +test.t1 984116287 +checksum table t2; +Table Checksum +test.t2 984116287 +drop table t1, t2; +show variables like 'maria_stats_method'; +Variable_name Value +maria_stats_method nulls_unequal +create table t1 (a int, key(a)) engine=maria; +insert into t1 values (0),(1),(2),(3),(4); +insert into t1 select NULL from t1; +analyze table t1; +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 +t1 1 a 1 a A 10 NULL NULL YES BTREE +insert into t1 values (11); +delete from t1 where a=11; +check table t1; +Table Op Msg_type Msg_text +test.t1 check 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 +t1 1 a 1 a A 10 NULL NULL YES BTREE +set maria_stats_method=nulls_equal; +show variables like 'maria_stats_method'; +Variable_name Value +maria_stats_method nulls_equal +insert into t1 values (11); +delete from t1 where a=11; +analyze table t1; +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 +t1 1 a 1 a A 5 NULL NULL YES BTREE +insert into t1 values (11); +delete from t1 where a=11; +check table t1; +Table Op Msg_type Msg_text +test.t1 check 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 +t1 1 a 1 a A 5 NULL NULL YES BTREE +set maria_stats_method=DEFAULT; +show variables like 'maria_stats_method'; +Variable_name Value +maria_stats_method nulls_unequal +insert into t1 values (11); +delete from t1 where a=11; +analyze table t1; +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 +t1 1 a 1 a A 10 NULL NULL YES BTREE +insert into t1 values (11); +delete from t1 where a=11; +check table t1; +Table Op Msg_type Msg_text +test.t1 check 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 +t1 1 a 1 a A 10 NULL NULL YES BTREE +drop table t1; +set maria_stats_method=nulls_ignored; +show variables like 'maria_stats_method'; +Variable_name Value +maria_stats_method nulls_ignored +create table t1 ( +a char(3), b char(4), c char(5), d char(6), +key(a,b,c,d) +) engine=maria; +insert into t1 values ('bcd','def1', NULL, 'zz'); +insert into t1 values ('bcd','def2', NULL, 'zz'); +insert into t1 values ('bce','def1', 'yuu', NULL); +insert into t1 values ('bce','def2', NULL, 'quux'); +analyze table t1; +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 +t1 1 a 1 a A 2 NULL NULL YES BTREE +t1 1 a 2 b A 4 NULL NULL YES BTREE +t1 1 a 3 c A 4 NULL NULL YES BTREE +t1 1 a 4 d A 4 NULL NULL YES BTREE +delete from t1; +analyze table t1; +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 +t1 1 a 1 a A 0 NULL NULL YES BTREE +t1 1 a 2 b A 0 NULL NULL YES BTREE +t1 1 a 3 c A 0 NULL NULL YES BTREE +t1 1 a 4 d A 0 NULL NULL YES BTREE +set maria_stats_method=DEFAULT; +drop table t1; +create table t1( +cip INT NOT NULL, +time TIME NOT NULL, +score INT NOT NULL DEFAULT 0, +bob TINYBLOB +) engine=maria; +insert into t1 (cip, time) VALUES (1, '00:01'), (2, '00:02'), (3,'00:03'); +insert into t1 (cip, bob, time) VALUES (4, 'a', '00:04'), (5, 'b', '00:05'), +(6, 'c', '00:06'); +select * from t1 where bob is null and cip=1; +cip time score bob +1 00:01:00 0 NULL +create index bug on t1 (bob(22), cip, time); +select * from t1 where bob is null and cip=1; +cip time score bob +1 00:01:00 0 NULL +drop table t1; +create table t1 ( +id1 int not null auto_increment, +id2 int not null default '0', +t text not null, +primary key (id1), +key x (id2, t(32)) +) engine=maria; +insert into t1 (id2, t) values +(10, 'abc'), (10, 'abc'), (10, 'abc'), +(20, 'abc'), (20, 'abc'), (20, 'def'), +(10, 'abc'), (10, 'abc'); +select count(*) from t1 where id2 = 10; +count(*) +5 +select count(id1) from t1 where id2 = 10; +count(id1) +5 +drop table t1; +set storage_engine=MARIA; +drop table if exists t1,t2,t3; +--- Testing varchar --- +--- Testing varchar --- +create table t1 (v varchar(10), c char(10), t text); +insert into t1 values('+ ', '+ ', '+ '); +set @a=repeat(' ',20); +insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); +Warnings: +Note 1265 Data truncated for column 'v' at row 1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+ *+*+ * +*+ *+*+ * +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text +) ENGINE=MARIA DEFAULT CHARSET=latin1 +create table t2 like t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text +) ENGINE=MARIA DEFAULT CHARSET=latin1 +create table t3 select * from t1; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text +) ENGINE=MARIA DEFAULT CHARSET=latin1 +alter table t1 modify c varchar(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` text +) ENGINE=MARIA DEFAULT CHARSET=latin1 +alter table t1 modify v char(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` text +) ENGINE=MARIA DEFAULT CHARSET=latin1 +alter table t1 modify t varchar(10); +Warnings: +Note 1265 Data truncated for column 't' at row 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` varchar(10) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+*+*+ * +*+*+*+ * +drop table t1,t2,t3; +create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text, + KEY `v` (`v`), + KEY `c` (`c`), + KEY `t` (`t`(10)) +) ENGINE=MARIA DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +270 +insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1))); +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where c='a'; +count(*) +10 +select count(*) from t1 where t='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where c='a '; +count(*) +10 +select count(*) from t1 where t='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where c like 'a%'; +count(*) +11 +select count(*) from t1 where t like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where; Using index +explain select count(*) from t1 where c='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 11 const # Using where; Using index +explain select count(*) from t1 where t='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range t t 13 NULL # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where; Using index +alter table t1 add unique(v); +ERROR 23000: Duplicate entry '{ ' for key 'v_2' +alter table t1 add key(v); +select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; +qq +*a*a*a* +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v,v_2 # 13 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(*) from t1 group by c limit 10; +c count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(*) from t1 group by t limit 10; +t count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`) +) ENGINE=MARIA DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where; Using index +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 303 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where; Using index +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 drop key v, add key v (v(30)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`(30)) +) ENGINE=MARIA DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(600), drop key v, add key v (v); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(600) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`) +) ENGINE=MARIA DEFAULT CHARSET=latin1 +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +drop table t1; +create table t1 (a char(10), unique (a)); +insert into t1 values ('a '); +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a' for key 'a' +alter table t1 modify a varchar(10); +insert into t1 values ('a '),('a '),('a '),('a '); +ERROR 23000: Duplicate entry 'a ' for key 'a' +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 'a' +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 'a' +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 'a' +update t1 set a='a ' where a like 'a%'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='abc ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a %'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +drop table t1; +create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` text, + KEY `v` (`v`(5)), + KEY `c` (`c`(5)), + KEY `t` (`t`(5)) +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v char(10) character set utf8); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) CHARACTER SET utf8 DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(10), c char(10)) row_format=fixed; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED +insert into t1 values('a','a'),('a ','a '); +select concat('*',v,'*',c,'*') from t1; +concat('*',v,'*',c,'*') +*a*a* +*a *a* +drop table t1; +create table t1 (v varchar(65530), key(v(10))); +insert into t1 values(repeat('a',65530)); +select length(v) from t1 where v=repeat('a',65530); +length(v) +65530 +drop table t1; +create table t1(a int, b varchar(12), key ba(b, a)); +insert into t1 values (1, 'A'), (20, NULL); +explain select * from t1 where a=20 and b is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref ba ba 20 const,const 1 Using where; Using index +select * from t1 where a=20 and b is null; +a b +20 NULL +drop table t1; +create table t1 (v varchar(65530), key(v)) engine=maria; +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +drop table if exists t1; +create table t1 (v varchar(65536)) engine=maria; +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(65530) character set utf8) engine=maria; +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext CHARACTER SET utf8 +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(65535)) engine=maria; +ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs +set storage_engine=MyISAM; +create table t1 (a int) engine=maria; +drop table if exists t1; +Warnings: +Error 2 Can't find file: 't1' (errno: 2) +create table t1 (a int) engine=maria; +drop table t1; +Got one of the listed errors +create table t1 (a int) engine=maria; +drop table t1; +Got one of the listed errors +drop table t1; +ERROR 42S02: Unknown table 't1' +set @save_concurrent_insert=@@concurrent_insert; +set global concurrent_insert=1; +create table t1 (a int) engine=maria; +insert into t1 values (1),(2),(3),(4),(5); +lock table t1 read local; +insert into t1 values(6),(7); +unlock tables; +delete from t1 where a>=3 and a<=4; +lock table t1 read local; +set global concurrent_insert=2; +insert into t1 values (8),(9); +unlock tables; +insert into t1 values (10),(11),(12); +select * from t1; +a +1 +2 +11 +10 +5 +6 +7 +8 +9 +12 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (a int, b varchar(30) default "hello") engine=maria; +insert into t1 (a) values (1),(2),(3),(4),(5); +lock table t1 read local; +insert into t1 (a) values(6),(7); +unlock tables; +delete from t1 where a>=3 and a<=4; +lock table t1 read local; +set global concurrent_insert=2; +insert into t1 (a) values (8),(9); +unlock tables; +insert into t1 (a) values (10),(11),(12); +select a from t1; +a +1 +2 +11 +10 +5 +6 +7 +8 +9 +12 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +set global concurrent_insert=@save_concurrent_insert; +create table t1 (a int, key(a)) engine=maria; +insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A 8 NULL NULL YES BTREE +alter table t1 disable keys; +alter table t1 enable keys; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A 8 NULL NULL YES BTREE +drop table t1; +create table t1 (c1 int) engine=maria pack_keys=0; +create table t2 (c1 int) engine=maria pack_keys=1; +create table t3 (c1 int) engine=maria pack_keys=default; +create table t4 (c1 int) engine=maria pack_keys=2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1 +drop table t1, t2, t3; diff --git a/mysql-test/r/ps_maria.result b/mysql-test/r/ps_maria.result new file mode 100644 index 00000000000..a5cb3050dcb --- /dev/null +++ b/mysql-test/r/ps_maria.result @@ -0,0 +1,3137 @@ +use test; +drop table if exists t1, t9 ; +create table t1 +( +a int, b varchar(30), +primary key(a) +) engine = 'MARIA' ; +create table t9 +( +c1 tinyint, c2 smallint, c3 mediumint, c4 int, +c5 integer, c6 bigint, c7 float, c8 double, +c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, +c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, +c25 blob, c26 text, c27 mediumblob, c28 mediumtext, +c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), +c32 set('monday', 'tuesday', 'wednesday'), +primary key(c1) +) engine = 'MARIA' ; +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +test_sequence +------ simple select tests ------ +prepare stmt1 from ' select * from t9 order by c1 ' ; +execute stmt1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t9 t9 c1 c1 1 4 1 N 49155 0 63 +def test t9 t9 c2 c2 2 6 1 Y 32768 0 63 +def test t9 t9 c3 c3 9 9 1 Y 32768 0 63 +def test t9 t9 c4 c4 3 11 1 Y 32768 0 63 +def test t9 t9 c5 c5 3 11 1 Y 32768 0 63 +def test t9 t9 c6 c6 8 20 1 Y 32768 0 63 +def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 +def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 +def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 +def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 +def test t9 t9 c13 c13 10 10 10 Y 128 0 63 +def test t9 t9 c14 c14 12 19 19 Y 128 0 63 +def test t9 t9 c15 c15 7 19 19 N 1249 0 63 +def test t9 t9 c16 c16 11 8 8 Y 128 0 63 +def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 +def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 +def test t9 t9 c20 c20 254 1 1 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 +def test t9 t9 c22 c22 253 30 30 Y 0 0 8 +def test t9 t9 c23 c23 252 255 8 Y 144 0 63 +def test t9 t9 c24 c24 252 255 8 Y 16 0 8 +def test t9 t9 c25 c25 252 65535 4 Y 144 0 63 +def test t9 t9 c26 c26 252 65535 4 Y 16 0 8 +def test t9 t9 c27 c27 252 16777215 10 Y 144 0 63 +def test t9 t9 c28 c28 252 16777215 10 Y 16 0 8 +def test t9 t9 c29 c29 252 4294967295 8 Y 144 0 63 +def test t9 t9 c30 c30 252 4294967295 8 Y 16 0 8 +def test t9 t9 c31 c31 254 5 3 Y 256 0 8 +def test t9 t9 c32 c32 254 24 7 Y 2048 0 8 +c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday +set @arg00='SELECT' ; +@arg00 a from t1 where a=1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a from t1 where a=1' at line 1 +prepare stmt1 from ' ? a from t1 where a=1 '; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a from t1 where a=1' at line 1 +set @arg00=1 ; +select @arg00, b from t1 where a=1 ; +@arg00 b +1 one +prepare stmt1 from ' select ?, b from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +? b +1 one +set @arg00='lion' ; +select @arg00, b from t1 where a=1 ; +@arg00 b +lion one +prepare stmt1 from ' select ?, b from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +? b +lion one +set @arg00=NULL ; +select @arg00, b from t1 where a=1 ; +@arg00 b +NULL one +prepare stmt1 from ' select ?, b from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +? b +NULL one +set @arg00=1 ; +select b, a - @arg00 from t1 where a=1 ; +b a - @arg00 +one 0 +prepare stmt1 from ' select b, a - ? from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +b a - ? +one 0 +set @arg00=null ; +select @arg00 as my_col ; +my_col +NULL +prepare stmt1 from ' select ? as my_col'; +execute stmt1 using @arg00 ; +my_col +NULL +select @arg00 + 1 as my_col ; +my_col +NULL +prepare stmt1 from ' select ? + 1 as my_col'; +execute stmt1 using @arg00 ; +my_col +NULL +select 1 + @arg00 as my_col ; +my_col +NULL +prepare stmt1 from ' select 1 + ? as my_col'; +execute stmt1 using @arg00 ; +my_col +NULL +set @arg00='MySQL' ; +select substr(@arg00,1,2) from t1 where a=1 ; +substr(@arg00,1,2) +My +prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +substr(?,1,2) +My +set @arg00=3 ; +select substr('MySQL',@arg00,5) from t1 where a=1 ; +substr('MySQL',@arg00,5) +SQL +prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +substr('MySQL',?,5) +SQL +select substr('MySQL',1,@arg00) from t1 where a=1 ; +substr('MySQL',1,@arg00) +MyS +prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +substr('MySQL',1,?) +MyS +set @arg00='MySQL' ; +select a , concat(@arg00,b) from t1 order by a; +a concat(@arg00,b) +1 MySQLone +2 MySQLtwo +3 MySQLthree +4 MySQLfour +prepare stmt1 from ' select a , concat(?,b) from t1 order by a ' ; +execute stmt1 using @arg00; +a concat(?,b) +1 MySQLone +2 MySQLtwo +3 MySQLthree +4 MySQLfour +select a , concat(b,@arg00) from t1 order by a ; +a concat(b,@arg00) +1 oneMySQL +2 twoMySQL +3 threeMySQL +4 fourMySQL +prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ; +execute stmt1 using @arg00; +a concat(b,?) +1 oneMySQL +2 twoMySQL +3 threeMySQL +4 fourMySQL +set @arg00='MySQL' ; +select group_concat(@arg00,b order by a) from t1 +group by 'a' ; +group_concat(@arg00,b order by a) +MySQLone,MySQLtwo,MySQLthree,MySQLfour +prepare stmt1 from ' select group_concat(?,b order by a) from t1 +group by ''a'' ' ; +execute stmt1 using @arg00; +group_concat(?,b order by a) +MySQLone,MySQLtwo,MySQLthree,MySQLfour +select group_concat(b,@arg00 order by a) from t1 +group by 'a' ; +group_concat(b,@arg00 order by a) +oneMySQL,twoMySQL,threeMySQL,fourMySQL +prepare stmt1 from ' select group_concat(b,? order by a) from t1 +group by ''a'' ' ; +execute stmt1 using @arg00; +group_concat(b,? order by a) +oneMySQL,twoMySQL,threeMySQL,fourMySQL +set @arg00='first' ; +set @arg01='second' ; +set @arg02=NULL; +select @arg00, @arg01 from t1 where a=1 ; +@arg00 @arg01 +first second +prepare stmt1 from ' select ?, ? from t1 where a=1 ' ; +execute stmt1 using @arg00, @arg01 ; +? ? +first second +execute stmt1 using @arg02, @arg01 ; +? ? +NULL second +execute stmt1 using @arg00, @arg02 ; +? ? +first NULL +execute stmt1 using @arg02, @arg02 ; +? ? +NULL NULL +drop table if exists t5 ; +create table t5 (id1 int(11) not null default '0', +value2 varchar(100), value1 varchar(100)) ; +insert into t5 values (1,'hh','hh'),(2,'hh','hh'), +(1,'ii','ii'),(2,'ii','ii') ; +prepare stmt1 from ' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ; +set @arg00=1 ; +set @arg01='hh' ; +execute stmt1 using @arg00, @arg01 ; +id1 value1 +1 hh +1 ii +2 hh +drop table t5 ; +drop table if exists t5 ; +create table t5(session_id char(9) not null) ; +insert into t5 values ('abc') ; +prepare stmt1 from ' select * from t5 +where ?=''1111'' and session_id = ''abc'' ' ; +set @arg00='abc' ; +execute stmt1 using @arg00 ; +session_id +set @arg00='1111' ; +execute stmt1 using @arg00 ; +session_id +abc +set @arg00='abc' ; +execute stmt1 using @arg00 ; +session_id +drop table t5 ; +set @arg00='FROM' ; +select a @arg00 t1 where a=1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 t1 where a=1' at line 1 +prepare stmt1 from ' select a ? t1 where a=1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? t1 where a=1' at line 1 +set @arg00='t1' ; +select a from @arg00 where a=1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 where a=1' at line 1 +prepare stmt1 from ' select a from ? where a=1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? where a=1' at line 1 +set @arg00='WHERE' ; +select a from t1 @arg00 a=1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a=1' at line 1 +prepare stmt1 from ' select a from t1 ? a=1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a=1' at line 1 +set @arg00=1 ; +select a FROM t1 where a=@arg00 ; +a +1 +prepare stmt1 from ' select a FROM t1 where a=? ' ; +execute stmt1 using @arg00 ; +a +1 +set @arg00=1000 ; +execute stmt1 using @arg00 ; +a +set @arg00=NULL ; +select a FROM t1 where a=@arg00 ; +a +prepare stmt1 from ' select a FROM t1 where a=? ' ; +execute stmt1 using @arg00 ; +a +set @arg00=4 ; +select a FROM t1 where a=sqrt(@arg00) ; +a +2 +prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; +execute stmt1 using @arg00 ; +a +2 +set @arg00=NULL ; +select a FROM t1 where a=sqrt(@arg00) ; +a +prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; +execute stmt1 using @arg00 ; +a +set @arg00=2 ; +set @arg01=3 ; +select a FROM t1 where a in (@arg00,@arg01) order by a; +a +2 +3 +prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a '; +execute stmt1 using @arg00, @arg01; +a +2 +3 +set @arg00= 'one' ; +set @arg01= 'two' ; +set @arg02= 'five' ; +prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ; +execute stmt1 using @arg00, @arg01, @arg02 ; +b +one +two +prepare stmt1 from ' select b FROM t1 where b like ? '; +set @arg00='two' ; +execute stmt1 using @arg00 ; +b +two +set @arg00='tw%' ; +execute stmt1 using @arg00 ; +b +two +set @arg00='%wo' ; +execute stmt1 using @arg00 ; +b +two +set @arg00=null ; +insert into t9 set c1= 0, c5 = NULL ; +select c5 from t9 where c5 > NULL ; +c5 +prepare stmt1 from ' select c5 from t9 where c5 > ? '; +execute stmt1 using @arg00 ; +c5 +select c5 from t9 where c5 < NULL ; +c5 +prepare stmt1 from ' select c5 from t9 where c5 < ? '; +execute stmt1 using @arg00 ; +c5 +select c5 from t9 where c5 = NULL ; +c5 +prepare stmt1 from ' select c5 from t9 where c5 = ? '; +execute stmt1 using @arg00 ; +c5 +select c5 from t9 where c5 <=> NULL ; +c5 +NULL +prepare stmt1 from ' select c5 from t9 where c5 <=> ? '; +execute stmt1 using @arg00 ; +c5 +NULL +delete from t9 where c1= 0 ; +set @arg00='>' ; +select a FROM t1 where a @arg00 1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 1' at line 1 +prepare stmt1 from ' select a FROM t1 where a ? 1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? 1' at line 1 +set @arg00=1 ; +select a,b FROM t1 where a is not NULL +AND b is not NULL group by a - @arg00 ; +a b +1 one +2 two +3 three +4 four +prepare stmt1 from ' select a,b FROM t1 where a is not NULL +AND b is not NULL group by a - ? ' ; +execute stmt1 using @arg00 ; +a b +1 one +2 two +3 three +4 four +set @arg00='two' ; +select a,b FROM t1 where a is not NULL +AND b is not NULL having b <> @arg00 order by a ; +a b +1 one +3 three +4 four +prepare stmt1 from ' select a,b FROM t1 where a is not NULL +AND b is not NULL having b <> ? order by a ' ; +execute stmt1 using @arg00 ; +a b +1 one +3 three +4 four +set @arg00=1 ; +select a,b FROM t1 where a is not NULL +AND b is not NULL order by a - @arg00 ; +a b +1 one +2 two +3 three +4 four +prepare stmt1 from ' select a,b FROM t1 where a is not NULL +AND b is not NULL order by a - ? ' ; +execute stmt1 using @arg00 ; +a b +1 one +2 two +3 three +4 four +set @arg00=2 ; +select a,b from t1 order by 2 ; +a b +4 four +1 one +3 three +2 two +prepare stmt1 from ' select a,b from t1 +order by ? '; +execute stmt1 using @arg00; +a b +4 four +1 one +3 three +2 two +set @arg00=1 ; +execute stmt1 using @arg00; +a b +1 one +2 two +3 three +4 four +set @arg00=0 ; +execute stmt1 using @arg00; +ERROR 42S22: Unknown column '?' in 'order clause' +set @arg00=1; +prepare stmt1 from ' select a,b from t1 order by a +limit 1 '; +execute stmt1 ; +a b +1 one +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one +set @arg00='b' ; +set @arg01=0 ; +set @arg02=2 ; +set @arg03=2 ; +select sum(a), @arg00 from t1 where a > @arg01 +and b is not null group by substr(b,@arg02) +having sum(a) <> @arg03 ; +sum(a) @arg00 +3 b +1 b +4 b +prepare stmt1 from ' select sum(a), ? from t1 where a > ? +and b is not null group by substr(b,?) +having sum(a) <> ? '; +execute stmt1 using @arg00, @arg01, @arg02, @arg03; +sum(a) ? +3 b +1 b +4 b +test_sequence +------ join tests ------ +select first.a as a1, second.a as a2 +from t1 first, t1 second +where first.a = second.a order by a1 ; +a1 a2 +1 1 +2 2 +3 3 +4 4 +prepare stmt1 from ' select first.a as a1, second.a as a2 + from t1 first, t1 second + where first.a = second.a order by a1 '; +execute stmt1 ; +a1 a2 +1 1 +2 2 +3 3 +4 4 +set @arg00='ABC'; +set @arg01='two'; +set @arg02='one'; +select first.a, @arg00, second.a FROM t1 first, t1 second +where @arg01 = first.b or first.a = second.a or second.b = @arg02 +order by second.a, first.a; +a @arg00 a +1 ABC 1 +2 ABC 1 +3 ABC 1 +4 ABC 1 +2 ABC 2 +2 ABC 3 +3 ABC 3 +2 ABC 4 +4 ABC 4 +prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second + where ? = first.b or first.a = second.a or second.b = ? + order by second.a, first.a'; +execute stmt1 using @arg00, @arg01, @arg02; +a ? a +1 ABC 1 +2 ABC 1 +3 ABC 1 +4 ABC 1 +2 ABC 2 +2 ABC 3 +3 ABC 3 +2 ABC 4 +4 ABC 4 +drop table if exists t2 ; +create table t2 as select * from t1 ; +set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ; +set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ; +set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ; +set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ; +set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ; +set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ; +set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ; +set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ; +set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ; +the join statement is: +SELECT * FROM t2 right join t1 using(a) order by t2.a +prepare stmt1 from @query9 ; +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +the join statement is: +SELECT * FROM t2 natural right join t1 order by t2.a +prepare stmt1 from @query8 ; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +the join statement is: +SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a +prepare stmt1 from @query7 ; +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +the join statement is: +SELECT * FROM t2 left join t1 using(a) order by t2.a +prepare stmt1 from @query6 ; +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +the join statement is: +SELECT * FROM t2 natural left join t1 order by t2.a +prepare stmt1 from @query5 ; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +the join statement is: +SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a +prepare stmt1 from @query4 ; +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +the join statement is: +SELECT * FROM t2 join t1 using(a) order by t2.a +prepare stmt1 from @query3 ; +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +the join statement is: +SELECT * FROM t2 natural join t1 order by t2.a +prepare stmt1 from @query2 ; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +the join statement is: +SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a +prepare stmt1 from @query1 ; +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +drop table t2 ; +test_sequence +------ subquery tests ------ +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = ''two'') '; +execute stmt1 ; +a b +2 two +set @arg00='two' ; +select a, b FROM t1 outer_table where +a = (select a from t1 where b = 'two' ) and b=@arg00 ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = ''two'') and b=? '; +execute stmt1 using @arg00; +a b +2 two +set @arg00='two' ; +select a, b FROM t1 outer_table where +a = (select a from t1 where b = @arg00 ) and b='two' ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = ? ) and b=''two'' ' ; +execute stmt1 using @arg00; +a b +2 two +set @arg00=3 ; +set @arg01='three' ; +select a,b FROM t1 where (a,b) in (select 3, 'three'); +a b +3 three +select a FROM t1 where (a,b) in (select @arg00,@arg01); +a +3 +prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) '; +execute stmt1 using @arg00, @arg01; +a +3 +set @arg00=1 ; +set @arg01='two' ; +set @arg02=2 ; +set @arg03='two' ; +select a, @arg00, b FROM t1 outer_table where +b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ; +a @arg00 b +2 1 two +prepare stmt1 from ' select a, ?, b FROM t1 outer_table where + b=? and a = (select ? from t1 where b = ? ) ' ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; +a ? b +2 1 two +prepare stmt1 from 'select c4 FROM t9 where + c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ; +execute stmt1 using @arg01, @arg02; +c4 +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = outer_table.b ) order by a '; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +prepare stmt1 from ' SELECT a as ccc from t1 where a+1= + (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; +execute stmt1 ; +ccc +1 +deallocate prepare stmt1 ; +prepare stmt1 from ' SELECT a as ccc from t1 where a+1= + (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; +execute stmt1 ; +ccc +1 +deallocate prepare stmt1 ; +prepare stmt1 from ' SELECT a as ccc from t1 where a+1= + (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; +execute stmt1 ; +ccc +1 +deallocate prepare stmt1 ; +set @arg00='two' ; +select a, b FROM t1 outer_table where +a = (select a from t1 where b = outer_table.b ) and b=@arg00 ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = outer_table.b) and b=? '; +execute stmt1 using @arg00; +a b +2 two +set @arg00=2 ; +select a, b FROM t1 outer_table where +a = (select a from t1 where a = @arg00 and b = outer_table.b) and b='two' ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ; +execute stmt1 using @arg00; +a b +2 two +set @arg00=2 ; +select a, b FROM t1 outer_table where +a = (select a from t1 where outer_table.a = @arg00 and a=2) and b='two' ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ; +execute stmt1 using @arg00; +a b +2 two +set @arg00=1 ; +set @arg01='two' ; +set @arg02=2 ; +set @arg03='two' ; +select a, @arg00, b FROM t1 outer_table where +b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03 +and outer_table.a=a ) ; +a @arg00 b +2 1 two +prepare stmt1 from ' select a, ?, b FROM t1 outer_table where + b=? and a = (select ? from t1 where outer_table.b = ? + and outer_table.a=a ) ' ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; +a ? b +2 1 two +set @arg00=1 ; +set @arg01=0 ; +select a, @arg00 +from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2 +where a=@arg01; +a @arg00 +0 1 +prepare stmt1 from ' select a, ? + from ( select a - ? as a from t1 where a=? ) as t2 + where a=? '; +execute stmt1 using @arg00, @arg00, @arg00, @arg01 ; +a ? +0 1 +drop table if exists t2 ; +create table t2 as select * from t1; +prepare stmt1 from ' select a in (select a from t2) from t1 ' ; +execute stmt1 ; +a in (select a from t2) +1 +1 +1 +1 +drop table if exists t5, t6, t7 ; +create table t5 (a int , b int) ; +create table t6 like t5 ; +create table t7 like t5 ; +insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), +(2, -1), (3, 10) ; +insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ; +insert into t7 values (3, 3), (2, 2), (1, 1) ; +prepare stmt1 from ' select a, (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) from t7 ' ; +execute stmt1 ; +a (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) +3 1 +2 2 +1 2 +execute stmt1 ; +a (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) +3 1 +2 2 +1 2 +execute stmt1 ; +a (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) +3 1 +2 2 +1 2 +drop table t5, t6, t7 ; +drop table if exists t2 ; +create table t2 as select * from t9; +set @stmt= ' SELECT + (SELECT SUM(c1 + c12 + 0.0) FROM t2 + where (t9.c2 - 0e-3) = t2.c2 + GROUP BY t9.c15 LIMIT 1) as scalar_s, + exists (select 1.0e+0 from t2 + where t2.c3 * 9.0000000000 = t9.c4) as exists_s, + c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, + (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s +FROM t9, +(select c25 x, c32 y from t2) tt WHERE x = c25 ' ; +prepare stmt1 from @stmt ; +execute stmt1 ; +execute stmt1 ; +set @stmt= concat('explain ',@stmt); +prepare stmt1 from @stmt ; +execute stmt1 ; +execute stmt1 ; +set @stmt= ' SELECT + (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2 + GROUP BY t9.c15 LIMIT 1) as scalar_s, + exists (select ? from t2 + where t2.c3*?=t9.c4) as exists_s, + c5*? in (select c6+? from t2) as in_s, + (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s +FROM t9, +(select c25 x, c32 y from t2) tt WHERE x =c25 ' ; +set @arg00= 0.0 ; +set @arg01= 0e-3 ; +set @arg02= 1.0e+0 ; +set @arg03= 9.0000000000 ; +set @arg04= 4 ; +set @arg05= 0.3e+1 ; +set @arg06= 4 ; +set @arg07= 4 ; +set @arg08= 4.0 ; +set @arg09= 40e-1 ; +prepare stmt1 from @stmt ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +set @stmt= concat('explain ',@stmt); +prepare stmt1 from @stmt ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +drop table t2 ; +select 1 < (select a from t1) ; +ERROR 21000: Subquery returns more than 1 row +prepare stmt1 from ' select 1 < (select a from t1) ' ; +execute stmt1 ; +ERROR 21000: Subquery returns more than 1 row +select 1 as my_col ; +my_col +1 +test_sequence +------ union tests ------ +prepare stmt1 from ' select a FROM t1 where a=1 + union distinct + select a FROM t1 where a=1 '; +execute stmt1 ; +a +1 +execute stmt1 ; +a +1 +prepare stmt1 from ' select a FROM t1 where a=1 + union all + select a FROM t1 where a=1 '; +execute stmt1 ; +a +1 +1 +prepare stmt1 from ' SELECT 1, 2 union SELECT 1 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +prepare stmt1 from ' SELECT 1 union SELECT 1, 2 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +prepare stmt1 from ' SELECT * from t1 union SELECT 1 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +prepare stmt1 from ' SELECT 1 union SELECT * from t1 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +set @arg00=1 ; +select @arg00 FROM t1 where a=1 +union distinct +select 1 FROM t1 where a=1; +@arg00 +1 +prepare stmt1 from ' select ? FROM t1 where a=1 + union distinct + select 1 FROM t1 where a=1 ' ; +execute stmt1 using @arg00; +? +1 +set @arg00=1 ; +select 1 FROM t1 where a=1 +union distinct +select @arg00 FROM t1 where a=1; +1 +1 +prepare stmt1 from ' select 1 FROM t1 where a=1 + union distinct + select ? FROM t1 where a=1 ' ; +execute stmt1 using @arg00; +1 +1 +set @arg00='a' ; +select @arg00 FROM t1 where a=1 +union distinct +select @arg00 FROM t1 where a=1; +@arg00 +a +prepare stmt1 from ' select ? FROM t1 where a=1 + union distinct + select ? FROM t1 where a=1 '; +execute stmt1 using @arg00, @arg00; +? +a +prepare stmt1 from ' select ? + union distinct + select ? '; +execute stmt1 using @arg00, @arg00; +? +a +set @arg00='a' ; +set @arg01=1 ; +set @arg02='a' ; +set @arg03=2 ; +select @arg00 FROM t1 where a=@arg01 +union distinct +select @arg02 FROM t1 where a=@arg03; +@arg00 +a +prepare stmt1 from ' select ? FROM t1 where a=? + union distinct + select ? FROM t1 where a=? ' ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03; +? +a +set @arg00=1 ; +prepare stmt1 from ' select sum(a) + 200, ? from t1 +union distinct +select sum(a) + 200, 1 from t1 +group by b ' ; +execute stmt1 using @arg00; +sum(a) + 200 ? +210 1 +204 1 +201 1 +203 1 +202 1 +set @Oporto='Oporto' ; +set @Lisboa='Lisboa' ; +set @0=0 ; +set @1=1 ; +set @2=2 ; +set @3=3 ; +set @4=4 ; +select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ; +@Oporto @Lisboa @0 @1 @2 @3 @4 +Oporto Lisboa 0 1 2 3 4 +select sum(a) + 200 as the_sum, @Oporto as the_town from t1 +group by b +union distinct +select sum(a) + 200, @Lisboa from t1 +group by b ; +the_sum the_town +204 Oporto +201 Oporto +203 Oporto +202 Oporto +204 Lisboa +201 Lisboa +203 Lisboa +202 Lisboa +prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 + group by b + union distinct + select sum(a) + 200, ? from t1 + group by b ' ; +execute stmt1 using @Oporto, @Lisboa; +the_sum the_town +204 Oporto +201 Oporto +203 Oporto +202 Oporto +204 Lisboa +201 Lisboa +203 Lisboa +202 Lisboa +select sum(a) + 200 as the_sum, @Oporto as the_town from t1 +where a > @1 +group by b +union distinct +select sum(a) + 200, @Lisboa from t1 +where a > @2 +group by b ; +the_sum the_town +204 Oporto +203 Oporto +202 Oporto +204 Lisboa +203 Lisboa +prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 + where a > ? + group by b + union distinct + select sum(a) + 200, ? from t1 + where a > ? + group by b ' ; +execute stmt1 using @Oporto, @1, @Lisboa, @2; +the_sum the_town +204 Oporto +203 Oporto +202 Oporto +204 Lisboa +203 Lisboa +select sum(a) + 200 as the_sum, @Oporto as the_town from t1 +where a > @1 +group by b +having avg(a) > @2 +union distinct +select sum(a) + 200, @Lisboa from t1 +where a > @2 +group by b +having avg(a) > @3; +the_sum the_town +204 Oporto +203 Oporto +204 Lisboa +prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 + where a > ? + group by b + having avg(a) > ? + union distinct + select sum(a) + 200, ? from t1 + where a > ? + group by b + having avg(a) > ? '; +execute stmt1 using @Oporto, @1, @2, @Lisboa, @2, @3; +the_sum the_town +204 Oporto +203 Oporto +204 Lisboa +test_sequence +------ explain select tests ------ +prepare stmt1 from ' explain select * from t9 ' ; +execute stmt1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def id 8 3 1 N 32929 0 63 +def select_type 253 19 6 N 1 31 8 +def table 253 64 2 Y 0 31 8 +def type 253 10 3 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 +def key 253 64 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 +def rows 8 10 1 Y 32928 0 63 +def Extra 253 255 0 N 1 31 8 +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t9 ALL NULL NULL NULL NULL 2 +drop table if exists t2 ; +create table t2 (s varchar(25), fulltext(s)) +ENGINE = 'MARIA' ; +insert into t2 values ('Gravedigger'), ('Greed'),('Hollow Dogs') ; +commit ; +prepare stmt1 from ' select s from t2 where match (s) against (?) ' ; +set @arg00='Dogs' ; +execute stmt1 using @arg00 ; +s +Hollow Dogs +prepare stmt1 from ' SELECT s FROM t2 +where match (s) against (concat(?,''digger'')) '; +set @arg00='Grave' ; +execute stmt1 using @arg00 ; +s +Gravedigger +drop table t2 ; +test_sequence +------ delete tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +prepare stmt1 from 'delete from t1 where a=2' ; +execute stmt1; +select a,b from t1 where a=2; +a b +execute stmt1; +insert into t1 values(0,NULL); +set @arg00=NULL; +prepare stmt1 from 'delete from t1 where b=?' ; +execute stmt1 using @arg00; +select a,b from t1 where b is NULL ; +a b +0 NULL +set @arg00='one'; +execute stmt1 using @arg00; +select a,b from t1 where b=@arg00; +a b +prepare stmt1 from 'truncate table t1' ; +test_sequence +------ update tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ; +execute stmt1; +select a,b from t1 where a=2; +a b +2 a=two +execute stmt1; +select a,b from t1 where a=2; +a b +2 a=two +set @arg00=NULL; +prepare stmt1 from 'update t1 set b=? where a=2' ; +execute stmt1 using @arg00; +select a,b from t1 where a=2; +a b +2 NULL +set @arg00='two'; +execute stmt1 using @arg00; +select a,b from t1 where a=2; +a b +2 two +set @arg00=2; +prepare stmt1 from 'update t1 set b=NULL where a=?' ; +execute stmt1 using @arg00; +select a,b from t1 where a=@arg00; +a b +2 NULL +update t1 set b='two' where a=@arg00; +set @arg00=2000; +execute stmt1 using @arg00; +select a,b from t1 where a=@arg00; +a b +set @arg00=2; +set @arg01=22; +prepare stmt1 from 'update t1 set a=? where a=?' ; +execute stmt1 using @arg00, @arg00; +select a,b from t1 where a=@arg00; +a b +2 two +execute stmt1 using @arg01, @arg00; +select a,b from t1 where a=@arg01; +a b +22 two +execute stmt1 using @arg00, @arg01; +select a,b from t1 where a=@arg00; +a b +2 two +set @arg00=NULL; +set @arg01=2; +execute stmt1 using @arg00, @arg01; +Warnings: +Warning 1048 Column 'a' cannot be null +select a,b from t1 order by a; +a b +0 two +1 one +3 three +4 four +set @arg00=0; +execute stmt1 using @arg01, @arg00; +select a,b from t1 order by a; +a b +1 one +2 two +3 three +4 four +set @arg00=23; +set @arg01='two'; +set @arg02=2; +set @arg03='two'; +set @arg04=2; +drop table if exists t2; +create table t2 as select a,b from t1 ; +prepare stmt1 from 'update t1 set a=? where b=? + and a in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 where a = @arg00 ; +a b +23 two +prepare stmt1 from 'update t1 set a=? where b=? + and a not in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 order by a ; +a b +1 one +2 two +3 three +4 four +drop table t2 ; +create table t2 +( +a int, b varchar(30), +primary key(a) +) engine = 'MARIA' ; +insert into t2(a,b) select a, b from t1 ; +prepare stmt1 from 'update t1 set a=? where b=? + and a in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 where a = @arg00 ; +a b +23 two +prepare stmt1 from 'update t1 set a=? where b=? + and a not in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 order by a ; +a b +1 one +2 two +3 three +4 four +drop table t2 ; +set @arg00=1; +prepare stmt1 from 'update t1 set b=''bla'' +where a=2 +limit 1'; +execute stmt1 ; +select a,b from t1 where b = 'bla' ; +a b +2 bla +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; +test_sequence +------ insert tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +prepare stmt1 from 'insert into t1 values(5, ''five'' )'; +execute stmt1; +select a,b from t1 where a = 5; +a b +5 five +set @arg00='six' ; +prepare stmt1 from 'insert into t1 values(6, ? )'; +execute stmt1 using @arg00; +select a,b from t1 where b = @arg00; +a b +6 six +execute stmt1 using @arg00; +ERROR 23000: Duplicate entry '6' for key 'PRIMARY' +set @arg00=NULL ; +prepare stmt1 from 'insert into t1 values(0, ? )'; +execute stmt1 using @arg00; +select a,b from t1 where b is NULL; +a b +0 NULL +set @arg00=8 ; +set @arg01='eight' ; +prepare stmt1 from 'insert into t1 values(?, ? )'; +execute stmt1 using @arg00, @arg01 ; +select a,b from t1 where b = @arg01; +a b +8 eight +set @NULL= null ; +set @arg00= 'abc' ; +execute stmt1 using @NULL, @NULL ; +ERROR 23000: Column 'a' cannot be null +execute stmt1 using @NULL, @NULL ; +ERROR 23000: Column 'a' cannot be null +execute stmt1 using @NULL, @arg00 ; +ERROR 23000: Column 'a' cannot be null +execute stmt1 using @NULL, @arg00 ; +ERROR 23000: Column 'a' cannot be null +set @arg01= 10000 + 2 ; +execute stmt1 using @arg01, @arg00 ; +set @arg01= 10000 + 1 ; +execute stmt1 using @arg01, @arg00 ; +select * from t1 where a > 10000 order by a ; +a b +10001 abc +10002 abc +delete from t1 where a > 10000 ; +set @arg01= 10000 + 2 ; +execute stmt1 using @arg01, @NULL ; +set @arg01= 10000 + 1 ; +execute stmt1 using @arg01, @NULL ; +select * from t1 where a > 10000 order by a ; +a b +10001 NULL +10002 NULL +delete from t1 where a > 10000 ; +set @arg01= 10000 + 10 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 9 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 8 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 7 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 6 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 5 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 4 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 3 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 2 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 1 ; +execute stmt1 using @arg01, @arg01 ; +select * from t1 where a > 10000 order by a ; +a b +10001 10001 +10002 10002 +10003 10003 +10004 10004 +10005 10005 +10006 10006 +10007 10007 +10008 10008 +10009 10009 +10010 10010 +delete from t1 where a > 10000 ; +set @arg00=81 ; +set @arg01='8-1' ; +set @arg02=82 ; +set @arg03='8-2' ; +prepare stmt1 from 'insert into t1 values(?,?),(?,?)'; +execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; +select a,b from t1 where a in (@arg00,@arg02) ; +a b +81 8-1 +82 8-2 +set @arg00=9 ; +set @arg01='nine' ; +prepare stmt1 from 'insert into t1 set a=?, b=? '; +execute stmt1 using @arg00, @arg01 ; +select a,b from t1 where a = @arg00 ; +a b +9 nine +set @arg00=6 ; +set @arg01=1 ; +prepare stmt1 from 'insert into t1 set a=?, b=''sechs'' + on duplicate key update a=a + ?, b=concat(b,''modified'') '; +execute stmt1 using @arg00, @arg01; +select * from t1 order by a; +a b +0 NULL +1 one +2 two +3 three +4 four +5 five +7 sixmodified +8 eight +9 nine +81 8-1 +82 8-2 +set @arg00=81 ; +set @arg01=1 ; +execute stmt1 using @arg00, @arg01; +ERROR 23000: Duplicate entry '82' for key 'PRIMARY' +drop table if exists t2 ; +create table t2 (id int auto_increment primary key) +ENGINE= 'MARIA' ; +prepare stmt1 from ' select last_insert_id() ' ; +insert into t2 values (NULL) ; +execute stmt1 ; +last_insert_id() +1 +insert into t2 values (NULL) ; +execute stmt1 ; +last_insert_id() +2 +drop table t2 ; +set @1000=1000 ; +set @x1000_2="x1000_2" ; +set @x1000_3="x1000_3" ; +set @x1000="x1000" ; +set @1100=1100 ; +set @x1100="x1100" ; +set @100=100 ; +set @updated="updated" ; +insert into t1 values(1000,'x1000_1') ; +insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3) +on duplicate key update a = a + @100, b = concat(b,@updated) ; +select a,b from t1 where a >= 1000 order by a ; +a b +1000 x1000_3 +1100 x1000_1updated +delete from t1 where a >= 1000 ; +insert into t1 values(1000,'x1000_1') ; +prepare stmt1 from ' insert into t1 values(?,?),(?,?) + on duplicate key update a = a + ?, b = concat(b,?) '; +execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ; +select a,b from t1 where a >= 1000 order by a ; +a b +1000 x1000_3 +1100 x1000_1updated +delete from t1 where a >= 1000 ; +insert into t1 values(1000,'x1000_1') ; +execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ; +select a,b from t1 where a >= 1000 order by a ; +a b +1200 x1000_1updatedupdated +delete from t1 where a >= 1000 ; +prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' '; +execute stmt1; +execute stmt1; +execute stmt1; +test_sequence +------ multi table tests ------ +delete from t1 ; +delete from t9 ; +insert into t1(a,b) values (1, 'one'), (2, 'two'), (3, 'three') ; +insert into t9 (c1,c21) +values (1, 'one'), (2, 'two'), (3, 'three') ; +prepare stmt_delete from " delete t1, t9 + from t1, t9 where t1.a=t9.c1 and t1.b='updated' "; +prepare stmt_update from " update t1, t9 + set t1.b='updated', t9.c21='updated' + where t1.a=t9.c1 and t1.a=? "; +prepare stmt_select1 from " select a, b from t1 order by a" ; +prepare stmt_select2 from " select c1, c21 from t9 order by c1" ; +set @arg00= 1 ; +execute stmt_update using @arg00 ; +execute stmt_delete ; +execute stmt_select1 ; +a b +2 two +3 three +execute stmt_select2 ; +c1 c21 +2 two +3 three +set @arg00= @arg00 + 1 ; +execute stmt_update using @arg00 ; +execute stmt_delete ; +execute stmt_select1 ; +a b +3 three +execute stmt_select2 ; +c1 c21 +3 three +set @arg00= @arg00 + 1 ; +execute stmt_update using @arg00 ; +execute stmt_delete ; +execute stmt_select1 ; +a b +execute stmt_select2 ; +c1 c21 +set @arg00= @arg00 + 1 ; +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +insert into t1 values(0,NULL) ; +set @duplicate='duplicate ' ; +set @1000=1000 ; +set @5=5 ; +select a,b from t1 where a < 5 order by a ; +a b +0 NULL +1 one +2 two +3 three +4 four +insert into t1 select a + @1000, concat(@duplicate,b) from t1 +where a < @5 ; +affected rows: 5 +info: Records: 5 Duplicates: 0 Warnings: 0 +select a,b from t1 where a >= 1000 order by a ; +a b +1000 NULL +1001 duplicate one +1002 duplicate two +1003 duplicate three +1004 duplicate four +delete from t1 where a >= 1000 ; +prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1 +where a < ? ' ; +execute stmt1 using @1000, @duplicate, @5; +affected rows: 5 +info: Records: 5 Duplicates: 0 Warnings: 0 +select a,b from t1 where a >= 1000 order by a ; +a b +1000 NULL +1001 duplicate one +1002 duplicate two +1003 duplicate three +1004 duplicate four +delete from t1 where a >= 1000 ; +set @1=1 ; +set @2=2 ; +set @100=100 ; +set @float=1.00; +set @five='five' ; +drop table if exists t2; +create table t2 like t1 ; +insert into t2 (b,a) +select @duplicate, sum(first.a) from t1 first, t1 second +where first.a <> @5 and second.b = first.b +and second.b <> @five +group by second.b +having sum(second.a) > @2 +union +select b, a + @100 from t1 +where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b +from t1); +affected rows: 3 +info: Records: 3 Duplicates: 0 Warnings: 0 +select a,b from t2 order by a ; +a b +3 duplicate +4 duplicate +103 three +delete from t2 ; +prepare stmt1 from ' insert into t2 (b,a) +select ?, sum(first.a) + from t1 first, t1 second + where first.a <> ? and second.b = first.b and second.b <> ? + group by second.b + having sum(second.a) > ? +union +select b, a + ? from t1 + where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b + from t1 ) ' ; +execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ; +affected rows: 3 +info: Records: 3 Duplicates: 0 Warnings: 0 +select a,b from t2 order by a ; +a b +3 duplicate +4 duplicate +103 three +drop table t2; +drop table if exists t5 ; +set @arg01= 8; +set @arg02= 8.0; +set @arg03= 80.00000000000e-1; +set @arg04= 'abc' ; +set @arg05= CAST('abc' as binary) ; +set @arg06= '1991-08-05' ; +set @arg07= CAST('1991-08-05' as date); +set @arg08= '1991-08-05 01:01:01' ; +set @arg09= CAST('1991-08-05 01:01:01' as datetime) ; +set @arg10= unix_timestamp('1991-01-01 01:01:01'); +set @arg11= YEAR('1991-01-01 01:01:01'); +set @arg12= 8 ; +set @arg12= NULL ; +set @arg13= 8.0 ; +set @arg13= NULL ; +set @arg14= 'abc'; +set @arg14= NULL ; +set @arg15= CAST('abc' as binary) ; +set @arg15= NULL ; +create table t5 as select +8 as const01, @arg01 as param01, +8.0 as const02, @arg02 as param02, +80.00000000000e-1 as const03, @arg03 as param03, +'abc' as const04, @arg04 as param04, +CAST('abc' as binary) as const05, @arg05 as param05, +'1991-08-05' as const06, @arg06 as param06, +CAST('1991-08-05' as date) as const07, @arg07 as param07, +'1991-08-05 01:01:01' as const08, @arg08 as param08, +CAST('1991-08-05 01:01:01' as datetime) as const09, @arg09 as param09, +unix_timestamp('1991-01-01 01:01:01') as const10, @arg10 as param10, +YEAR('1991-01-01 01:01:01') as const11, @arg11 as param11, +NULL as const12, @arg12 as param12, +@arg13 as param13, +@arg14 as param14, +@arg15 as param15; +show create table t5 ; +Table Create Table +t5 CREATE TABLE `t5` ( + `const01` bigint(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', + `param04` longtext, + `const05` varbinary(3) NOT NULL DEFAULT '', + `param05` longblob, + `const06` varchar(10) NOT NULL DEFAULT '', + `param06` longtext, + `const07` date DEFAULT NULL, + `param07` longblob, + `const08` varchar(19) NOT NULL DEFAULT '', + `param08` longtext, + `const09` datetime DEFAULT NULL, + `param09` longblob, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, + `param14` longtext, + `param15` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from t5 ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t5 t5 const01 const01 8 1 1 N 32769 0 63 +def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 +def test t5 t5 const02 const02 246 3 3 N 33 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 +def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 +def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 +def test t5 t5 const06 const06 253 10 10 N 1 0 8 +def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 +def test t5 t5 const07 const07 10 10 10 Y 128 0 63 +def test t5 t5 param07 param07 252 4294967295 10 Y 144 0 63 +def test t5 t5 const08 const08 253 19 19 N 1 0 8 +def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8 +def test t5 t5 const09 const09 12 19 19 Y 128 0 63 +def test t5 t5 param09 param09 252 4294967295 19 Y 144 0 63 +def test t5 t5 const10 const10 3 10 9 N 32769 0 63 +def test t5 t5 param10 param10 8 20 9 Y 32768 0 63 +def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 +def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 +def test t5 t5 const12 const12 254 0 0 Y 128 0 63 +def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 +def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 +def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 +const01 8 +param01 8 +const02 8.0 +param02 8.000000000000000000000000000000 +const03 8 +param03 8 +const04 abc +param04 abc +const05 abc +param05 abc +const06 1991-08-05 +param06 1991-08-05 +const07 1991-08-05 +param07 1991-08-05 +const08 1991-08-05 01:01:01 +param08 1991-08-05 01:01:01 +const09 1991-08-05 01:01:01 +param09 1991-08-05 01:01:01 +const10 662680861 +param10 662680861 +const11 1991 +param11 1991 +const12 NULL +param12 NULL +param13 NULL +param14 NULL +param15 NULL +drop table t5 ; +test_sequence +------ data type conversion tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +insert into t9 set c1= 0, c15= '1991-01-01 01:01:01' ; +select * from t9 order by c1 ; +c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday +test_sequence +------ select @parameter:= column ------ +prepare full_info from "select @arg01, @arg02, @arg03, @arg04, + @arg05, @arg06, @arg07, @arg08, + @arg09, @arg10, @arg11, @arg12, + @arg13, @arg14, @arg15, @arg16, + @arg17, @arg18, @arg19, @arg20, + @arg21, @arg22, @arg23, @arg24, + @arg25, @arg26, @arg27, @arg28, + @arg29, @arg30, @arg31, @arg32" ; +select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, +@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, +@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, +@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, +@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, +@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, +@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, +@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 +from t9 where c1= 1 ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, +@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, +@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, +@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, +@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, +@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, +@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, +@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 +from t9 where c1= 0 ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select + @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, + @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, + @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, + @arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, + @arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, + @arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, + @arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, + @arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 +from t9 where c1= ?" ; +set @my_key= 1 ; +execute stmt1 using @my_key ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +set @my_key= 0 ; +execute stmt1 using @my_key ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= c1 from t9 where c1= 1' at line 1 +test_sequence +------ select column, .. into @parm,.. ------ +select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, +c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, +c25, c26, c27, c28, c29, c30, c31, c32 +into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, +@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, +@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, +@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 +from t9 where c1= 1 ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, +c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, +c25, c26, c27, c28, c29, c30, c31, c32 +into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, +@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, +@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, +@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 +from t9 where c1= 0 ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, + c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, + c25, c26, c27, c28, c29, c30, c31, c32 +into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, + @arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, + @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, + @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 +from t9 where c1= ?" ; +set @my_key= 1 ; +execute stmt1 using @my_key ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +set @my_key= 0 ; +execute stmt1 using @my_key ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t9 where c1= 1' at line 1 +test_sequence +-- insert into numeric columns -- +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ) ; +set @arg00= 21 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 )" ; +execute stmt1 ; +set @arg00= 23; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, +30.0, 30.0, 30.0 ) ; +set @arg00= 31.0 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, + 32.0, 32.0, 32.0 )" ; +execute stmt1 ; +set @arg00= 33.0; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( '40', '40', '40', '40', '40', '40', '40', '40', +'40', '40', '40' ) ; +set @arg00= '41' ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( '42', '42', '42', '42', '42', '42', '42', '42', + '42', '42', '42' )" ; +execute stmt1 ; +set @arg00= '43'; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( CAST('50' as binary), CAST('50' as binary), +CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), +CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), +CAST('50' as binary), CAST('50' as binary), CAST('50' as binary) ) ; +set @arg00= CAST('51' as binary) ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( CAST('52' as binary), CAST('52' as binary), + CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), + CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), + CAST('52' as binary), CAST('52' as binary), CAST('52' as binary) )" ; +execute stmt1 ; +set @arg00= CAST('53' as binary) ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +set @arg00= 2 ; +set @arg00= NULL ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL ) ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 61, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL )" ; +execute stmt1 ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 63, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +set @arg00= 8.0 ; +set @arg00= NULL ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 71, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 73, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +set @arg00= 'abc' ; +set @arg00= NULL ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 81, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 83, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 +from t9 where c1 >= 20 +order by c1 ; +c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c12 +20 20 20 20 20 20 20 20 20 20 20.0000 +21 21 21 21 21 21 21 21 21 21 21.0000 +22 22 22 22 22 22 22 22 22 22 22.0000 +23 23 23 23 23 23 23 23 23 23 23.0000 +30 30 30 30 30 30 30 30 30 30 30.0000 +31 31 31 31 31 31 31 31 31 31 31.0000 +32 32 32 32 32 32 32 32 32 32 32.0000 +33 33 33 33 33 33 33 33 33 33 33.0000 +40 40 40 40 40 40 40 40 40 40 40.0000 +41 41 41 41 41 41 41 41 41 41 41.0000 +42 42 42 42 42 42 42 42 42 42 42.0000 +43 43 43 43 43 43 43 43 43 43 43.0000 +50 50 50 50 50 50 50 50 50 50 50.0000 +51 51 51 51 51 51 51 51 51 51 51.0000 +52 52 52 52 52 52 52 52 52 52 52.0000 +53 53 53 53 53 53 53 53 53 53 53.0000 +60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +test_sequence +-- select .. where numeric column = .. -- +set @arg00= 20; +select 'true' as found from t9 +where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 +and c8= 20 and c9= 20 and c10= 20 and c12= 20; +found +true +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 + and c8= 20 and c9= 20 and c10= 20 and c12= 20 "; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 20.0; +select 'true' as found from t9 +where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 +and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0; +found +true +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 + and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0 "; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +select 'true' as found from t9 +where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' + and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20'; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' + and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20' "; +execute stmt1 ; +found +true +set @arg00= '20'; +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +select 'true' as found from t9 +where c1= CAST('20' as binary) and c2= CAST('20' as binary) and +c3= CAST('20' as binary) and c4= CAST('20' as binary) and +c5= CAST('20' as binary) and c6= CAST('20' as binary) and +c7= CAST('20' as binary) and c8= CAST('20' as binary) and +c9= CAST('20' as binary) and c10= CAST('20' as binary) and +c12= CAST('20' as binary); +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= CAST('20' as binary) and c2= CAST('20' as binary) and + c3= CAST('20' as binary) and c4= CAST('20' as binary) and + c5= CAST('20' as binary) and c6= CAST('20' as binary) and + c7= CAST('20' as binary) and c8= CAST('20' as binary) and + c9= CAST('20' as binary) and c10= CAST('20' as binary) and + c12= CAST('20' as binary) "; +execute stmt1 ; +found +true +set @arg00= CAST('20' as binary) ; +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +delete from t9 ; +test_sequence +-- some numeric overflow experiments -- +prepare my_insert from "insert into t9 + ( c21, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 'O', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 +from t9 where c21 = 'O' "; +prepare my_delete from "delete from t9 where c21 = 'O' "; +set @arg00= 9223372036854775807 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 +c7 9.22337e+18 +c8 9.22337203685478e+18 +c9 9.22337203685478e+18 +c10 9.22337203685478e+18 +c12 9999.9999 +execute my_delete ; +set @arg00= '9223372036854775807' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 +c7 9.22337e+18 +c8 9.22337203685478e+18 +c9 9.22337203685478e+18 +c10 9.22337203685478e+18 +c12 9999.9999 +execute my_delete ; +set @arg00= -9223372036854775808 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 +c7 -9.22337e+18 +c8 -9.22337203685478e+18 +c9 -9.22337203685478e+18 +c10 -9.22337203685478e+18 +c12 -9999.9999 +execute my_delete ; +set @arg00= '-9223372036854775808' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 +c7 -9.22337e+18 +c8 -9.22337203685478e+18 +c9 -9.22337203685478e+18 +c10 -9.22337203685478e+18 +c12 -9999.9999 +execute my_delete ; +set @arg00= 1.11111111111111111111e+50 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 +c7 3.40282e+38 +c8 1.11111111111111e+50 +c9 1.11111111111111e+50 +c10 1.11111111111111e+50 +c12 9999.9999 +execute my_delete ; +set @arg00= '1.11111111111111111111e+50' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1265 Data truncated for column 'c1' at row 1 +Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1265 Data truncated for column 'c3' at row 1 +Warning 1265 Data truncated for column 'c4' at row 1 +Warning 1265 Data truncated for column 'c5' at row 1 +Warning 1265 Data truncated for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 1 +c2 1 +c3 1 +c4 1 +c5 1 +c6 1 +c7 3.40282e+38 +c8 1.11111111111111e+50 +c9 1.11111111111111e+50 +c10 1.11111111111111e+50 +c12 9999.9999 +execute my_delete ; +set @arg00= -1.11111111111111111111e+50 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 +c7 -3.40282e+38 +c8 -1.11111111111111e+50 +c9 -1.11111111111111e+50 +c10 -1.11111111111111e+50 +c12 -9999.9999 +execute my_delete ; +set @arg00= '-1.11111111111111111111e+50' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1265 Data truncated for column 'c1' at row 1 +Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1265 Data truncated for column 'c3' at row 1 +Warning 1265 Data truncated for column 'c4' at row 1 +Warning 1265 Data truncated for column 'c5' at row 1 +Warning 1265 Data truncated for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -1 +c2 -1 +c3 -1 +c4 -1 +c5 -1 +c6 -1 +c7 -3.40282e+38 +c8 -1.11111111111111e+50 +c9 -1.11111111111111e+50 +c10 -1.11111111111111e+50 +c12 -9999.9999 +execute my_delete ; +test_sequence +-- insert into string columns -- +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +select c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 +from t9 where c1 >= 20 +order by c1 ; +c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 +20 2 20 20 20 20 20 20 20 20 20 20 +21 2 21 21 21 21 21 21 21 21 21 21 +22 2 22 22 22 22 22 22 22 22 22 22 +23 2 23 23 23 23 23 23 23 23 23 23 +30 3 30 30 30 30 30 30 30 30 30 30 +31 3 31 31 31 31 31 31 31 31 31 31 +32 3 32 32 32 32 32 32 32 32 32 32 +33 3 33 33 33 33 33 33 33 33 33 33 +40 4 40 40 40 40 40 40 40 40 40 40 +41 4 41 41 41 41 41 41 41 41 41 41 +42 4 42 42 42 42 42 42 42 42 42 42 +43 4 43 43 43 43 43 43 43 43 43 43 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 +54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 +55 5 55 55 55 55 55 55 55 55 55 55 +56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 +57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00 +60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +test_sequence +-- select .. where string column = .. -- +set @arg00= '20'; +select 'true' as found from t9 +where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and +c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and +c27= '20' and c28= '20' and c29= '20' and c30= '20' ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and + c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and + c27= '20' and c28= '20' and c29= '20' and c30= '20'" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and + c21= ? and c22= ? and c23= ? and c25= ? and + c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= CAST('20' as binary); +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) += CAST('20' as binary) and c21= CAST('20' as binary) +and c22= CAST('20' as binary) and c23= CAST('20' as binary) and +c24= CAST('20' as binary) and c25= CAST('20' as binary) and +c26= CAST('20' as binary) and c27= CAST('20' as binary) and +c28= CAST('20' as binary) and c29= CAST('20' as binary) and +c30= CAST('20' as binary) ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20))) = @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and +c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) + = CAST('20' as binary) and c21= CAST('20' as binary) + and c22= CAST('20' as binary) and c23= CAST('20' as binary) and + c24= CAST('20' as binary) and c25= CAST('20' as binary) and + c26= CAST('20' as binary) and c27= CAST('20' as binary) and + c28= CAST('20' as binary) and c29= CAST('20' as binary) and + c30= CAST('20' as binary)" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20))) = ? and c21= ? and + c22= ? and c23= ? and c25= ? and c26= ? and c27= ? and c28= ? and + c29= ? and c30= ?"; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 20; +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and +c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and +c27= 20 and c28= 20 and c29= 20 and c30= 20 ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and + c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and + c27= 20 and c28= 20 and c29= 20 and c30= 20" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and + c21= ? and c22= ? and c23= ? and c25= ? and + c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 20.0; +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and +c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and +c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0 ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and + c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and + c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and + c21= ? and c22= ? and c23= ? and c25= ? and + c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +delete from t9 ; +test_sequence +-- insert into date/time columns -- +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; +c1 c13 c14 c15 c16 c17 +20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +21 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +22 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +23 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +30 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +31 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +32 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +33 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +40 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +41 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +60 NULL NULL 1991-01-01 01:01:01 NULL NULL +61 NULL NULL 1991-01-01 01:01:01 NULL NULL +62 NULL NULL 1991-01-01 01:01:01 NULL NULL +63 NULL NULL 1991-01-01 01:01:01 NULL NULL +71 NULL NULL 1991-01-01 01:01:01 NULL NULL +73 NULL NULL 1991-01-01 01:01:01 NULL NULL +81 NULL NULL 1991-01-01 01:01:01 NULL NULL +83 NULL NULL 1991-01-01 01:01:01 NULL NULL +test_sequence +-- select .. where date/time column = .. -- +set @arg00= '1991-01-01 01:01:01' ; +select 'true' as found from t9 +where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and +c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and +c17= '1991-01-01 01:01:01' ; +found +true +select 'true' as found from t9 +where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00 +and c17= @arg00 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and + c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and + c17= '1991-01-01 01:01:01'" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; +select 'true' as found from t9 +where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and +c14= CAST('1991-01-01 01:01:01' as datetime) and +c15= CAST('1991-01-01 01:01:01' as datetime) and +c16= CAST('1991-01-01 01:01:01' as datetime) and +c17= CAST('1991-01-01 01:01:01' as datetime) ; +found +true +select 'true' as found from t9 +where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00 +and c17= @arg00 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and + c14= CAST('1991-01-01 01:01:01' as datetime) and + c15= CAST('1991-01-01 01:01:01' as datetime) and + c16= CAST('1991-01-01 01:01:01' as datetime) and + c17= CAST('1991-01-01 01:01:01' as datetime)" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 1991 ; +select 'true' as found from t9 +where c1= 20 and c17= 1991 ; +found +true +select 'true' as found from t9 +where c1= 20 and c17= @arg00 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c17= 1991" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c17= ?" ; +execute stmt1 using @arg00 ; +found +true +set @arg00= 1.991e+3 ; +select 'true' as found from t9 +where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ; +found +true +select 'true' as found from t9 +where c1= 20 and abs(c17 - @arg00) < 0.01 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and abs(c17 - ?) < 0.01" ; +execute stmt1 using @arg00 ; +found +true +drop table t1, t9; -- cgit v1.2.1 From c262b880a5f74bc938d8925f4dda8ada57bc272b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 May 2006 16:44:26 +0300 Subject: postmerge fix BUILD/SETUP.sh: postmerge changes configure.in: postmerge changes mysql-test/r/ps_maria.result: changed result according last MyISAM test changes --- mysql-test/r/ps_maria.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/ps_maria.result b/mysql-test/r/ps_maria.result index a5cb3050dcb..00e32cf8fce 100644 --- a/mysql-test/r/ps_maria.result +++ b/mysql-test/r/ps_maria.result @@ -1777,7 +1777,7 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL DEFAULT '0', `param01` bigint(20) DEFAULT NULL, - `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `const02` decimal(2,1) NOT NULL DEFAULT '0.0', `param02` decimal(65,30) DEFAULT NULL, `const03` double NOT NULL DEFAULT '0', `param03` double DEFAULT NULL, @@ -1807,7 +1807,7 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 246 3 3 N 33 1 63 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 def test t5 t5 param02 param02 246 67 32 Y 0 30 63 def test t5 t5 const03 const03 5 17 1 N 32769 31 63 def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 -- cgit v1.2.1 From 99c431db92f8904bf50f6944e1488a0172c4ebd8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Aug 2006 16:36:54 +0200 Subject: Completion of merge of mysql-5.1 into mysql-maria. Manually imported changes done to MyISAM (include/myisam.h, storage/myisam/*, sql/ha_myisam.*, mysql-test/t/myisam.test, mysql-test/t/ps_2myisam.test) the last months into Maria (tedious, should do it more frequently in the future), including those not done at the previous 5.1->Maria merge (please in the future don't forget to apply MyISAM changes to Maria when you merge 5.1 into Maria). Note: I didn't try to import anything which could be MyISAM-related in other tests of mysql-test (I didn't want to dig in all csets), but as QA is working to make most tests re-usable for other engines (Falcon), it is likely that we'll benefit from this and just have to set engine=Maria somewhere to run those tests on Maria. func_group and partition tests fail but they already do in main 5.1 on my machine. No Valgrind error in t/*maria*.test. Monty: please see the commit comment of maria.result and check. BitKeeper/deleted/.del-ha_maria.m4: Delete: config/ac-macros/ha_maria.m4 configure.in: fix for the new way of enabling engines include/maria.h: importing changes done to MyISAM the last months into Maria include/my_handler.h: importing changes done to MyISAM the last months into Maria include/myisam.h: importing changes done to MyISAM the last months into Maria mysql-test/r/maria.result: identical to myisam.result, except the engine name in some places AND in the line testing key_block_size=1000000000000000000: Maria gives a key block size of 8192 while MyISAM gives 4096; is it explainable by the difference between MARIA_KEY_BLOCK_LENGTH and the same constant in MyISAM? Monty? mysql-test/r/ps_maria.result: identical to ps_2myisam.result (except the engine name in some places) mysql-test/t/maria.test: instead of engine=maria everywhere, I use @@storage_engine (reduces the diff with myisam.test). importing changes done to MyISAM the last months into Maria mysys/my_handler.c: importing changes done to MyISAM the last months into Maria sql/ha_maria.cc: importing changes done to MyISAM the last months into Maria sql/ha_maria.h: importing changes done to MyISAM the last months into Maria sql/mysqld.cc: unneeded storage/maria/Makefile.am: importing changes done to MyISAM the last months into Maria storage/maria/ma_check.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_create.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_delete_table.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_dynrec.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_extra.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_ft_boolean_search.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_ft_eval.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_ft_nlq_search.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_ft_parser.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_ft_test1.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_ft_update.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_ftdefs.h: importing changes done to MyISAM the last months into Maria storage/maria/ma_key.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_open.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_page.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_rkey.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_rsamepos.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_rt_index.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_rt_mbr.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_search.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_sort.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_test1.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_test2.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_test3.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_update.c: importing changes done to MyISAM the last months into Maria storage/maria/ma_write.c: importing changes done to MyISAM the last months into Maria storage/maria/maria_chk.c: importing changes done to MyISAM the last months into Maria storage/maria/maria_def.h: importing changes done to MyISAM the last months into Maria storage/maria/maria_ftdump.c: importing changes done to MyISAM the last months into Maria storage/maria/maria_pack.c: importing changes done to MyISAM the last months into Maria --- mysql-test/r/maria.result | 294 ++++++++++++++++++++++++++++++++++--------- mysql-test/r/ps_maria.result | 4 +- 2 files changed, 235 insertions(+), 63 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 3b360873c36..b6924e4395b 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1,9 +1,11 @@ +set global storage_engine=maria; +set session storage_engine=maria; drop table if exists t1,t2; SET SQL_WARNINGS=1; CREATE TABLE t1 ( STRING_DATA char(255) default NULL, KEY string_data (STRING_DATA) -) ENGINE=MARIA; +); INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); INSERT INTO t1 VALUES ('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'); @@ -14,7 +16,7 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)) engine=maria; +create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)); check table t1; Table Op Msg_type Msg_text test.t1 check status OK @@ -32,7 +34,7 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)) engine=maria; +create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)); insert into t1 (b) values (1),(2),(2),(2),(2); optimize table t1; Table Op Msg_type Msg_text @@ -49,7 +51,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par t1 0 PRIMARY 1 a A 5 NULL NULL BTREE t1 1 b 1 b A 1 NULL NULL BTREE drop table t1; -create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=maria; +create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)); insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); explain select * from t1 order by a; id select_type table type possible_keys key key_len ref rows Extra @@ -76,7 +78,7 @@ explain select a,b,c from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 drop table t1; -CREATE TABLE t1 (a INT) engine=maria; +CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1), (2), (3); LOCK TABLES t1 WRITE; INSERT INTO t1 VALUES (1), (2), (3); @@ -84,7 +86,7 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; -create table t1 ( t1 char(255), key(t1(250))) engine=maria; +create table t1 ( t1 char(255), key(t1(250))); insert t1 values ('137513751375137513751375137513751375137569516951695169516951695169516951695169'); insert t1 values ('178417841784178417841784178417841784178403420342034203420342034203420342034203'); insert t1 values ('213872387238723872387238723872387238723867376737673767376737673767376737673767'); @@ -245,7 +247,7 @@ int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 -int, i999 int, i1000 int, b blob) row_format=dynamic engine=maria; +int, i999 int, i1000 int, b blob) row_format=dynamic; insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -313,7 +315,7 @@ KEY `ip` (`ip`), KEY `poster_login` (`poster_login`), KEY `topic_id` (`topic_id`), FULLTEXT KEY `post_text` (`post_text`) -) ENGINE=MARIA; +); INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'); REPAIR TABLE t1; Table Op Msg_type Msg_text @@ -322,15 +324,15 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e)) engine=maria; +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e)); ERROR 42000: Specified key was too long; max key length is 1000 bytes -CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255)) engine=maria; +CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255)); ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e); ERROR 42000: Specified key was too long; max key length is 1000 bytes DROP TABLE t1; -CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)) engine=maria; +CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)); INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4); -create table t2 (a int not null, b int, c int, key(b), key(c), key(a)) engine=maria; +create table t2 (a int not null, b int, c int, key(b), key(c), key(a)); INSERT into t2 values (1,1,1), (2,2,2); optimize table t1; Table Op Msg_type Msg_text @@ -346,11 +348,11 @@ t1 1 c_2 2 a A 5 NULL NULL BTREE explain select * from t1,t2 where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where explain select * from t1,t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 @@ -362,7 +364,7 @@ id select_type table type possible_keys key key_len ref rows Extra explain select * from t1,t2 force index(c) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where explain select * from t1 where a=0 or a=2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where @@ -376,7 +378,7 @@ explain select * from t1 use index() where c=1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where drop table t1,t2; -create table t1 (a int not null auto_increment primary key, b varchar(255)) engine=maria; +create table t1 (a int not null auto_increment primary key, b varchar(255)); insert into t1 (b) values (repeat('a',100)),(repeat('b',100)),(repeat('c',100)); update t1 set b=repeat(left(b,1),200) where a=1; delete from t1 where (a & 1)= 0; @@ -398,7 +400,7 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -create table t1 ( a text not null, key a (a(20))) engine=maria; +create table t1 ( a text not null, key a (a(20))); insert into t1 values ('aaa '),('aaa'),('aa'); check table t1; Table Op Msg_type Msg_text @@ -420,7 +422,7 @@ bbb. bbb. aa. drop table t1; -create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))) engine=maria; +create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))); insert into t1 values('807780', '477', '165'); insert into t1 values('807780', '477', '162'); insert into t1 values('807780', '472', '162'); @@ -431,7 +433,7 @@ drop table t1; DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' -CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)) engine=maria; +CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)); INSERT t1 VALUES ("can \tcan"); INSERT t1 VALUES ("can can"); INSERT t1 VALUES ("can"); @@ -444,7 +446,7 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; -create table t1 (a blob) engine=maria; +create table t1 (a blob); insert into t1 values('a '),('a'); select concat(a,'.') from t1 where a='a'; concat(a,'.') @@ -460,7 +462,7 @@ select concat(a,'.') from t1 where a='a '; concat(a,'.') a . drop table t1; -create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))) engine=maria; +create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))); insert into t1 (b) values ('a'),('b'),('c'); select concat(b,'.') from t1; concat(b,'.') @@ -483,8 +485,8 @@ a concat(b,'.') 1 a. 3 c. drop table t1; -create table t1 (a int not null) engine=maria; -create table t2 (a int not null, primary key (a)) engine=maria; +create table t1 (a int not null); +create table t2 (a int not null, primary key (a)); insert into t1 values (1); insert into t2 values (1),(2); select sql_big_result distinct t1.a from t1,t2 order by t2.a; @@ -508,17 +510,17 @@ drop table t1,t2; create table t1 ( c1 varchar(32), key (c1) -) engine=maria; +); alter table t1 disable keys; insert into t1 values ('a'), ('b'); select c1 from t1 order by c1 limit 1; c1 a drop table t1; -CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MARIA; +CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)); Got one of the listed errors -create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=maria; -create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=maria; +create table t1 (a int, b varchar(200), c text not null) checksum=1; +create table t2 (a int, b varchar(200), c text not null) checksum=0; insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, ""); insert t2 select * from t1; checksum table t1, t2, t3 quick; @@ -543,7 +545,7 @@ test.t3 NULL Warnings: Error 1146 Table 'test.t3' doesn't exist drop table t1,t2; -create table t1 (a int, key (a)) engine=maria; +create table t1 (a int, key (a)); show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a A NULL NULL NULL YES BTREE @@ -551,7 +553,7 @@ alter table t1 disable keys; show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a A NULL NULL NULL YES BTREE disabled -create table t2 (a int) engine=maria; +create table t2 (a int); set @@rand_seed1=31415926,@@rand_seed2=2718281828; insert t1 select * from t2; show keys from t1; @@ -569,7 +571,7 @@ show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a NULL 500 NULL NULL YES HASH drop table t1,t2; -create table t1 ( a tinytext, b char(1), index idx (a(1),b)) engine=maria; +create table t1 ( a tinytext, b char(1), index idx (a(1),b) ); insert into t1 values (null,''), (null,''); explain select count(*) from t1 where a is null; id select_type table type possible_keys key key_len ref rows Extra @@ -579,20 +581,20 @@ count(*) 2 drop table t1; create table t1 (c1 int, c2 varchar(4) not null default '', -key(c2(3))) default charset=utf8 engine=maria; +key(c2(3))) default charset=utf8; insert into t1 values (1,'A'), (2, 'B'), (3, 'A'); update t1 set c2='A B' where c1=2; check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -create table t1 (c1 int) engine=maria; +create table t1 (c1 int); insert into t1 values (1),(2),(3),(4); checksum table t1; Table Checksum test.t1 149057747 delete from t1 where c1 = 1; -create table t2 engine=maria as select * from t1; +create table t2 as select * from t1; checksum table t1; Table Checksum test.t1 984116287 @@ -603,7 +605,7 @@ drop table t1, t2; show variables like 'maria_stats_method'; Variable_name Value maria_stats_method nulls_unequal -create table t1 (a int, key(a)) engine=maria; +create table t1 (a int, key(a)); insert into t1 values (0),(1),(2),(3),(4); insert into t1 select NULL from t1; analyze table t1; @@ -668,7 +670,7 @@ maria_stats_method nulls_ignored create table t1 ( a char(3), b char(4), c char(5), d char(6), key(a,b,c,d) -) engine=maria; +); insert into t1 values ('bcd','def1', NULL, 'zz'); insert into t1 values ('bcd','def2', NULL, 'zz'); insert into t1 values ('bce','def1', 'yuu', NULL); @@ -699,7 +701,7 @@ cip INT NOT NULL, time TIME NOT NULL, score INT NOT NULL DEFAULT 0, bob TINYBLOB -) engine=maria; +); insert into t1 (cip, time) VALUES (1, '00:01'), (2, '00:02'), (3,'00:03'); insert into t1 (cip, bob, time) VALUES (4, 'a', '00:04'), (5, 'b', '00:05'), (6, 'c', '00:06'); @@ -729,7 +731,27 @@ select count(id1) from t1 where id2 = 10; count(id1) 5 drop table t1; -set storage_engine=MARIA; +CREATE TABLE t1(a TINYINT, KEY(a)); +INSERT INTO t1 VALUES(1); +SELECT MAX(a) FROM t1 IGNORE INDEX(a); +MAX(a) +1 +ALTER TABLE t1 DISABLE KEYS; +SELECT MAX(a) FROM t1; +MAX(a) +1 +SELECT MAX(a) FROM t1 IGNORE INDEX(a); +MAX(a) +1 +DROP TABLE t1; +CREATE TABLE t1(a CHAR(9), b VARCHAR(7)); +INSERT INTO t1(a) VALUES('xxxxxxxxx'),('xxxxxxxxx'); +UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb'; +SELECT * FROM t1; +a b +xxxxxxxxx bbbbbb +xxxxxxxxx bbbbbb +DROP TABLE t1; drop table if exists t1,t2,t3; --- Testing varchar --- --- Testing varchar --- @@ -1301,11 +1323,11 @@ select * from t1 where a=20 and b is null; a b 20 NULL drop table t1; -create table t1 (v varchar(65530), key(v)) engine=maria; +create table t1 (v varchar(65530), key(v)); Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes drop table if exists t1; -create table t1 (v varchar(65536)) engine=maria; +create table t1 (v varchar(65536)); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT show create table t1; @@ -1314,7 +1336,7 @@ t1 CREATE TABLE `t1` ( `v` mediumtext ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; -create table t1 (v varchar(65530) character set utf8) engine=maria; +create table t1 (v varchar(65530) character set utf8); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT show create table t1; @@ -1323,24 +1345,11 @@ t1 CREATE TABLE `t1` ( `v` mediumtext CHARACTER SET utf8 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; -create table t1 (v varchar(65535)) engine=maria; +create table t1 (v varchar(65535)); ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs -set storage_engine=MyISAM; -create table t1 (a int) engine=maria; -drop table if exists t1; -Warnings: -Error 2 Can't find file: 't1' (errno: 2) -create table t1 (a int) engine=maria; -drop table t1; -Got one of the listed errors -create table t1 (a int) engine=maria; -drop table t1; -Got one of the listed errors -drop table t1; -ERROR 42S02: Unknown table 't1' set @save_concurrent_insert=@@concurrent_insert; set global concurrent_insert=1; -create table t1 (a int) engine=maria; +create table t1 (a int); insert into t1 values (1),(2),(3),(4),(5); lock table t1 read local; insert into t1 values(6),(7); @@ -1367,7 +1376,7 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -create table t1 (a int, b varchar(30) default "hello") engine=maria; +create table t1 (a int, b varchar(30) default "hello"); insert into t1 (a) values (1),(2),(3),(4),(5); lock table t1 read local; insert into t1 (a) values(6),(7); @@ -1395,7 +1404,7 @@ Table Op Msg_type Msg_text test.t1 check status OK drop table t1; set global concurrent_insert=@save_concurrent_insert; -create table t1 (a int, key(a)) engine=maria; +create table t1 (a int, key(a)); insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL); analyze table t1; Table Op Msg_type Msg_text @@ -1409,9 +1418,172 @@ show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a A 8 NULL NULL YES BTREE drop table t1; -create table t1 (c1 int) engine=maria pack_keys=0; -create table t2 (c1 int) engine=maria pack_keys=1; -create table t3 (c1 int) engine=maria pack_keys=default; -create table t4 (c1 int) engine=maria pack_keys=2; +show create table t1; +show create table t1; +create table t1 (a int) select 42 a; +select * from t1; +a +9 +select * from t1; +a +99 +select * from t1; +a +42 +drop table t1; +End of 4.1 tests +create table t1 (c1 int) pack_keys=0; +create table t2 (c1 int) pack_keys=1; +create table t3 (c1 int) pack_keys=default; +create table t4 (c1 int) pack_keys=2; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1 drop table t1, t2, t3; +End of 5.0 tests +create table t1 (a int not null, key `a` (a) key_block_size=1024); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=1024 +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int not null, key `a` (a) key_block_size=2048); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=2048 +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a varchar(2048), key `a` (a)); +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2048) DEFAULT NULL, + KEY `a` (`a`(1000)) +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a varchar(2048), key `a` (a) key_block_size=1024); +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2048) DEFAULT NULL, + KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=4096 +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + KEY `a` (`a`), + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096 +) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024 +alter table t1 key_block_size=2048; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=1024, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096 +) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2048 +alter table t1 add c int, add key (c); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + `c` int(11) DEFAULT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=1024, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096, + KEY `c` (`c`) +) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2048 +alter table t1 key_block_size=0; +alter table t1 add d int, add key (d); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + `c` int(11) DEFAULT NULL, + `d` int(11) DEFAULT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=1024, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096, + KEY `c` (`c`) KEY_BLOCK_SIZE=2048, + KEY `d` (`d`) +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192; +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + KEY `a` (`a`), + KEY `b` (`b`(1000)) +) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=8192 +drop table t1; +create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192; +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=1024, + KEY `b` (`b`(1000)) +) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=8192 +drop table t1; +create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` int(11) DEFAULT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=1024, + KEY `b` (`b`) KEY_BLOCK_SIZE=8192 +) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16384 +drop table t1; +create table t1 (a int not null, key `a` (a) key_block_size=512); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=1024 +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2048) DEFAULT NULL, + KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192 +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int not null, key `a` (a) key_block_size=1025); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=2048 +) ENGINE=MARIA DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int not null, key key_block_size=1024 (a)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1 +create table t1 (a int not null, key `a` key_block_size=1024 (a)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1 +End of 5.1 tests +set global storage_engine=MyISAM; diff --git a/mysql-test/r/ps_maria.result b/mysql-test/r/ps_maria.result index 00e32cf8fce..f47c72187e2 100644 --- a/mysql-test/r/ps_maria.result +++ b/mysql-test/r/ps_maria.result @@ -1775,7 +1775,7 @@ NULL as const12, @arg12 as param12, show create table t5 ; Table Create Table t5 CREATE TABLE `t5` ( - `const01` bigint(1) NOT NULL DEFAULT '0', + `const01` int(1) NOT NULL DEFAULT '0', `param01` bigint(20) DEFAULT NULL, `const02` decimal(2,1) NOT NULL DEFAULT '0.0', `param02` decimal(65,30) DEFAULT NULL, @@ -1805,7 +1805,7 @@ t5 CREATE TABLE `t5` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t5 t5 const01 const01 8 1 1 N 32769 0 63 +def test t5 t5 const01 const01 3 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 def test t5 t5 const02 const02 246 4 3 N 1 1 63 def test t5 t5 param02 param02 246 67 32 Y 0 30 63 -- cgit v1.2.1 From 0a1dc8af5b665647a08c51f75b5d5c2e1a112d99 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Oct 2006 19:30:16 +0300 Subject: Merge of recent MyISAM changes into Maria. Testsuite passes as much as in the main 5.1 (partition and ndb_alter_table fail). mysql-test/r/maria.result: merge from MyISAM mysql-test/r/ps_maria.result: merge from MyISAM mysql-test/t/maria.test: merge from MyISAM sql/mysql_priv.h: fix after wrong merge sql/mysqld.cc: fix after wrong merge sql/set_var.cc: adding _db like other engines have storage/maria/Makefile.am: merge from MyISAM storage/maria/ha_maria.cc: merge from MyISAM storage/maria/ha_maria.h: merge from MyISAM storage/maria/ma_check.c: merge from MyISAM storage/maria/ma_delete.c: merge from MyISAM storage/maria/ma_init.c: maria_inited should rather be my_bool storage/maria/ma_locking.c: merge from MyISAM storage/maria/ma_packrec.c: merge from MyISAM storage/maria/ma_panic.c: maria_panic() should not take mutex if engine has not been inited. storage/maria/ma_rkey.c: merge from MyISAM storage/maria/ma_write.c: merge from MyISAM storage/maria/maria_def.h: merge from MyISAM. maria_inited is needed for maria_panic(). storage/maria/maria_ftdump.c: merge from MyISAM --- mysql-test/r/maria.result | 28 ++++ mysql-test/r/ps_maria.result | 320 +++++++++++++++++++++---------------------- 2 files changed, 188 insertions(+), 160 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index b6924e4395b..396b5da4bc1 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -517,6 +517,34 @@ select c1 from t1 order by c1 limit 1; c1 a drop table t1; +create table t1 (a int not null, primary key(a)); +create table t2 (a int not null, b int not null, primary key(a,b)); +insert into t1 values (1),(2),(3),(4),(5),(6); +insert into t2 values (1,1),(2,1); +lock tables t1 read local, t2 read local; +select straight_join * from t1,t2 force index (primary) where t1.a=t2.a; +a a b +1 1 1 +2 2 1 +insert into t2 values(2,0); +select straight_join * from t1,t2 force index (primary) where t1.a=t2.a; +a a b +1 1 1 +2 2 1 +drop table t1,t2; +CREATE TABLE t1 (c1 varchar(250) NOT NULL); +CREATE TABLE t2 (c1 varchar(250) NOT NULL, PRIMARY KEY (c1)); +INSERT INTO t1 VALUES ('test000001'), ('test000002'), ('test000003'); +INSERT INTO t2 VALUES ('test000002'), ('test000003'), ('test000004'); +LOCK TABLES t1 READ LOCAL, t2 READ LOCAL; +SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2 +WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1; +t1c1 t2c1 +INSERT INTO t2 VALUES ('test000001'), ('test000005'); +SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2 +WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1; +t1c1 t2c1 +DROP TABLE t1,t2; CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)); Got one of the listed errors create table t1 (a int, b varchar(200), c text not null) checksum=1; diff --git a/mysql-test/r/ps_maria.result b/mysql-test/r/ps_maria.result index f47c72187e2..9268c44eecd 100644 --- a/mysql-test/r/ps_maria.result +++ b/mysql-test/r/ps_maria.result @@ -1929,26 +1929,26 @@ def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 def @arg11 253 67 6 Y 128 30 63 def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 8192 10 Y 128 31 63 -def @arg14 253 8192 19 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 8 Y 128 31 63 +def @arg13 253 16777216 10 Y 128 31 63 +def @arg14 253 16777216 19 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 8 Y 128 31 63 def @arg17 253 20 4 Y 128 0 63 def @arg18 253 20 1 Y 128 0 63 def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 8192 1 Y 0 31 8 -def @arg21 253 8192 10 Y 0 31 8 -def @arg22 253 8192 30 Y 0 31 8 -def @arg23 253 8192 8 Y 128 31 63 -def @arg24 253 8192 8 Y 0 31 8 -def @arg25 253 8192 4 Y 128 31 63 -def @arg26 253 8192 4 Y 0 31 8 -def @arg27 253 8192 10 Y 128 31 63 -def @arg28 253 8192 10 Y 0 31 8 -def @arg29 253 8192 8 Y 128 31 63 -def @arg30 253 8192 8 Y 0 31 8 -def @arg31 253 8192 3 Y 0 31 8 -def @arg32 253 8192 6 Y 0 31 8 +def @arg20 253 16777216 1 Y 0 31 8 +def @arg21 253 16777216 10 Y 0 31 8 +def @arg22 253 16777216 30 Y 0 31 8 +def @arg23 253 16777216 8 Y 128 31 63 +def @arg24 253 16777216 8 Y 0 31 8 +def @arg25 253 16777216 4 Y 128 31 63 +def @arg26 253 16777216 4 Y 0 31 8 +def @arg27 253 16777216 10 Y 128 31 63 +def @arg28 253 16777216 10 Y 0 31 8 +def @arg29 253 16777216 8 Y 128 31 63 +def @arg30 253 16777216 8 Y 0 31 8 +def @arg31 253 16777216 3 Y 0 31 8 +def @arg32 253 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @@ -1976,26 +1976,26 @@ def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 def @arg11 253 67 0 Y 128 30 63 def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 8192 0 Y 128 31 63 -def @arg14 253 8192 0 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 0 Y 128 31 63 +def @arg13 253 16777216 0 Y 128 31 63 +def @arg14 253 16777216 0 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 0 Y 128 31 63 def @arg17 253 20 0 Y 128 0 63 def @arg18 253 20 0 Y 128 0 63 def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 8192 0 Y 0 31 8 -def @arg21 253 8192 0 Y 0 31 8 -def @arg22 253 8192 0 Y 0 31 8 -def @arg23 253 8192 0 Y 128 31 63 -def @arg24 253 8192 0 Y 0 31 8 -def @arg25 253 8192 0 Y 128 31 63 -def @arg26 253 8192 0 Y 0 31 8 -def @arg27 253 8192 0 Y 128 31 63 -def @arg28 253 8192 0 Y 0 31 8 -def @arg29 253 8192 0 Y 128 31 63 -def @arg30 253 8192 0 Y 0 31 8 -def @arg31 253 8192 0 Y 0 31 8 -def @arg32 253 8192 0 Y 0 31 8 +def @arg20 253 16777216 0 Y 0 31 8 +def @arg21 253 16777216 0 Y 0 31 8 +def @arg22 253 16777216 0 Y 0 31 8 +def @arg23 253 16777216 0 Y 128 31 63 +def @arg24 253 16777216 0 Y 0 31 8 +def @arg25 253 16777216 0 Y 128 31 63 +def @arg26 253 16777216 0 Y 0 31 8 +def @arg27 253 16777216 0 Y 128 31 63 +def @arg28 253 16777216 0 Y 0 31 8 +def @arg29 253 16777216 0 Y 128 31 63 +def @arg30 253 16777216 0 Y 0 31 8 +def @arg31 253 16777216 0 Y 0 31 8 +def @arg32 253 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2026,26 +2026,26 @@ def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 def @arg11 253 67 6 Y 128 30 63 def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 8192 10 Y 128 31 63 -def @arg14 253 8192 19 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 8 Y 128 31 63 +def @arg13 253 16777216 10 Y 128 31 63 +def @arg14 253 16777216 19 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 8 Y 128 31 63 def @arg17 253 20 4 Y 128 0 63 def @arg18 253 20 1 Y 128 0 63 def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 8192 1 Y 0 31 8 -def @arg21 253 8192 10 Y 0 31 8 -def @arg22 253 8192 30 Y 0 31 8 -def @arg23 253 8192 8 Y 128 31 63 -def @arg24 253 8192 8 Y 0 31 8 -def @arg25 253 8192 4 Y 128 31 63 -def @arg26 253 8192 4 Y 0 31 8 -def @arg27 253 8192 10 Y 128 31 63 -def @arg28 253 8192 10 Y 0 31 8 -def @arg29 253 8192 8 Y 128 31 63 -def @arg30 253 8192 8 Y 0 31 8 -def @arg31 253 8192 3 Y 0 31 8 -def @arg32 253 8192 6 Y 0 31 8 +def @arg20 253 16777216 1 Y 0 31 8 +def @arg21 253 16777216 10 Y 0 31 8 +def @arg22 253 16777216 30 Y 0 31 8 +def @arg23 253 16777216 8 Y 128 31 63 +def @arg24 253 16777216 8 Y 0 31 8 +def @arg25 253 16777216 4 Y 128 31 63 +def @arg26 253 16777216 4 Y 0 31 8 +def @arg27 253 16777216 10 Y 128 31 63 +def @arg28 253 16777216 10 Y 0 31 8 +def @arg29 253 16777216 8 Y 128 31 63 +def @arg30 253 16777216 8 Y 0 31 8 +def @arg31 253 16777216 3 Y 0 31 8 +def @arg32 253 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; @@ -2066,26 +2066,26 @@ def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 def @arg11 253 67 0 Y 128 30 63 def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 8192 0 Y 128 31 63 -def @arg14 253 8192 0 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 0 Y 128 31 63 +def @arg13 253 16777216 0 Y 128 31 63 +def @arg14 253 16777216 0 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 0 Y 128 31 63 def @arg17 253 20 0 Y 128 0 63 def @arg18 253 20 0 Y 128 0 63 def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 8192 0 Y 0 31 8 -def @arg21 253 8192 0 Y 0 31 8 -def @arg22 253 8192 0 Y 0 31 8 -def @arg23 253 8192 0 Y 128 31 63 -def @arg24 253 8192 0 Y 0 31 8 -def @arg25 253 8192 0 Y 128 31 63 -def @arg26 253 8192 0 Y 0 31 8 -def @arg27 253 8192 0 Y 128 31 63 -def @arg28 253 8192 0 Y 0 31 8 -def @arg29 253 8192 0 Y 128 31 63 -def @arg30 253 8192 0 Y 0 31 8 -def @arg31 253 8192 0 Y 0 31 8 -def @arg32 253 8192 0 Y 0 31 8 +def @arg20 253 16777216 0 Y 0 31 8 +def @arg21 253 16777216 0 Y 0 31 8 +def @arg22 253 16777216 0 Y 0 31 8 +def @arg23 253 16777216 0 Y 128 31 63 +def @arg24 253 16777216 0 Y 0 31 8 +def @arg25 253 16777216 0 Y 128 31 63 +def @arg26 253 16777216 0 Y 0 31 8 +def @arg27 253 16777216 0 Y 128 31 63 +def @arg28 253 16777216 0 Y 0 31 8 +def @arg29 253 16777216 0 Y 128 31 63 +def @arg30 253 16777216 0 Y 0 31 8 +def @arg31 253 16777216 0 Y 0 31 8 +def @arg32 253 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2114,26 +2114,26 @@ def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 def @arg11 253 67 6 Y 128 30 63 def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 8192 10 Y 128 31 63 -def @arg14 253 8192 19 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 8 Y 128 31 63 +def @arg13 253 16777216 10 Y 128 31 63 +def @arg14 253 16777216 19 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 8 Y 128 31 63 def @arg17 253 20 4 Y 128 0 63 def @arg18 253 20 1 Y 128 0 63 def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 8192 1 Y 0 31 8 -def @arg21 253 8192 10 Y 0 31 8 -def @arg22 253 8192 30 Y 0 31 8 -def @arg23 253 8192 8 Y 128 31 63 -def @arg24 253 8192 8 Y 0 31 8 -def @arg25 253 8192 4 Y 128 31 63 -def @arg26 253 8192 4 Y 0 31 8 -def @arg27 253 8192 10 Y 128 31 63 -def @arg28 253 8192 10 Y 0 31 8 -def @arg29 253 8192 8 Y 128 31 63 -def @arg30 253 8192 8 Y 0 31 8 -def @arg31 253 8192 3 Y 0 31 8 -def @arg32 253 8192 6 Y 0 31 8 +def @arg20 253 16777216 1 Y 0 31 8 +def @arg21 253 16777216 10 Y 0 31 8 +def @arg22 253 16777216 30 Y 0 31 8 +def @arg23 253 16777216 8 Y 128 31 63 +def @arg24 253 16777216 8 Y 0 31 8 +def @arg25 253 16777216 4 Y 128 31 63 +def @arg26 253 16777216 4 Y 0 31 8 +def @arg27 253 16777216 10 Y 128 31 63 +def @arg28 253 16777216 10 Y 0 31 8 +def @arg29 253 16777216 8 Y 128 31 63 +def @arg30 253 16777216 8 Y 0 31 8 +def @arg31 253 16777216 3 Y 0 31 8 +def @arg32 253 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2158,26 +2158,26 @@ def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 def @arg11 253 67 0 Y 128 30 63 def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 8192 0 Y 128 31 63 -def @arg14 253 8192 0 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 0 Y 128 31 63 +def @arg13 253 16777216 0 Y 128 31 63 +def @arg14 253 16777216 0 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 0 Y 128 31 63 def @arg17 253 20 0 Y 128 0 63 def @arg18 253 20 0 Y 128 0 63 def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 8192 0 Y 0 31 8 -def @arg21 253 8192 0 Y 0 31 8 -def @arg22 253 8192 0 Y 0 31 8 -def @arg23 253 8192 0 Y 128 31 63 -def @arg24 253 8192 0 Y 0 31 8 -def @arg25 253 8192 0 Y 128 31 63 -def @arg26 253 8192 0 Y 0 31 8 -def @arg27 253 8192 0 Y 128 31 63 -def @arg28 253 8192 0 Y 0 31 8 -def @arg29 253 8192 0 Y 128 31 63 -def @arg30 253 8192 0 Y 0 31 8 -def @arg31 253 8192 0 Y 0 31 8 -def @arg32 253 8192 0 Y 0 31 8 +def @arg20 253 16777216 0 Y 0 31 8 +def @arg21 253 16777216 0 Y 0 31 8 +def @arg22 253 16777216 0 Y 0 31 8 +def @arg23 253 16777216 0 Y 128 31 63 +def @arg24 253 16777216 0 Y 0 31 8 +def @arg25 253 16777216 0 Y 128 31 63 +def @arg26 253 16777216 0 Y 0 31 8 +def @arg27 253 16777216 0 Y 128 31 63 +def @arg28 253 16777216 0 Y 0 31 8 +def @arg29 253 16777216 0 Y 128 31 63 +def @arg30 253 16777216 0 Y 0 31 8 +def @arg31 253 16777216 0 Y 0 31 8 +def @arg32 253 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2204,26 +2204,26 @@ def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 def @arg11 253 67 6 Y 128 30 63 def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 8192 10 Y 128 31 63 -def @arg14 253 8192 19 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 8 Y 128 31 63 +def @arg13 253 16777216 10 Y 128 31 63 +def @arg14 253 16777216 19 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 8 Y 128 31 63 def @arg17 253 20 4 Y 128 0 63 def @arg18 253 20 1 Y 128 0 63 def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 8192 1 Y 0 31 8 -def @arg21 253 8192 10 Y 0 31 8 -def @arg22 253 8192 30 Y 0 31 8 -def @arg23 253 8192 8 Y 128 31 63 -def @arg24 253 8192 8 Y 0 31 8 -def @arg25 253 8192 4 Y 128 31 63 -def @arg26 253 8192 4 Y 0 31 8 -def @arg27 253 8192 10 Y 128 31 63 -def @arg28 253 8192 10 Y 0 31 8 -def @arg29 253 8192 8 Y 128 31 63 -def @arg30 253 8192 8 Y 0 31 8 -def @arg31 253 8192 3 Y 0 31 8 -def @arg32 253 8192 6 Y 0 31 8 +def @arg20 253 16777216 1 Y 0 31 8 +def @arg21 253 16777216 10 Y 0 31 8 +def @arg22 253 16777216 30 Y 0 31 8 +def @arg23 253 16777216 8 Y 128 31 63 +def @arg24 253 16777216 8 Y 0 31 8 +def @arg25 253 16777216 4 Y 128 31 63 +def @arg26 253 16777216 4 Y 0 31 8 +def @arg27 253 16777216 10 Y 128 31 63 +def @arg28 253 16777216 10 Y 0 31 8 +def @arg29 253 16777216 8 Y 128 31 63 +def @arg30 253 16777216 8 Y 0 31 8 +def @arg31 253 16777216 3 Y 0 31 8 +def @arg32 253 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; @@ -2242,26 +2242,26 @@ def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 def @arg11 253 67 0 Y 128 30 63 def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 8192 0 Y 128 31 63 -def @arg14 253 8192 0 Y 128 31 63 -def @arg15 253 8192 19 Y 128 31 63 -def @arg16 253 8192 0 Y 128 31 63 +def @arg13 253 16777216 0 Y 128 31 63 +def @arg14 253 16777216 0 Y 128 31 63 +def @arg15 253 16777216 19 Y 128 31 63 +def @arg16 253 16777216 0 Y 128 31 63 def @arg17 253 20 0 Y 128 0 63 def @arg18 253 20 0 Y 128 0 63 def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 8192 0 Y 0 31 8 -def @arg21 253 8192 0 Y 0 31 8 -def @arg22 253 8192 0 Y 0 31 8 -def @arg23 253 8192 0 Y 128 31 63 -def @arg24 253 8192 0 Y 0 31 8 -def @arg25 253 8192 0 Y 128 31 63 -def @arg26 253 8192 0 Y 0 31 8 -def @arg27 253 8192 0 Y 128 31 63 -def @arg28 253 8192 0 Y 0 31 8 -def @arg29 253 8192 0 Y 128 31 63 -def @arg30 253 8192 0 Y 0 31 8 -def @arg31 253 8192 0 Y 0 31 8 -def @arg32 253 8192 0 Y 0 31 8 +def @arg20 253 16777216 0 Y 0 31 8 +def @arg21 253 16777216 0 Y 0 31 8 +def @arg22 253 16777216 0 Y 0 31 8 +def @arg23 253 16777216 0 Y 128 31 63 +def @arg24 253 16777216 0 Y 0 31 8 +def @arg25 253 16777216 0 Y 128 31 63 +def @arg26 253 16777216 0 Y 0 31 8 +def @arg27 253 16777216 0 Y 128 31 63 +def @arg28 253 16777216 0 Y 0 31 8 +def @arg29 253 16777216 0 Y 128 31 63 +def @arg30 253 16777216 0 Y 0 31 8 +def @arg31 253 16777216 0 Y 0 31 8 +def @arg32 253 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2689,21 +2689,21 @@ set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 -Warning 1265 Data truncated for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1265 Data truncated for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 Warning 1264 Out of range value for column 'c7' at row 1 Warning 1264 Out of range value for column 'c12' at row 1 execute my_select ; -c1 1 -c2 1 -c3 1 -c4 1 -c5 1 -c6 1 +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 @@ -2739,21 +2739,21 @@ set @arg00= '-1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 -Warning 1265 Data truncated for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1265 Data truncated for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 Warning 1264 Out of range value for column 'c7' at row 1 Warning 1264 Out of range value for column 'c12' at row 1 execute my_select ; -c1 -1 -c2 -1 -c3 -1 -c4 -1 -c5 -1 -c6 -1 +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 c7 -3.40282e+38 c8 -1.11111111111111e+50 c9 -1.11111111111111e+50 -- cgit v1.2.1 From 887383d4e496277f79500f38ae789d2d5595476c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Oct 2006 12:44:33 +0100 Subject: Manually importing Ingo's fix for BUG#22119 "Changing MI_KEY_BLOCK_LENGTH makes a wrong myisamchk" in the Maria tree as it is really needed to get "ma_test_all" to pass (this bug showed up in Maria first, not in MyISAM). Now ma_test_all does not have corruption messages about test2 anymore, and shows the same output as mi_test_all except that ma_test_all has this at the start: lt-maria_chk: MARIA file test1 lt-maria_chk: warning: Size of indexfile is: 8192 Should be: 16384 MARIA-table 'test1' is usable but should be fixed This was already true before importing the bugfix. Wonder if normal. NOTE: this bugfix is currently in 5.1-engines, in a few days will be in the main 5.1, then we'll merge 5.1 into Maria: this will merge the bugfix into storage/myisam, but there will be no need to apply it to storage/maria again. I just couldn't wait a few days for the 5.1-engines->5.1 merge to be allowed. mysql-test/r/maria.result: result update mysql-test/t/maria.test: test for BUG#22119 storage/maria/ma_check.c: fix for BUG#22119 --- mysql-test/r/maria.result | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 396b5da4bc1..39c7c0b65dd 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1613,5 +1613,50 @@ create table t1 (a int not null, key key_block_size=1024 (a)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1 create table t1 (a int not null, key `a` key_block_size=1024 (a)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1 +CREATE TABLE t1 ( +c1 INT, +c2 VARCHAR(300), +KEY (c1) KEY_BLOCK_SIZE 1024, +KEY (c2) KEY_BLOCK_SIZE 8192 +); +INSERT INTO t1 VALUES (10, REPEAT('a', CEIL(RAND(10) * 300))), +(11, REPEAT('b', CEIL(RAND() * 300))), +(12, REPEAT('c', CEIL(RAND() * 300))), +(13, REPEAT('d', CEIL(RAND() * 300))), +(14, REPEAT('e', CEIL(RAND() * 300))), +(15, REPEAT('f', CEIL(RAND() * 300))), +(16, REPEAT('g', CEIL(RAND() * 300))), +(17, REPEAT('h', CEIL(RAND() * 300))), +(18, REPEAT('i', CEIL(RAND() * 300))), +(19, REPEAT('j', CEIL(RAND() * 300))), +(20, REPEAT('k', CEIL(RAND() * 300))), +(21, REPEAT('l', CEIL(RAND() * 300))), +(22, REPEAT('m', CEIL(RAND() * 300))), +(23, REPEAT('n', CEIL(RAND() * 300))), +(24, REPEAT('o', CEIL(RAND() * 300))), +(25, REPEAT('p', CEIL(RAND() * 300))), +(26, REPEAT('q', CEIL(RAND() * 300))), +(27, REPEAT('r', CEIL(RAND() * 300))), +(28, REPEAT('s', CEIL(RAND() * 300))), +(29, REPEAT('t', CEIL(RAND() * 300))), +(30, REPEAT('u', CEIL(RAND() * 300))), +(31, REPEAT('v', CEIL(RAND() * 300))), +(32, REPEAT('w', CEIL(RAND() * 300))), +(33, REPEAT('x', CEIL(RAND() * 300))), +(34, REPEAT('y', CEIL(RAND() * 300))), +(35, REPEAT('z', CEIL(RAND() * 300))); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +REPAIR TABLE t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +DELETE FROM t1 WHERE c1 >= 10; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; End of 5.1 tests set global storage_engine=MyISAM; -- cgit v1.2.1 From c2f2a41ed32522fa89f5c79fec42ab60e0b4aa62 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Dec 2006 19:15:53 +0100 Subject: Maria - merging recent changes done to MyISAM into Maria. Plus compiler warnings, and a fix to the pagecache unit tests for IA64 include/maria.h: merging MyISAM into Maria include/myisam.h: post-merge fixes mysql-test/r/maria.result: merging MyISAM into Maria mysql-test/t/maria.test: merging MyISAM into Maria sql/mysqld.cc: post-merge fixes storage/maria/ha_maria.cc: merging MyISAM into Maria storage/maria/ha_maria.h: merging MyISAM into Maria storage/maria/ma_check.c: merging MyISAM into Maria storage/maria/ma_open.c: merging MyISAM into Maria storage/maria/ma_packrec.c: merging MyISAM into Maria storage/maria/ma_range.c: merging MyISAM into Maria storage/maria/ma_sort.c: merging MyISAM into Maria storage/maria/maria_def.h: merging MyISAM into Maria storage/maria/maria_pack.c: merging MyISAM into Maria storage/maria/plug.in: merging MyISAM into Maria storage/myisam/myisamdef.h: merging MyISAM into Maria storage/myisam/myisampack.c: fix for compiler warnings unittest/mysys/mf_pagecache_consist.c: this sets the stack size lower than the minimum on IA64, we remove it (it made the test fail) unittest/mysys/mf_pagecache_single.c: this sets the stack size lower than the minimum on IA64, we remove it (it made the test fail) --- mysql-test/r/maria.result | 142 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 134 insertions(+), 8 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 39c7c0b65dd..7812f04336a 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -780,6 +780,132 @@ a b xxxxxxxxx bbbbbb xxxxxxxxx bbbbbb DROP TABLE t1; +SET @@maria_repair_threads=2; +SHOW VARIABLES LIKE 'maria_repair%'; +Variable_name Value +maria_repair_threads 2 +CREATE TABLE t1 ( +`_id` int(11) NOT NULL default '0', +`url` text, +`email` text, +`description` text, +`loverlap` int(11) default NULL, +`roverlap` int(11) default NULL, +`lneighbor_id` int(11) default NULL, +`rneighbor_id` int(11) default NULL, +`length_` int(11) default NULL, +`sequence` mediumtext, +`name` text, +`_obj_class` text NOT NULL, +PRIMARY KEY (`_id`), +UNIQUE KEY `sequence_name_index` (`name`(50)), +KEY (`length_`) +) ENGINE=maria DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES +(1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''), +(2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''), +(3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample3',''), +(4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample4',''), +(5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample5',''), +(6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample6',''), +(7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample7',''), +(8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample8',''), +(9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample9',''); +SELECT _id FROM t1; +_id +1 +2 +3 +4 +5 +6 +7 +8 +9 +DELETE FROM t1 WHERE _id < 8; +SHOW TABLE STATUS LIKE 't1'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MARIA 10 Dynamic 2 # # # # 140 # # # # # # +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +SHOW TABLE STATUS LIKE 't1'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MARIA 10 Dynamic 2 # # # # 0 # # # # # # +SELECT _id FROM t1; +_id +8 +9 +DROP TABLE t1; +CREATE TABLE t1 ( +`_id` int(11) NOT NULL default '0', +`url` text, +`email` text, +`description` text, +`loverlap` int(11) default NULL, +`roverlap` int(11) default NULL, +`lneighbor_id` int(11) default NULL, +`rneighbor_id` int(11) default NULL, +`length_` int(11) default NULL, +`sequence` mediumtext, +`name` text, +`_obj_class` text NOT NULL, +PRIMARY KEY (`_id`), +UNIQUE KEY `sequence_name_index` (`name`(50)), +KEY (`length_`) +) ENGINE=maria DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES +(1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''), +(2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''), +(3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample3',''), +(4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample4',''), +(5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample5',''), +(6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample6',''), +(7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample7',''), +(8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample8',''), +(9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample9',''); +SELECT _id FROM t1; +_id +1 +2 +3 +4 +5 +6 +7 +8 +9 +DELETE FROM t1 WHERE _id < 8; +SHOW TABLE STATUS LIKE 't1'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MARIA 10 Dynamic 2 # # # # 140 # # # # # # +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +REPAIR TABLE t1 QUICK; +Table Op Msg_type Msg_text +test.t1 repair status OK +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +SHOW TABLE STATUS LIKE 't1'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MARIA 10 Dynamic 2 # # # # 140 # # # # # # +SELECT _id FROM t1; +_id +8 +9 +DROP TABLE t1; +SET @@maria_repair_threads=1; +SHOW VARIABLES LIKE 'maria_repair%'; +Variable_name Value +maria_repair_threads 1 drop table if exists t1,t2,t3; --- Testing varchar --- --- Testing varchar --- @@ -985,15 +1111,15 @@ i 10 select sql_big_result v,count(c) from t1 group by v limit 10; v count(c) a 1 -a 10 -b 10 -c 10 -d 10 -e 10 -f 10 -g 10 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 h 10 -i 10 +i 10 select c,count(*) from t1 group by c limit 10; c count(*) a 1 -- cgit v1.2.1 From 7412f0fa0cd498f06fe04966a6f6161e8b32d0a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Jan 2007 13:32:02 +0200 Subject: After merge fixes Removed compiler warnings Fixed clashing function name in maria Disable maria tests from MySQL level for now BitKeeper/deleted/.del-ha_maria.cc: Rename: libmysqld/ha_maria.cc -> BitKeeper/deleted/.del-ha_maria.cc BitKeeper/etc/ignore: added libmysqld/ha_maria.cc --- added storage/maria/unittest/maria_control unittest/maria_control --- added *.Tpo --- added unittest/page_cache_test_file_1 --- added unittest/pagecache_debug.log --- added unittest/mysys/mf_pagecache_consist_1k-t-big unittest/mysys/mf_pagecache_consist_1kHC-t-big unittest/mysys/mf_pagecache_consist_1kRD-t-big unittest/mysys/mf_pagecache_consist_1kWR-t-big unittest/mysys/mf_pagecache_consist_64k-t-big unittest/mysys/mf_pagecache_consist_64kHC-t-big unittest/mysys/mf_pagecache_consist_64kRD-t-big unittest/mysys/mf_pagecache_consist_64kWR-t-big --- added unittest/mysys/mf_pagecache_single_64k-t-big Makefile.am: Don't run 'test-unit' by default (takes too long time) client/mysqldump.c: Fixed compiler warning include/lf.h: Remove compiler warnings about not used require_pins constant include/pagecache.h: LSN should be of type ulonglong (This fixes some compiler warnings) mysql-test/r/events_logs_tests.result: Make test predictable mysql-test/r/view.result: Make test results predictable mysql-test/t/disabled.def: Disable maria tests for a while mysql-test/t/events_logs_tests.test: Make test predictable mysql-test/t/view.test: Make test results predictable mysys/lf_alloc-pin.c: #warning ->QQ mysys/lf_hash.c: #warning ->QQ Removed compiler warnings mysys/mf_pagecache.c: Removed compiler warnings mysys/my_rename.c: Removed compiler warnings plugin/daemon_example/daemon_example.c: Remove compiler warning sql/ha_ndbcluster.cc: Remove compiler warning sql/udf_example.c: Remove compiler warning storage/maria/lockman.c: Changed #warnings to QQ comment Removed compiler warnings storage/maria/ma_blockrec.c: Removed compiler warnings storage/maria/ma_check.c: After merge fixes storage/maria/ma_key.c: After merge fixes storage/maria/ma_packrec.c: After merge fixes storage/maria/ma_rkey.c: After merge fixes storage/maria/ma_sort.c: After merge fixes storage/maria/ma_sp_defs.h: Rename clashing function name storage/maria/ma_sp_key.c: Rename clashing function name storage/maria/ma_test_all.res: New test results storage/maria/ma_unique.c: Fixed compiler warning storage/maria/tablockman.c: #warning -> QQ storage/maria/tablockman.h: #warning -> QQ storage/maria/trnman.c: #warning -> QQ storage/maria/unittest/lockman2-t.c: Removed compiler warnings storage/maria/unittest/ma_control_file-t.c: Removed warning for 'maria_control' file not found storage/maria/unittest/trnman-t.c: Removed compiler warnings storage/ndb/src/mgmapi/mgmapi.cpp: Remove compiler warnings unittest/mysys/mf_pagecache_consist.c: Removed compiler warnings unittest/mysys/my_atomic-t.c: Removed compiler warnings --- mysql-test/r/events_logs_tests.result | 2 +- mysql-test/r/view.result | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/events_logs_tests.result b/mysql-test/r/events_logs_tests.result index 335ca848387..b067b2011e1 100644 --- a/mysql-test/r/events_logs_tests.result +++ b/mysql-test/r/events_logs_tests.result @@ -83,7 +83,7 @@ slo_val val 4 0 1 0 "Check slow log. Should see 1 row because 4 is over the threshold of 3 for GLOBAL, though under SESSION which is 10" -SELECT user_host, query_time, db, sql_text FROM mysql.slow_log; +SELECT user_host, query_time, db, sql_text FROM mysql.slow_log where sql_text <> "DROP EVENT long_event"; user_host query_time db sql_text USER_HOST SLEEPVAL events_test INSERT INTO slow_event_test SELECT @@long_query_time, SLEEP(2) DROP EVENT long_event2; diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 4bc122cc97b..eb090658560 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2684,10 +2684,12 @@ FROM t1 HAVING Age < 75; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75) +set timestamp=1136066400; SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; Age 42 38 +set timestamp=1136066400; SELECT * FROM v1; Age 42 @@ -3014,6 +3016,15 @@ i j 6 3 DROP VIEW v1, v2; DROP TABLE t1; +DROP VIEW IF EXISTS v1; +CREATE VIEW v1 AS SELECT 'The\ZEnd'; +SELECT * FROM v1; +TheEnd +ThezEnd +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _latin1'ThezEnd' AS `TheEnd` +DROP VIEW v1; End of 5.0 tests. DROP DATABASE IF EXISTS `d-1`; CREATE DATABASE `d-1`; -- cgit v1.2.1 From 0abffa05a60e3fccb31a81828fdc99986ce4b7c5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 14:38:05 +0300 Subject: Fixed that maria.test works BUILD/SETUP.sh: Update from 5.1 include/maria.h: Moved structs into size order mysql-test/include/varchar.inc: Fixed error numbers (as in 5.1) mysql-test/mysql-test-run.pl: Updated from 5.1 Create a dummy mysql.err file if using --valgrind --debug mysql-test/lib/init_db.sql: Update from 5.1 mysql-test/lib/mtr_cases.pl: Update from 5.1 mysql-test/lib/mtr_diff.pl: Update from 5.1 mysql-test/lib/mtr_gcov.pl: Update from 5.1 mysql-test/lib/mtr_gprof.pl: Update from 5.1 mysql-test/lib/mtr_im.pl: Update from 5.1 mysql-test/lib/mtr_io.pl: Update from 5.1 mysql-test/lib/mtr_match.pl: Update from 5.1 mysql-test/lib/mtr_misc.pl: Update from 5.1 mysql-test/lib/mtr_process.pl: Update from 5.1 mysql-test/lib/mtr_report.pl: Update from 5.1 mysql-test/lib/mtr_stress.pl: Update from 5.1 mysql-test/lib/mtr_timer.pl: Update from 5.1 mysql-test/lib/mtr_unique.pl: Update from 5.1 mysql-test/r/maria.result: Updated results. The reason for the new results are: - Maria doesn't support REPAIR TABLE or OPTIMIZE table yet - Some statistics information is different, so MySQL prefers index reads instead of table scans - No support for concurrent writes in the default BLOCK_RECORD mode - No support for different KEY_BLOCK sizes (will not be fixed) mysql-test/t/disabled.def: Enable maria test mysql-test/t/maria.test: No support for concurrent writes in the default BLOCK_RECORD mode No support for different KEY_BLOCK sizes (will not be fixed) mysql-test/t/myisam.test: Fix to be able to run with --extern mysql-test/t/query_cache_notembedded.test: Fix to be able to run with --extern sql/filesort.cc: Fixed compiler warning sql/handler.cc: Use new error message (as in 5.1) sql/share/errmsg.txt: Update error messages (as in 5.1) sql/slave.cc: Fixed compiler warning sql/slave.h: Fixed compiler warning sql/sql_table.cc: Fixed compiler warning storage/maria/ha_maria.cc: Added better scan_time() Disble REPAIR on BLOCK_RECORD tables Added rnd_end() to free memory after scan Don't pack numerical primary keys Don't allow fast alter table if row type changes storage/maria/ha_maria.h: Added get_row_type(), scan_time() and rnd_end() BitKeeper/etc/ignore: Added storage/maria/unittest/mf_pagecache_consist_1k-t-big storage/maria/unittest/mf_pagecache_consist_1kHC-t-big storage/maria/unittest/mf_pagecache_consist_1kRD-t-big storage/maria/unittest/mf_pagecache_consist_1kWR-t-big storage/maria/unittest/mf_pagecache_consist_64k-t-big storage/maria/unittest/mf_pagecache_consist_64kHC-t-big storage/maria/unittest/mf_pagecache_consist_64kRD-t-big storage/maria/unittest/mf_pagecache_consist_64kWR-t-big storage/maria/unittest/mf_pagecache_single_64k-t-big to the ignore list storage/maria/ma_bitmap.c: Fixed some bugs found with maria.test Added more DBUG_PRINT and some more comments storage/maria/ma_blockrec.c: Fixed some bugs found with maria.test Simplified code More comments storage/maria/ma_blockrec.h: Added DBUG_ASSERT() storage/maria/ma_check.c: Don't check record data links with block_records Update state.changed properly storage/maria/ma_checksum.c: Fixed bug in checksum handling (only first field was calculated) storage/maria/ma_create.c: Set rec->fill_length properly Added extra testing needed for BLOCK_RECORD Fixed bug in unlock of not locked mutex Fixed memory leak storage/maria/ma_delete.c: Update state.changed storage/maria/ma_delete_all.c: Update state.changed storage/maria/ma_extra.c: Disable caching of rows if we are using BLOCK_RECORD (scan_init will enable caching of rows when using BLOCK_RECORD) storage/maria/ma_info.c: Added data_file_type storage/maria/ma_search.c: Fixed bug with signed bytes storage/maria/ma_test2.c: Fixed wrong pointer handling (caused crash on 64 bit machines) storage/maria/ma_write.c: Added DBUG_ statements storage/maria/maria_def.h: Added STATE_NOT_OPTIMIZED_ROWS storage/myisam/mi_create.c: Fixed bug with unlocking of not locked mutex (in case of error condition) storage/myisam/mi_test2.c: Fixed wrong pointer handling (caused crash on 64 bit machines) --- mysql-test/r/maria.result | 79 ++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 42 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 7812f04336a..4a708cde307 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -348,11 +348,11 @@ t1 1 c_2 2 a A 5 NULL NULL BTREE explain select * from t1,t2 where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t1 ref a a 4 test.t2.a 3 explain select * from t1,t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t1 ref a a 4 test.t2.a 3 explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 @@ -364,10 +364,10 @@ id select_type table type possible_keys key key_len ref rows Extra explain select * from t1,t2 force index(c) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t1 ref a a 4 test.t2.a 3 explain select * from t1 where a=0 or a=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t1 range a a 4 NULL 4 Using where explain select * from t1 force index (a) where a=0 or a=2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 4 NULL 4 Using where @@ -430,9 +430,6 @@ select * from t1 where a='807780' and b='477' and c='165'; a b c 807780 477 165 drop table t1; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)); INSERT t1 VALUES ("can \tcan"); INSERT t1 VALUES ("can can"); @@ -517,8 +514,8 @@ select c1 from t1 order by c1 limit 1; c1 a drop table t1; -create table t1 (a int not null, primary key(a)); -create table t2 (a int not null, b int not null, primary key(a,b)); +create table t1 (a int not null, primary key(a)) ROW_FORMAT=FIXED; +create table t2 (a int not null, b int not null, primary key(a,b)) ROW_FORMAT=FIXED; insert into t1 values (1),(2),(3),(4),(5),(6); insert into t2 values (1,1),(2,1); lock tables t1 read local, t2 read local; @@ -532,8 +529,8 @@ a a b 1 1 1 2 2 1 drop table t1,t2; -CREATE TABLE t1 (c1 varchar(250) NOT NULL); -CREATE TABLE t2 (c1 varchar(250) NOT NULL, PRIMARY KEY (c1)); +CREATE TABLE t1 (c1 varchar(250) NOT NULL) ROW_FORMAT=DYNAMIC; +CREATE TABLE t2 (c1 varchar(250) NOT NULL, PRIMARY KEY (c1)) ROW_FORMAT=DYNAMIC; INSERT INTO t1 VALUES ('test000001'), ('test000002'), ('test000003'); INSERT INTO t2 VALUES ('test000002'), ('test000003'), ('test000004'); LOCK TABLES t1 READ LOCAL, t2 READ LOCAL; @@ -590,7 +587,7 @@ t1 1 a 1 a A NULL NULL NULL YES BTREE disabled alter table t1 enable keys; show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 a 1 a A 1000 NULL NULL YES BTREE +t1 1 a 1 a A NULL NULL NULL YES BTREE disabled alter table t1 engine=heap; alter table t1 disable keys; Warnings: @@ -715,7 +712,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE delete from t1; analyze table t1; Table Op Msg_type Msg_text -test.t1 analyze status OK +test.t1 analyze status Table is already up to date show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a A 0 NULL NULL YES BTREE @@ -800,7 +797,7 @@ CREATE TABLE t1 ( PRIMARY KEY (`_id`), UNIQUE KEY `sequence_name_index` (`name`(50)), KEY (`length_`) -) ENGINE=maria DEFAULT CHARSET=latin1; +) DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''), (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''), @@ -825,19 +822,19 @@ _id DELETE FROM t1 WHERE _id < 8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Dynamic 2 # # # # 140 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK OPTIMIZE TABLE t1; Table Op Msg_type Msg_text -test.t1 optimize status OK +test.t1 optimize status Table is already up to date CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Dynamic 2 # # # # 0 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # SELECT _id FROM t1; _id 8 @@ -859,7 +856,7 @@ CREATE TABLE t1 ( PRIMARY KEY (`_id`), UNIQUE KEY `sequence_name_index` (`name`(50)), KEY (`length_`) -) ENGINE=maria DEFAULT CHARSET=latin1; +) DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''), (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''), @@ -884,7 +881,7 @@ _id DELETE FROM t1 WHERE _id < 8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Dynamic 2 # # # # 140 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK @@ -896,7 +893,7 @@ Table Op Msg_type Msg_text test.t1 check status OK SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Dynamic 2 # # # # 140 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # SELECT _id FROM t1; _id 8 @@ -1503,7 +1500,7 @@ create table t1 (v varchar(65535)); ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs set @save_concurrent_insert=@@concurrent_insert; set global concurrent_insert=1; -create table t1 (a int); +create table t1 (a int) ROW_FORMAT=FIXED; insert into t1 values (1),(2),(3),(4),(5); lock table t1 read local; insert into t1 values(6),(7); @@ -1530,7 +1527,7 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -create table t1 (a int, b varchar(30) default "hello"); +create table t1 (a int, b varchar(30) default "hello") ROW_FORMAT=DYNAMIC; insert into t1 (a) values (1),(2),(3),(4),(5); lock table t1 read local; insert into t1 (a) values(6),(7); @@ -1570,7 +1567,7 @@ alter table t1 disable keys; alter table t1 enable keys; show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 a 1 a A 8 NULL NULL YES BTREE +t1 1 a 1 a A 8 NULL NULL YES BTREE disabled drop table t1; show create table t1; show create table t1; @@ -1592,13 +1589,12 @@ create table t3 (c1 int) pack_keys=default; create table t4 (c1 int) pack_keys=2; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1 drop table t1, t2, t3; -End of 5.0 tests create table t1 (a int not null, key `a` (a) key_block_size=1024); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=1024 + KEY `a` (`a`) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int not null, key `a` (a) key_block_size=2048); @@ -1606,7 +1602,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=2048 + KEY `a` (`a`) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(2048), key `a` (a)); @@ -1626,7 +1622,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=4096 + KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; @@ -1637,8 +1633,8 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, - KEY `a` (`a`), - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096 + KEY `a` (`a`) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024 alter table t1 key_block_size=2048; show create table t1; @@ -1646,8 +1642,8 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=1024, - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096 + KEY `a` (`a`) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2048 alter table t1 add c int, add key (c); show create table t1; @@ -1656,9 +1652,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, `c` int(11) DEFAULT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=1024, - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096, - KEY `c` (`c`) + KEY `a` (`a`) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192, + KEY `c` (`c`) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2048 alter table t1 key_block_size=0; alter table t1 add d int, add key (d); @@ -1669,9 +1665,9 @@ t1 CREATE TABLE `t1` ( `b` varchar(2048) DEFAULT NULL, `c` int(11) DEFAULT NULL, `d` int(11) DEFAULT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=1024, - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=4096, - KEY `c` (`c`) KEY_BLOCK_SIZE=2048, + KEY `a` (`a`) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192, + KEY `c` (`c`) KEY_BLOCK_SIZE=8192, KEY `d` (`d`) ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; @@ -1695,7 +1691,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=1024, + KEY `a` (`a`), KEY `b` (`b`(1000)) ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=8192 drop table t1; @@ -1705,7 +1701,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` int(11) DEFAULT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=1024, + KEY `a` (`a`) KEY_BLOCK_SIZE=8192, KEY `b` (`b`) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16384 drop table t1; @@ -1714,7 +1710,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=1024 + KEY `a` (`a`) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); @@ -1732,7 +1728,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - KEY `a` (`a`) KEY_BLOCK_SIZE=2048 + KEY `a` (`a`) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int not null, key key_block_size=1024 (a)); @@ -1784,5 +1780,4 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; -End of 5.1 tests set global storage_engine=MyISAM; -- cgit v1.2.1 From 1a392bf63e95383be9a5e5276dfb1d85cd4cb6a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 04:58:05 +0300 Subject: After merge fixes Fixed test for row based replication mysql-test/mysql-test-run.pl: After merge fix mysql-test/r/maria.result: Fixed test for row based replication mysql-test/t/maria.test: Fixed test for row based replication storage/maria/ha_maria.cc: After merge fix storage/maria/ma_blockrec.c: Better to clear whole page, as 'length' may be bigger than what we need. storage/maria/ma_loghandler.c: Fix compiler warning Removed access to not initialized memory storage/maria/ma_open.c: Remove wrong (not needed) test --- mysql-test/r/maria.result | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 4a708cde307..d52f243e186 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -712,7 +712,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE delete from t1; analyze table t1; Table Op Msg_type Msg_text -test.t1 analyze status Table is already up to date +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 t1 1 a 1 a A 0 NULL NULL YES BTREE @@ -1780,4 +1780,3 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; -set global storage_engine=MyISAM; -- cgit v1.2.1 From eb7d9500a9909ce594c4d169e70fb5cecbb33e2b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Apr 2007 13:18:56 +0300 Subject: Fixes after review of guilhem of block record patch Short overview: Changed a lot of variable, functions, defines and struct elements to use more readable names More comments (mostly function and structure slot comments) Other things: Changed 'USE_WHOLE_KEY' to a big number to not interfer with long keys Ensure that tail block are at least of size 'MIN_TAIL_SIZE' Allow longer keys and key parts than before (don't limit Maria interface by HA_MAX_KEY_LENGTH) Use ma_chsize() to write initial bitmap page Added checking if using file with wrong block_size Added issing types to type_names[] (for maria_chk -d) Added maria_max_key_length() include/maria.h: Changed maria_portable_size_char_ptr to portable_size_char_ptr and moved it to my_handler.h Removed not used variable maria_delay_rec_write. More comments include/my_handler.h: Added portable_sizeof_char_ptr include/myisam.h: Changed mi_portable_size_char_ptr to portable_size_char_ptr and moved it to my_handler.h mysql-test/r/maria.result: Fix results when we now have a longer key length mysql-test/t/maria.test: More tests mysys/my_pread.c: Code cleanup sql/net_serv.cc: Changed warning to note (as in main 5.1 tree) to avoid not critical failing tests sql/sql_select.cc: Use portable_sizeof_char_ptr storage/maria/ha_maria.cc: Added max_supported_key_length(), as this is not a trival function anymore storage/maria/ha_maria.h: Moved max_supported_key_length(), as this is not a trival function anymore storage/maria/ma_bitmap.c: Lots of new comments Added maria_bitmap_marker[] to mark 2 last bytes of each bitmap (for corruption detection) Trivial code changes (based on review comments) storage/maria/ma_blockrec.c: More code comments Renamed _block_row() functions to _block_record() Trivial code changes, based on review comments Moved Code from maria_close() to _ma_end_block_record() Some function renames to make things more understandable DIR_ENTRY_OFFSET -> DIR_COUNT_OFFSET keybuff_used -> keyread_buff_used ma_recordpos_to_offset -> ma_recordpos_to_dir_entry Changed some 'rec' named variables to 'column'. Ensure that tail block are at least of size 'MIN_TAIL_SIZE' storage/maria/ma_blockrec.h: More comments DIRCOUNT_SIZE -> DIR_COUNT_SIZE Added define for maira_bitmap_marker[] ma_recordpos_to_offset -> ma_recordpos_to_dir_entry xxx_block_row() -> xxx_block_record() Made _ma_read_bitmap_page() static storage/maria/ma_check.c: More comments ma_recordpos_to_offset() -> ma_recordpos_to_dir_entry() DIR_ENTRY_OFFSET -> DIR_COUNT_OFFSET rec variables -> column variables recdef -> columndef storage/maria/ma_checksum.c: rec -> column Avoid an 'if' in _ma_checksum() for the common case storage/maria/ma_close.c: Moved resetting of info->dfile to ma_end_once_block_record() storage/maria/ma_create.c: Some variable changes to make things more readable: recinfo -> columndef rec -> column rec_end -> end_column record_type -> datafile_type ma_recinfo_write() -> ma_columndef_write() Fixed wrong setting of 'data_file_length'; Now max_rows should be calculated correctly New check if too long key. Use ma_chsize() to write bitmap page. storage/maria/ma_delete.c: keybuff_used -> keyread_buff_used storage/maria/ma_dynrec.c: rec -> columndef rec_length -> column_length maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr Better comment for _ma_read_rnd_dynamic_record() storage/maria/ma_ft_eval.c: maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/maria/ma_ft_test1.c: maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/maria/ma_ft_update.c: keybuff_used -> keyread_buff_used storage/maria/ma_info.c: More comments storage/maria/ma_open.c: Added checking if using file with wrong block_size New checking of max_key_length rec -> columndef _ma_recinfo_write -> _ma_columndef_write Don't change block_size (as this is checked in ma_create()) More comments storage/maria/ma_packrec.c: Trivial code changes rec -> columndef maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/maria/ma_page.c: keybuff_used -> keyread_buff_used storage/maria/ma_rkey.c: Removed not needded empty line storage/maria/ma_rrnd.c: Removed not used variable storage/maria/ma_rt_index.c: keybuff_used -> keyread_buff_used storage/maria/ma_search.c: keybuff_used -> keyread_buff_used Trivial code changes storage/maria/ma_sp_test.c: maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/maria/ma_test1.c: maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/maria/ma_test2.c: maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/maria/ma_update.c: Updated comment storage/maria/ma_write.c: keybuff_used -> keyread_buff_used storage/maria/maria_chk.c: Added missing types to type_names[] Removed not used variable rec -> columndef Replaced some numbers with define flags storage/maria/maria_def.h: More comments Added 'MARIA_INDEX_MIN_OVERHEAD_SIZE' rec -> columndef keybuff_used -> keyread_buff_used _ma_recinfo_write -> _ma_culumndef_write _ma_recinfo_read -> _ma_columndef_read Changed 'USE_WHOLE_KEY' to a big number to not interfer with long keys Added maria_max_key_length() storage/maria/maria_pack.c: Updated message strings rec -> columndef maria_portable_sizeof_char_ptr -> portable_sizeof_char_ptr More comments storage/myisam/ft_eval.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/ft_test1.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_checksum.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_create.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_dynrec.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_open.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_packrec.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_rkey.c: Unlock mutex also in case of error storage/myisam/mi_test1.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_test2.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/myisampack.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/sp_test.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr support-files/magic: Fixed typo --- mysql-test/r/maria.result | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index d52f243e186..515cb73eb2a 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -325,10 +325,14 @@ Table Op Msg_type Msg_text test.t1 check status OK drop table t1; CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e)); -ERROR 42000: Specified key was too long; max key length is 1000 bytes +ERROR 42000: Specified key was too long; max key length is 1112 bytes +CREATE TABLE t1 (a varchar(32000), unique key(a)); +ERROR 42000: Specified key was too long; max key length is 1112 bytes +CREATE TABLE t1 (a varchar(1), b varchar(1), key (a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b)); +ERROR 42000: Too many key parts specified; max 16 parts allowed CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255)); ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e); -ERROR 42000: Specified key was too long; max key length is 1000 bytes +ERROR 42000: Specified key was too long; max key length is 1112 bytes DROP TABLE t1; CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)); INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4); @@ -1476,7 +1480,7 @@ a b drop table t1; create table t1 (v varchar(65530), key(v)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Warning 1071 Specified key was too long; max key length is 1112 bytes drop table if exists t1; create table t1 (v varchar(65536)); Warnings: @@ -1607,34 +1611,34 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Warning 1071 Specified key was too long; max key length is 1112 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(1000)) + KEY `a` (`a`(1112)) ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1024); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Warning 1071 Specified key was too long; max key length is 1112 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192 + KEY `a` (`a`(1112)) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Warning 1071 Specified key was too long; max key length is 1112 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192 + KEY `b` (`b`(1112)) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024 alter table t1 key_block_size=2048; show create table t1; @@ -1643,7 +1647,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192 + KEY `b` (`b`(1112)) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2048 alter table t1 add c int, add key (c); show create table t1; @@ -1653,7 +1657,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(2048) DEFAULT NULL, `c` int(11) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1112)) KEY_BLOCK_SIZE=8192, KEY `c` (`c`) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2048 alter table t1 key_block_size=0; @@ -1666,33 +1670,33 @@ t1 CREATE TABLE `t1` ( `c` int(11) DEFAULT NULL, `d` int(11) DEFAULT NULL, KEY `a` (`a`) KEY_BLOCK_SIZE=8192, - KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1112)) KEY_BLOCK_SIZE=8192, KEY `c` (`c`) KEY_BLOCK_SIZE=8192, KEY `d` (`d`) ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Warning 1071 Specified key was too long; max key length is 1112 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, KEY `a` (`a`), - KEY `b` (`b`(1000)) + KEY `b` (`b`(1112)) ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=8192 drop table t1; create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Warning 1071 Specified key was too long; max key length is 1112 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` varchar(2048) DEFAULT NULL, KEY `a` (`a`), - KEY `b` (`b`(1000)) + KEY `b` (`b`(1112)) ) ENGINE=MARIA DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=8192 drop table t1; create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384; @@ -1715,12 +1719,12 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Warning 1071 Specified key was too long; max key length is 1112 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2048) DEFAULT NULL, - KEY `a` (`a`(1000)) KEY_BLOCK_SIZE=8192 + KEY `a` (`a`(1112)) KEY_BLOCK_SIZE=8192 ) ENGINE=MARIA DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int not null, key `a` (a) key_block_size=1025); -- cgit v1.2.1 From 8f39541e7d8ba812d1198af5d4179ba44d6693fa Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 May 2007 20:13:56 +0300 Subject: This patch is a collection of patches from from Sanja, Sergei and Monty. Added logging and pinning of pages to block format. Integration of transaction manager, log handler. Better page cache intergration Split trnman.h into two files, so that we don't have to include my_atomic.h into C++ programs. Renaming of structures, more comments, more debugging etc. Fixed problem with small head block + long varchar. Added extra argument to delete_record() and update_record() (needed for UNDO logging) Small changes to interface of pagecache and log handler. Change initialization of log_record_type_descriptors to not be depending on enum order. Use array of LEX_STRING's to send data to log handler Added 'dummy' transaction option to MARIA_INFO so that we can always assume 'trn' exists. include/lf.h: Interface fixes Rename of structures (Patch from Sergei via Sanja) include/my_atomic.h: More comments include/my_global.h: Added MY_ERRPTR include/pagecache.h: Added undo LSN when unlocking pages mysql-test/r/maria.result: Updated results mysql-test/t/maria.test: Added autocommit around lock tables (Patch from Sanja) mysys/lf_alloc-pin.c: Post-review fixes, simple optimizations More comments Struct slot renames Check amount of memory on stack (Patch from Sergei) mysys/lf_dynarray.c: More comments mysys/lf_hash.c: More comments After review fixes (Patch from Sergei) storage/maria/ha_maria.cc: Split trnman.h into two files, so that we don't have to include my_atomic.h into the .cc program. (Temporary fix to avoid bug in gcc) Move out all deferencing of the transaction structure. Transaction manager integrated (Patch from Sergei) storage/maria/ha_maria.h: Added prototype for start_stmt() storage/maria/lockman.c: Function call rename storage/maria/ma_bitmap.c: Mark deleted pages free from page cache storage/maria/ma_blockrec.c: Offset -> rownr More debugging Fixed problem with small head block + long varchar Added logging of changed pages Added logging of undo (Including only loggging of changed fields in case of update) Added pinning/unpinning of all changed pages More comments Added free_full_pages() as the same code was used in several places. fill_rows_parts() renamed as fill_insert_undo_parts() offset -> rownr Added some optimization of not transactional tables _ma_update_block_record() has new parameter, as we need original row to do efficent undo for update storage/maria/ma_blockrec.h: Added ROW_EXTENTS_ON_STACK Changed prototype for update and delete of row storage/maria/ma_check.c: Added original row to delete_record() call storage/maria/ma_control_file.h: Added ifdefs for C++ storage/maria/ma_delete.c: Added original row to delete_record() call (Needed for efficent undo logging) storage/maria/ma_dynrec.c: Added extra argument to delete_record() and update_record() Removed not used variable storage/maria/ma_init.c: Initialize log handler storage/maria/ma_loghandler.c: Removed not used variable Change initialization of log_record_type_descriptors to not be depending on enum order Use array of LEX_STRING's to send data to log handler storage/maria/ma_loghandler.h: New defines Use array of LEX_STRING's to send data to log handler storage/maria/ma_open.c: Added 'dummy' transaction option to MARIA_INFO so that we can always assume 'trn' exists. Store in MARIA_SHARE->page_type if pages will have up to date LSN's storage/maria/ma_pagecache.c: Don't decrease number of readers when using pagecache_write()/pagecache_read() In pagecache_write() decrement request count if page was left pinned Added pagecache_delete_pages() Removed some casts Make trace output consistent with rest of code Simplify calling of DBUG_ASSERT(0) Only update LSN if the LSN is bigger than what's already on the page Added LSN parameter pagecache_unpin_page(), pagecache_unpin(), and pagecache_unlock() (Part of patch from Sanja) storage/maria/ma_static.c: Added 'dummy' transaction option to MARIA_INFO so that we can always assume 'trn' exists. Added default page cache storage/maria/ma_statrec.c: Added extra argument to delete_record() and update_record() storage/maria/ma_test1.c: Added option -T for transactions storage/maria/ma_test2.c: Added option -T for transactions storage/maria/ma_test_all.sh: Test with transactions storage/maria/ma_update.c: Changed prototype for update of row storage/maria/maria_def.h: Changed prototype for update & delete of row as block records need to access the old row Store in MARIA_SHARE->page_type if pages will have up to date LSN's Added MARIA_MAX_TREE_LEVELS to allow us to calculate the number of possible pinned pages we may need. Removed not used 'empty_bits_buffer' Added pointer to transaction object Added array for pinned pages Added log_row_parts array for logging of field data. Added MARIA_PINNED_PAGE to store pinned pages storage/maria/trnman.c: Added accessor functions to transaction object Added missing DBUG_RETURN() More debugging More comments Changed // comment of code to #ifdef NOT_USED Transaction manager integrated. Post review fixes Part of patch originally from Sergei storage/maria/trnman.h: Split trnman.h into two files, so that we don't have to include my_atomic.h into the .cc program. (Temporary fix to avoid bug in gcc) storage/maria/unittest/ma_pagecache_single.c: Added missing argument Added SKIP_BIG_TESTS (Patch from Sanja) storage/maria/unittest/ma_test_loghandler-t.c: Test logging with new LEX_STRING parameter (Patch from Sanja) storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Test logging with new LEX_STRING parameter (Patch from Sanja) storage/maria/unittest/ma_test_loghandler_multithread-t.c: Test logging with new LEX_STRING parameter (Patch from Sanja) storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Test logging with new LEX_STRING parameter (Patch from Sanja) storage/maria/unittest/trnman-t.c: Stack overflow detection (Patch from Sergei) unittest/unit.pl: Command-line options --big and --verbose (Patch from Sergei) unittest/mytap/tap.c: Detect --big (Patch from Sergei) unittest/mytap/tap.h: Skip_big_tests and SKIP_BIG_TESTS (Patch from Sergei) storage/maria/trnman_public.h: New BitKeeper file ``storage/maria/trnman_public.h'' --- mysql-test/r/maria.result | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 515cb73eb2a..93d8863f40b 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -78,10 +78,15 @@ explain select a,b,c from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 drop table t1; +set autocommit=0; +begin; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1), (2), (3); LOCK TABLES t1 WRITE; INSERT INTO t1 VALUES (1), (2), (3); +commit; +set autocommit=1; +UNLOCK TABLES; OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK @@ -522,12 +527,15 @@ create table t1 (a int not null, primary key(a)) ROW_FORMAT=FIXED; create table t2 (a int not null, b int not null, primary key(a,b)) ROW_FORMAT=FIXED; insert into t1 values (1),(2),(3),(4),(5),(6); insert into t2 values (1,1),(2,1); +set autocommit=0; +begin; lock tables t1 read local, t2 read local; select straight_join * from t1,t2 force index (primary) where t1.a=t2.a; a a b 1 1 1 2 2 1 insert into t2 values(2,0); +commit; select straight_join * from t1,t2 force index (primary) where t1.a=t2.a; a a b 1 1 1 -- cgit v1.2.1 From 75e52671d771a51bfea53082139cd88c2fba1480 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Jun 2007 16:06:08 +0200 Subject: maria cannot rollback yet --- mysql-test/r/maria.result | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 93d8863f40b..3ec9af0fffa 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -2,6 +2,25 @@ set global storage_engine=maria; set session storage_engine=maria; drop table if exists t1,t2; SET SQL_WARNINGS=1; +RESET MASTER; +set binlog_format=statement; +CREATE TABLE t1 (a int primary key); +insert t1 values (1),(2),(3); +insert t1 values (4),(2),(5); +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +select * from t1; +a +1 +2 +3 +4 +SHOW BINLOG EVENTS FROM 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 102 Query 1 200 use `test`; CREATE TABLE t1 (a int primary key) +master-bin.000001 200 Query 1 291 use `test`; insert t1 values (1),(2),(3) +master-bin.000001 291 Query 1 382 use `test`; insert t1 values (4),(2),(5) +drop table t1; +set binlog_format=default; CREATE TABLE t1 ( STRING_DATA char(255) default NULL, KEY string_data (STRING_DATA) -- cgit v1.2.1 From fd9bd5802932b08da7484c54445ae14ee4e25385 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Jun 2007 16:01:04 +0200 Subject: Monty's fix for Maria's table scan sometimes not seeing all rows; without the fix, only 896 rows were inserted into t2 in maria-big.test. storage/maria/ma_blockrec.c: due to wrong test we were skipping some rows when scanning mysql-test/r/maria-big.result: result for new test mysql-test/t/maria-big.test: test for a bug where we missed some rows when scanning --- mysql-test/r/maria-big.result | 61 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 mysql-test/r/maria-big.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-big.result b/mysql-test/r/maria-big.result new file mode 100644 index 00000000000..ca18d992187 --- /dev/null +++ b/mysql-test/r/maria-big.result @@ -0,0 +1,61 @@ +set storage_engine=maria; +affected rows: 0 +drop table if exists t1, t2; +affected rows: 0 +create table t1(a char(3)); +affected rows: 0 +insert into t1 values("abc"); +affected rows: 1 +insert into t1 select "def" from t1; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +insert into t1 select "ghi" from t1; +affected rows: 2 +info: Records: 2 Duplicates: 0 Warnings: 0 +insert into t1 select "jkl" from t1; +affected rows: 4 +info: Records: 4 Duplicates: 0 Warnings: 0 +insert into t1 select "mno" from t1; +affected rows: 8 +info: Records: 8 Duplicates: 0 Warnings: 0 +insert into t1 select "pqr" from t1; +affected rows: 16 +info: Records: 16 Duplicates: 0 Warnings: 0 +insert into t1 select "stu" from t1; +affected rows: 32 +info: Records: 32 Duplicates: 0 Warnings: 0 +insert into t1 select "vwx" from t1; +affected rows: 64 +info: Records: 64 Duplicates: 0 Warnings: 0 +insert into t1 select "yza" from t1; +affected rows: 128 +info: Records: 128 Duplicates: 0 Warnings: 0 +insert into t1 select "ceg" from t1; +affected rows: 256 +info: Records: 256 Duplicates: 0 Warnings: 0 +insert into t1 select "ikm" from t1; +affected rows: 512 +info: Records: 512 Duplicates: 0 Warnings: 0 +insert into t1 select "oqs" from t1; +affected rows: 1024 +info: Records: 1024 Duplicates: 0 Warnings: 0 +select count(*) from t1; +count(*) +2048 +affected rows: 1 +insert into t1 select "uwy" from t1; +affected rows: 2048 +info: Records: 2048 Duplicates: 0 Warnings: 0 +create table t2 select * from t1; +affected rows: 4096 +info: Records: 4096 Duplicates: 0 Warnings: 0 +select count(*) from t1; +count(*) +4096 +affected rows: 1 +select count(*) from t2; +count(*) +4096 +affected rows: 1 +drop table t1, t2; +affected rows: 0 -- cgit v1.2.1 From d6f2fda680ec2be373ff5694e91cfccf792f4eb0 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Jul 2007 16:20:57 +0300 Subject: Fixed REPAIR/CHECK/ANALYZE TABLE for tables with new BLOCK-ROW format. Fixed maria_chk to repair BLOCK-ROW tables. Added CREATE options ROW_FORMAT=PAGE & TRANSACTIONAL= 0|1 More DBUG information in a lot of functions Some minor code cleanups Enable handler errors earlier for better clear text error messages at handler startup / standalone usage. Don't print NULL strings in my_create_with_symlink(); Fixes core dump when used with --debug include/maria.h: Added extra variables needed for REPAIR with BLOCK records include/my_base.h: Added argument for opening copy of maria table without a shared object include/my_handler.h: Prototypes for my_handler_error_register() & my_handler_error_unregister() include/pagecache.h: Added PAGECACHE_READ_UNKNOWN_PAGE mysql-test/include/ps_conv.inc: Enforce creation of table as MyISAM (to allow one to use --default-storage-engine) mysql-test/r/maria.result: Moved some things to maria-connect.test Updared results as REPAIR now works Added tests for creation option TRANSACTIONAL mysql-test/r/ps_2myisam.result: Enforce creation of table as MyISAM (to allow one to use --default-storage-engine) mysql-test/r/ps_3innodb.result: Enforce creation of table as MyISAM (to allow one to use --default-storage-engine) mysql-test/r/ps_4heap.result: Enforce creation of table as MyISAM (to allow one to use --default-storage-engine) mysql-test/r/ps_5merge.result: Enforce creation of table as MyISAM (to allow one to use --default-storage-engine) mysql-test/r/ps_7ndb.result: Enforce creation of table as MyISAM (to allow one to use --default-storage-engine) mysql-test/r/ps_maria.result: Enforce creation of table as MyISAM (to allow one to use --default-storage-engine) mysql-test/t/maria.test: Moved some things to maria-connect.test Updared results as REPAIR now works Added tests for creation option TRANSACTIONAL mysys/mf_iocache.c: More debugging mysys/mf_tempfile.c: Added missing close() mysys/my_error.c: init_glob_errs() is now done in my_init() mysys/my_handler.c: Added functions to initialize handler error messages mysys/my_init.c: Moevd init_glob_errs() here. mysys/my_open.c: More comments More debugging Code cleanup (join multiple code paths) and indentation fixes. No change in logic. mysys/my_symlink2.c: Don't print NULL strings sql/handler.cc: Added printing of PAGE row type Moved out initializing of handler errors to allow handler to give better error messages at startup sql/handler.h: ROW_TYPE_PAGES -> ROW_TYPE_PAGE sql/lex.h: Added 'PAGE' and 'TRANSACTIONAL' sql/mysqld.cc: Initialize handler error messages early to get better error messages from handler startup sql/sql_show.cc: ROW_TYPE_PAGES -> ROW_TYPE_PAGE sql/sql_table.cc: Removed not needed initializer sql/sql_yacc.yy: Added CREATE options ROW_FORMAT=PAGE and TRANSACTIONAL=[0|1] sql/table.cc: Store transactional flag in .frm More comments sql-bench/example: Better example sql/table.h: Added transactional table option storage/maria/ha_maria.cc: More debug information Enable REPAIR Detect usage of TRANSACTIONAL table option storage/maria/ma_bitmap.c: More comments (from Guilhem) storage/maria/ma_blockrec.c: SANITY_CHECK -> SANITY_CHECKS (fixed typo) Write out pages on delete even if there is no rows. (Fixed problem with REPAIR) Removed some ASSERTS to runtime checks (for better REPAIR) Fixed bug when scanning rows More DBUG information storage/maria/ma_check.c: Partial rewrite to allow REPAIR of BLOCK/PAGE format. Repair of BLOCK format rows is for now only done with 'maria_repair()' (= repair through key cache) The new logic to repair rows with BLOCK format is: - Create new, unrelated MARIA_HA of the table - Create new datafile and associate it with new handler - Reset all statistic information in new handler - Copy all data to new handler with normal write operations - Move state of new handler to old handler - Close new handler - Close data file in old handler - Rename old data file to new data file. - Reopen data file in old handler storage/maria/ma_close.c: REmoved not needed block storage/maria/ma_create.c: Swap arguments to _ma_initialize_data_file() storage/maria/ma_delete_all.c: Split maria_delete_all_rows() to two functions to allow REPAIR to easily reset all status information. storage/maria/ma_dynrec.c: Added checksum argument to _ma_rec_check (multi-thread fix) storage/maria/ma_info.c: Indentation fix storage/maria/ma_init.c: Register error message to get better error message on init and when using as standalone module. storage/maria/ma_loghandler.c: Fixed typo that disabled some error detection by valgrind storage/maria/ma_open.c: Added 'calc_check_checksum()' Don't log things during repair Added option HA_OPEN_COPY to allow one to open a Maria table with an independent share (required by REPAIR) storage/maria/ma_pagecache.c: Fixed some compiler warnings Added support for PAGECACHE_READ_UNKNOWN_PAGE (used for scanning file without knowing page types) storage/maria/ma_test_all.sh: More test of REPAIR storage/maria/ma_update.c: Optimized checksum code storage/maria/maria_chk.c: Use DBUG_SET_INITIAL() to get DBUG to work with --parallel-repair Ensure we always use maria_repair() for BLOCK format (for now) More DBUG information storage/maria/maria_def.h: For now, always run with more checkings (SANITY_CHECKS) Added share->calc_check_checksum to be used with REPAIR / CHECK table. Swaped arguments to _ma_initialize_data_file() storage/myisam/ft_stopwords.c: Added DBUG information mysql-test/r/maria-connect.result: New BitKeeper file ``mysql-test/r/maria-connect.result'' mysql-test/t/maria-connect.test: New BitKeeper file ``mysql-test/t/maria-connect.test'' --- mysql-test/r/maria-connect.result | 23 ++++++++++++ mysql-test/r/maria.result | 73 +++++++++++++++++++++++++-------------- mysql-test/r/ps_2myisam.result | 2 +- mysql-test/r/ps_3innodb.result | 2 +- mysql-test/r/ps_4heap.result | 2 +- mysql-test/r/ps_5merge.result | 4 +-- mysql-test/r/ps_7ndb.result | 2 +- mysql-test/r/ps_maria.result | 2 +- 8 files changed, 77 insertions(+), 33 deletions(-) create mode 100644 mysql-test/r/maria-connect.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-connect.result b/mysql-test/r/maria-connect.result new file mode 100644 index 00000000000..e232f564d10 --- /dev/null +++ b/mysql-test/r/maria-connect.result @@ -0,0 +1,23 @@ +set global storage_engine=maria; +set session storage_engine=maria; +drop table if exists t1; +SET SQL_WARNINGS=1; +RESET MASTER; +set binlog_format=statement; +CREATE TABLE t1 (a int primary key); +insert t1 values (1),(2),(3); +insert t1 values (4),(2),(5); +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +select * from t1; +a +1 +2 +3 +4 +SHOW BINLOG EVENTS FROM 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 102 Query 1 200 use `test`; CREATE TABLE t1 (a int primary key) +master-bin.000001 200 Query 1 291 use `test`; insert t1 values (1),(2),(3) +master-bin.000001 291 Query 1 382 use `test`; insert t1 values (4),(2),(5) +drop table t1; +set binlog_format=default; diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 3ec9af0fffa..a1c49fdfe4f 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -2,25 +2,6 @@ set global storage_engine=maria; set session storage_engine=maria; drop table if exists t1,t2; SET SQL_WARNINGS=1; -RESET MASTER; -set binlog_format=statement; -CREATE TABLE t1 (a int primary key); -insert t1 values (1),(2),(3); -insert t1 values (4),(2),(5); -ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -select * from t1; -a -1 -2 -3 -4 -SHOW BINLOG EVENTS FROM 102; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 102 Query 1 200 use `test`; CREATE TABLE t1 (a int primary key) -master-bin.000001 200 Query 1 291 use `test`; insert t1 values (1),(2),(3) -master-bin.000001 291 Query 1 382 use `test`; insert t1 values (4),(2),(5) -drop table t1; -set binlog_format=default; CREATE TABLE t1 ( STRING_DATA char(255) default NULL, KEY string_data (STRING_DATA) @@ -618,7 +599,7 @@ t1 1 a 1 a A NULL NULL NULL YES BTREE disabled alter table t1 enable keys; show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 a 1 a A NULL NULL NULL YES BTREE disabled +t1 1 a 1 a A NULL NULL NULL YES BTREE alter table t1 engine=heap; alter table t1 disable keys; Warnings: @@ -853,19 +834,19 @@ _id DELETE FROM t1 WHERE _id < 8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Paged 2 # # # # 0 # # # # # # +t1 MARIA 10 Page 2 # # # # 0 # # # # # # CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK OPTIMIZE TABLE t1; Table Op Msg_type Msg_text -test.t1 optimize status Table is already up to date +test.t1 optimize status OK CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Paged 2 # # # # 0 # # # # # # +t1 MARIA 10 Page 2 # # # # 0 # # # # # # SELECT _id FROM t1; _id 8 @@ -912,7 +893,7 @@ _id DELETE FROM t1 WHERE _id < 8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Paged 2 # # # # 0 # # # # # # +t1 MARIA 10 Page 2 # # # # 0 # # # # # # CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK @@ -924,7 +905,7 @@ Table Op Msg_type Msg_text test.t1 check status OK SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Paged 2 # # # # 0 # # # # # # +t1 MARIA 10 Page 2 # # # # 0 # # # # # # SELECT _id FROM t1; _id 8 @@ -1598,7 +1579,7 @@ alter table t1 disable keys; alter table t1 enable keys; show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 a 1 a A 8 NULL NULL YES BTREE disabled +t1 1 a 1 a A 8 NULL NULL YES BTREE drop table t1; show create table t1; show create table t1; @@ -1811,3 +1792,43 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +create table t1 (a int) transactional=0; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 TRANSACTIONAL=0 +drop table t1; +create table t1 (a int) row_format=dynamic transactional=0; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0 +drop table t1; +create table t1 (a int) row_format=dynamic transactional=1; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC TRANSACTIONAL=1 +alter table t1 row_format=PAGE; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=1 +alter table t1 transactional=0; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=0 +drop table t1; +create table t1 (a int) row_format=PAGE; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE +drop table t1; diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index 2bfd6d31ac9..9330ac2853e 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1756,7 +1756,7 @@ set @arg14= 'abc'; set @arg14= NULL ; set @arg15= CAST('abc' as binary) ; set @arg15= NULL ; -create table t5 as select +create table t5 engine = MyISAM as select 8 as const01, @arg01 as param01, 8.0 as const02, @arg02 as param02, 80.00000000000e-1 as const03, @arg03 as param03, diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 607a0426bd7..4972942e6f3 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1739,7 +1739,7 @@ set @arg14= 'abc'; set @arg14= NULL ; set @arg15= CAST('abc' as binary) ; set @arg15= NULL ; -create table t5 as select +create table t5 engine = MyISAM as select 8 as const01, @arg01 as param01, 8.0 as const02, @arg02 as param02, 80.00000000000e-1 as const03, @arg03 as param03, diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index f4eec0c610c..bb17d0d161c 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1740,7 +1740,7 @@ set @arg14= 'abc'; set @arg14= NULL ; set @arg15= CAST('abc' as binary) ; set @arg15= NULL ; -create table t5 as select +create table t5 engine = MyISAM as select 8 as const01, @arg01 as param01, 8.0 as const02, @arg02 as param02, 80.00000000000e-1 as const03, @arg03 as param03, diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 38e4626d59c..1ed2136151b 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1676,7 +1676,7 @@ set @arg14= 'abc'; set @arg14= NULL ; set @arg15= CAST('abc' as binary) ; set @arg15= NULL ; -create table t5 as select +create table t5 engine = MyISAM as select 8 as const01, @arg01 as param01, 8.0 as const02, @arg02 as param02, 80.00000000000e-1 as const03, @arg03 as param03, @@ -4690,7 +4690,7 @@ set @arg14= 'abc'; set @arg14= NULL ; set @arg15= CAST('abc' as binary) ; set @arg15= NULL ; -create table t5 as select +create table t5 engine = MyISAM as select 8 as const01, @arg01 as param01, 8.0 as const02, @arg02 as param02, 80.00000000000e-1 as const03, @arg03 as param03, diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 432a07df9d0..af693de986b 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -1739,7 +1739,7 @@ set @arg14= 'abc'; set @arg14= NULL ; set @arg15= CAST('abc' as binary) ; set @arg15= NULL ; -create table t5 as select +create table t5 engine = MyISAM as select 8 as const01, @arg01 as param01, 8.0 as const02, @arg02 as param02, 80.00000000000e-1 as const03, @arg03 as param03, diff --git a/mysql-test/r/ps_maria.result b/mysql-test/r/ps_maria.result index 9268c44eecd..b1ea905c406 100644 --- a/mysql-test/r/ps_maria.result +++ b/mysql-test/r/ps_maria.result @@ -1756,7 +1756,7 @@ set @arg14= 'abc'; set @arg14= NULL ; set @arg15= CAST('abc' as binary) ; set @arg15= NULL ; -create table t5 as select +create table t5 engine = MyISAM as select 8 as const01, @arg01 as param01, 8.0 as const02, @arg02 as param02, 80.00000000000e-1 as const03, @arg03 as param03, -- cgit v1.2.1 From 29d7d1becdb777d84c4d9948a9791681d67fe3c5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Jul 2007 16:36:13 +0200 Subject: Verify that INSERT DELAYED is disabled only for transactional Maria tables mysql-test/r/maria.result: result update (we see DELAYED is refused only for transactional Maria tables) mysql-test/t/maria.test: verify that INSERT DELAYED is disabled only for transactional Maria tables --- mysql-test/r/maria.result | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index a1c49fdfe4f..6303f498e36 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1832,3 +1832,27 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE drop table t1; +create table t1 (a int) row_format=page; +insert delayed into t1 values(1); +ERROR HY000: Table storage engine for 't1' doesn't have this option +drop table t1; +create table t1 (a int) row_format=page transactional=0; +insert delayed into t1 values(1); +flush table t1; +select * from t1; +a +1 +select count(*) from t1; +count(*) +1 +drop table t1; +create table t1 (a int) row_format=dynamic; +insert delayed into t1 values(1); +flush table t1; +select * from t1; +a +1 +select count(*) from t1; +count(*) +1 +drop table t1; -- cgit v1.2.1 From 85510db991b5bbaa954bd181e1d02e45ca9f845f Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Jul 2007 23:17:35 +0300 Subject: Merged from main 5.1 --- mysql-test/r/alter_table.result | 2 ++ mysql-test/r/rpl_events.result | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index a9c01f308f7..cc93eab0cd5 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1030,6 +1030,7 @@ select * from t2; c NULL 1 +Two Three lock table t2 write, t3 read; alter table t2 change c vc varchar(100) default "Four", rename to t1; @@ -1046,6 +1047,7 @@ select * from t1; vc NULL 1 +Two Three Four drop tables t1, t3; diff --git a/mysql-test/r/rpl_events.result b/mysql-test/r/rpl_events.result index 18fe72a9879..2cb9a4ab62f 100644 --- a/mysql-test/r/rpl_events.result +++ b/mysql-test/r/rpl_events.result @@ -122,13 +122,15 @@ SELECT * FROM t1 ORDER BY id; id c ts 1 manually TIMESTAMP 2 from justonce TIMESTAMP -affected rows: 2 +4 from er TIMESTAMP +affected rows: 3 "Checking event data on the slave" SELECT * FROM t1 ORDER BY id; id c ts 1 manually TIMESTAMP 2 from justonce TIMESTAMP -affected rows: 2 +4 from er TIMESTAMP +affected rows: 3 "Checking event is inactive on slave" SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; db name status originator -- cgit v1.2.1 From 662002fc8f6301ec78d2eca14c5f991212d4f67f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jul 2007 17:51:49 +0200 Subject: post-merge fixes, and fixes for some of the 16 compiler warnings found in pushbuild on sapsrv1. Some not fixed as not repeatable on my machine (32/64 bit issue?). Fixes for some test failures: - "maria-connect" now passes; - "maria": after fixing the obvious reasons for failures, the test went further and hit a more complex issues: difference in the output of EXPLAIN output; not fixed; - "ps_maria" still crashes in assertion mysqld: ha_maria.cc:1627: virtual int ha_maria::index_read(uchar*, const uchar*, uint, ha_rkey_function): Ass ertion `inited == INDEX' failed, as already observable in pushbuild. All this might just be due to an incomplete merge of MyISAM changes into Maria when 5.1 was last merged to mysql-maria. include/my_global.h: temporary fix until next merge of 5.1; without this it does not build mysql-test/r/maria-connect.result: position changed mysql-test/t/maria-connect.test: If one wants to use the binlog it has to ask for it. 1582 is not used for dup entry error anymore (it was in older 5.1). Size of first event in binlog was increased by 4 (when the new type of event "gap" was added). mysql-test/t/maria.test: 1582 not used anymore in this case storage/maria/ha_maria.cc: engine now has to say what binlogging it supports storage/maria/ma_blockrec.c: fix for compiler warnings ("comparison is always true" or "always false") storage/maria/ma_loghandler.c: fix for compiler warnings (comparing char* to uchar*) storage/maria/ma_packrec.c: fix for compiler warning (fix simply merged from MyISAM) storage/maria/ma_pagecache.c: info_check_pin() was not used so gave a compiler warning. storage/maria/ma_pagecache.h: fixing typo from the last 5.1->maria merge. storage/maria/ma_recovery.c: my_free() has a void* argument, so why cast. byte->uchar. storage/maria/ma_search.c: fix for compiler warning (fix simply merged from MyISAM) storage/maria/maria_read_log.c: gptr->uchar* storage/maria/trnman.c: probable fix for warning found in pushbuild (but not on my machine): storage/maria/trnman.c: 142 passing argument 6 of \u2018lf_hash_init\u2019 from incompatible pointer type on sapsrv1. --- mysql-test/r/maria-connect.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-connect.result b/mysql-test/r/maria-connect.result index e232f564d10..8fe483c8467 100644 --- a/mysql-test/r/maria-connect.result +++ b/mysql-test/r/maria-connect.result @@ -14,10 +14,10 @@ a 2 3 4 -SHOW BINLOG EVENTS FROM 102; +SHOW BINLOG EVENTS FROM 106; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 102 Query 1 200 use `test`; CREATE TABLE t1 (a int primary key) -master-bin.000001 200 Query 1 291 use `test`; insert t1 values (1),(2),(3) -master-bin.000001 291 Query 1 382 use `test`; insert t1 values (4),(2),(5) +master-bin.000001 106 Query 1 204 use `test`; CREATE TABLE t1 (a int primary key) +master-bin.000001 204 Query 1 295 use `test`; insert t1 values (1),(2),(3) +master-bin.000001 295 Query 1 386 use `test`; insert t1 values (4),(2),(5) drop table t1; set binlog_format=default; -- cgit v1.2.1 From 9554b40df2a2c1ad3be7b79cf8a5abe6ca4e211e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Jul 2007 12:01:52 +0200 Subject: Maria: it is allowed to change unknown type to any legal type of page in the pagecache: fixing wrong assertion and a test case. maria.test and ps_maria.test still fail. mysql-test/r/maria.result: result update mysql-test/t/maria.test: added test for incorrect assert on page's type storage/maria/ma_pagecache.c: It is allowed to change unknown type to any legal type of page in the pagecache. --- mysql-test/r/maria.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 6303f498e36..90b406cbb9d 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -33,6 +33,10 @@ test.t1 repair status OK check table t1; Table Op Msg_type Msg_text test.t1 check status OK +flush table t1; +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK drop table t1; create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)); insert into t1 (b) values (1),(2),(2),(2),(2); -- cgit v1.2.1 From 562923e85f94d1cf9f0cbc1e20315c50c2040488 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Jul 2007 19:01:23 +0200 Subject: updating result file of ps_maria, it is now identical to the result of ps_2myisam.result. Thanks Serg for the help. mysql-test/r/ps_maria.result: Result file was probably out-of-date; it thus becomes identical to the result of ps_2myisam.result --- mysql-test/r/ps_maria.result | 537 ++++++++++++++++++++++--------------------- 1 file changed, 272 insertions(+), 265 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/ps_maria.result b/mysql-test/r/ps_maria.result index b1ea905c406..8416a670228 100644 --- a/mysql-test/r/ps_maria.result +++ b/mysql-test/r/ps_maria.result @@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 253 4096 0 Y 128 31 63 +def key_len 253 1365 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 def Extra 253 255 0 N 1 31 8 @@ -1917,38 +1917,38 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 1 Y 128 0 63 -def @arg03 253 20 1 Y 128 0 63 -def @arg04 253 20 1 Y 128 0 63 -def @arg05 253 20 1 Y 128 0 63 -def @arg06 253 20 1 Y 128 0 63 -def @arg07 253 23 1 Y 128 31 63 -def @arg08 253 23 1 Y 128 31 63 -def @arg09 253 23 1 Y 128 31 63 -def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 16777216 10 Y 128 31 63 -def @arg14 253 16777216 19 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 8 Y 128 31 63 -def @arg17 253 20 4 Y 128 0 63 -def @arg18 253 20 1 Y 128 0 63 -def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 16777216 1 Y 0 31 8 -def @arg21 253 16777216 10 Y 0 31 8 -def @arg22 253 16777216 30 Y 0 31 8 -def @arg23 253 16777216 8 Y 128 31 63 -def @arg24 253 16777216 8 Y 0 31 8 -def @arg25 253 16777216 4 Y 128 31 63 -def @arg26 253 16777216 4 Y 0 31 8 -def @arg27 253 16777216 10 Y 128 31 63 -def @arg28 253 16777216 10 Y 0 31 8 -def @arg29 253 16777216 8 Y 128 31 63 -def @arg30 253 16777216 8 Y 0 31 8 -def @arg31 253 16777216 3 Y 0 31 8 -def @arg32 253 16777216 6 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @@ -1964,38 +1964,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 0 Y 128 0 63 -def @arg03 253 20 0 Y 128 0 63 -def @arg04 253 20 0 Y 128 0 63 -def @arg05 253 20 0 Y 128 0 63 -def @arg06 253 20 0 Y 128 0 63 -def @arg07 253 23 0 Y 128 31 63 -def @arg08 253 23 0 Y 128 31 63 -def @arg09 253 23 0 Y 128 31 63 -def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 16777216 0 Y 128 31 63 -def @arg14 253 16777216 0 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 0 Y 128 31 63 -def @arg17 253 20 0 Y 128 0 63 -def @arg18 253 20 0 Y 128 0 63 -def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 16777216 0 Y 0 31 8 -def @arg21 253 16777216 0 Y 0 31 8 -def @arg22 253 16777216 0 Y 0 31 8 -def @arg23 253 16777216 0 Y 128 31 63 -def @arg24 253 16777216 0 Y 0 31 8 -def @arg25 253 16777216 0 Y 128 31 63 -def @arg26 253 16777216 0 Y 0 31 8 -def @arg27 253 16777216 0 Y 128 31 63 -def @arg28 253 16777216 0 Y 0 31 8 -def @arg29 253 16777216 0 Y 128 31 63 -def @arg30 253 16777216 0 Y 0 31 8 -def @arg31 253 16777216 0 Y 0 31 8 -def @arg32 253 16777216 0 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2014,38 +2014,38 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 1 Y 128 0 63 -def @arg03 253 20 1 Y 128 0 63 -def @arg04 253 20 1 Y 128 0 63 -def @arg05 253 20 1 Y 128 0 63 -def @arg06 253 20 1 Y 128 0 63 -def @arg07 253 23 1 Y 128 31 63 -def @arg08 253 23 1 Y 128 31 63 -def @arg09 253 23 1 Y 128 31 63 -def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 16777216 10 Y 128 31 63 -def @arg14 253 16777216 19 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 8 Y 128 31 63 -def @arg17 253 20 4 Y 128 0 63 -def @arg18 253 20 1 Y 128 0 63 -def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 16777216 1 Y 0 31 8 -def @arg21 253 16777216 10 Y 0 31 8 -def @arg22 253 16777216 30 Y 0 31 8 -def @arg23 253 16777216 8 Y 128 31 63 -def @arg24 253 16777216 8 Y 0 31 8 -def @arg25 253 16777216 4 Y 128 31 63 -def @arg26 253 16777216 4 Y 0 31 8 -def @arg27 253 16777216 10 Y 128 31 63 -def @arg28 253 16777216 10 Y 0 31 8 -def @arg29 253 16777216 8 Y 128 31 63 -def @arg30 253 16777216 8 Y 0 31 8 -def @arg31 253 16777216 3 Y 0 31 8 -def @arg32 253 16777216 6 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; @@ -2054,38 +2054,38 @@ execute stmt1 using @my_key ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 0 Y 128 0 63 -def @arg03 253 20 0 Y 128 0 63 -def @arg04 253 20 0 Y 128 0 63 -def @arg05 253 20 0 Y 128 0 63 -def @arg06 253 20 0 Y 128 0 63 -def @arg07 253 23 0 Y 128 31 63 -def @arg08 253 23 0 Y 128 31 63 -def @arg09 253 23 0 Y 128 31 63 -def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 16777216 0 Y 128 31 63 -def @arg14 253 16777216 0 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 0 Y 128 31 63 -def @arg17 253 20 0 Y 128 0 63 -def @arg18 253 20 0 Y 128 0 63 -def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 16777216 0 Y 0 31 8 -def @arg21 253 16777216 0 Y 0 31 8 -def @arg22 253 16777216 0 Y 0 31 8 -def @arg23 253 16777216 0 Y 128 31 63 -def @arg24 253 16777216 0 Y 0 31 8 -def @arg25 253 16777216 0 Y 128 31 63 -def @arg26 253 16777216 0 Y 0 31 8 -def @arg27 253 16777216 0 Y 128 31 63 -def @arg28 253 16777216 0 Y 0 31 8 -def @arg29 253 16777216 0 Y 128 31 63 -def @arg30 253 16777216 0 Y 0 31 8 -def @arg31 253 16777216 0 Y 0 31 8 -def @arg32 253 16777216 0 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2102,38 +2102,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 1 Y 128 0 63 -def @arg03 253 20 1 Y 128 0 63 -def @arg04 253 20 1 Y 128 0 63 -def @arg05 253 20 1 Y 128 0 63 -def @arg06 253 20 1 Y 128 0 63 -def @arg07 253 23 1 Y 128 31 63 -def @arg08 253 23 1 Y 128 31 63 -def @arg09 253 23 1 Y 128 31 63 -def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 16777216 10 Y 128 31 63 -def @arg14 253 16777216 19 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 8 Y 128 31 63 -def @arg17 253 20 4 Y 128 0 63 -def @arg18 253 20 1 Y 128 0 63 -def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 16777216 1 Y 0 31 8 -def @arg21 253 16777216 10 Y 0 31 8 -def @arg22 253 16777216 30 Y 0 31 8 -def @arg23 253 16777216 8 Y 128 31 63 -def @arg24 253 16777216 8 Y 0 31 8 -def @arg25 253 16777216 4 Y 128 31 63 -def @arg26 253 16777216 4 Y 0 31 8 -def @arg27 253 16777216 10 Y 128 31 63 -def @arg28 253 16777216 10 Y 0 31 8 -def @arg29 253 16777216 8 Y 128 31 63 -def @arg30 253 16777216 8 Y 0 31 8 -def @arg31 253 16777216 3 Y 0 31 8 -def @arg32 253 16777216 6 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2146,38 +2146,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 0 Y 128 0 63 -def @arg03 253 20 0 Y 128 0 63 -def @arg04 253 20 0 Y 128 0 63 -def @arg05 253 20 0 Y 128 0 63 -def @arg06 253 20 0 Y 128 0 63 -def @arg07 253 23 0 Y 128 31 63 -def @arg08 253 23 0 Y 128 31 63 -def @arg09 253 23 0 Y 128 31 63 -def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 16777216 0 Y 128 31 63 -def @arg14 253 16777216 0 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 0 Y 128 31 63 -def @arg17 253 20 0 Y 128 0 63 -def @arg18 253 20 0 Y 128 0 63 -def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 16777216 0 Y 0 31 8 -def @arg21 253 16777216 0 Y 0 31 8 -def @arg22 253 16777216 0 Y 0 31 8 -def @arg23 253 16777216 0 Y 128 31 63 -def @arg24 253 16777216 0 Y 0 31 8 -def @arg25 253 16777216 0 Y 128 31 63 -def @arg26 253 16777216 0 Y 0 31 8 -def @arg27 253 16777216 0 Y 128 31 63 -def @arg28 253 16777216 0 Y 0 31 8 -def @arg29 253 16777216 0 Y 128 31 63 -def @arg30 253 16777216 0 Y 0 31 8 -def @arg31 253 16777216 0 Y 0 31 8 -def @arg32 253 16777216 0 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2192,76 +2192,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 1 Y 128 0 63 -def @arg03 253 20 1 Y 128 0 63 -def @arg04 253 20 1 Y 128 0 63 -def @arg05 253 20 1 Y 128 0 63 -def @arg06 253 20 1 Y 128 0 63 -def @arg07 253 23 1 Y 128 31 63 -def @arg08 253 23 1 Y 128 31 63 -def @arg09 253 23 1 Y 128 31 63 -def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 -def @arg13 253 16777216 10 Y 128 31 63 -def @arg14 253 16777216 19 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 8 Y 128 31 63 -def @arg17 253 20 4 Y 128 0 63 -def @arg18 253 20 1 Y 128 0 63 -def @arg19 253 20 1 Y 128 0 63 -def @arg20 253 16777216 1 Y 0 31 8 -def @arg21 253 16777216 10 Y 0 31 8 -def @arg22 253 16777216 30 Y 0 31 8 -def @arg23 253 16777216 8 Y 128 31 63 -def @arg24 253 16777216 8 Y 0 31 8 -def @arg25 253 16777216 4 Y 128 31 63 -def @arg26 253 16777216 4 Y 0 31 8 -def @arg27 253 16777216 10 Y 128 31 63 -def @arg28 253 16777216 10 Y 0 31 8 -def @arg29 253 16777216 8 Y 128 31 63 -def @arg30 253 16777216 8 Y 0 31 8 -def @arg31 253 16777216 3 Y 0 31 8 -def @arg32 253 16777216 6 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 253 20 1 Y 128 0 63 -def @arg02 253 20 0 Y 128 0 63 -def @arg03 253 20 0 Y 128 0 63 -def @arg04 253 20 0 Y 128 0 63 -def @arg05 253 20 0 Y 128 0 63 -def @arg06 253 20 0 Y 128 0 63 -def @arg07 253 23 0 Y 128 31 63 -def @arg08 253 23 0 Y 128 31 63 -def @arg09 253 23 0 Y 128 31 63 -def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 -def @arg13 253 16777216 0 Y 128 31 63 -def @arg14 253 16777216 0 Y 128 31 63 -def @arg15 253 16777216 19 Y 128 31 63 -def @arg16 253 16777216 0 Y 128 31 63 -def @arg17 253 20 0 Y 128 0 63 -def @arg18 253 20 0 Y 128 0 63 -def @arg19 253 20 0 Y 128 0 63 -def @arg20 253 16777216 0 Y 0 31 8 -def @arg21 253 16777216 0 Y 0 31 8 -def @arg22 253 16777216 0 Y 0 31 8 -def @arg23 253 16777216 0 Y 128 31 63 -def @arg24 253 16777216 0 Y 0 31 8 -def @arg25 253 16777216 0 Y 128 31 63 -def @arg26 253 16777216 0 Y 0 31 8 -def @arg27 253 16777216 0 Y 128 31 63 -def @arg28 253 16777216 0 Y 0 31 8 -def @arg29 253 16777216 0 Y 128 31 63 -def @arg30 253 16777216 0 Y 0 31 8 -def @arg31 253 16777216 0 Y 0 31 8 -def @arg32 253 16777216 0 Y 0 31 8 +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2961,20 +2961,26 @@ delete from t9 ; test_sequence -- insert into date/time columns -- Warnings: +Note 1265 Data truncated for column 'c13' at row 1 Warning 1265 Data truncated for column 'c17' at row 1 Warnings: +Note 1265 Data truncated for column 'c13' at row 1 Warning 1265 Data truncated for column 'c17' at row 1 Warnings: +Note 1265 Data truncated for column 'c13' at row 1 Warning 1265 Data truncated for column 'c17' at row 1 Warnings: +Note 1265 Data truncated for column 'c13' at row 1 Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: +Note 1265 Data truncated for column 'c13' at row 1 Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: +Note 1265 Data truncated for column 'c13' at row 1 Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1264 Out of range value for column 'c13' at row 1 @@ -3005,6 +3011,7 @@ Warning 1265 Data truncated for column 'c15' at row 1 Warning 1264 Out of range value for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 Warnings: +Note 1265 Data truncated for column 'c13' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 Warning 1264 Out of range value for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 @@ -3046,31 +3053,31 @@ test_sequence -- select .. where date/time column = .. -- set @arg00= '1991-01-01 01:01:01' ; select 'true' as found from t9 -where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and +where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and c17= '1991-01-01 01:01:01' ; found true select 'true' as found from t9 -where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00 +where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 and c17= @arg00 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and +where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and c17= '1991-01-01 01:01:01'" ; execute stmt1 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ; +where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; found true set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and c14= CAST('1991-01-01 01:01:01' as datetime) and c15= CAST('1991-01-01 01:01:01' as datetime) and c16= CAST('1991-01-01 01:01:01' as datetime) and @@ -3078,12 +3085,12 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ; found true select 'true' as found from t9 -where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00 +where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 and c17= @arg00 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and c14= CAST('1991-01-01 01:01:01' as datetime) and c15= CAST('1991-01-01 01:01:01' as datetime) and c16= CAST('1991-01-01 01:01:01' as datetime) and @@ -3092,7 +3099,7 @@ execute stmt1 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ; +where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; found true -- cgit v1.2.1 From 1b47e3dabddd64f56b804721a37bd5defc94d23f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Aug 2007 20:17:38 +0200 Subject: Make test does not fail if run with --mysqld=--default-storage-engine=X where X does not support INSERT DELAYED (like Maria) mysql-test/r/alter_table.result: result update mysql-test/t/alter_table.test: so that test does not fail if run with --mysqld=--default-storage-engine=X where X does not support INSERT DELAYED (like Maria) --- mysql-test/r/alter_table.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index cc93eab0cd5..e6c99cf0cf3 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -298,7 +298,7 @@ t1 0 a 1 a A 3 NULL NULL YES BTREE t1 0 a 2 b A 300 NULL NULL YES BTREE t1 1 b 1 b A 100 NULL NULL YES BTREE drop table t1; -CREATE TABLE t1 (i int(10), index(i) ); +CREATE TABLE t1 (i int(10), index(i) ) ENGINE=MyISAM; ALTER TABLE t1 DISABLE KEYS; INSERT DELAYED INTO t1 VALUES(1),(2),(3); ALTER TABLE t1 ENABLE KEYS; -- cgit v1.2.1 From 1ad3a05dd7353cc7106d57de1acf777cbd0368c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Aug 2007 18:23:49 +0200 Subject: Fix for errors during: "./mtr --mysqld=--default-storage-engine=maria mysqldump". First problem was use of INSERT DELAYED and MERGE tables without specifying that the tables to create should always be MyISAM. After fixing this, no rows were returned by the final SELECT of the "BUG 19025" portion of the test. Simplified problem was: LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002); /*!40000 ALTER TABLE `t1` ENABLE KEYS */; UNLOCK TABLES; select * from t1; The SELECT would find no rows. Reason: ENABLE KEYS does a maria_repair(); but data pages are still in the page cache and not on disk (because they were not flushed because maria_lock_database(F_UNLCK) was not called at the end of INSERT because under LOCK TABLES). At start of maria_repair(), sort_info.filelength is set to the physical size of the data file (=> too small because pages are in cache and not on disk). Then in sort_get_next_record(), when seeing end-of-file, this is done: sort_param->max_pos= sort_info->filelength; Further in maria_repair(), this is done: info->state->data_file_length= sort_param.max_pos; and so data_file_length is smaller (0) than reality (16384). This makes SELECT think EOF is where it is not, and thus find no rows. This is fixed by flushing all data pages at the start of maria_repair() (no performance problem is introduced as in common cases where ALTER TABLE is not under LOCK TABLES, the previous statement did this flush anyway). Another reason to do this flush is that, if not doing it, old cached pages might go down onto the repaired data file at a later point and thus corrupt it (assume a REPAIR non-QUICK). A similar bug is fixed: LOCK TABLES WRITE; INSERT; CHECK TABLE; reports "Size of datafile is: 0 Should be: 16384" again because the physical size was read without a preliminary page cache flush. mysql-test/r/maria.result: result update mysql-test/r/mysqldump.result: result update mysql-test/t/maria.test: adding test for fixed bug in LOCK TABLES + CHECK TABLE + block format. Disabling portion which hits "incorrect key file" but still letting it make the test fail (Monty to fix). mysql-test/t/mysqldump.test: in places where test expects engine to support INSERT DELAYED and be includable in a MERGE table, i.e. be MyISAM, we explicitely ask for MyISAM. storage/maria/ma_check.c: Before reading the data file's physical size with my_seek(MY_SEEK_END) during maria_chk_size() and maria_repair(), we must flush this data file, otherwise physical size is misleading and leads to - CHECK TABLE finding the table corrupted ("size of datafile should be" error) - ALTER TABLE ENABLE KEYS losing rows (maria_repair() setting data_file_length to a too small value => later SELECT does not find rows though they are in the data file). This fixes the "mysqldump.test" failure. sort_info.filelength contains the physical size, re-using it. --- mysql-test/r/maria.result | 12 ++++++++++++ mysql-test/r/mysqldump.result | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 90b406cbb9d..7c5a1b925fa 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1860,3 +1860,15 @@ select count(*) from t1; count(*) 1 drop table t1; +create table `t1` ( +t1_name varchar(255) default null, +t1_id int(10) unsigned not null auto_increment, +key (t1_name), +primary key (t1_id) +) auto_increment = 1000 default charset=latin1; +lock tables t1 write; +INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002); +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlock tables; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 007ed57f651..367dfb9142e 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -660,7 +660,7 @@ DROP TABLE t1; # # Test for --insert-ignore # -CREATE TABLE t1 (a int); +CREATE TABLE t1 (a int) ENGINE=MyISAM; INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (4),(5),(6); @@ -3443,8 +3443,8 @@ CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); mysqldump: Input filename or options too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DROP TABLE t1; -CREATE TABLE t2 (a int); -CREATE TABLE t3 (a int); +CREATE TABLE t2 (a int) ENGINE=MyISAM; +CREATE TABLE t3 (a int) ENGINE=MyISAM; CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -- cgit v1.2.1 From c7f9cf127c74c3ffb80632ffe3d0f13c8ea695dc Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Aug 2007 17:56:15 +0200 Subject: Tests which use INSERT DELAYED or MERGE tables should explicitely specify that they want a MyISAM table, otherwise they fail when run with --default-storage-engine=maria. mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: uses INSERT DELAYED so has to specify MyISAM mysql-test/extra/rpl_tests/rpl_insert_delayed.test: uses INSERT DELAYED so has to specify MyISAM mysql-test/r/query_cache.result: result update mysql-test/r/rpl_insert.result: result update mysql-test/r/rpl_stm_flsh_tbls.result: result update mysql-test/r/rpl_stm_insert_delayed.result: result update mysql-test/r/rpl_switch_stm_row_mixed.result: result update mysql-test/r/subselect.result: result update mysql-test/t/query_cache.test: uses MERGE so has to specify MyISAM mysql-test/t/query_cache_merge.test: uses MERGE so has to specify MyISAM mysql-test/t/rpl_insert.test: uses INSERT DELAYED so has to specify MyISAM mysql-test/t/rpl_stm_flsh_tbls.test: specifying the engine lengthens the query in binlog so shifts positions mysql-test/t/rpl_switch_stm_row_mixed.test: uses INSERT DELAYED so has to specify MyISAM mysql-test/t/subselect.test: uses INSERT DELAYED so has to specify MyISAM --- mysql-test/r/query_cache.result | 6 +++--- mysql-test/r/rpl_insert.result | 2 +- mysql-test/r/rpl_stm_flsh_tbls.result | 8 ++++---- mysql-test/r/rpl_stm_insert_delayed.result | 4 ++-- mysql-test/r/rpl_switch_stm_row_mixed.result | 6 +++--- mysql-test/r/subselect.result | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 680577c495e..4f0662fd500 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -42,9 +42,9 @@ drop table t1; show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 -create table t1 (a int not null); +create table t1 (a int not null) ENGINE=MyISAM; insert into t1 values (1),(2),(3); -create table t2 (a int not null); +create table t2 (a int not null) ENGINE=MyISAM; insert into t2 values (4),(5),(6); create table t3 (a int not null) engine=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST; select * from t3; @@ -460,7 +460,7 @@ Qcache_queries_in_cache 2 drop table t1; flush query cache; reset query cache; -create table t1 (a int not null); +create table t1 (a int not null) ENGINE=MyISAM; insert into t1 values (1),(2),(3); select * from t1; a diff --git a/mysql-test/r/rpl_insert.result b/mysql-test/r/rpl_insert.result index b6a97926f73..6080d18c5aa 100644 --- a/mysql-test/r/rpl_insert.result +++ b/mysql-test/r/rpl_insert.result @@ -9,7 +9,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; CREATE SCHEMA IF NOT EXISTS mysqlslap; USE mysqlslap; -CREATE TABLE t1 (id INT, name VARCHAR(64)); +CREATE TABLE t1 (id INT, name VARCHAR(64)) ENGINE=MyISAM; SELECT COUNT(*) FROM mysqlslap.t1; COUNT(*) 5000 diff --git a/mysql-test/r/rpl_stm_flsh_tbls.result b/mysql-test/r/rpl_stm_flsh_tbls.result index 1c6b5615b6e..bc14c443f48 100644 --- a/mysql-test/r/rpl_stm_flsh_tbls.result +++ b/mysql-test/r/rpl_stm_flsh_tbls.result @@ -4,21 +4,21 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -create table t1 (a int); +create table t1 (a int) ENGINE=MyISAM; insert into t1 values (10); -create table t2 (a int); +create table t2 (a int) ENGINE=MyISAM; create table t3 (a int) engine=merge union(t1); create table t4 (a int); insert into t4 select * from t3; rename table t1 to t5, t2 to t1; flush no_write_to_binlog tables; -SHOW BINLOG EVENTS FROM 656 ; +SHOW BINLOG EVENTS FROM 684 ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 select * from t3; a flush tables; -SHOW BINLOG EVENTS FROM 656 ; +SHOW BINLOG EVENTS FROM 684 ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 master-bin.000001 # Query 1 # use `test`; flush tables diff --git a/mysql-test/r/rpl_stm_insert_delayed.result b/mysql-test/r/rpl_stm_insert_delayed.result index 1c003856eb9..1707ca0c9d1 100644 --- a/mysql-test/r/rpl_stm_insert_delayed.result +++ b/mysql-test/r/rpl_stm_insert_delayed.result @@ -11,7 +11,7 @@ USE mysqlslap; select @@global.binlog_format; @@global.binlog_format STATEMENT -CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)) ENGINE=MyISAM; FLUSH TABLE t1; SELECT COUNT(*) FROM t1; COUNT(*) @@ -51,7 +51,7 @@ USE mysqlslap; select @@global.binlog_format; @@global.binlog_format MIXED -CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)) ENGINE=MyISAM; FLUSH TABLE t1; SELECT COUNT(*) FROM t1; COUNT(*) diff --git a/mysql-test/r/rpl_switch_stm_row_mixed.result b/mysql-test/r/rpl_switch_stm_row_mixed.result index c3f0c07b92c..510c94d1f2c 100644 --- a/mysql-test/r/rpl_switch_stm_row_mixed.result +++ b/mysql-test/r/rpl_switch_stm_row_mixed.result @@ -135,7 +135,7 @@ execute stmt1 using @string; deallocate prepare stmt1; insert into t1 values(concat("for_23_",UUID())); insert into t1 select "yesterday_24_"; -create table t2 select rpad(UUID(),100,' '); +create table t2 ENGINE=MyISAM select rpad(UUID(),100,' '); create table t3 select 1 union select UUID(); create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); @@ -453,7 +453,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' -) +) ENGINE=MyISAM master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( @@ -757,7 +757,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' -) +) ENGINE=MyISAM master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 40b9e489577..8fd2702acc7 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -627,8 +627,8 @@ a b 33 10 22 11 drop table t11, t12, t2; -CREATE TABLE t1 (x int); -create table t2 (a int); +CREATE TABLE t1 (x int) ENGINE=MyISAM; +create table t2 (a int) ENGINE=MyISAM; create table t3 (b int); insert into t2 values (1); insert into t3 values (1),(2); @@ -675,7 +675,7 @@ x 11 2 drop table t1, t2, t3; -CREATE TABLE t1 (x int not null, y int, primary key (x)); +CREATE TABLE t1 (x int not null, y int, primary key (x)) ENGINE=MyISAM; create table t2 (a int); create table t3 (a int); insert into t2 values (1); -- cgit v1.2.1 From 0d301ee822c45fa6b8e1ff0e31e7ec3308c9747f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 9 Aug 2007 15:00:32 +0200 Subject: * tests which use MERGE or INSERT DELAYED should run only with engines which support that * temporarily adding option --global-subst to mysqltest so that the full testsuite can be run using Maria tables without failing on trivial differences (like diff in the engine clause of SHOW CREATE TABLE) * using recognizable tags for todos of the Maria team client/mysqltest.c: temporarily adding option --global-subst: its argument is X,Y. It replaces all occurrences of X by Y into mysqltest's result before the comparison with the expected result is done. This serves for when a test is run with --default-storage-engine=X where X is not MyISAM: tests using SHOW CREATE TABLE will always fail because SHOW CREATE TABLE prints X instead of MyISAM. With --global-subst=X,MyISAM , such trivial differences are eliminated and test may be reported as passing. For example, --global-subst=MARIA,MyISAM This is not good enough for merging into main trees! just for running many tests and finding bugs now! mysql-test/mysql-test-run.pl: new option --mysqltest to pass options to mysqltest (like we have --mysqld). Used for example like this: ./mtr --mysqltest=--global-subst=MARIA,MyISAM mysql-test/r/merge.result: update mysql-test/t/delayed.test: run test only with engines which support INSERT DELAYED mysql-test/t/merge.test: run test only with MyISAM tables, as they are required by MERGE sql/sql_delete.cc: recognizable tag sql/table.cc: recognizable tag storage/maria/ha_maria.cc: recognizable tag storage/maria/ma_check.c: recognizable tag storage/maria/ma_create.c: recognizable tag --- mysql-test/r/merge.result | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index bb4fc654b38..d22b8ba5fdd 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -1,3 +1,5 @@ +set global storage_engine=myisam; +set session storage_engine=myisam; drop table if exists t1,t2,t3,t4,t5,t6; drop database if exists mysqltest; create table t1 (a int not null primary key auto_increment, message char(20)); -- cgit v1.2.1 From a8d94b4ab3826aeaa18d47ce862103591259e140 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Aug 2007 20:54:11 +0300 Subject: Fixes for bugs found by maria.test and event*tests: Fixed bug when doing rnd_read followed by update. Don't duplicate error messages in log Initialize transaction object properly. Fixed failure in event*tests when running with maria mysql-test/mysql-test-run.pl: Removed warning when running with --external mysql-test/r/maria.result: Added back disabled test Verified that the result changes are correct mysql-test/t/maria.test: Added back disabled test sql/handler.cc: More debugging. Simple style change sql/sql_class.cc: Initialize transaction object properly. Fixed failure in event*tests when running with maria storage/maria/ha_maria.cc: More dbug info storage/maria/ma_blockrec.c: Removed not needed line storage/maria/ma_rrnd.c: Removed not used code Ensure that cur_row.lastpos is always set when reading record with rnd. (Fixes failure in maria.test) storage/maria/maria_def.h: Don't call maria_print_error() except with EXTRA_DEBUG (Removes duplicate error messages when somethings goes wrong) --- mysql-test/r/maria.result | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 7c5a1b925fa..53063c9c7ab 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -435,6 +435,28 @@ bbb. bbb. aa. drop table t1; +create table t1 ( a text not null, key a (a(20))) row_format=dynamic; +insert into t1 values ('aaa '),('aaa'),('aa'); +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +select concat(a,'.') from t1 where a='aaa'; +concat(a,'.') +aaa . +aaa. +select concat(a,'.') from t1 where binary a='aaa'; +concat(a,'.') +aaa. +update t1 set a='bbb' where a='aaa'; +select concat(a,'.') from t1; +concat(a,'.') +bbb. +bbb. +aa. +drop table t1; create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))); insert into t1 values('807780', '477', '165'); insert into t1 values('807780', '477', '162'); @@ -1045,7 +1067,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref c c 11 const # Using where; Using index explain select count(*) from t1 where t='a '; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range t t 13 NULL # Using where +1 SIMPLE t1 ref t t 13 const # Using where explain select count(*) from t1 where v like 'a%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range v v 13 NULL # Using where; Using index -- cgit v1.2.1 From d430e5bfc1327de723911aa22f26eb83b46c6592 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Aug 2007 10:56:10 +0300 Subject: Fixed compiler warnings Fixed wrong hash function prototype (causes failure on 64 bit systems) mysql-test/r/rpl_events.result: Removed wrong merge (result file is now identical as in 5.1 tree) mysys/lf_hash.c: Fixed compiler warning mysys/my_safehash.c: Fixed wrong hash function prototype (causes failure on 64 bit systems) storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Fixed compiler warning --- mysql-test/r/rpl_events.result | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_events.result b/mysql-test/r/rpl_events.result index 2cb9a4ab62f..18fe72a9879 100644 --- a/mysql-test/r/rpl_events.result +++ b/mysql-test/r/rpl_events.result @@ -122,15 +122,13 @@ SELECT * FROM t1 ORDER BY id; id c ts 1 manually TIMESTAMP 2 from justonce TIMESTAMP -4 from er TIMESTAMP -affected rows: 3 +affected rows: 2 "Checking event data on the slave" SELECT * FROM t1 ORDER BY id; id c ts 1 manually TIMESTAMP 2 from justonce TIMESTAMP -4 from er TIMESTAMP -affected rows: 3 +affected rows: 2 "Checking event is inactive on slave" SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; db name status originator -- cgit v1.2.1 From 5183a4b00b0cadf74b9ed5c92734617ec3c9270b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Sep 2007 12:05:17 +0300 Subject: Fixed several bugs found by running *.test with maria engine Renamed HA_EXTRA_PREAPRE_FOR_DELETE to HA_EXTRA_PERPARE_FOR_DROP Added HA_EXTRA_PREPARE_FOR_RENAME (as we in the code before used HA_EXTRA_PREPARE_FOR_DELETE also for renames which confused things) Allow multiple write locks for same page by same file handle Don't write table state if table is not changed include/my_base.h: Renamed HA_EXTRA_PREAPRE_FOR_DELETE to HA_EXTRA_PERPARE_FOR_DROP Added HA_EXTRA_PREPARE_FOR_RENAME (as we in the code before used HA_EXTRA_PREPARE_FOR_DELETE also for renames which confused things) mysql-test/r/maria.result: More tests of things that failed in other tests mysql-test/t/maria.test: More tests of things that failed in other tests sql/ha_partition.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP Use HA_EXTRA_PREPARE_FOR_RENAME for renames sql/ha_partition.h: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP Use HA_EXTRA_PREPARE_FOR_RENAME for renames sql/lock.cc: Fixed comment sql/sql_table.cc: Fixed wrong usage of HA_EXTRA_PREAPRE_FOR_DELETE storage/maria/ha_maria.cc: Added missing _ma_renable_logging_for_table() (When using with ALTER TABLE + repair index) Enabled fast generation of index storage/maria/ma_bitmap.c: Fixed bug when resetting full pages when page was a tail page storage/maria/ma_blockrec.c: Fixed several bugs found by running *.test with maria engine: During update we keep old changed pages locked with a write lock to be able to reuse them. - Fixed bug with allocated but not used tail part - Fixed bug with blob that only had tail part - Fixed bug when update reused a page (needed multiple write locks for same page) - Fixed bug when first extent was a tail block storage/maria/ma_check.c: Better error message when bitmap is destroyed storage/maria/ma_close.c: Only write status if file was changed. Fixed bug when maria_chk -e file_name changed the file. storage/maria/ma_dynrec.c: Removed not used argument to _ma_state_info_read_dsk storage/maria/ma_extra.c: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP Use HA_EXTRA_PREPARE_FOR_RENAME for renames Only ignore flushing of pages for DROP (not rename) storage/maria/ma_locking.c: Removed not used argument to _ma_state_info_read_dsk storage/maria/ma_open.c: Removed not used argument to _ma_state_info_read_dsk storage/maria/ma_pagecache.c: Allow multiple write locks for same page by same file handle (Not yet complete, Sanja will fix) storage/maria/ma_recovery.c: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP storage/maria/maria_def.h: Removed not used argument to _ma_state_info_read_dsk storage/myisam/mi_extra.c: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP Use HA_EXTRA_PREPARE_FOR_RENAME for renames Only ignore flushing of pages for DROP (not rename) storage/myisammrg/ha_myisammrg.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP Use HA_EXTRA_PREPARE_FOR_RENAME for renames --- mysql-test/r/maria.result | 74 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 53063c9c7ab..68ae0cb267b 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1598,6 +1598,9 @@ insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL); analyze table t1; Table Op Msg_type Msg_text test.t1 analyze status OK +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Table is already up to date show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a A 8 NULL NULL YES BTREE @@ -1887,10 +1890,79 @@ t1_name varchar(255) default null, t1_id int(10) unsigned not null auto_increment, key (t1_name), primary key (t1_id) -) auto_increment = 1000 default charset=latin1; +) engine=maria auto_increment = 1000 default charset=latin1; lock tables t1 write; INSERT INTO `t1` VALUES ('bla',1000),('bla',1001),('bla',1002); check table t1; Table Op Msg_type Msg_text test.t1 check status OK unlock tables; +create table t2 like t1; +insert into t2 select * from t1; +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +delete from t2; +insert into t2 select * from t1; +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +drop table t1,t2; +create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000)); +update t1 set b=repeat('a',100) where a between 1 and 100; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +update t1 set c=repeat('a',8192*2) where a between 200 and 202; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +CREATE TABLE t1 ( +auto int(5) unsigned NOT NULL auto_increment, +string char(10) default "hello", +tiny tinyint(4) DEFAULT '0' NOT NULL , +short smallint(6) DEFAULT '1' NOT NULL , +medium mediumint(8) DEFAULT '0' NOT NULL, +long_int int(11) DEFAULT '0' NOT NULL, +longlong bigint(13) DEFAULT '0' NOT NULL, +real_float float(13,1) DEFAULT 0.0 NOT NULL, +real_double double(16,4), +utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, +ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, +umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, +ulong int(11) unsigned DEFAULT '0' NOT NULL, +ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, +time_stamp timestamp, +date_field date, +time_field time, +date_time datetime, +blob_col blob, +tinyblob_col tinyblob, +mediumblob_col mediumblob not null default '', +longblob_col longblob not null default '', +options enum('one','two','tree') not null , +flags set('one','two','tree') not null default '', +PRIMARY KEY (auto), +KEY (utiny), +KEY (tiny), +KEY (short), +KEY any_name (medium), +KEY (longlong), +KEY (real_float), +KEY (ushort), +KEY (umedium), +KEY (ulong), +KEY (ulonglong,ulong), +KEY (options,flags) +) engine=maria; +insert into t1 values (10,1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one'); +create table t2 (primary key (auto)) engine=maria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1; +check table t1,t2; +Table Op Msg_type Msg_text +test.t1 check status OK +test.t2 check status OK +select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2; +t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8 +1 a 256 256 4096 4096 +drop table t1,t2; -- cgit v1.2.1 From 6aef814d98ee2c8c4f3199e9505a988f7609e3a7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Sep 2007 01:58:15 +0300 Subject: Fixed some bugs when using undo of VARCHAR fields Fixed bug in undo_delete Fixed wrong error output from maria_check include/my_base.h: Added marker if we have null fields in table mysql-test/r/maria.result: checksum in maria now ignore null fields that are null sql/sql_table.cc: Ignore null fields that are now (Before enabling this, we have to change MyISAM to also skip null fields) storage/maria/ma_blockrec.c: More logging After merge fixes Fixed some bugs when using undo of VARCHAR fields Fixed bug in undo_delete (We can't use info->rec_buff here as this is used in write_block_record()) storage/maria/ma_blockrec.h: ma_recordpos_to_dir_entry changed to return uint storage/maria/ma_check.c: Fixed wrong output in case of errors storage/maria/ma_create.c: Set share.base.pack_reclength more correct for block record Delete support for RAID storage/maria/ma_open.c: Don't calculate checksum fields with value NULL storage/maria/ma_test1.c: Fixed output from -v for VARCHAR keys storage/maria/ma_test_recovery.expected: Update results after adding new printf New checksums (because we now ignore nulls) Some file lengths are different, but think they are ok (didn't have time to investigate) storage/myisam/ha_myisam.cc: Fixed comment storage/myisam/mi_test1.c: Fixed bug --- mysql-test/r/maria.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 68ae0cb267b..710cb5ec094 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -588,14 +588,14 @@ insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, ""); insert t2 select * from t1; checksum table t1, t2, t3 quick; Table Checksum -test.t1 2948697075 +test.t1 3442722830 test.t2 NULL test.t3 NULL Warnings: Error 1146 Table 'test.t3' doesn't exist checksum table t1, t2, t3; Table Checksum -test.t1 2948697075 +test.t1 3442722830 test.t2 2948697075 test.t3 NULL Warnings: -- cgit v1.2.1 From 5becb1e4040884cde2f6537db7c3daef0b5e5eb9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Sep 2007 15:10:41 +0200 Subject: fix for pushbuild test failures mysql-test/r/rpl_row_flsh_tbls.result: result update mysql-test/r/rpl_row_insert_delayed.result: result update mysql-test/t/rpl_row_flsh_tbls.test: CREATE TABLE statement got an ENGINE clause so became longer --- mysql-test/r/rpl_row_flsh_tbls.result | 8 ++++---- mysql-test/r/rpl_row_insert_delayed.result | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_row_flsh_tbls.result b/mysql-test/r/rpl_row_flsh_tbls.result index 942a6b83bf6..b2fd110973f 100644 --- a/mysql-test/r/rpl_row_flsh_tbls.result +++ b/mysql-test/r/rpl_row_flsh_tbls.result @@ -4,21 +4,21 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -create table t1 (a int); +create table t1 (a int) ENGINE=MyISAM; insert into t1 values (10); -create table t2 (a int); +create table t2 (a int) ENGINE=MyISAM; create table t3 (a int) engine=merge union(t1); create table t4 (a int); insert into t4 select * from t3; rename table t1 to t5, t2 to t1; flush no_write_to_binlog tables; -SHOW BINLOG EVENTS FROM 619 ; +SHOW BINLOG EVENTS FROM 647 ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 select * from t3; a flush tables; -SHOW BINLOG EVENTS FROM 619 ; +SHOW BINLOG EVENTS FROM 647 ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 master-bin.000001 # Query 1 # use `test`; flush tables diff --git a/mysql-test/r/rpl_row_insert_delayed.result b/mysql-test/r/rpl_row_insert_delayed.result index 2044672f49d..bec410cc3fa 100644 --- a/mysql-test/r/rpl_row_insert_delayed.result +++ b/mysql-test/r/rpl_row_insert_delayed.result @@ -11,7 +11,7 @@ USE mysqlslap; select @@global.binlog_format; @@global.binlog_format ROW -CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)) ENGINE=MyISAM; FLUSH TABLE t1; SELECT COUNT(*) FROM t1; COUNT(*) -- cgit v1.2.1 From be382b4220656eca2642943abca1f8ffcb1faaa2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Sep 2007 10:31:25 +0200 Subject: Fix for segmentation fault when updating a record having a small BLOB whose size didn't change. Fix for probably impossible problem in Recovery. mysql-test/r/maria.result: result for new test mysql-test/t/maria.test: testcase for a bug (used to segfault) storage/maria/ma_blockrec.c: When writing a record, we put BLOBs into the head part if there is room for them. "Is there room" was first decided by !(tmp_data + length > end_of_data) (line 1894) but then was tested again as *blob_lengths < (ulong)(end_of_data - data). We see that in case of equality, the first condition was true but the second was not, so it was inconsistent and crashed later. storage/maria/ma_recovery.c: When wondering if recovery should update the state (like state.records): if table was closed, its is_of_horizon was set to X, then table was reopened and a REDO was written. If this REDO had LSN X (as horizon is just a lower bound of the LSN of the next record), we have to apply it. In practice this equality probably could not happen because of LOGREC_FILE_ID would be written before the REDO. --- mysql-test/r/maria.result | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 710cb5ec094..8c1cb5f3a2f 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1966,3 +1966,10 @@ select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2; t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8 1 a 256 256 4096 4096 drop table t1,t2; +CREATE TABLE t1 (seq int, s1 int, s2 blob); +insert into t1 values (1, 1, MD5(1)); +update t1 set s1=2 where seq=1; +check table t1 extended; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; -- cgit v1.2.1 From 4eb383e06c021e89244cbf7d24abecb7b3bde01b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Oct 2007 20:33:42 +0300 Subject: After merge fixes. Applied changes made in myisam manually to maria. storage/maria/ma_test1.c: After merge fixes. Applied changes made in myisam manually to maria. Fixed memory leak. storage/maria/ma_test2.c: After merge fixes. Applied changes made in myisam manually to maria. Fixed memory leak. --- mysql-test/r/maria.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 8c1cb5f3a2f..d49d65e6dc2 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -860,7 +860,7 @@ _id DELETE FROM t1 WHERE _id < 8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Page 2 # # # # 0 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK @@ -872,7 +872,7 @@ Table Op Msg_type Msg_text test.t1 check status OK SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Page 2 # # # # 0 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # SELECT _id FROM t1; _id 8 @@ -919,7 +919,7 @@ _id DELETE FROM t1 WHERE _id < 8; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Page 2 # # # # 0 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK @@ -931,7 +931,7 @@ Table Op Msg_type Msg_text test.t1 check status OK SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MARIA 10 Page 2 # # # # 0 # # # # # # +t1 MARIA 10 Paged 2 # # # # 0 # # # # # # SELECT _id FROM t1; _id 8 -- cgit v1.2.1 From 496741d5761f14dba39c7cfd01c31bcc0fe810b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Oct 2007 21:09:50 +0300 Subject: Moved randomize and my_rnd under mysys Added my_uuid Added pre-support for PAGE_CHECKSUM Added syntax for CREATE ... PAGE_CHECKSUM=# TABLE_CHECKSUM=# Reserved place for page checksums on index, bitmap and block pages Added index number to header of index pages Added linked list for free directory entries (speeds up inserts with BLOCK format) Calculate checksums in original column order (fixes bug with checksum on rows with BLOCK format) Cleaned up all index handling to use 'info->s->keypage_header' (variable size) as the header for index pages (before this was '2') Added 0xffffffff to end of index and block data bases and 0xfffffffe at end of bitmap pages when page checksums are not enabled Added _ma_get_page_used() and _ma_get_used_and_node() to simplify index page header handling rec_per_key_part is now in double precision Reserved place in index file for my_guid and nulls_per_key_part Give error HA_ERR_NEW_FILE if trying to open a Maria file with new, not yet supported extensions Lots of renames to increase readability: randomize() -> my_rnd_init() st_maria_info -> st_maria_handler st_maria_info -> MARIA_HA st_maria_isaminfo -> st_maria_info rand_struct -> my_rand_struct rec_per_key_rows -> records_at_analyze client/mysqladmin.cc: rand_struct -> my_rrnd_struct include/maria.h: st_maria_info -> MARIA_HA st_maria_isaminfo -> st_maria_info Changed analyze statistics to be of double precission Changed offset to field to be 32bits instead of 64 (safe as a record without blobs can't be that big) include/my_base.h: Added HA_OPTION_PAGE_CHECKSUM & HA_CREATE_PAGE_CHECKSUM Fixed comments Added HA_ERR_NEW_FILE include/my_sys.h: Added prototypes and structures for my_uuid() and my_rnd() include/myisamchk.h: Changed some buffers to size_t Added possibility to have key statistics with double precission include/mysql_com.h: Move rand functions to mysys libmysql/Makefile.shared: Added my_rnd mysql-test/r/maria.result: Updated results mysql-test/t/maria.test: More tests for checksum mysys/Makefile.am: Added my_rnd.c and my_uuid.c server-tools/instance-manager/listener.cc: Fixed include order (my_global.h should always be first) server-tools/instance-manager/mysql_connection.cc: Fixed include order (my_global.h should always be first) Use my_rnd_init() server-tools/instance-manager/mysql_connection.h: rand_struct -> my_rand_struct sql/handler.h: Added flag for page checksums sql/item_func.cc: Use new my_rnd() interface sql/item_func.h: Use new my_rnd() interface sql/item_strfunc.cc: Use new my_rnd() interface sql/lex.h: Added PAGE_CHECKSUM and TABLE_CHECKSUM sql/mysql_priv.h: Use new my_rnd() interface sql/mysqld.cc: Use new my_rnd() interface sql/password.c: Move my_rnd() to mysys Use new my_rnd() interface sql/sql_class.cc: Use new my_rnd() interface sql/sql_class.h: Use new my_rnd() interface sql/sql_crypt.cc: Use new my_rnd() interface sql/sql_crypt.h: Use new my_rnd() interface sql/sql_show.cc: Simpler handling of ha_choice_values Added PAGE_CHECKSUM sql/sql_table.cc: Enable correct checksum handling (for now) if not running in compatible mode sql/sql_yacc.yy: Added table option PAGE_CHECKSUM Added future compatible table option TABLE_CHECKSUM (alias for CHECKSUM) Added 'choice' target to simplify code sql/table.cc: Store flag for PAGE_CHECKSUM sql/table.h: Added support for PAGE_CHECKSUM storage/maria/ha_maria.cc: Remove protection for incompatbile frm and MAI (Slow, not needed test) Rec_per_key is now in double Remember row type for table Give warning if one Maria uses another row type than requested Removed some old ASK_MONTY entries (added comments instead) Added handling of PAGE_CHECKSUM flags storage/maria/ma_bitmap.c: Added page checksums to bitmap pages Added special bitmap marker for bitmap pages (Used to find bugs when running without page checksums) storage/maria/ma_blockrec.c: Added a free-link list over directory entries. This makes insert of small rows faster as we don't have to scan the whole directory to find a not used entry. Moved SANITY_CHECKS to maria_def.h Simplify code by introducing dir_entry_pos() Added support for PAGE_CHECKSUM storage/maria/ma_blockrec.h: Added DIR_FREE_SIZE (linked list of free directory entries) Added PAGE_CHECKSUM Added 'dir_entry_pos()' storage/maria/ma_check.c: Check that index pages has correct index number Calculate rec_per_key with double precission Simplify code by using '_ma_get_used_and_node()' Check free directory list Remove wrong end \n from messages maria_data_on_page() -> _ma_get_page_used() maria_putint() -> _ma_store_page_used() rec_per_key_rows -> records_at_analyze storage/maria/ma_checksum.c: Calculate checksum in original column order storage/maria/ma_create.c: Store original column order in index file Reserve place for nulls_per_key_part (future) Added support for PAGE_CHECKSUM storage/maria/ma_dbug.c: Fixed wrong debug output of key of type 'ulong' storage/maria/ma_delete.c: maria_data_on_page() -> _ma_get_used_and_node() maria_data_on_page() -> _ma_get_page_used() maria_putint() -> _ma_store_page_used() Added page header (index key number) to all index pages Reserved page for checksum on index pages Use keypage_header storage/maria/ma_ft_update.c: maria_putint() -> _ma_store_page_used() Store key number at start of page storage/maria/ma_loghandler.h: st_maria_info -> MARIA_HA storage/maria/ma_open.c: rec_per_key is now in double precission Added 'nulls_per_key_part' Added 'extra_options' (flags for future) Added support for PAGE_CHECKSUM Give error HA_ERR_NEW_FILE when using unsupported maria extensions Added comments Add maria_uuid to index file Added functions to store and read column_nr map. Changed some functions to return my_bool instead of uint storage/maria/ma_page.c: Added checks that pages has correct key nr Store 0xffffffff in checksum position if page checksums are not enabled Moved key-page-delete link to take into account keypage header storage/maria/ma_preload.c: Remove old MyISAM dependent code When scanning pages, only add pages to page cache for the requested index storage/maria/ma_range.c: maria_data_on_page() -> _ma_get_used_and_node() Use keypage_header storage/maria/ma_rt_index.c: Fixed indentation storage/maria/ma_rt_index.h: Added support for dynamic index page header Reserved place for PAGE_CHECKSUM storage/maria/ma_rt_key.c: Fixed indentation maria_data_on_page() -> _ma_get_page_used() maria_putint() -> maria_store_page_used() storage/maria/ma_rt_mbr.c: Fixed indentation storage/maria/ma_rt_split.c: Fixed indentation maria_data_on_page () -> _ma_get_page_used() storage/maria/ma_rt_test.c: Fixed indentation storage/maria/ma_search.c: Remove support of using -1 as 'last used index' to _ma_check_index() maria_data_on_page() -> _ma_get_page_used() maria_data_on_page() -> _ma_get_used_and_node() Use keypage_header storage/maria/ma_sort.c: Changed some buffers to size_t Changed rec_per_key_part to double storage/maria/ma_static.c: Removed NEAR Added maria_uuid storage/maria/ma_test2.c: Moevd testflag == 2 to correct place Remove test of reading with index number -1 (not supported anymore) storage/maria/ma_test_recovery.expected: Updated results storage/maria/ma_test_recovery: Changed tmp table names so that one can run maria_chk on them storage/maria/ma_write.c: Fixed indentation Use keypage_header Store index number on index pages maria_putint() -> _ma_store_page_used() maria_data_on_page() -> ma_get_used_and_node() maria_data_on_page() -> _ma_get_page_used() Added PAGE_CHECKSUM Added Maria handler to some functions Removed some not needed casts storage/maria/maria_chk.c: Added error handling for HA_ERR_NEW_FILE Added information about page checksums rec_per_key_part changed to double maria_data_on_page() -> _ma_get_page_used() Use keypage_header storage/maria/maria_def.h: Added IDENTICAL_PAGES_AFTER_RECOVERY and SANITY_CHECKS Changed rec_per_key_part to double Added nulls_per_key_part rec_per_key_rows -> records_at_analyze st_maria_info -> MARIA_HA Reserve place for new statistics variables, uuid, checksums per page etc. Removed NEAR tags Changed some prototypes to use my_bool and size_t storage/maria/maria_pack.c: st_maria_info -> MARIA_HA Fixed indentation storage/myisam/mi_dbug.c: Fix wrong debug output for ULONG mysys/my_rnd.c: New BitKeeper file ``mysys/my_rnd.c'' mysys/my_uuid.c: New BitKeeper file ``mysys/my_uuid.c'' --- mysql-test/r/maria.result | 56 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 8c1cb5f3a2f..8a029ef5d16 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -596,14 +596,14 @@ Error 1146 Table 'test.t3' doesn't exist checksum table t1, t2, t3; Table Checksum test.t1 3442722830 -test.t2 2948697075 +test.t2 3442722830 test.t3 NULL Warnings: Error 1146 Table 'test.t3' doesn't exist checksum table t1, t2, t3 extended; Table Checksum -test.t1 2948697075 -test.t2 2948697075 +test.t1 3442722830 +test.t2 3442722830 test.t3 NULL Warnings: Error 1146 Table 'test.t3' doesn't exist @@ -665,6 +665,25 @@ checksum table t2; Table Checksum test.t2 984116287 drop table t1, t2; +CREATE TABLE t1 ( +twenty int(4), +hundred int(4) NOT NULL +) CHECKSUM=1; +INSERT INTO t1 VALUES (11,91); +check table t1 extended; +Table Op Msg_type Msg_text +test.t1 check status OK +checksum table t1; +Table Checksum +test.t1 3235292310 +checksum table t1 extended; +Table Checksum +test.t1 3235292310 +alter table t1 engine=myisam; +checksum table t1; +Table Checksum +test.t1 3235292310 +drop table t1; show variables like 'maria_stats_method'; Variable_name Value maria_stats_method nulls_unequal @@ -1836,23 +1855,39 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0 drop table t1; create table t1 (a int) row_format=dynamic transactional=1; +Warnings: +Note 1475 Row format set to PAGE because of TRANSACTIONAL=1 option show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL -) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC TRANSACTIONAL=1 +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=1 alter table t1 row_format=PAGE; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=1 +alter table t1 row_format=DYNAMIC; +Warnings: +Note 1475 Row format set to PAGE because of TRANSACTIONAL=1 option +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=1 alter table t1 transactional=0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=0 +alter table t1 row_format=DYNAMIC; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC TRANSACTIONAL=0 drop table t1; create table t1 (a int) row_format=PAGE; show create table t1; @@ -1861,6 +1896,19 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE drop table t1; +create table t1 (a int) row_format=PAGE TRANSACTIONAL=DEFAULT; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE +alter table t1 row_format=DYNAMIC; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +drop table t1; create table t1 (a int) row_format=page; insert delayed into t1 values(1); ERROR HY000: Table storage engine for 't1' doesn't have this option -- cgit v1.2.1 From 47d484153f57b6852a69cdf6f6defa3b610ef6c5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Oct 2007 10:22:49 +0200 Subject: make maria more pluggable mysql-test/r/maria.result: test for maria variables mysql-test/t/maria.test: test for maria variables BitKeeper/etc/ignore: Added sql/link_sources ylwrap libmysql_r/link_sources to the ignore list sql/sql_delete.cc: fix incorrect check storage/maria/ha_maria.cc: maria status and pagecache variables --- mysql-test/r/maria.result | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index d49d65e6dc2..8644d80f73f 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1973,3 +1973,23 @@ check table t1 extended; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +show variables like 'maria%'; +Variable_name Value +maria_block_size 8192 +maria_checkpoint_frequency 30 +maria_max_sort_file_size 9223372036854775807 +maria_pagecache_age_threshold 300 +maria_pagecache_buffer_size 8388572 +maria_pagecache_division_limit 100 +maria_repair_threads 1 +maria_sort_buffer_size 8388608 +maria_stats_method nulls_unequal +show status like 'maria%'; +Variable_name Value +Maria_pagecache_blocks_not_flushed # +Maria_pagecache_blocks_unused # +Maria_pagecache_blocks_used # +Maria_pagecache_read_requests # +Maria_pagecache_reads # +Maria_pagecache_write_requests # +Maria_pagecache_writes # -- cgit v1.2.1 From f1d92c4397bd848b5c761cfcbf3a1d195934c03d Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 13 Oct 2007 20:25:53 +0200 Subject: my_getopt: enforce "correctness" (min/max/block_size) of default values client/mysqltest.c: fix my_option's with incorrect defaults mysql-test/r/maria.result: update results mysql-test/t/variables.test: update results sql/mysqld.cc: fix my_option's with incorrect defaults --- mysql-test/r/maria.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 8644d80f73f..bd2cca08d79 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1977,9 +1977,9 @@ show variables like 'maria%'; Variable_name Value maria_block_size 8192 maria_checkpoint_frequency 30 -maria_max_sort_file_size 9223372036854775807 +maria_max_sort_file_size 9223372036853727232 maria_pagecache_age_threshold 300 -maria_pagecache_buffer_size 8388572 +maria_pagecache_buffer_size 8384512 maria_pagecache_division_limit 100 maria_repair_threads 1 maria_sort_buffer_size 8388608 -- cgit v1.2.1 From 0f1feefa034759c8876b9529a2a859a3a4fd8eec Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Oct 2007 16:55:26 +0200 Subject: WL#3071 Maria checkpoint Ability for flush_pagecache_blocks() to flush only certain pages of a file, as instructed by an option "filter" pointer-to-function argument; Checkpoint and background dirty page flushing use that to flush only pages which have been dirty for long enough and bitmap pages. Fix for a bug in flush_cached_blocks() (no idea if it could produce a bug in real life, but theoretically it is). Testing checkpoint in ma_test_recovery via ma_test1 and ma_test2. Background checkpoint & dirty pages flush thread is still disabled by default in ha_maria. mysql-test/r/maria.result: result update storage/maria/ha_maria.cc: blank after function comment storage/maria/ma_checkpoint.c: Using an enum instead of 0/1/2 (applying Sanja's review comments). The comment about "this is an horizon" can be removed as Sanja created translog_next_LSN() which parse_checkpoint_record() uses. Variables in ma_checkpoint_background() cannot be declared in the for() as their value must not be reset at each iteration! storage/maria/ma_pagecache.c: adding to flush_pagecache_blocks() optional arguments 'filter' (pointer to function) and 'filter_arg'; if filter!=NULL this function will be called for each block of the file and will reply if this block and following ones should be flushed or not (3 possible replies). Fixing a bug when flush_cached_blocks() skips a pinned page: it has to unset PCBLOCK_IN_FLUSH set by flush_pagecache_blocks_int(). storage/maria/ma_pagecache.h: flush_pagecache_blocks() is changed to take "filter" and "filter_arg" arguments. "filter", if it is not NULL, may return one value among enum pagecache_flush_filter_result. storage/maria/ma_recovery.c: open_count=0 when closing tables at the end of recovery. storage/maria/ma_test1.c: Optional checkpoints (-H#) at various stages (stages similar to --testflag), for testing of checkpoints. storage/maria/ma_test2.c: Optional checkpoints (-H#) at various stages (stages similar to -t), for testing of checkpoints. storage/maria/ma_test_recovery.expected: Result update: the results of the additional test run with -H# (checkpoints) are added here. They are exactly identical to without checkpoints except that the index's Root (printed by maria_chk) is more correct when using checkpoints. This is because checkpoint flushed the state, so it happens to be correct, while no-checkpoint does not flush the state, and recovery does not recover indexes so Root is never fixed. When we recover indices, this will go away. storage/maria/ma_test_recovery: We duplicate the loop of tests to add an additional run with checkpoints at various stages, to see if maria_read_log uses them fine. --- mysql-test/r/maria.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index bd2cca08d79..7e63964726c 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1976,7 +1976,7 @@ drop table t1; show variables like 'maria%'; Variable_name Value maria_block_size 8192 -maria_checkpoint_frequency 30 +maria_checkpoint_frequency 0 maria_max_sort_file_size 9223372036853727232 maria_pagecache_age_threshold 300 maria_pagecache_buffer_size 8384512 -- cgit v1.2.1 From 77017191de1b2d05392a8ad2f202f5162aa5fc68 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Oct 2007 14:15:13 +0200 Subject: WL#3071 - Maria checkpoint - serializing calls to flush_pagecache_blocks_int() on the same file to avoid known concurrency bugs - having that, we can now enable the background thread, as the flushes it does are now supposedly safe in concurrent situations. - new type of flush FLUSH_KEEP_LAZY: when the background checkpoint thread is flushing a packet of dirty pages between two checkpoints, it uses this flush type, indeed if a file is already being flushed by another thread it's smarter to move on to the next file than wait. - maria_checkpoint_frequency renamed to maria_checkpoint_interval. include/my_sys.h: new type of flushing for the page cache: FLUSH_KEEP_LAZY mysql-test/r/maria.result: result update mysys/mf_keycache.c: indentation. No FLUSH_KEEP_LAZY support in key cache. storage/maria/ha_maria.cc: maria_checkpoint_frequency was somehow a hidden part of the Checkpoint API and that was not good. Now we have checkpoint_interval, local to ha_maria.cc, which serves as container for the user-visible maria_checkpoint_interval global variable; setting it calls update_checkpoint_interval which passes the new value to ma_checkpoint_init(). There is no hiding anymore. By default, enable background thread which does checkpoints every 30 seconds, and dirty page flush in between. That thread takes a checkpoint when it ends, so no need for maria_hton_panic to take one. The | is | and not ||, because maria_panic() must always be called. frequency->interval. storage/maria/ma_checkpoint.c: Use FLUSH_KEEP_LAZY for background thread when it flushes packets of dirty pages between two checkpoints: it is smarter to move on to the next file than wait for it to have been completely flushed, which may take long. Comments about flush concurrency bugs moved from ma_pagecache.c. Removing out-of-date comment. frequency->interval. create_background_thread -> (interval>0). In ma_checkpoint_background(), some variables need to be preserved between iterations. storage/maria/ma_checkpoint.h: new prototype storage/maria/ma_pagecache.c: - concurrent calls of flush_pagecache_blocks_int() on the same file cause bugs (see @note in that function); we fix them by serializing in this situation. For that we use a global hash of (file, wqueue). When flush_pagecache_blocks_int() starts it looks into the hash, using the file as key. If not found, it inserts (file,wqueue) into the hash, flushes the file, and finally removes itself from the hash and wakes up any waiter in the queue. If found, it adds itself to the wqueue and waits. - As a by-product, we can remove changed_blocks_is_incomplete and replace it by scanning the hash, replace the sleep() by a queue wait. - new type of flush FLUSH_KEEP_LAZY: when flushing a file, if it's already being flushed by another thread (even partially), return immediately. storage/maria/ma_pagecache.h: In pagecache, a hash of files currently being flushed (i.e. there is a call to flush_pagecache_blocks_int() for them). storage/maria/ma_recovery.c: new prototype storage/maria/ma_test1.c: new prototype storage/maria/ma_test2.c: new prototype --- mysql-test/r/maria.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 7e63964726c..982ae512e70 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1976,7 +1976,7 @@ drop table t1; show variables like 'maria%'; Variable_name Value maria_block_size 8192 -maria_checkpoint_frequency 0 +maria_checkpoint_interval 30 maria_max_sort_file_size 9223372036853727232 maria_pagecache_age_threshold 300 maria_pagecache_buffer_size 8384512 -- cgit v1.2.1 From 13d53bf657060acaecf055107e5e6cc7045f351e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Oct 2007 00:24:22 +0300 Subject: Merge some changes from sql directory in 5.1 tree Changed format for REDO_INSERT_ROWS_BLOBS Fixed several bugs in handling of big blobs Added redo_free_head_or_tail() & redo_insert_row_blobs() Added uuid to control file maria_checks now verifies that not used part of bitmap is 0 REDO_PURGE_BLOCKS -> REDO_FREE_BLOCKS Added REDO_FREE_HEAD_OR_TAIL Fixes problem when trying to read block outside of file during REDO include/my_global.h: STACK_DIRECTION is already set by configure mysql-test/r/maria.result: Updated results mysql-test/t/maria.test: Test shrinking of VARCHAR mysys/my_realloc.c: Fixed indentation mysys/safemalloc.c: Fixed indentation sql/filesort.cc: Removed some casts sql/mysqld.cc: Added missing setting of myisam_stats_method_str sql/uniques.cc: Removed some casts storage/maria/ma_bitmap.c: Added printing of bitmap (for debugging) Renamed _ma_print_bitmap() -> _ma_print_bitmap_changes() Added _ma_set_full_page_bits() Fixed bug in ma_bitmap_find_new_place() (affecting updates) when using big files storage/maria/ma_blockrec.c: Changed format for REDO_INSERT_ROWS_BLOBS Fixed several bugs in handling of big blobs Added code to fix some cases where redo when using blobs didn't produce idenital .MAD files as normal usage REDO_FREE_ROW_BLOCKS doesn't anymore change pages; We only mark things free in bitmap Remove TAIL and filler extents from REDO_FREE_BLOCKS log entry. (Fixed some asserts) REDO_PURGE_BLOCKS -> REDO_FREE_BLOCKS Delete tails in update. (Fixed bug when doing update that shrinks blob/varchar length) Fixed bug when doing insert in block outside of file size. Added redo_free_head_or_tail() & redo_insert_row_blobs() Added pagecache_unlock_by_link() when read fails. Much more comments, DBUG and ASSERT entries storage/maria/ma_blockrec.h: Prototypes of new functions Define of SUB_RANGE_SIZE & BLOCK_FILLER_SIZE storage/maria/ma_check.c: Verify that not used part of bitmap is 0 storage/maria/ma_control_file.c: Added uuid to control file storage/maria/ma_loghandler.c: REDO_PURGE_BLOCKS -> REDO_FREE_BLOCKS Added REDO_FREE_HEAD_OR_TAIL storage/maria/ma_loghandler.h: REDO_PURGE_BLOCKS -> REDO_FREE_BLOCKS Added REDO_FREE_HEAD_OR_TAIL storage/maria/ma_pagecache.c: If we write full block, remove error flag for block. (Fixes problem when trying to read block outside of file) storage/maria/ma_recovery.c: REDO_PURGE_BLOCKS -> REDO_FREE_BLOCKS Added REDO_FREE_HEAD_OR_TAIL storage/maria/ma_test1.c: Allow option after 'b' to be compatible with ma_test2 (This is just to simplify test scripts like ma_test_recovery) storage/maria/ma_test2.c: Default size of blob is now 1000 instead of 1 storage/maria/ma_test_all.sh: Added test for bigger blobs storage/maria/ma_test_recovery.expected: Updated results storage/maria/ma_test_recovery: Added test for bigger blobs --- mysql-test/r/maria.result | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 52c499643e6..75c9ae99159 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -679,10 +679,18 @@ test.t1 3235292310 checksum table t1 extended; Table Checksum test.t1 3235292310 -alter table t1 engine=myisam; +alter table t1 row_format=fixed; checksum table t1; Table Checksum test.t1 3235292310 +alter table t1 row_format=dynamic; +checksum table t1; +Table Checksum +test.t1 4183529555 +alter table t1 engine=myisam; +checksum table t1; +Table Checksum +test.t1 4183529555 drop table t1; show variables like 'maria_stats_method'; Variable_name Value @@ -1856,7 +1864,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int) row_format=dynamic transactional=1; Warnings: -Note 1475 Row format set to PAGE because of TRANSACTIONAL=1 option +Note 1477 Row format set to PAGE because of TRANSACTIONAL=1 option show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1870,7 +1878,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=1 alter table t1 row_format=DYNAMIC; Warnings: -Note 1475 Row format set to PAGE because of TRANSACTIONAL=1 option +Note 1477 Row format set to PAGE because of TRANSACTIONAL=1 option show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1966,6 +1974,21 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +CREATE TABLE t1 (a int, b int, v varchar(60000)) checksum=1 engine=maria; +insert into t1 values (1,1,"aaa"),(1,2,null); +checksum table t1; +Table Checksum +test.t1 1112804611 +lock table t1 write; +insert into t1 values (1,3,repeat('c',30000)),(4,4,repeat('a',30000)); +update t1 set v="row5" where b=4; +delete from t1 where b=3; +select a, b, length(v) from t1; +a b length(v) +1 1 3 +1 2 NULL +4 4 4 +drop table t1; CREATE TABLE t1 ( auto int(5) unsigned NOT NULL auto_increment, string char(10) default "hello", -- cgit v1.2.1 From 5fbd5dafe7f78735922ce5aa15d65ffab811deb8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Nov 2007 17:12:29 +0100 Subject: * WL#4137 Maria- Framework for testing recovery in mysql-test-run See test maria-recovery.test for a model; all include scripts have an "API" section at start if they do take parameters from outside. * Fixing bug reported by Jani and Monty (when two REDOs about the same page in one group, see ma_blockrec.c). * Fixing small bugs in recovery mysql-test/include/wait_until_connected_again.inc: be sure to enter the loop (the previous query by the caller may not have failed: it could be query; mysqladmin shutdown; call this script). mysql-test/lib/mtr_process.pl: * Through the "expect" file a test can tell mtr that a server crash is expected. What the file contains is irrelevant. Now if its last line starts with "wait", mtr will wait before restarting (it will wait for the last line to not start with "wait"). This is for tests which need to mangle files under the feet of a dead mysqld. * Remove "expect" file before restarting; otherwise there could be a race condition: tests sees server restarted, does something, writes an "expect" file, and then mtr removes that file, then test kills mysqld, and then mtr will never restart it. storage/maria/ma_blockrec.c: - when applying a REDO in recovery, we don't anymore put UNDO's LSN on the page at once; indeed if in this REDO's group there comes another REDO for the same page it would be wrongly skipped. Instead, we keep pages pinned, don't change their LSN. When done with all REDOs of the group we unpin them and stamp them with UNDO's LSN. - fixing bug in applying of REDO_PURGE_BLOCKS in recovery: page_range sometimes has TAIL_BIT set, need to turn it down to know the real page range. - Both bugs are covered in maria-recovery.test storage/maria/ma_checkpoint.c: Capability to, in debug builds only, do some special operations (flush all bitmap and data pages, flush state, flush log) and crash mysqld, to later test recovery. Driven by some --debug=d, symbols. storage/maria/ma_open.c: debugging info storage/maria/ma_pagecache.c: Now that we can _ma_unpin_all_pages() during the REDO phase to set page's LSN, the assertion needs to be relaxed. storage/maria/ma_recovery.c: - open trace file in append mode (useful when a test triggers several recoveries, we see them all). - fixing wrong error detection, it's possible that during recovery we want to open an already open table. - when applying a REDO in recovery, we don't anymore put UNDO's LSN on the page at once; indeed if in this REDO's group there comes another REDO for the same page it would be wrongly skipped. Instead, we keep pages pinned, don't change their LSN. When done with all REDOs of the group we unpin them and stamp them with UNDO's LSN. - we verify that all log records of a group are about the same table, for debugging. mysql-test/r/maria-recovery.result: result mysql-test/t/maria-recovery-master.opt: crash is expected, core file would take room, stack trace would wake pushbuild up. mysql-test/t/maria-recovery.test: Test of recovery from mysql-test (it is already tested as unit tests in ma_test_recovery) (WL#4137) - test that, if recovery is made to start on an empty table it can replay the effects of committed and uncommitted statements (having only the committed ones in the end result). This should be the first test for someone writing code of new REDOs. - test that, if mysqld is crashed and recovery runs we have only committed statements in the end result. Crashes are done in different ways: flush nothing (so, uncommitted statement is often missing from the log => no rollback to do); flush pagecache (implicitely flushes log (WAL)) and flush log, both causes rollbacks; flush log can also flush state (state.records etc) to test recovery of the state (not tested well now as we repair the index anyway). - test of bug found by Jani and Monty in recovery (two REDO about the same page in one group). mysql-test/include/maria_empty_logs.inc: removes logs, to have a clean sheet for testing recovery. mysql-test/include/maria_make_snapshot.inc: copies a table to another directory, or back, or compares both (comparison is not implemented as physical comparison is impossible if an UNDO phase happened). mysql-test/include/maria_make_snapshot_for_comparison.inc: copies tables to another directory so that they can later serve as a comparison reference (they are the good tables, recovery should produce similar ones). mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc: When we want to force recovery to start on old tables, we prepare old tables with this script: we put them in a spare directory. They are later copied back over mysqltest tables while mysqld is dead. We also need to copy back the control file, otherwise mysqld, in recovery, would start from the latest checkpoint: latest checkpoint plus old tables is not a recovery-possible scenario of course. mysql-test/include/maria_verify_recovery.inc: causes mysqld to crash, restores old tables if requested, lets recovery run, compares resulting tables with reference tables by using CHECKSUM TABLE. We don't do any sanity checks on page's LSN in resulting tables, yet. --- mysql-test/r/maria-recovery.result | 168 +++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 mysql-test/r/maria-recovery.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-recovery.result b/mysql-test/r/maria-recovery.result new file mode 100644 index 00000000000..0749e9b0826 --- /dev/null +++ b/mysql-test/r/maria-recovery.result @@ -0,0 +1,168 @@ +drop database if exists mysqltest; +create database mysqltest; +use mysqltest; +* shut down mysqld, removed logs, restarted it +use mysqltest; +create table t1 (a varchar(1000)) engine=maria; +* TEST: see if recovery can reconstruct if we give it an old table +* copied t1 for feeding_recovery +insert into t1 values ("00000000"); +flush table t1; +* copied t1 for comparison +lock tables t1 write; +insert into t1 values ("aaaaaaaaa"); +SET SESSION debug="+d,maria_flush_whole_log,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* copied t1 back for feeding_recovery +* recovery happens +* rebuilding index (until we have recovery of index) +repair table t1 quick; +Table Op Msg_type Msg_text +mysqltest.t1 repair status OK +* testing that checksum after recovery is as expected +select if(substring("mysqltest.t1 488070860",instr("mysqltest.t1 488070860",".t1")) = substring("mysqltest_for_comparison.t1 488070860",instr("mysqltest_for_comparison.t1 488070860",".t1")),"ok","failure"); +if(substring("mysqltest.t1 488070860",instr("mysqltest.t1 488070860",".t1")) = substring("mysqltest_for_comparison.t1 488070860",instr("mysqltest_for_comparison.t1 488070860",".t1")),"ok","failure") +ok +use mysqltest; +select * from t1; +a +00000000 +* TEST: normal recovery test (no moving tables under its feet) +insert into t1 values ("00000000"); +flush table t1; +* copied t1 for comparison +lock tables t1 write; +insert into t1 values ("aaaaaaaaa"); +SET SESSION debug="+d,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* recovery happens +* rebuilding index (until we have recovery of index) +repair table t1 quick; +Table Op Msg_type Msg_text +mysqltest.t1 repair status OK +* testing that checksum after recovery is as expected +select if(substring("mysqltest.t1 976141720",instr("mysqltest.t1 976141720",".t1")) = substring("mysqltest_for_comparison.t1 976141720",instr("mysqltest_for_comparison.t1 976141720",".t1")),"ok","failure"); +if(substring("mysqltest.t1 976141720",instr("mysqltest.t1 976141720",".t1")) = substring("mysqltest_for_comparison.t1 976141720",instr("mysqltest_for_comparison.t1 976141720",".t1")),"ok","failure") +ok +use mysqltest; +select * from t1; +a +00000000 +00000000 +insert into t1 values ("00000000"); +flush table t1; +* copied t1 for comparison +lock tables t1 write; +insert into t1 values ("aaaaaaaaa"); +SET SESSION debug="+d,maria_flush_whole_page_cache,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* recovery happens +* rebuilding index (until we have recovery of index) +repair table t1 quick; +Table Op Msg_type Msg_text +mysqltest.t1 repair status OK +* testing that checksum after recovery is as expected +select if(substring("mysqltest.t1 1464212580",instr("mysqltest.t1 1464212580",".t1")) = substring("mysqltest_for_comparison.t1 1464212580",instr("mysqltest_for_comparison.t1 1464212580",".t1")),"ok","failure"); +if(substring("mysqltest.t1 1464212580",instr("mysqltest.t1 1464212580",".t1")) = substring("mysqltest_for_comparison.t1 1464212580",instr("mysqltest_for_comparison.t1 1464212580",".t1")),"ok","failure") +ok +use mysqltest; +select * from t1; +a +00000000 +00000000 +00000000 +insert into t1 values ("00000000"); +flush table t1; +* copied t1 for comparison +lock tables t1 write; +insert into t1 values ("aaaaaaaaa"); +SET SESSION debug="+d,maria_flush_states,maria_flush_whole_log,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* recovery happens +* rebuilding index (until we have recovery of index) +repair table t1 quick; +Table Op Msg_type Msg_text +mysqltest.t1 repair status OK +* testing that checksum after recovery is as expected +select if(substring("mysqltest.t1 1952283440",instr("mysqltest.t1 1952283440",".t1")) = substring("mysqltest_for_comparison.t1 1952283440",instr("mysqltest_for_comparison.t1 1952283440",".t1")),"ok","failure"); +if(substring("mysqltest.t1 1952283440",instr("mysqltest.t1 1952283440",".t1")) = substring("mysqltest_for_comparison.t1 1952283440",instr("mysqltest_for_comparison.t1 1952283440",".t1")),"ok","failure") +ok +use mysqltest; +select * from t1; +a +00000000 +00000000 +00000000 +00000000 +insert into t1 values ("00000000"); +flush table t1; +* copied t1 for comparison +lock tables t1 write; +insert into t1 values ("aaaaaaaaa"); +SET SESSION debug="+d,maria_flush_whole_log,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* recovery happens +* rebuilding index (until we have recovery of index) +repair table t1 quick; +Table Op Msg_type Msg_text +mysqltest.t1 repair status OK +* testing that checksum after recovery is as expected +select if(substring("mysqltest.t1 2440354300",instr("mysqltest.t1 2440354300",".t1")) = substring("mysqltest_for_comparison.t1 2440354300",instr("mysqltest_for_comparison.t1 2440354300",".t1")),"ok","failure"); +if(substring("mysqltest.t1 2440354300",instr("mysqltest.t1 2440354300",".t1")) = substring("mysqltest_for_comparison.t1 2440354300",instr("mysqltest_for_comparison.t1 2440354300",".t1")),"ok","failure") +ok +use mysqltest; +select * from t1; +a +00000000 +00000000 +00000000 +00000000 +00000000 +drop table t1; +* shut down mysqld, removed logs, restarted it +use mysqltest; +CREATE TABLE t1 ( +i int, +b blob default NULL, +c varchar(6000) default NULL +) ENGINE=MARIA CHECKSUM=1; +* copied t1 for feeding_recovery +INSERT INTO t1 VALUES (1, REPEAT('a', 5000), REPEAT('b', 5000)); +UPDATE t1 SET i=3, b=CONCAT(b,'c') WHERE i=1; +SELECT LENGTH(b) FROM t1 WHERE i=3; +LENGTH(b) +5001 +flush table t1; +* copied t1 for comparison +SET SESSION debug="+d,maria_flush_whole_log,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* copied t1 back for feeding_recovery +* recovery happens +* rebuilding index (until we have recovery of index) +repair table t1 quick; +Table Op Msg_type Msg_text +mysqltest.t1 repair status OK +* testing that checksum after recovery is as expected +select if(substring("mysqltest.t1 3472399915",instr("mysqltest.t1 3472399915",".t1")) = substring("mysqltest_for_comparison.t1 3472399915",instr("mysqltest_for_comparison.t1 3472399915",".t1")),"ok","failure"); +if(substring("mysqltest.t1 3472399915",instr("mysqltest.t1 3472399915",".t1")) = substring("mysqltest_for_comparison.t1 3472399915",instr("mysqltest_for_comparison.t1 3472399915",".t1")),"ok","failure") +ok +use mysqltest; +SELECT LENGTH(b) FROM t1 WHERE i=3; +LENGTH(b) +5001 +drop table t1; +drop database mysqltest_for_feeding_recovery; +drop database mysqltest_for_comparison; +drop database mysqltest; -- cgit v1.2.1 From ac590d9ce994cda6c6f000b1957ef059297245d5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Nov 2007 18:49:00 +0100 Subject: Addendum to WL#4137 "Maria- Framework for testing recovery in mysql-test-run": possibility, if requested in the test, to do byte-for-byte comparison of data files after recovery. This makes sense only when testing REDOs, as UNDO phase generates new log records thus data pages get new LSNs. First test of maria-recovery.test is changed to test only REDOs and do byte-for-byte comparison. mysql-test/include/maria_make_snapshot.inc: possibility to compare physically the data files (makes sense only if testing REDO phase). mysql-test/include/maria_verify_recovery.inc: allow physical comparison of data files after recovery if requested mysql-test/r/maria-recovery.result: result update (first test tests REDO only now) mysql-test/t/maria-recovery.test: first test tests REDO only now, and thus can do byte-for-byte comparison of data files. --- mysql-test/r/maria-recovery.result | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-recovery.result b/mysql-test/r/maria-recovery.result index 0749e9b0826..42bc4e9f39c 100644 --- a/mysql-test/r/maria-recovery.result +++ b/mysql-test/r/maria-recovery.result @@ -4,13 +4,11 @@ use mysqltest; * shut down mysqld, removed logs, restarted it use mysqltest; create table t1 (a varchar(1000)) engine=maria; -* TEST: see if recovery can reconstruct if we give it an old table +* TEST of REDO: see if recovery can reconstruct if we give it an old table * copied t1 for feeding_recovery insert into t1 values ("00000000"); flush table t1; * copied t1 for comparison -lock tables t1 write; -insert into t1 values ("aaaaaaaaa"); SET SESSION debug="+d,maria_flush_whole_log,maria_crash"; * crashing mysqld intentionally set global maria_checkpoint_interval=1; @@ -25,11 +23,12 @@ mysqltest.t1 repair status OK select if(substring("mysqltest.t1 488070860",instr("mysqltest.t1 488070860",".t1")) = substring("mysqltest_for_comparison.t1 488070860",instr("mysqltest_for_comparison.t1 488070860",".t1")),"ok","failure"); if(substring("mysqltest.t1 488070860",instr("mysqltest.t1 488070860",".t1")) = substring("mysqltest_for_comparison.t1 488070860",instr("mysqltest_for_comparison.t1 488070860",".t1")),"ok","failure") ok +* compared t1 to old version use mysqltest; select * from t1; a 00000000 -* TEST: normal recovery test (no moving tables under its feet) +* TEST of REDO+UNDO: normal recovery test (no moving tables under its feet) insert into t1 values ("00000000"); flush table t1; * copied t1 for comparison -- cgit v1.2.1 From 6b3743f0aa10ff5bcb0ea0e88722b2c912dd7a89 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Nov 2007 17:42:16 +0200 Subject: Fixes for redo/undo logging of key pages New extendable format for maria_log_control file Fixed some compiler warnings include/maria.h: Added maria_disable_logging() and maria_enable_logging() mysql-test/include/maria_verify_recovery.inc: Updated tests now when key redo/undo works mysql-test/r/maria-recovery.result: Updated tests now when key redo/undo works storage/maria/ma_blockrec.c: Use unified CLR code Added rec_lsn for full pages Moved clr write hook to ma_key_recover.c Changed REDO code to keep pages pinned until undo Mark page_link's as changed storage/maria/ma_blockrec.h: Moved write_hook_for_clr_end() to ma_key_recover.c storage/maria/ma_check.c: Changed key check code to use PAGECACHE_READ_UNKNOWN_PAGE Fixed wrong warning when checking files after maria_pack When unpacking files, we have to use new keypos_to_recpos method When doing repair, we can disregard index key file pages in page cache storage/maria/ma_commit.c: Added simple enable/disable logging functions (Needed for recovery) storage/maria/ma_control_file.c: Make maria control file extendable without having to make it incompatible for older versions storage/maria/ma_control_file.h: New error messages Added CONTROL_FILE_VERSION storage/maria/ma_delete.c: Added redo/undo for key pages change_length -> changed_length to make things similar More comments & more DBUG storage/maria/ma_key_recover.c: Unified CLR method Moved here write_hook_for_clr_end() and common keypage log functions Changed REDO to keep pages pinned until undo Changed UNDO code to change key_root under log mutex storage/maria/ma_key_recover.h: New structures and functions storage/maria/ma_loghandler.c: Include needed files storage/maria/ma_open.c: Change maria_open() to use pread() instead of read() storage/maria/ma_page.c: Fixed bug in key_del handling Clear pages if IDENTICAL_PAGES_AFTER_RECOVERY is defined storage/maria/ma_pagecache.c: Indentation and spelling fixes More DBUG Added helper function: pagecache_block_link_to_buffer() storage/maria/ma_pagecache.h: Added pagecache_block_link_to_buffer() storage/maria/ma_recovery.c: Fixed state.changed Fixed that REDO keeps pages pinned until UNDO Some bug fixes from previous commit Fixes for UNDO/REDO of key pages storage/maria/ma_search.c: Fixed packing and storing of keys to provide more information to caller so that we can do efficent REDO logging of the changes. storage/maria/ma_test1.c: Fixed bug with not initialized variable storage/maria/ma_test2.c: Removed not used code storage/maria/ma_test_all.res: Updated results storage/maria/ma_test_all.sh: Changed one test to test more Removed timing tests as not relevant here storage/maria/ma_test_recovery.expected: Updated test result after redo/undo if key pages works storage/maria/ma_test_recovery: Updated test after redo/undo if key pages works storage/maria/ma_write.c: Moved some general log functions to ma_key_recover.c Fixed some bugs in undo Moved ma_log_split() to _ma_split_page() Small changes in some function arguments to be able to do redo logging storage/maria/maria_chk.c: disable logging while doing repair table storage/maria/maria_def.h: New function prototypes Move some structs and functions to ma_key_recover.c storage/maria/unittest/ma_control_file-t.c: Updated with patch from Sanja NOTE: This is not complete and need to be updated to new control file format storage/maria/unittest/ma_test_loghandler-t.c: Fixed compiler warning --- mysql-test/r/maria-recovery.result | 48 ++++++++++++++------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-recovery.result b/mysql-test/r/maria-recovery.result index 42bc4e9f39c..70f0a7be596 100644 --- a/mysql-test/r/maria-recovery.result +++ b/mysql-test/r/maria-recovery.result @@ -15,13 +15,11 @@ set global maria_checkpoint_interval=1; ERROR HY000: Lost connection to MySQL server during query * copied t1 back for feeding_recovery * recovery happens -* rebuilding index (until we have recovery of index) -repair table t1 quick; +check table t1 extended; Table Op Msg_type Msg_text -mysqltest.t1 repair status OK +mysqltest.t1 check status OK * testing that checksum after recovery is as expected -select if(substring("mysqltest.t1 488070860",instr("mysqltest.t1 488070860",".t1")) = substring("mysqltest_for_comparison.t1 488070860",instr("mysqltest_for_comparison.t1 488070860",".t1")),"ok","failure"); -if(substring("mysqltest.t1 488070860",instr("mysqltest.t1 488070860",".t1")) = substring("mysqltest_for_comparison.t1 488070860",instr("mysqltest_for_comparison.t1 488070860",".t1")),"ok","failure") +Checksum-check ok * compared t1 to old version use mysqltest; @@ -39,13 +37,11 @@ SET SESSION debug="+d,maria_crash"; set global maria_checkpoint_interval=1; ERROR HY000: Lost connection to MySQL server during query * recovery happens -* rebuilding index (until we have recovery of index) -repair table t1 quick; +check table t1 extended; Table Op Msg_type Msg_text -mysqltest.t1 repair status OK +mysqltest.t1 check status OK * testing that checksum after recovery is as expected -select if(substring("mysqltest.t1 976141720",instr("mysqltest.t1 976141720",".t1")) = substring("mysqltest_for_comparison.t1 976141720",instr("mysqltest_for_comparison.t1 976141720",".t1")),"ok","failure"); -if(substring("mysqltest.t1 976141720",instr("mysqltest.t1 976141720",".t1")) = substring("mysqltest_for_comparison.t1 976141720",instr("mysqltest_for_comparison.t1 976141720",".t1")),"ok","failure") +Checksum-check ok use mysqltest; select * from t1; @@ -62,13 +58,11 @@ SET SESSION debug="+d,maria_flush_whole_page_cache,maria_crash"; set global maria_checkpoint_interval=1; ERROR HY000: Lost connection to MySQL server during query * recovery happens -* rebuilding index (until we have recovery of index) -repair table t1 quick; +check table t1 extended; Table Op Msg_type Msg_text -mysqltest.t1 repair status OK +mysqltest.t1 check status OK * testing that checksum after recovery is as expected -select if(substring("mysqltest.t1 1464212580",instr("mysqltest.t1 1464212580",".t1")) = substring("mysqltest_for_comparison.t1 1464212580",instr("mysqltest_for_comparison.t1 1464212580",".t1")),"ok","failure"); -if(substring("mysqltest.t1 1464212580",instr("mysqltest.t1 1464212580",".t1")) = substring("mysqltest_for_comparison.t1 1464212580",instr("mysqltest_for_comparison.t1 1464212580",".t1")),"ok","failure") +Checksum-check ok use mysqltest; select * from t1; @@ -86,13 +80,11 @@ SET SESSION debug="+d,maria_flush_states,maria_flush_whole_log,maria_crash"; set global maria_checkpoint_interval=1; ERROR HY000: Lost connection to MySQL server during query * recovery happens -* rebuilding index (until we have recovery of index) -repair table t1 quick; +check table t1 extended; Table Op Msg_type Msg_text -mysqltest.t1 repair status OK +mysqltest.t1 check status OK * testing that checksum after recovery is as expected -select if(substring("mysqltest.t1 1952283440",instr("mysqltest.t1 1952283440",".t1")) = substring("mysqltest_for_comparison.t1 1952283440",instr("mysqltest_for_comparison.t1 1952283440",".t1")),"ok","failure"); -if(substring("mysqltest.t1 1952283440",instr("mysqltest.t1 1952283440",".t1")) = substring("mysqltest_for_comparison.t1 1952283440",instr("mysqltest_for_comparison.t1 1952283440",".t1")),"ok","failure") +Checksum-check ok use mysqltest; select * from t1; @@ -111,13 +103,11 @@ SET SESSION debug="+d,maria_flush_whole_log,maria_crash"; set global maria_checkpoint_interval=1; ERROR HY000: Lost connection to MySQL server during query * recovery happens -* rebuilding index (until we have recovery of index) -repair table t1 quick; +check table t1 extended; Table Op Msg_type Msg_text -mysqltest.t1 repair status OK +mysqltest.t1 check status OK * testing that checksum after recovery is as expected -select if(substring("mysqltest.t1 2440354300",instr("mysqltest.t1 2440354300",".t1")) = substring("mysqltest_for_comparison.t1 2440354300",instr("mysqltest_for_comparison.t1 2440354300",".t1")),"ok","failure"); -if(substring("mysqltest.t1 2440354300",instr("mysqltest.t1 2440354300",".t1")) = substring("mysqltest_for_comparison.t1 2440354300",instr("mysqltest_for_comparison.t1 2440354300",".t1")),"ok","failure") +Checksum-check ok use mysqltest; select * from t1; @@ -149,13 +139,11 @@ set global maria_checkpoint_interval=1; ERROR HY000: Lost connection to MySQL server during query * copied t1 back for feeding_recovery * recovery happens -* rebuilding index (until we have recovery of index) -repair table t1 quick; +check table t1 extended; Table Op Msg_type Msg_text -mysqltest.t1 repair status OK +mysqltest.t1 check status OK * testing that checksum after recovery is as expected -select if(substring("mysqltest.t1 3472399915",instr("mysqltest.t1 3472399915",".t1")) = substring("mysqltest_for_comparison.t1 3472399915",instr("mysqltest_for_comparison.t1 3472399915",".t1")),"ok","failure"); -if(substring("mysqltest.t1 3472399915",instr("mysqltest.t1 3472399915",".t1")) = substring("mysqltest_for_comparison.t1 3472399915",instr("mysqltest_for_comparison.t1 3472399915",".t1")),"ok","failure") +Checksum-check ok use mysqltest; SELECT LENGTH(b) FROM t1 WHERE i=3; -- cgit v1.2.1 From 4e0964cb040d833351ddd66c00b146b2e93e9fa7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Nov 2007 21:38:30 +0200 Subject: Fixed repair_by_sort to work with BLOCK_RECORD Fixed bugs in undo logging Fixed bug where head block was split before min_row_length (caused Maria to believe row was crashed on read) Reserved place for reference-transid on key pages (for packing of transids) ALTER TABLE and INSERT ... SELECT now uses fast creation of index Known bugs: ma_test_recovery fails because of a bug in redo handling when log is cut directly after a redo (Guilhem knows how to fix) ma_test_recovery.excepted is not totally correct, because of the above bug mysqld sometimes fails to restart; Fails with error "end_of_redo_phase: Assertion `long_trid != 0' failed"; Guilhem to investigate include/maria.h: Prototype changes Added current_filepos to st_maria_sort_info mysql-test/r/maria.result: Updated results that changes as alter table and insert ... select now uses fast creation of index mysys/mf_iocache.c: Reset variable to gurard against double invocation storage/maria/ma_bitmap.c: Added _ma_bitmap_reset_cache() (needed for repair) storage/maria/ma_blockrec.c: Simplify code More initial allocations Fixed bug where head block was split before min_row_length (caused Maria to believe row was crashed on read) storage/maria/ma_blockrec.h: Moved TRANSID_SIZE to maria_def.h Added prototype for new functions storage/maria/ma_check.c: Simplicy code Fixed repair_by_sort to work with BLOCK_RECORD - When using BLOCK_RECORD or UNPACK create new Maria handle - Use common initializer function - Align code with maria_repair() Made some changes to maria_repair_parallel() to use common initializer function Removed ASK_MONTY section by fixing noted problem storage/maria/ma_close.c: Moved check for readonly to _ma_state_info_write() storage/maria/ma_key_recover.c: Use different log entries if key root changes or not. This fixed some bugs when tree grows storage/maria/ma_key_recover.h: Added keynr to st_msg_to_write_hook_for_undo_key storage/maria/ma_loghandler.c: Added INIT_LOGREC_UNDO_KEY_INSERT_WITH_ROOT storage/maria/ma_loghandler.h: Added INIT_LOGREC_UNDO_KEY_INSERT_WITH_ROOT storage/maria/ma_open.c: Added TRANSID to all key pages (for future compressing of trans id's) For compressed records, alloc a bit bigger buffer to avoid valgrind warnings If table is opened readonly, don't update state storage/maria/ma_packrec.c: Allocate bigger array for bit unpacking to avoid valgrind errors storage/maria/ma_recovery.c: Added UNDO_KEY_INSERT_WITH_ROOT & UNDO_KEY_DELETE_WITH_ROOT storage/maria/ma_sort.c: More logging storage/maria/ma_test_all.sh: More tests storage/maria/ma_test_recovery.expected: Update results Note that this is not complete becasue of a bug in recovery storage/maria/ma_test_recovery: Removed recreation of index (not needed when we have redo for index pages) storage/maria/maria_chk.c: When using flag --read-only, don't update status for files When using --unpack, don't use REPAIR_BY_SORT if other repair option is given Enable repair_by_sort for BLOCK records Removed not needed newline at start of --describe storage/maria/maria_def.h: Support for TRANSID_SIZE to key pages storage/maria/maria_read_log.c: renamed --only-display to --display-only --- mysql-test/r/maria.result | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 7fc6ae39224..97f2850dabd 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -625,7 +625,7 @@ t1 1 a 1 a A NULL NULL NULL YES BTREE disabled alter table t1 enable keys; show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 a 1 a A NULL NULL NULL YES BTREE +t1 1 a 1 a A 1000 NULL NULL YES BTREE alter table t1 engine=heap; alter table t1 disable keys; Warnings: @@ -1957,12 +1957,12 @@ create table t2 like t1; insert into t2 select * from t1; analyze table t2; Table Op Msg_type Msg_text -test.t2 analyze status OK +test.t2 analyze status Table is already up to date delete from t2; insert into t2 select * from t1; analyze table t2; Table Op Msg_type Msg_text -test.t2 analyze status OK +test.t2 analyze status Table is already up to date drop table t1,t2; create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000)); update t1 set b=repeat('a',100) where a between 1 and 100; -- cgit v1.2.1 From 3e90f0d86c016534a4e53d357e4d3224d16875ef Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Dec 2007 18:09:36 +0200 Subject: Added variable to control log directory syncs. Part of postreview fixes added. mysql-test/r/maria.result: Added variable to control log directory syncs. storage/maria/ha_maria.cc: Added variable to control log directory syncs. storage/maria/ma_loghandler.h: Added variable to control log directory syncs. storage/maria/ma_loghandler_lsn.h: postreview fix storage/maria/unittest/Makefile.am: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler_multigroup-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler_multithread-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler_noflush-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler_pagecache-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_test_loghandler_purge-t.c: New file with logrecord descriptors for tests. storage/maria/unittest/ma_loghandler_examples.c: New BitKeeper file ``storage/maria/unittest/ma_loghandler_examples.c'' --- mysql-test/r/maria.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 97f2850dabd..8f873fef230 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -2055,6 +2055,7 @@ maria_pagecache_division_limit 100 maria_repair_threads 1 maria_sort_buffer_size 8388608 maria_stats_method nulls_unequal +maria_sync_log_dir NEWFILE show status like 'maria%'; Variable_name Value Maria_pagecache_blocks_not_flushed # -- cgit v1.2.1 From ebf7ab7bce003093745337be43cd6107726aa0fb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Dec 2007 23:23:42 +0200 Subject: Added error HA_ERR_FILE_TOO_SHORT to be used when files are shorter than expected (by my_read/my_pread) Added debugger hook _my_dbug_put_break_here() that is called if we get a CRC that matches --debug-crc-break (my_crc_dbug_break) Fixed REDO_REPAIR to use all repair modes (repair, repair_by_sort, repair_paralell REDO_REPAIR now also logs used key map Fixed some bugs in REDO logging of key pages Better error messages from maria_read_log Added my_readwrite_flags to init_pagecache() to be able to get better error messages and simplify code. Don't allow pagecaches with less than 8 blocks (Causes strange crashes) Added EXTRA_DEBUG_KEY_CHANGES. When this is defined some REDO_INDEX entries contains page checksums (these are calculated and checked in DBUG mode, ignored otherwise) Fixed bug in ma_pagecache unit tests that caused program to sometimes fail Added some missing calls to MY_INIT() that caused some unit tests to fail Fixed that TRUNCATE works properly on temporary MyISAM files Updates some result files to new table checksums results (checksum when NULL fields are ignored) perl test-insert can be replayed with maria_read_log! sql/share/Makefile.am: Change mode to -rw-rw-r-- BitKeeper/etc/ignore: added storage/maria/unittest/page_cache_test_file_1 storage/maria/unittest/pagecache_debug.log include/maria.h: Added maria_tmpdir include/my_base.h: Added error HA_ERR_FILE_TOO_SHORT include/my_sys.h: Added variable my_crc_dbug_check Added function my_dbug_put_break_here() include/myisamchk.h: Added org_key_map (Needed for writing REDO record for REPAIR) mysql-test/r/innodb.result: Updated to new checksum algorithm (NULL ignored) mysql-test/r/mix2_myisam.result: Updated to new checksum algorithm (NULL ignored) mysql-test/r/myisam.result: Updated to new checksum algorithm (NULL ignored) mysql-test/t/myisam.test: Added used table mysys/checksum.c: Added DBUG for checksum results Added debugger hook so that _my_dbug_put_break_here() is called if we get matching CRC mysys/lf_alloc-pin.c: Fixed compiler warning mysys/my_handler.c: Added new error message mysys/my_init.c: If my_progname is not given, use 'unknown' form my_progname_short Added debugger function my_debug_put_break_here() mysys/my_pread.c: In case of too short file when MY_NABP or MY_FNABP is specified, give error HA_ERR_FILE_TO_SHORT mysys/my_read.c: In case of too short file when MY_NABP or MY_FNABP is specified, give error HA_ERR_FILE_TO_SHORT sql/mysqld.cc: Added debug option --debug-crc-break sql/sql_parse.cc: Trivial optimization storage/maria/ha_maria.cc: Renamed variable to be more logical Ensure that param.testflag is correct when calling repair Added extra argument to init_pagecache Set default value for maria_tempdir storage/maria/ma_blockrec.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_cache.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_check.c: Set param->testflag to match how repair is run (needed for REDO logging) Simple optimization Moved flag if page is node from pagelength to keypage-flag byte Log used key map in REDO log. storage/maria/ma_delete.c: Remember previous UNDO entry when writing undo (for future CLR records) Moved flag if page is node from pagelength to keypage-flag byte Fixed some bugs in redo logging Added CRC for some translog REDO_INDEX entries storage/maria/ma_dynrec.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_ft_update.c: Fixed call to _ma_store_page_used() storage/maria/ma_key_recover.c: Added CRC for some translog REDO_INDEX entries Removed not needed pagecache_write() in _ma_apply_redo_index() storage/maria/ma_locking.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/maria/ma_loghandler.c: Added used key map to REDO_REPAIR_TABLE storage/maria/ma_loghandler.h: Added operation for checksum of key pages storage/maria/ma_open.c: Allocate storage for undo lsn pointers storage/maria/ma_pagecache.c: Remove not needed include file Change logging to use fd: for file descritors as other code Added my_readwrite_flags to init_pagecache() to be able to get better error messages for maria_chk/maria_read_log Don't allow pagecaches with less than 8 blocks Remove wrong DBUG_ASSERT() storage/maria/ma_pagecache.h: Added readwrite_flags storage/maria/ma_recovery.c: Better error messages for maria_read_log: - Added eprint() for printing error messages - Print extra \n before error message if we are printing %0 %10 ... Added used key_map to REDO_REPAIR log entry More DBUG Call same repair method that was used by mysqld storage/maria/ma_rt_index.c: Moved flag if page is node from pagelength to keypage-flag byte storage/maria/ma_rt_key.c: Fixed call to _ma_store_page_used() storage/maria/ma_rt_split.c: Moved flag if page is node from pagelength to keypage-flag byte storage/maria/ma_static.c: Added maria_tmpdir storage/maria/ma_test1.c: Updated call to init_pagecache() storage/maria/ma_test2.c: Updated call to init_pagecache() storage/maria/ma_test3.c: Updated call to init_pagecache() storage/maria/ma_write.c: Removed #ifdef NOT_YET Moved flag if page is node from pagelength to keypage-flag byte Fixed bug in _ma_log_del_prefix() storage/maria/maria_chk.c: Fixed wrong min limit for page_buffer_size Updated call to init_pagecache() storage/maria/maria_def.h: Added EXTRA_DEBUG_KEY_CHANGES. When this is defined some REDO_INDEX entries contains page checksums Moved flag if page is node from pagelength to keypage-flag byte storage/maria/maria_ftdump.c: Updated call to init_pagecache() storage/maria/maria_pack.c: Updated call to init_pagecache() Reset share->state.create_rename_lsn & share->state.is_of_horizon storage/maria/maria_read_log.c: Better error messages Added --tmpdir option (needed to set temporary directory for REDO_REPAIR) Added --start-from-lsn Changed option for --display-only to 'd' (wanted to use -o for 'offset') storage/maria/unittest/lockman2-t.c: Added missing call to MY_INIT() storage/maria/unittest/ma_pagecache_consist.c: Updated call to init_pagecache() storage/maria/unittest/ma_pagecache_single.c: Fixed bug that caused program to sometimes fail Added some DBUG_ASSERTS() Changed some calls to malloc()/free() to my_malloc()/my_free() Create extra file to expose original hard-to-find bug storage/maria/unittest/ma_test_loghandler-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated call to init_pagecache() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated call to init_pagecache() storage/maria/unittest/test_file.c: Changed malloc()/free() to my_malloc()/my_free() Fixed memory leak Changd logic a bit while trying to find bug in reset_file() storage/maria/unittest/trnman-t.c: Added missing call to MY_INIT() storage/myisam/mi_cache.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/myisam/mi_create.c: Removed O_EXCL to get TRUNCATE to work for temporary files storage/myisam/mi_dynrec.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 storage/myisam/mi_locking.c: Test for HA_ERR_FILE_TOO_SHORT instead for -1 mysql-test/r/old-mode.result: New BitKeeper file ``mysql-test/r/old-mode.result'' mysql-test/t/old-mode-master.opt: New BitKeeper file ``mysql-test/t/old-mode-master.opt'' mysql-test/t/old-mode.test: New BitKeeper file ``mysql-test/t/old-mode.test'' --- mysql-test/r/innodb.result | 14 +++++++------- mysql-test/r/mix2_myisam.result | 28 ++++++++++++++-------------- mysql-test/r/myisam.result | 12 ++++++------ mysql-test/r/old-mode.result | 14 ++++++++++++++ 4 files changed, 41 insertions(+), 27 deletions(-) create mode 100644 mysql-test/r/old-mode.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index d0b67e90afb..e7910ee9e32 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1440,7 +1440,7 @@ insert t2 select * from t1; insert t3 select * from t1; checksum table t1, t2, t3, t4 quick; Table Checksum -test.t1 2948697075 +test.t1 3442722830 test.t2 NULL test.t3 NULL test.t4 NULL @@ -1448,17 +1448,17 @@ Warnings: Error 1146 Table 'test.t4' doesn't exist checksum table t1, t2, t3, t4; Table Checksum -test.t1 2948697075 -test.t2 2948697075 -test.t3 2948697075 +test.t1 3442722830 +test.t2 3442722830 +test.t3 3442722830 test.t4 NULL Warnings: Error 1146 Table 'test.t4' doesn't exist checksum table t1, t2, t3, t4 extended; Table Checksum -test.t1 2948697075 -test.t2 2948697075 -test.t3 2948697075 +test.t1 3442722830 +test.t2 3442722830 +test.t3 3442722830 test.t4 NULL Warnings: Error 1146 Table 'test.t4' doesn't exist diff --git a/mysql-test/r/mix2_myisam.result b/mysql-test/r/mix2_myisam.result index cabc4de8d21..e0a3d1af089 100644 --- a/mysql-test/r/mix2_myisam.result +++ b/mysql-test/r/mix2_myisam.result @@ -1232,34 +1232,34 @@ insert t5 select * from t1; insert t6 select * from t1; checksum table t1, t2, t3, t4, t5, t6, t7 quick; Table Checksum -test.t1 2948697075 +test.t1 3442722830 test.t2 NULL test.t3 NULL test.t4 NULL -test.t5 2948697075 +test.t5 3442722830 test.t6 NULL test.t7 NULL Warnings: Error 1146 Table 'test.t7' doesn't exist checksum table t1, t2, t3, t4, t5, t6, t7; Table Checksum -test.t1 2948697075 -test.t2 2948697075 -test.t3 2948697075 -test.t4 2948697075 -test.t5 2948697075 -test.t6 2948697075 +test.t1 3442722830 +test.t2 3442722830 +test.t3 3442722830 +test.t4 3442722830 +test.t5 3442722830 +test.t6 3442722830 test.t7 NULL Warnings: Error 1146 Table 'test.t7' doesn't exist checksum table t1, t2, t3, t4, t5, t6, t7 extended; Table Checksum -test.t1 2948697075 -test.t2 2948697075 -test.t3 2948697075 -test.t4 2948697075 -test.t5 2948697075 -test.t6 2948697075 +test.t1 3442722830 +test.t2 3442722830 +test.t3 3442722830 +test.t4 3442722830 +test.t5 3442722830 +test.t6 3442722830 test.t7 NULL Warnings: Error 1146 Table 'test.t7' doesn't exist diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 73661897ee1..cb9c3355f7a 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; SET SQL_WARNINGS=1; CREATE TABLE t1 ( STRING_DATA char(255) default NULL, @@ -551,22 +551,22 @@ insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, ""); insert t2 select * from t1; checksum table t1, t2, t3 quick; Table Checksum -test.t1 2948697075 +test.t1 3442722830 test.t2 NULL test.t3 NULL Warnings: Error 1146 Table 'test.t3' doesn't exist checksum table t1, t2, t3; Table Checksum -test.t1 2948697075 -test.t2 2948697075 +test.t1 3442722830 +test.t2 3442722830 test.t3 NULL Warnings: Error 1146 Table 'test.t3' doesn't exist checksum table t1, t2, t3 extended; Table Checksum -test.t1 2948697075 -test.t2 2948697075 +test.t1 3442722830 +test.t2 3442722830 test.t3 NULL Warnings: Error 1146 Table 'test.t3' doesn't exist diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result new file mode 100644 index 00000000000..df2c0b6fee0 --- /dev/null +++ b/mysql-test/r/old-mode.result @@ -0,0 +1,14 @@ +drop table if exists t1,t2; +create table t1 (a int, b varchar(200), c text not null) checksum=1; +create table t2 (a int, b varchar(200), c text not null) checksum=0; +insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, ""); +insert t2 select * from t1; +checksum table t1, t2; +Table Checksum +test.t1 3442722830 +test.t2 2948697075 +checksum table t1, t2 extended; +Table Checksum +test.t1 2948697075 +test.t2 2948697075 +drop table t1,t2; -- cgit v1.2.1 From 771296eb063e7d1f8d5264f48a254adad439616b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 Dec 2007 19:35:51 +0200 Subject: Manageable transactional log purge and file size support added to maria. mysql-test/r/maria.result: New variables added. storage/maria/ha_maria.cc: Variable for transactional log purge method added. Variable for transactional log size added. SHOW for engine logs added. Log flush purge logs in case of "ondemand" type of log processing. storage/maria/ma_checkpoint.c: log purge call enabled. storage/maria/ma_loghandler.c: Support for different methods of log purge added. Functions for getting information about logs state added. Functions for getting/setting log size. storage/maria/ma_loghandler.h: Fixed defines. Functions for for transactional log mannegment added. storage/maria/ma_recovery.c: Dependence on TRANSLOG_FILE_SIZE removed. mysql-test/r/maria-purge.result: New BitKeeper file ``mysql-test/r/maria-purge.result'' mysql-test/t/maria-purge.test: New BitKeeper file ``mysql-test/t/maria-purge.test'' --- mysql-test/r/maria-purge.result | 82 +++++++++++++++++++++++++++++++++++++++++ mysql-test/r/maria.result | 2 + 2 files changed, 84 insertions(+) create mode 100644 mysql-test/r/maria-purge.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-purge.result b/mysql-test/r/maria-purge.result new file mode 100644 index 00000000000..6c3e709f343 --- /dev/null +++ b/mysql-test/r/maria-purge.result @@ -0,0 +1,82 @@ +set global storage_engine=maria; +set session storage_engine=maria; +drop table if exists t1,t2; +SET SQL_WARNINGS=1; +CREATE TABLE t1 ( +STRING_DATA char(255) default NULL +); +CREATE TABLE t2 ( +STRING_DATA char(255) default NULL +); +INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); +INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +insert into t2 select * from t1; +insert into t1 select * from t2; +set global maria_checkpoint_interval=2; +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000001 in use +set global maria_log_file_size=16777216; +select @@global.maria_log_file_size; +@@global.maria_log_file_size +16777216 +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000002 in use +set global maria_log_file_size=8388608; +select @@global.maria_log_file_size; +@@global.maria_log_file_size +8388608 +set global maria_log_purge_type=at_flush; +insert into t1 select * from t2; +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000002 free +maria master-data/maria_log.00000003 free +maria master-data/maria_log.00000004 free +maria master-data/maria_log.00000005 in use +flush logs; +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000005 in use +set global maria_log_file_size=16777216; +set global maria_log_purge_type=external; +insert into t1 select * from t2; +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000005 free +maria master-data/maria_log.00000006 in use +flush logs; +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000005 free +maria master-data/maria_log.00000006 in use +set global maria_log_purge_type=immediate; +insert into t1 select * from t2; +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000007 in use +maria master-data/maria_log.00000008 in use +drop table t1, t2; diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 982ae512e70..31503330d1e 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1977,6 +1977,8 @@ show variables like 'maria%'; Variable_name Value maria_block_size 8192 maria_checkpoint_interval 30 +maria_log_file_size 1073741824 +maria_log_purge_type immediate maria_max_sort_file_size 9223372036853727232 maria_pagecache_age_threshold 300 maria_pagecache_buffer_size 8384512 -- cgit v1.2.1 From f7df9addbaafdbaebb8f89c5fb16c3225eea1d7c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Dec 2007 22:33:36 +0100 Subject: WL#3072 - Maria Recovery: recovery of state.auto_increment. When we log UNDO_KEY_INSERT for an auto_inc key, we update state.auto_increment (not anymore at the end of maria_write() except if this is a non-transactional table). When Recovery sees UNDO_KEY_INSERT in the REDO phase, it reads the auto_inc value from it and updates state.auto_increment. mysql-test/r/maria-recovery.result: Without the code fix, there would be in CHECK TABLE: "Auto-increment value: 0 is smaller than max used value: 3" and no AUTO_INCREMENT= clause in SHOW CREATE TABLE. mysql-test/t/maria-recovery.test: Test of recovery of state.auto_increment: from an old table, does the replaying of the log set state.auto_increment to what it should be. storage/maria/ma_check.c: new way of calling ma_retrieve_auto_increment(): pass key storage/maria/ma_key.c: ma_retrieve_auto_increment() now operates directly with a pointer to the key and not on the record. storage/maria/ma_key_recover.c: dedicated write_hook_for_undo_key_insert(): sets state.auto_increment under log's mutex. storage/maria/ma_key_recover.h: Dedicated hook for UNDO_KEY_INSERT, to set state.auto_increment. Such hook needs a new member st_msg_write_hook_for_undo_key::auto_increment, which contains the auto_increment value inserted. storage/maria/ma_loghandler.c: UNDO_KEY_INSERT gets a dedicated write_hook, to set auto_increment. storage/maria/ma_recovery.c: When in the REDO phase we see UNDO_KEY_INSERT: if the state is older than this record, and the key is the auto_increment one, read the key's value from the log record and update state.auto_increment. storage/maria/ma_test_all.sh: use $maria_path to be able to run from /dev/shm (faster) storage/maria/ma_update.c: bool is more of C++, using my_bool. If table is transactional, state.auto_increment is already updated in write_hook_for_undo_key_insert(). storage/maria/ma_write.c: If table is transactional, state.auto_increment is not updated at the end of maria_write() but rather in write_hook_for_undo_key_insert() (under log's mutex, so that a concurrent checkpoint does not read state.auto_increment while it is changing - corrupted). _ma_ck_write_btree_with_log() extracts the auto_increment value from the key, puts it into msg.auto_increment, and this is passed to write_hook_for_undo_key_insert(). storage/maria/maria_def.h: change of prototype of ma_retrieve_auto_increment() storage/maria/maria_read_log.c: use default log file size. Use separate page caches for table and logs (needed if maria_block_size!=TRANSLOG_PAGE_SIZE). --- mysql-test/r/maria-recovery.result | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-recovery.result b/mysql-test/r/maria-recovery.result index 70f0a7be596..2cee14bffcd 100644 --- a/mysql-test/r/maria-recovery.result +++ b/mysql-test/r/maria-recovery.result @@ -150,6 +150,66 @@ SELECT LENGTH(b) FROM t1 WHERE i=3; LENGTH(b) 5001 drop table t1; +* shut down mysqld, removed logs, restarted it +use mysqltest; +CREATE TABLE t1 ( +i int auto_increment primary key, +c varchar(6), +key(c) +) ENGINE=MARIA; +insert into t1 values(null,"b"); +* copied t1 for feeding_recovery +insert into t1 values(null,"a"), (null,"c"), (null,"d"); +delete from t1 where c="d"; +flush table t1; +* copied t1 for comparison +SET SESSION debug="+d,maria_flush_whole_log,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* copied t1 back for feeding_recovery +* recovery happens +check table t1 extended; +Table Op Msg_type Msg_text +mysqltest.t1 check status OK +* testing that checksum after recovery is as expected +Checksum-check +ok +use mysqltest; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) NOT NULL AUTO_INCREMENT, + `c` varchar(6) DEFAULT NULL, + PRIMARY KEY (`i`), + KEY `c` (`c`) +) ENGINE=MARIA AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +* copied t1 for feeding_recovery +update t1 set i=15 where c="a"; +flush table t1; +* copied t1 for comparison +SET SESSION debug="+d,maria_flush_whole_log,maria_crash"; +* crashing mysqld intentionally +set global maria_checkpoint_interval=1; +ERROR HY000: Lost connection to MySQL server during query +* copied t1 back for feeding_recovery +* recovery happens +check table t1 extended; +Table Op Msg_type Msg_text +mysqltest.t1 check status OK +* testing that checksum after recovery is as expected +Checksum-check +ok +use mysqltest; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) NOT NULL AUTO_INCREMENT, + `c` varchar(6) DEFAULT NULL, + PRIMARY KEY (`i`), + KEY `c` (`c`) +) ENGINE=MARIA AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 +drop table t1; drop database mysqltest_for_feeding_recovery; drop database mysqltest_for_comparison; drop database mysqltest; -- cgit v1.2.1 From ebafe3e4dbee1e0952e1c5f74bd7cb1791bddccb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Dec 2007 12:26:55 +0200 Subject: Postreview changes. mysql-test/r/maria-big.result: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/r/maria-connect.result: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/r/maria-purge.result: Change to make maria-purge more stable. mysql-test/r/maria.result: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/r/ps_maria.result: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/t/maria-big.test: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/t/maria-connect.test: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/t/maria-purge.test: Change to make maria-purge more stable. mysql-test/t/maria-recovery.test: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/t/maria.test: Change to make maria-purge more stable: increasing file size to let all records fit in one log. mysql-test/t/ps_maria.test: Change to make maria-purge more stable: increasing file size to let all records fit in one log. --- mysql-test/r/maria-big.result | 2 ++ mysql-test/r/maria-connect.result | 1 + mysql-test/r/maria-purge.result | 34 ++++++++++++++++++++-------------- mysql-test/r/maria.result | 3 ++- mysql-test/r/ps_maria.result | 1 + 5 files changed, 26 insertions(+), 15 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-big.result b/mysql-test/r/maria-big.result index ca18d992187..ac75cd4c1a5 100644 --- a/mysql-test/r/maria-big.result +++ b/mysql-test/r/maria-big.result @@ -1,5 +1,7 @@ set storage_engine=maria; affected rows: 0 +set global maria_log_file_size=4294967296; +affected rows: 0 drop table if exists t1, t2; affected rows: 0 create table t1(a char(3)); diff --git a/mysql-test/r/maria-connect.result b/mysql-test/r/maria-connect.result index 8fe483c8467..596d968e258 100644 --- a/mysql-test/r/maria-connect.result +++ b/mysql-test/r/maria-connect.result @@ -1,5 +1,6 @@ set global storage_engine=maria; set session storage_engine=maria; +set global maria_log_file_size=4294967296; drop table if exists t1; SET SQL_WARNINGS=1; RESET MASTER; diff --git a/mysql-test/r/maria-purge.result b/mysql-test/r/maria-purge.result index 6c3e709f343..c616ab4c2b8 100644 --- a/mysql-test/r/maria-purge.result +++ b/mysql-test/r/maria-purge.result @@ -1,5 +1,6 @@ set global storage_engine=maria; set session storage_engine=maria; +set global maria_log_file_size=4294967296; drop table if exists t1,t2; SET SQL_WARNINGS=1; CREATE TABLE t1 ( @@ -8,6 +9,8 @@ STRING_DATA char(255) default NULL CREATE TABLE t2 ( STRING_DATA char(255) default NULL ); +set global maria_log_file_size=16777216; +set global maria_checkpoint_interval=30; INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); insert into t2 select * from t1; @@ -34,49 +37,52 @@ insert into t2 select * from t1; insert into t1 select * from t2; insert into t2 select * from t1; insert into t1 select * from t2; -set global maria_checkpoint_interval=2; +set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000001 in use +maria master-data/maria_log.00000005 in use set global maria_log_file_size=16777216; select @@global.maria_log_file_size; @@global.maria_log_file_size 16777216 +set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000002 in use +maria master-data/maria_log.00000005 in use set global maria_log_file_size=8388608; select @@global.maria_log_file_size; @@global.maria_log_file_size 8388608 set global maria_log_purge_type=at_flush; insert into t1 select * from t2; +set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000002 free -maria master-data/maria_log.00000003 free -maria master-data/maria_log.00000004 free -maria master-data/maria_log.00000005 in use +maria master-data/maria_log.00000005 free +maria master-data/maria_log.00000006 free +maria master-data/maria_log.00000007 free +maria master-data/maria_log.00000008 in use flush logs; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000005 in use +maria master-data/maria_log.00000008 in use set global maria_log_file_size=16777216; set global maria_log_purge_type=external; insert into t1 select * from t2; +set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000005 free -maria master-data/maria_log.00000006 in use +maria master-data/maria_log.00000008 free +maria master-data/maria_log.00000009 in use flush logs; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000005 free -maria master-data/maria_log.00000006 in use +maria master-data/maria_log.00000008 free +maria master-data/maria_log.00000009 in use set global maria_log_purge_type=immediate; insert into t1 select * from t2; +set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000007 in use -maria master-data/maria_log.00000008 in use +maria master-data/maria_log.00000011 in use drop table t1, t2; diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 4cbdb094efc..62619feb323 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -1,5 +1,6 @@ set global storage_engine=maria; set session storage_engine=maria; +set global maria_log_file_size=4294967296; drop table if exists t1,t2; SET SQL_WARNINGS=1; CREATE TABLE t1 ( @@ -2048,7 +2049,7 @@ show variables like 'maria%'; Variable_name Value maria_block_size 8192 maria_checkpoint_interval 30 -maria_log_file_size 1073741824 +maria_log_file_size 4294959104 maria_log_purge_type immediate maria_max_sort_file_size 9223372036853727232 maria_pagecache_age_threshold 300 diff --git a/mysql-test/r/ps_maria.result b/mysql-test/r/ps_maria.result index 8416a670228..f06aac10747 100644 --- a/mysql-test/r/ps_maria.result +++ b/mysql-test/r/ps_maria.result @@ -1,3 +1,4 @@ +set global maria_log_file_size=4294967296; use test; drop table if exists t1, t9 ; create table t1 -- cgit v1.2.1 From 77e08a745b8a42e7b594643ac5ee79490c7b23ab Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Dec 2007 22:12:44 +0200 Subject: Fixed maximum file size change. Now it flush buffer after switching to new one which prevent deadlock. mysql-test/r/maria-purge.result: Fixed test which use setting maria_checkpoint_interval to force checkpoint now. mysql-test/t/maria-purge.test: Fixed test which use setting maria_checkpoint_interval to force checkpoint now. --- mysql-test/r/maria-purge.result | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/maria-purge.result b/mysql-test/r/maria-purge.result index c616ab4c2b8..ade5426b327 100644 --- a/mysql-test/r/maria-purge.result +++ b/mysql-test/r/maria-purge.result @@ -9,8 +9,6 @@ STRING_DATA char(255) default NULL CREATE TABLE t2 ( STRING_DATA char(255) default NULL ); -set global maria_log_file_size=16777216; -set global maria_checkpoint_interval=30; INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'); insert into t2 select * from t1; @@ -35,12 +33,17 @@ insert into t2 select * from t1; insert into t1 select * from t2; insert into t2 select * from t1; insert into t1 select * from t2; +set global maria_log_file_size=16777216; +set global maria_checkpoint_interval=30; +SHOW ENGINE maria logs; +Type Name Status +maria master-data/maria_log.00000002 in use insert into t2 select * from t1; insert into t1 select * from t2; set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000005 in use +maria master-data/maria_log.00000004 in use set global maria_log_file_size=16777216; select @@global.maria_log_file_size; @@global.maria_log_file_size @@ -48,7 +51,7 @@ select @@global.maria_log_file_size; set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status -maria master-data/maria_log.00000005 in use +maria master-data/maria_log.00000004 in use set global maria_log_file_size=8388608; select @@global.maria_log_file_size; @@global.maria_log_file_size @@ -58,6 +61,7 @@ insert into t1 select * from t2; set global maria_checkpoint_interval=30; SHOW ENGINE maria logs; Type Name Status +maria master-data/maria_log.00000004 free maria master-data/maria_log.00000005 free maria master-data/maria_log.00000006 free maria master-data/maria_log.00000007 free -- cgit v1.2.1