Fixed bug in undo_key_delete; Caused crashed key files in recovery
Maria is now used for internal temporary tables in MySQL
Better usage of VARCHAR and long strings in temporary tables
Use packed fields if BLOCK_RECORD is used
null_bytes are not anymore stored in a separate field
New interface to remember and restore scan position
Fixed bugs in unique handling
Don't sync Maria temporary tables
Lock control file while it's used to stop several processes from using it
Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
Added MY_FORCE_LOCK
include/my_sys.h:
Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
Added MY_FORCE_LOCK
include/myisam.h:
Make MyISAM columndef compile time compatible with Maria
mysql-test/lib/mtr_process.pl:
Removed confusing warning (It's common that there is a lot of other files than pid files)
mysql-test/mysql-test-run.pl:
Added --sync-frm to speed up tests
mysql-test/r/maria-recovery.result:
Updated results from wrong push
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
Marked test as --big
mysys/my_lock.c:
If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
If MY_NO_WAIT is given, return at once if lock is occupied
If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
mysys/my_thr_init.c:
Fix that we don't give name to thread before it's properly initied
sql/handler.cc:
Added myisam.h
sql/handler.h:
Changes to use Maria for internal temporary tables
Removed not needed argument to restart_rnd_next()
Added function remember_rnd_pos()
sql/my_lock.c:
If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
If MY_NO_WAIT is given, return at once if lock is occupied
If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
sql/mysql_priv.h:
Added maria_hton
sql/sql_class.h:
Changes to use Maria for internal temporary tables
sql/sql_select.cc:
Changes to use Maria for internal temporary tables
Temporary tables didn't properly switch to dynamic row format if long strings was used
Better usage of VARCHAR in temporary tables
Use new interface to restart scan in duplicate removal
sql/sql_select.h:
Changes to use Maria for internal temporary tables
sql/sql_show.cc:
Changes to use Maria for internal temporary tables
Removed all end space
sql/sql_table.cc:
Set HA_OPTION_PACK_RECORD if we are not using default or static record
sql/sql_union.cc:
If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
If MY_NO_WAIT is given, return at once if lock is occupied
If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
sql/sql_update.cc:
If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
If MY_NO_WAIT is given, return at once if lock is occupied
If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
storage/maria/ha_maria.cc:
Use packed fields
null_bytes are not anymore stored in a separate field
Changes to use Maria for internal temporary tables
Give warning if we try to do an ALTER TABLE to a unusable row format
storage/maria/ha_maria.h:
Allow Maria with block format to restart scanning at given position
storage/maria/ma_blockrec.c:
Added functions to remember and restore scan position
Allocate cur_row.extents so that we don't have to do a malloc on first read
Fixed bug when using packed row without packed strings
Removed unneeded calls to free_full_pages()
Fixed unlikely bug when using old bitmap to read head page and head page had gone away
Remember row position when doing undo of delete and update row (needed for undo of key delete)
storage/maria/ma_blockrec.h:
Added functions to remember and restore scan position
storage/maria/ma_close.c:
Don't sync temporary tables
storage/maria/ma_control_file.c:
Lock control file while it's used to stop several processes from using it
storage/maria/ma_create.c:
Fixed bug when using FIELD_NORMAL that was longer than FULL_PAGE_SIZE
Fixed bug that casued fields to not be ordered according to offset
Fixed bug in unique creation
storage/maria/ma_delete.c:
Don't write record reference when deleting key.
(Rowid is likely to be different when we undo this)
storage/maria/ma_dynrec.c:
Fixed core dump when comparing records (happended in unique handling)
storage/maria/ma_extra.c:
MY_DONT_WAIT -> MY_SHORT_WAIT
Removed TODO comment. (Was not relevant as all other instances are guranteed to be closed when we the code is excecuted)
Added DBUG_ASSERT() to prove above.
storage/maria/ma_key_recover.c:
CLR's for UNDO_ROW_DELETE and UNDO_ROW_UPDATE now include rowid for the row.
This was needed for undo_key_delete to work, as undo of delete row is likely to put row in a new position.
undo_delete_key now doesn't include row position
storage/maria/ma_open.c:
Added virtual functions for remembering and restoring scan position
Fixed wrong key search method when using multi-byte character sets (Bug#32705)
Store original column number in index file
NOTE: Index files are now incompatible with previous versions!
(Ok as we haven't yet made a public Maria release)
storage/maria/ma_recovery.c:
Set info->cur_row.lastpos when reading CLR's for UNDO_ROW_DELETE or UNDO_ROW_UPDATE
storage/maria/ma_scan.c:
Added default function to remember and restore scan position
storage/maria/maria_def.h:
Added virtual functions & variables to remember and restore scan position
Added MARIA_MAX_CONTROL_FILE_LOCK_RETRY
storage/myisam/ha_myisam.cc:
Fixed compiler errors as columdef->type is now an enum, not an integer
Added functions to remember and restore scan position
storage/myisam/ha_myisam.h:
Added functions to remember and restore scan position
storage/myisam/mi_check.c:
MY_DONT_WAIT -> MY_SHORT_WAIT
storage/myisam/mi_extra.c:
MY_DONT_WAIT -> MY_SHORT_WAIT
storage/myisam/mi_open.c:
MY_DONT_WAIT -> MY_SHORT_WAIT
storage/myisam/myisamdef.h:
MY_DONT_WAIT -> MY_SHORT_WAIT
2007-12-17 01:17:37 +02:00
|
|
|
--source include/big_test.inc
|
2007-09-08 11:19:35 -07:00
|
|
|
--source include/have_innodb.inc
|
2007-10-15 17:04:43 +02:00
|
|
|
--source include/have_partition.inc
|
2007-09-12 18:16:50 -07:00
|
|
|
--source include/have_binlog_format_mixed_or_row.inc
|
2007-09-08 11:19:35 -07:00
|
|
|
--source include/master-slave.inc
|
|
|
|
|
|
|
|
# Set the default connection to 'master'
|
|
|
|
|
|
|
|
--vertical_results
|
|
|
|
|
|
|
|
let $engine_type= 'innodb';
|
|
|
|
|
|
|
|
######## Creat Table Section #########
|
|
|
|
use test;
|
|
|
|
|
|
|
|
eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
|
|
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
|
|
|
fkid MEDIUMINT, filler VARCHAR(255),
|
|
|
|
PRIMARY KEY(id)) ENGINE=$engine_type;
|
|
|
|
|
|
|
|
eval CREATE TABLE test.bykey_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
|
|
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
|
|
|
fkid MEDIUMINT, filler VARCHAR(255),
|
|
|
|
PRIMARY KEY(id)) ENGINE=$engine_type
|
|
|
|
PARTITION BY KEY(id) partitions 5;
|
|
|
|
|
|
|
|
eval CREATE TABLE test.byrange_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
|
|
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
|
|
|
fkid MEDIUMINT, filler VARCHAR(255),
|
|
|
|
PRIMARY KEY(id)) ENGINE=$engine_type
|
|
|
|
PARTITION BY RANGE(id)
|
|
|
|
SUBPARTITION BY hash(id) subpartitions 2
|
|
|
|
(PARTITION pa1 values less than (10),
|
|
|
|
PARTITION pa2 values less than (20),
|
|
|
|
PARTITION pa3 values less than (30),
|
|
|
|
PARTITION pa4 values less than (40),
|
|
|
|
PARTITION pa5 values less than (50),
|
|
|
|
PARTITION pa6 values less than (60),
|
|
|
|
PARTITION pa7 values less than (70),
|
|
|
|
PARTITION pa8 values less than (80),
|
|
|
|
PARTITION pa9 values less than (90),
|
|
|
|
PARTITION pa10 values less than (100),
|
|
|
|
PARTITION pa11 values less than MAXVALUE);
|
|
|
|
|
|
|
|
######## Create SPs, Functions, Views and Triggers Section ##############
|
|
|
|
|
|
|
|
delimiter |;
|
|
|
|
CREATE PROCEDURE test.proc_norm()
|
|
|
|
BEGIN
|
|
|
|
DECLARE ins_count INT DEFAULT 1000;
|
|
|
|
DECLARE del_count INT;
|
|
|
|
DECLARE cur_user VARCHAR(255);
|
|
|
|
DECLARE local_uuid VARCHAR(255);
|
|
|
|
DECLARE local_time TIMESTAMP;
|
|
|
|
|
|
|
|
SET local_time= NOW();
|
|
|
|
SET cur_user= CURRENT_USER();
|
|
|
|
SET local_uuid= UUID();
|
|
|
|
|
|
|
|
WHILE ins_count > 0 DO
|
|
|
|
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
|
|
|
ins_count,'Going to test MBR for MySQL');
|
|
|
|
SET ins_count = ins_count - 1;
|
|
|
|
END WHILE;
|
|
|
|
|
|
|
|
SELECT MAX(id) FROM test.regular_tbl INTO del_count;
|
|
|
|
WHILE del_count > 0 DO
|
|
|
|
DELETE FROM test.regular_tbl WHERE id = del_count;
|
|
|
|
SET del_count = del_count - 2;
|
|
|
|
END WHILE;
|
|
|
|
END|
|
|
|
|
|
|
|
|
CREATE PROCEDURE test.proc_bykey()
|
|
|
|
BEGIN
|
|
|
|
DECLARE ins_count INT DEFAULT 1000;
|
|
|
|
DECLARE del_count INT;
|
|
|
|
DECLARE cur_user VARCHAR(255);
|
|
|
|
DECLARE local_uuid VARCHAR(255);
|
|
|
|
DECLARE local_time TIMESTAMP;
|
|
|
|
|
|
|
|
SET local_time= NOW();
|
|
|
|
SET cur_user= CURRENT_USER();
|
|
|
|
SET local_uuid= UUID();
|
|
|
|
|
|
|
|
WHILE ins_count > 0 DO
|
|
|
|
INSERT INTO test.bykey_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
|
|
|
ins_count,'Going to test MBR for MySQL');
|
|
|
|
SET ins_count = ins_count - 1;
|
|
|
|
END WHILE;
|
|
|
|
|
|
|
|
SELECT MAX(id) FROM test.bykey_tbl INTO del_count;
|
|
|
|
WHILE del_count > 0 DO
|
|
|
|
DELETE FROM test.bykey_tbl WHERE id = del_count;
|
|
|
|
SET del_count = del_count - 2;
|
|
|
|
END WHILE;
|
|
|
|
END|
|
|
|
|
|
|
|
|
CREATE PROCEDURE test.proc_byrange()
|
|
|
|
BEGIN
|
|
|
|
DECLARE ins_count INT DEFAULT 1000;
|
|
|
|
DECLARE del_count INT;
|
|
|
|
DECLARE cur_user VARCHAR(255);
|
|
|
|
DECLARE local_uuid VARCHAR(255);
|
|
|
|
DECLARE local_time TIMESTAMP;
|
|
|
|
|
|
|
|
SET local_time= NOW();
|
|
|
|
SET cur_user = CURRENT_USER();
|
|
|
|
SET local_uuid=UUID();
|
|
|
|
|
|
|
|
WHILE ins_count > 0 DO
|
|
|
|
INSERT INTO test.byrange_tbl VALUES (NULL, NOW(), USER(), UUID(),
|
|
|
|
ins_count,'Going to test MBR for MySQL');
|
|
|
|
SET ins_count = ins_count - 1;
|
|
|
|
END WHILE;
|
|
|
|
|
|
|
|
SELECT MAX(id) FROM test.byrange_tbl INTO del_count;
|
|
|
|
WHILE del_count > 0 DO
|
|
|
|
DELETE FROM test.byrange_tbl WHERE id = del_count;
|
|
|
|
SET del_count = del_count - 2;
|
|
|
|
END WHILE;
|
|
|
|
END|
|
|
|
|
|
|
|
|
delimiter ;|
|
|
|
|
|
|
|
|
############ Finish Setup Section ###################
|
|
|
|
|
|
|
|
|
|
|
|
############ Test Section ###################
|
|
|
|
|
|
|
|
CALL test.proc_norm();
|
|
|
|
SELECT count(*) as "Master regular" FROM test.regular_tbl;
|
|
|
|
CALL test.proc_bykey();
|
|
|
|
SELECT count(*) as "Master bykey" FROM test.bykey_tbl;
|
|
|
|
CALL test.proc_byrange();
|
|
|
|
SELECT count(*) as "Master byrange" FROM test.byrange_tbl;
|
|
|
|
|
|
|
|
--sync_slave_with_master
|
|
|
|
connection slave;
|
|
|
|
show create table test.byrange_tbl;
|
|
|
|
SELECT count(*) "Slave norm" FROM test.regular_tbl;
|
|
|
|
SELECT count(*) "Slave bykey" FROM test.bykey_tbl;
|
|
|
|
SELECT count(*) "Slave byrange" FROM test.byrange_tbl;
|
|
|
|
|
2007-09-12 13:35:39 -07:00
|
|
|
###### CLEAN UP SECTION ##############
|
|
|
|
|
2007-09-08 11:19:35 -07:00
|
|
|
connection master;
|
2007-09-08 11:56:55 -07:00
|
|
|
DROP PROCEDURE test.proc_norm;
|
|
|
|
DROP PROCEDURE test.proc_bykey;
|
|
|
|
DROP PROCEDURE test.proc_byrange;
|
|
|
|
DROP TABLE test.regular_tbl;
|
|
|
|
DROP TABLE test.bykey_tbl;
|
|
|
|
DROP TABLE test.byrange_tbl;
|
|
|
|
|
|
|
|
--source include/master-slave-end.inc
|