Loading include/thr_lock.h +1 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,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; Loading mysql-test/r/myisam.result +21 −0 Original line number Diff line number Diff line Loading @@ -922,6 +922,27 @@ SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; Variable_name Value myisam_repair_threads 1 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; 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 set storage_engine=MyISAM; drop table if exists t1,t2,t3; Loading mysql-test/t/myisam.test +27 −0 Original line number Diff line number Diff line Loading @@ -847,6 +847,33 @@ DROP TABLE t1; SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; # # 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; # # Bug#24607 - MyISAM pointer size determined incorrectly # 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; --echo End of 4.1 tests Loading mysys/thr_lock.c +10 −2 Original line number Diff line number Diff line Loading @@ -757,8 +757,16 @@ void thr_unlock(THR_LOCK_DATA *data) } else lock->write.last=data->prev; if (lock_type >= TL_WRITE_CONCURRENT_INSERT && lock->update_status) 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 */ Loading scripts/fill_help_tables.sh +1 −0 Original line number Diff line number Diff line Loading @@ -521,6 +521,7 @@ print <<EOF; -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA EOF print "set sql_mode='';\n"; print "delete from help_topic;\n"; print "delete from help_category;\n"; print "delete from help_keyword;\n"; Loading Loading
include/thr_lock.h +1 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,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; Loading
mysql-test/r/myisam.result +21 −0 Original line number Diff line number Diff line Loading @@ -922,6 +922,27 @@ SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; Variable_name Value myisam_repair_threads 1 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; 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 set storage_engine=MyISAM; drop table if exists t1,t2,t3; Loading
mysql-test/t/myisam.test +27 −0 Original line number Diff line number Diff line Loading @@ -847,6 +847,33 @@ DROP TABLE t1; SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; # # 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; # # Bug#24607 - MyISAM pointer size determined incorrectly # 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; --echo End of 4.1 tests Loading
mysys/thr_lock.c +10 −2 Original line number Diff line number Diff line Loading @@ -757,8 +757,16 @@ void thr_unlock(THR_LOCK_DATA *data) } else lock->write.last=data->prev; if (lock_type >= TL_WRITE_CONCURRENT_INSERT && lock->update_status) 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 */ Loading
scripts/fill_help_tables.sh +1 −0 Original line number Diff line number Diff line Loading @@ -521,6 +521,7 @@ print <<EOF; -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA EOF print "set sql_mode='';\n"; print "delete from help_topic;\n"; print "delete from help_category;\n"; print "delete from help_keyword;\n"; Loading