From d472978bb13a512661478600a66c5f82faf7f812 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Dec 2006 19:11:43 +0400 Subject: [PATCH 01/19] BUG#23196 - MySQL server does not exit / shutdown when storage engine returns errno 12 If there is not enough memory to store or update blob record (while allocating record buffer), myisam marks table as crashed. With this fix myisam attempts to roll an index back and return an error, not marking a table as crashed. Affects myisam tables with blobs only. No test case for this fix. myisam/mi_dynrec.c: If there is not enough memory to store or update blob record (while allocating record buffer), return HA_ERR_OUT_OF_MEM instead of ENOMEM. In this case storage engine can simply roll an index back and return an error, not marking table as crashed. myisam/mi_update.c: In some cases do not mark a table as crashed if we run out of memory. Instead roll an index back and return an error. These cases are signalled with my_errno set to HA_ERR_OUT_OF_MEM. myisam/mi_write.c: In some cases do not mark a table as crashed if we run out of memory. Instead roll an index back and return an error. These cases are signalled with my_errno set to HA_ERR_OUT_OF_MEM. --- myisam/mi_dynrec.c | 4 ++-- myisam/mi_update.c | 3 ++- myisam/mi_write.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 727f44341b1..260f461685e 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -81,7 +81,7 @@ int _mi_write_blob_record(MI_INFO *info, const byte *record) #endif if (!(rec_buff=(byte*) my_alloca(reclength))) { - my_errno=ENOMEM; + my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), @@ -115,7 +115,7 @@ int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const byte *record) #endif if (!(rec_buff=(byte*) my_alloca(reclength))) { - my_errno=ENOMEM; + my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), diff --git a/myisam/mi_update.c b/myisam/mi_update.c index 00eee18bfab..d5a580748fc 100644 --- a/myisam/mi_update.c +++ b/myisam/mi_update.c @@ -193,7 +193,8 @@ err: save_errno=my_errno; if (changed) key_changed|= HA_STATE_CHANGED; - if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_RECORD_FILE_FULL) + if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_OUT_OF_MEM || + my_errno == HA_ERR_RECORD_FILE_FULL) { info->errkey= (int) i; flag=0; diff --git a/myisam/mi_write.c b/myisam/mi_write.c index 720c96b2d38..76e164adc99 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -164,7 +164,7 @@ int mi_write(MI_INFO *info, byte *record) err: save_errno=my_errno; if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_RECORD_FILE_FULL || - my_errno == HA_ERR_NULL_IN_SPATIAL) + my_errno == HA_ERR_NULL_IN_SPATIAL || my_errno == HA_ERR_OUT_OF_MEM) { if (info->bulk_insert) { From 2b0c4476835c31f37b93aa96a905cdf1917766cd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Dec 2006 18:44:14 +0400 Subject: [PATCH 02/19] BUG#23526 - show table status reports incorrect values for MyISAM tables This problem could happen when show table status get outdated copy of TABLE object from table cache. MyISAM updates state info when external_lock() method is called. Though I_S does not lock a table to avoid deadlocks. If I_S opens a table which is in a table cache it will likely get outdated state info copy. In this case shared state copy is more recent than local copy. This problem is fixed by correctly restoring myisam state info pointer back to original value, that is to shared state. Affects MyISAM only. No good deterministic test case for this fix. include/thr_lock.h: Added restore_status, that will be called prior to release a read lock. myisam/mi_locking.c: Added mi_restore_status, that will be called prior to release a read lock. This function is intended to set myisam state pointer back to original value, that is to shared state. myisam/mi_open.c: Added restore_status, that will be called prior to release a read lock. myisam/myisamdef.h: Added mi_restore_status, that will be called prior to release a read lock. mysys/thr_lock.c: Call restore_status if we have lock with priority lower than TL_WRITE_CONCURRENT_INSERT. --- include/thr_lock.h | 1 + myisam/mi_locking.c | 9 +++++++++ myisam/mi_open.c | 1 + myisam/myisamdef.h | 1 + mysys/thr_lock.c | 12 ++++++++++-- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/include/thr_lock.h b/include/thr_lock.h index 251d8e7c9cf..d34358d5a6b 100644 --- a/include/thr_lock.h +++ b/include/thr_lock.h @@ -122,6 +122,7 @@ typedef struct st_thr_lock { void (*get_status)(void*, int); /* When one gets a lock */ void (*copy_status)(void*,void*); void (*update_status)(void*); /* Before release of write */ + void (*restore_status)(void*); /* Before release of read */ my_bool (*check_status)(void *); } THR_LOCK; diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c index 36b793363c5..ee776128eb8 100644 --- a/myisam/mi_locking.c +++ b/myisam/mi_locking.c @@ -326,6 +326,15 @@ void mi_update_status(void* param) } } + +void mi_restore_status(void *param) +{ + MI_INFO *info= (MI_INFO*) param; + info->state= &info->s->state.state; + info->append_insert_at_end= 0; +} + + void mi_copy_status(void* to,void *from) { ((MI_INFO*) to)->state= &((MI_INFO*) from)->save_state; diff --git a/myisam/mi_open.c b/myisam/mi_open.c index bf20eb3f270..1f7dd23f148 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -505,6 +505,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) share->lock.get_status=mi_get_status; share->lock.copy_status=mi_copy_status; share->lock.update_status=mi_update_status; + share->lock.restore_status= mi_restore_status; share->lock.check_status=mi_check_status; } } diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h index 12e2c8e4bec..14f4570771a 100644 --- a/myisam/myisamdef.h +++ b/myisam/myisamdef.h @@ -732,6 +732,7 @@ int mi_unique_comp(MI_UNIQUEDEF *def, const byte *a, const byte *b, my_bool null_are_equal); void mi_get_status(void* param, int concurrent_insert); void mi_update_status(void* param); +void mi_restore_status(void* param); void mi_copy_status(void* to,void *from); my_bool mi_check_status(void* param); void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows); diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 66848b94651..58b55583c5f 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -758,8 +758,16 @@ void thr_unlock(THR_LOCK_DATA *data) } else lock->write.last=data->prev; - if (lock_type >= TL_WRITE_CONCURRENT_INSERT && lock->update_status) - (*lock->update_status)(data->status_param); + if (lock_type >= TL_WRITE_CONCURRENT_INSERT) + { + if (lock->update_status) + (*lock->update_status)(data->status_param); + } + else + { + if (lock->restore_status) + (*lock->restore_status)(data->status_param); + } if (lock_type == TL_READ_NO_INSERT) lock->read_no_write_count--; data->type=TL_UNLOCK; /* Mark unlocked */ From e071fdb6323a51254ca77ce0aebae0885e4fac42 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Dec 2006 16:01:56 +0400 Subject: [PATCH 03/19] BUG#24358 - Table access crashes server Having broken .frm, particulary number of field names does not match number of fields, causes server crash. Refuse to open a table if number of field names in a table is not equal to number of fields in a table. No test case, since it requires broken .frm file. sql/table.cc: Refuse to open a table if number of field names in a table is not equal to number of fields in a table. --- sql/table.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/table.cc b/sql/table.cc index aff1e6d11f6..dab2f978327 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -373,6 +373,8 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, memcpy(comment_pos, disk_buff+read_length-com_length, com_length); fix_type_pointers(&int_array,&outparam->fieldnames,1,&names); + if (outparam->fieldnames.count != outparam->fields) + goto err_not_open; fix_type_pointers(&int_array,outparam->intervals,interval_count, &names); From 9d85b0a61673eea742c0fa84c9bafb5cc620e4fd Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Dec 2006 19:05:35 +0400 Subject: [PATCH 04/19] BUG#21310 - Trees in SQL causing a "crashed" table with MyISAM storage engine An update that used a join of a table to itself and modified the table on one side of the join reported the table as crashed or updated wrong rows. Fixed by creating temporary table for self-joined multi update statement. mysql-test/r/myisam.result: A test case for BUG#21310. mysql-test/t/myisam.test: A test case for BUG#21310. sql/lock.cc: Exclude 'table' param from check. sql/sql_update.cc: Disabling record cache for self-joined multi update statement is wrong. The join must only see the table as it was at the beginning of the statement. safe_update_on_fly check if it is safe to update first table on the fly, that is not creating temporary table. It is possible in case a row from this table is never read more than once. safe_update_on_fly now detect self-joined table and refuse to update this table on the fly. --- mysql-test/r/myisam.result | 16 +++++ mysql-test/t/myisam.test | 19 +++++ sql/lock.cc | 2 +- sql/sql_update.cc | 139 +++++++++++++++++-------------------- 4 files changed, 99 insertions(+), 77 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index b34c127595f..73cee4835bf 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -944,3 +944,19 @@ select * from t1; a 42 drop table t1; +CREATE TABLE t1(a VARCHAR(16)); +INSERT INTO t1 VALUES('aaaaaaaa'),(NULL); +UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa'; +SELECT * FROM t1; +a +aaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaa +DROP TABLE t1; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(2); +UPDATE t1,t1 AS t2 SET t1.a=t1.a+2 WHERE t1.a=t2.a-1; +SELECT * FROM t1 ORDER BY a; +a +2 +3 +DROP TABLE t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 745e3a2e377..7868e7bad4e 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -890,4 +890,23 @@ connection default; select * from t1; drop table t1; +# +# BUG#21310 - Trees in SQL causing a "crashed" table with MyISAM storage +# engine +# + +# A simplified test case that reflect crashed table issue. +CREATE TABLE t1(a VARCHAR(16)); +INSERT INTO t1 VALUES('aaaaaaaa'),(NULL); +UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa'; +SELECT * FROM t1; +DROP TABLE t1; + +# A test case that reflect wrong result set. +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(2); +UPDATE t1,t1 AS t2 SET t1.a=t1.a+2 WHERE t1.a=t2.a-1; +SELECT * FROM t1 ORDER BY a; +DROP TABLE t1; + # End of 4.1 tests diff --git a/sql/lock.cc b/sql/lock.cc index ab4a81034ba..3b2b2857f65 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -528,7 +528,7 @@ int mysql_lock_have_duplicate(THD *thd, TABLE *table, TABLE_LIST *tables) for (; tables; tables= tables->next) { table2= tables->table; - if (table2->tmp_table == TMP_TABLE) + if (table2->tmp_table == TMP_TABLE || table == table2) continue; /* All tables in list must be in lock. */ diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 6742fbad5c4..9a326535adc 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -23,8 +23,6 @@ #include "mysql_priv.h" #include "sql_select.h" -static bool safe_update_on_fly(JOIN_TAB *join_tab, List *fields); - /* Return 0 if row hasn't changed */ static bool compare_record(TABLE *table, ulong query_id) @@ -846,30 +844,72 @@ int multi_update::prepare(List ¬_used_values, for (i=0 ; i < table_count ; i++) set_if_bigger(max_fields, fields_for_table[i]->elements); copy_field= new Copy_field[max_fields]; - - /* - Mark all copies of tables that are updates to ensure that - init_read_record() will not try to enable a cache on them - - The problem is that for queries like - - UPDATE t1, t1 AS t2 SET t1.b=t2.c WHERE t1.a=t2.a; - - the row buffer may contain things that doesn't match what is on disk - which will cause an error when reading a row. - (This issue is mostly relevent for MyISAM tables) - */ - for (table_ref= all_tables; table_ref; table_ref=table_ref->next) - { - TABLE *table=table_ref->table; - if ((tables_to_update & table->map) && - mysql_lock_have_duplicate(thd, table, update_tables)) - table->no_cache= 1; // Disable row cache - } DBUG_RETURN(thd->is_fatal_error != 0); } +/* + Check if table is safe to update on fly + + SYNOPSIS + safe_update_on_fly() + thd Thread handler + join_tab How table is used in join + all_tables List of tables + fields Fields that are updated + + NOTES + We can update the first table in join on the fly if we know that + a row in this table will never be read twice. This is true under + the following conditions: + + - We are doing a table scan and the data is in a separate file (MyISAM) or + if we don't update a clustered key. + + - We are doing a range scan and we don't update the scan key or + the primary key for a clustered table handler. + + - Table is not joined to itself. + + WARNING + This code is a bit dependent of how make_join_readinfo() works. + + RETURN + 0 Not safe to update + 1 Safe to update +*/ + +static bool safe_update_on_fly(THD *thd, JOIN_TAB *join_tab, + TABLE_LIST *all_tables, List *fields) +{ + TABLE *table= join_tab->table; + /* First check if a table is not joined to itself. */ + if (mysql_lock_have_duplicate(thd, table, all_tables)) + return 0; + switch (join_tab->type) { + case JT_SYSTEM: + case JT_CONST: + case JT_EQ_REF: + return 1; // At most one matching row + case JT_REF: + return !check_if_key_used(table, join_tab->ref.key, *fields); + case JT_ALL: + /* If range search on index */ + if (join_tab->quick) + return !check_if_key_used(table, join_tab->quick->index, + *fields); + /* If scanning in clustered key */ + if ((table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) && + table->primary_key < MAX_KEY) + return !check_if_key_used(table, table->primary_key, *fields); + return 1; + default: + break; // Avoid compler warning + } + return 0; +} + + /* Initialize table for multi table @@ -905,7 +945,7 @@ multi_update::initialize_tables(JOIN *join) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); if (table == main_table) // First table in join { - if (safe_update_on_fly(join->join_tab, &temp_fields)) + if (safe_update_on_fly(thd, join->join_tab, all_tables, &temp_fields)) { table_to_update= main_table; // Update table on the fly continue; @@ -951,59 +991,6 @@ multi_update::initialize_tables(JOIN *join) DBUG_RETURN(0); } -/* - Check if table is safe to update on fly - - SYNOPSIS - safe_update_on_fly - join_tab How table is used in join - fields Fields that are updated - - NOTES - We can update the first table in join on the fly if we know that - a row in this tabel will never be read twice. This is true under - the folloing conditions: - - - We are doing a table scan and the data is in a separate file (MyISAM) or - if we don't update a clustered key. - - - We are doing a range scan and we don't update the scan key or - the primary key for a clustered table handler. - - WARNING - This code is a bit dependent of how make_join_readinfo() works. - - RETURN - 0 Not safe to update - 1 Safe to update -*/ - -static bool safe_update_on_fly(JOIN_TAB *join_tab, List *fields) -{ - TABLE *table= join_tab->table; - switch (join_tab->type) { - case JT_SYSTEM: - case JT_CONST: - case JT_EQ_REF: - return 1; // At most one matching row - case JT_REF: - return !check_if_key_used(table, join_tab->ref.key, *fields); - case JT_ALL: - /* If range search on index */ - if (join_tab->quick) - return !check_if_key_used(table, join_tab->quick->index, - *fields); - /* If scanning in clustered key */ - if ((table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) && - table->primary_key < MAX_KEY) - return !check_if_key_used(table, table->primary_key, *fields); - return 1; - default: - break; // Avoid compler warning - } - return 0; -} - multi_update::~multi_update() { From 569eefdc7296ea994cb0161ef31e3765da0701bd Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Dec 2006 19:54:49 +0400 Subject: [PATCH 05/19] After merge fix. --- sql/sql_update.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 5b7b7f594da..ce0126f1f1c 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1079,10 +1079,11 @@ int multi_update::prepare(List ¬_used_values, */ static bool safe_update_on_fly(THD *thd, JOIN_TAB *join_tab, - TABLE_LIST *all_tables, List *fields) + TABLE_LIST *table_ref, TABLE_LIST *all_tables, + List *fields) { TABLE *table= join_tab->table; - if (unique_table(thd, table, all_tables)) + if (unique_table(thd, table_ref, all_tables)) return 0; switch (join_tab->type) { case JT_SYSTEM: @@ -1142,7 +1143,8 @@ multi_update::initialize_tables(JOIN *join) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); if (table == main_table) // First table in join { - if (safe_update_on_fly(thd, join->join_tab, all_tables, &temp_fields)) + if (safe_update_on_fly(thd, join->join_tab, table_ref, all_tables, + &temp_fields)) { table_to_update= main_table; // Update table on the fly continue; From f468d34eb65becb7196bcb9e374732ed6631db71 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 2 Jan 2007 09:42:13 -0800 Subject: [PATCH 06/19] Bug#24270 "mysql_install_db doesn't work properly on 5.1" force sql_mode to known value within initialization scripts scripts/fill_help_tables.sh: force sql_mode to known value scripts/mysql_create_system_tables.sh: force sql_mode to known value scripts/mysql_fix_privilege_tables.sql: force sql_mode to known value --- scripts/fill_help_tables.sh | 1 + scripts/mysql_create_system_tables.sh | 1 + scripts/mysql_fix_privilege_tables.sql | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/fill_help_tables.sh b/scripts/fill_help_tables.sh index 1dff7edd268..e600d24032b 100644 --- a/scripts/fill_help_tables.sh +++ b/scripts/fill_help_tables.sh @@ -521,6 +521,7 @@ print < Date: Fri, 5 Jan 2007 10:26:51 +0100 Subject: [PATCH 07/19] Bug#24607 - MyISAM pointer size determined incorrectly The function mi_get_pointer_length() computed too small pointer size for very large tables. Inserted missing 'else' between the branches for very large tables. myisam/mi_create.c: Bug#24607 - MyISAM pointer size determined incorrectly Inserted missing 'else' between the branches for very large tables. Harmonized literals "(longlong) 1" and "1L" to "ULL(1)" where they are used for "ulonglong file_length". mysql-test/r/myisam.result: Bug#24607 - MyISAM pointer size determined incorrectly Added the test result. mysql-test/t/myisam.test: Bug#24607 - MyISAM pointer size determined incorrectly Added the test. --- myisam/mi_create.c | 13 +++++++------ mysql-test/r/myisam.result | 5 +++++ mysql-test/t/myisam.test | 8 ++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/myisam/mi_create.c b/myisam/mi_create.c index c1310a8012d..da9e0887b00 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -768,18 +768,19 @@ uint mi_get_pointer_length(ulonglong file_length, uint def) if (file_length) /* If not default */ { #ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS - if (file_length >= (longlong) 1 << 56) + if (file_length >= ULL(1) << 56) def=8; + else #endif - if (file_length >= (longlong) 1 << 48) + if (file_length >= ULL(1) << 48) def=7; - if (file_length >= (longlong) 1 << 40) + else if (file_length >= ULL(1) << 40) def=6; - else if (file_length >= (longlong) 1 << 32) + else if (file_length >= ULL(1) << 32) def=5; - else if (file_length >= (1L << 24)) + else if (file_length >= ULL(1) << 24) def=4; - else if (file_length >= (1L << 16)) + else if (file_length >= ULL(1) << 16) def=3; else def=2; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 73cee4835bf..749d5f47809 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -960,3 +960,8 @@ a 2 3 DROP TABLE t1; +CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=5100100100; +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 MyISAM 9 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4294967295 avg_row_length=70100 +DROP TABLE t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 7868e7bad4e..d065d2e3ebf 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -909,4 +909,12 @@ UPDATE t1,t1 AS t2 SET t1.a=t1.a+2 WHERE t1.a=t2.a-1; SELECT * FROM t1 ORDER BY a; DROP TABLE t1; +# +# Bug#24607 - MyISAM pointer size determined incorrectly +# +CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=5100100100; +--replace_column 5 X 6 X 7 X 9 X 10 X 11 X 12 X 13 X 14 X 16 X +SHOW TABLE STATUS LIKE 't1'; +DROP TABLE t1; + # End of 4.1 tests From 61a2861973c7e4e7fa9fa1e48ed3499390c72d56 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Jan 2007 18:05:37 +0400 Subject: [PATCH 08/19] BUG#24855 - Crash mysqld 4.1.21 with corrupted tables Accessing fixed record format table with crashed key definition results in server/myisamchk segmentation fault. This is fixed by refusing to open such tables. Affects MyISAM only. No test case, since it requires crashed table. myisam/mi_open.c: Refuse to open fixed record format table with key segment that includes BLOB part (which is true only for tables with crashed key definition). --- myisam/mi_open.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index 4efe6f42d5e..047686278b4 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -315,7 +315,13 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) for (j=0 ; j < share->keyinfo[i].keysegs; j++,pos++) { disk_pos=mi_keyseg_read(disk_pos, pos); - + if (pos->flag & HA_BLOB_PART && + ! (share->options & (HA_OPTION_COMPRESS_RECORD | + HA_OPTION_PACK_RECORD))) + { + my_errno= HA_ERR_CRASHED; + goto err; + } if (pos->type == HA_KEYTYPE_TEXT || pos->type == HA_KEYTYPE_VARTEXT) { if (!pos->language) From 1ce535c6abe4681a9161de073acae340667f38f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Jan 2007 11:27:33 +0100 Subject: [PATCH 09/19] Cset exclude: msvensson@neptunus.(none)|ChangeSet|20060825084614|09755 mysql-test/r/myisam.result: Exclude mysql-test/t/myisam.test: Exclude --- mysql-test/r/myisam.result | 4 ++-- mysql-test/t/myisam.test | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 73cee4835bf..a95d57b4513 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -927,12 +927,12 @@ show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t1 (a int) engine=myisam select 42 a; select * from t1; a diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 7868e7bad4e..22f5bf18c0d 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -861,20 +861,14 @@ connect (session2,localhost,root,,); connection session1; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 9 a; enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR show create table t1; connection session2; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 99 a; enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR show create table t1; connection default; From eb179ebefc74dae6af544b109e085ad00f5f61fe Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Jan 2007 12:12:24 +0100 Subject: [PATCH 10/19] Cset exclude: msvensson@pilot.mysql.com|ChangeSet|20070117102733|42618 mysql-test/r/myisam.result: Exclude mysql-test/t/myisam.test: Exclude --- mysql-test/r/myisam.result | 4 ++-- mysql-test/t/myisam.test | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index a95d57b4513..73cee4835bf 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -927,12 +927,12 @@ show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' create table t1 (a int) engine=myisam select 42 a; select * from t1; a diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 22f5bf18c0d..7868e7bad4e 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -861,14 +861,20 @@ connect (session2,localhost,root,,); connection session1; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 9 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR show create table t1; connection session2; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 99 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR show create table t1; connection default; From f509e774bc5e593418f84b70d315b9d4a798eb12 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Jan 2007 12:22:00 +0100 Subject: [PATCH 11/19] Bug#21122 SHOW CREATE TABLE: directory output only sometimes Bug #25000 myisam.test fails on 'pb-valgrind-*' Valgrind - Move tests that need symlink to symlink.test mysql-test/r/myisam.result: - Move tests that need symlink to symlink.test mysql-test/r/symlink.result: - Move tests that need symlink to symlink.test mysql-test/t/myisam.test: - Move tests that need symlink to symlink.test mysql-test/t/symlink.test: - Move tests that need symlink to symlink.test --- mysql-test/r/myisam.result | 21 --------------------- mysql-test/r/symlink.result | 21 +++++++++++++++++++++ mysql-test/t/myisam.test | 35 ----------------------------------- mysql-test/t/symlink.test | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 56 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 73cee4835bf..62d3e679eb2 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -923,27 +923,6 @@ SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; Variable_name Value myisam_repair_threads 1 -show create table t1; -Table Create Table -t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' -show create table t1; -Table Create Table -t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' -create table t1 (a int) engine=myisam select 42 a; -select * from t1; -a -9 -select * from t1; -a -99 -select * from t1; -a -42 -drop table t1; CREATE TABLE t1(a VARCHAR(16)); INSERT INTO t1 VALUES('aaaaaaaa'),(NULL); UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa'; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index f6779689133..b104ce50a56 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -102,3 +102,24 @@ t1 CREATE TABLE `t1` ( `i` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +create table t1 (a int) engine=myisam select 42 a; +select * from t1; +a +9 +select * from t1; +a +99 +select * from t1; +a +42 +drop table t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 7868e7bad4e..01e7a08ae53 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -854,41 +854,6 @@ DROP TABLE t1; # SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; -# Bug#8706 - temporary table with data directory option fails -# -connect (session1,localhost,root,,); -connect (session2,localhost,root,,); - -connection session1; -disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; -enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -show create table t1; - -connection session2; -disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; -enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -show create table t1; - -connection default; -create table t1 (a int) engine=myisam select 42 a; - -connection session1; -select * from t1; -disconnect session1; -connection session2; -select * from t1; -disconnect session2; -connection default; -select * from t1; -drop table t1; # # BUG#21310 - Trees in SQL causing a "crashed" table with MyISAM storage diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index c0c1db3d553..201a2866c4f 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -133,4 +133,41 @@ enable_query_log; show create table t1; drop table t1; +# +# Bug#8706 - temporary table with data directory option fails +# +connect (session1,localhost,root,,); +connect (session2,localhost,root,,); + +connection session1; +disable_query_log; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; +enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +show create table t1; + +connection session2; +disable_query_log; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; +enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +show create table t1; + +connection default; +create table t1 (a int) engine=myisam select 42 a; + +connection session1; +select * from t1; +disconnect session1; +connection session2; +select * from t1; +disconnect session2; +connection default; +select * from t1; +drop table t1; + # End of 4.1 tests From ca2aa14312ee5414ba69ed2022bc0bc1617e58c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Jan 2007 12:03:03 +0100 Subject: [PATCH 12/19] Use $MYSQLTESTVARDIR --- mysql-test/r/symlink.result | 4 ++-- mysql-test/t/symlink.test | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index c64d34aa80c..891efb7a0cf 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -115,12 +115,12 @@ show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' create table t1 (a int) engine=myisam select 42 a; select * from t1; a diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 94890eab93d..9a498eaadc9 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -147,20 +147,20 @@ connect (session2,localhost,root,,); connection session1; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 9 a; enable_query_log; # If running test suite with a non standard tmp dir, the "show create table" # will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; connection session2; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 99 a; enable_query_log; # If running test suite with a non standard tmp dir, the "show create table" # will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; connection default; From ea042b93309261af2b27fefde9b802f00f150702 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Jan 2007 12:18:18 +0100 Subject: [PATCH 13/19] Update result file to 5.1 format --- mysql-test/r/symlink.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index f9f7a1c5741..ce20ebd2a44 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -114,12 +114,12 @@ drop table t1; show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' create table t1 (a int) engine=myisam select 42 a; select * from t1; From 848a663b43e7950ba54c5e8586eef35719bf9ca6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Jan 2007 13:06:22 +0100 Subject: [PATCH 14/19] After merge fix --- mysql-test/r/myisam.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 5629f0bc22a..76a5ce16293 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1640,5 +1640,5 @@ DROP TABLE t1; CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=5100100100; 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 MyISAM 9 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4294967295 avg_row_length=70100 +t1 MyISAM 10 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4294967295 avg_row_length=70100 DROP TABLE t1; From fde52a2f827654f02dae9e0cd69f262bb54ee11a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Jan 2007 16:34:58 +0400 Subject: [PATCH 15/19] BUG#24401 - MySQL server crashes if you try to retrieve data from corrupted table Accessing a table with corrupted column definition results in server crash. This is fixed by refusing to open such tables. Affects MyISAM only. No test case, since it requires crashed table. myisam/mi_open.c: Refuse to open MyISAM table with summary columns length bigger than length of the record. --- myisam/mi_open.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index 047686278b4..b007eb63e63 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -435,6 +435,13 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) offset+=share->rec[i].length; } share->rec[i].type=(int) FIELD_LAST; /* End marker */ + if (offset > share->base.reclength) + { + /* purecov: begin inspected */ + my_errno= HA_ERR_CRASHED; + goto err; + /* purecov: end */ + } if (! lock_error) { From 5e0fd916f1fa72cd2cc4126669ad1772a77e055d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Jan 2007 11:53:09 +0400 Subject: [PATCH 16/19] After merge fix. --- mysql-test/r/myisam.result | 13 ------------- mysql-test/t/myisam.test | 34 ---------------------------------- 2 files changed, 47 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 76a5ce16293..52dae8abd02 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1608,19 +1608,6 @@ create table t3 (c1 int) engine=myisam pack_keys=default; create table t4 (c1 int) engine=myisam 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; -show create table t1; -show create table t1; -create table t1 (a int) engine=myisam select 42 a; -select * from t1; -a -9 -select * from t1; -a -99 -select * from t1; -a -42 -drop table t1; CREATE TABLE t1(a VARCHAR(16)); INSERT INTO t1 VALUES('aaaaaaaa'),(NULL); UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa'; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 040ab3fce09..3189a59333b 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -969,40 +969,6 @@ create table t3 (c1 int) engine=myisam pack_keys=default; --error 1064 create table t4 (c1 int) engine=myisam pack_keys=2; drop table t1, t2, t3; -# -# Bug#8706 - temporary table with data directory option fails -# -connect (session1,localhost,root,,); -connect (session2,localhost,root,,); - -connection session1; -disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" select 9 a; -enable_query_log; -disable_result_log; -show create table t1; -enable_result_log; - -connection session2; -disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" select 99 a; -enable_query_log; -disable_result_log; -show create table t1; -enable_result_log; - -connection default; -create table t1 (a int) engine=myisam select 42 a; - -connection session1; -select * from t1; -disconnect session1; -connection session2; -select * from t1; -disconnect session2; -connection default; -select * from t1; -drop table t1; # # BUG#21310 - Trees in SQL causing a "crashed" table with MyISAM storage From 112ef50f287026d41fc509aabdc87fc65d40d7a4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Jan 2007 13:17:01 +0100 Subject: [PATCH 17/19] Bug#24607 - MyISAM pointer size determined incorrectly Fixed test. On 32-bit machines which compile without -DBIG_TABLES, MAX_ROWS is truncated to a 32-bit value. Using a value below 4G is portable. mysql-test/r/myisam.result: Bug#24607 - MyISAM pointer size determined incorrectly Fixed test results. --- mysql-test/r/myisam.result | 4 ++-- mysql-test/t/myisam.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 48d9905311d..41d2d48f82e 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -939,8 +939,8 @@ a 2 3 DROP TABLE t1; -CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=5100100100; +CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100; 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 MyISAM 9 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4294967295 avg_row_length=70100 +t1 MyISAM 9 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4100100100 avg_row_length=70100 DROP TABLE t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 0aeb49b0e99..0abe0a25f44 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -877,7 +877,7 @@ DROP TABLE t1; # # Bug#24607 - MyISAM pointer size determined incorrectly # -CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=5100100100; +CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100; --replace_column 5 X 6 X 7 X 9 X 10 X 11 X 12 X 13 X 14 X 16 X SHOW TABLE STATUS LIKE 't1'; DROP TABLE t1; From ccb002dbc2ce72221716e31f9fccd10e26ecb941 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Jan 2007 13:29:46 +0100 Subject: [PATCH 18/19] Bug#24607 - MyISAM pointer size determined incorrectly After merge fix --- mysql-test/r/myisam.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 6ffbabe3c61..373049bf051 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1640,5 +1640,5 @@ DROP TABLE t1; CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100; 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 MyISAM 9 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4100100100 avg_row_length=70100 +t1 MyISAM 10 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4100100100 avg_row_length=70100 DROP TABLE t1; From 89f02b13e3633bbc71f5b9c76dd9918cd371829e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Jan 2007 15:45:41 +0100 Subject: [PATCH 19/19] After merge fix --- mysql-test/r/myisam.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index f1f2a45c695..a6f3c071fb0 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1623,6 +1623,7 @@ CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100; 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 MyISAM 10 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4100100100 avg_row_length=70100 +DROP TABLE t1; End of 4.1 tests create table t1 (c1 int) engine=myisam pack_keys=0; create table t2 (c1 int) engine=myisam pack_keys=1;