mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql-5.1 -> mysql-5.1-innodb
This commit is contained in:
@ -88,8 +88,9 @@ let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-02-25';
|
||||
let $val4 = '2006-02-05';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# Disabled after fixing bug#54483.
|
||||
#let $coltype = char(30);
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = extract(month from col1);
|
||||
let $valsqlfunc = extract(year from '1998-11-23');
|
||||
@ -139,8 +140,9 @@ let $val2 = '14:30:20';
|
||||
let $val3 = '21:59:22';
|
||||
let $val4 = '10:22:33';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# second(non_time_col) is disabled after bug#54483.
|
||||
#let $coltype = char(30);
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = month(col1);
|
||||
let $valsqlfunc = month('2006-10-14');
|
||||
@ -172,26 +174,28 @@ let $val3 = '21:59:22';
|
||||
let $val4 = '10:33:11';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = to_days(col1)-to_days('2006-01-01');
|
||||
let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-02-03';
|
||||
let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-01-25';
|
||||
let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# to_days(non_date_col) is disabled after bug#54483.
|
||||
#let $sqlfunc = to_days(col1)-to_days('2006-01-01');
|
||||
#let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
|
||||
#let $coltype = date;
|
||||
#let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
#let $val1 = '2006-02-03';
|
||||
#let $val2 = '2006-01-17';
|
||||
#let $val3 = '2006-01-25';
|
||||
#let $val4 = '2006-02-06';
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
# to_days(non_date_col) is disabled after bug#54483.
|
||||
# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
|
||||
let $sqlfunc = datediff(col1, '2006-01-01');
|
||||
let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-02-03';
|
||||
let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-01-25';
|
||||
let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
#let $sqlfunc = datediff(col1, '2006-01-01');
|
||||
#let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
|
||||
#let $coltype = date;
|
||||
#let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
#let $val1 = '2006-02-03';
|
||||
#let $val2 = '2006-01-17';
|
||||
#let $val3 = '2006-01-25';
|
||||
#let $val4 = '2006-02-06';
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = weekday(col1);
|
||||
let $valsqlfunc = weekday('2006-10-14');
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -128,5 +128,47 @@ START SLAVE SQL_THREAD;
|
||||
include/wait_for_slave_sql_to_start.inc
|
||||
# Test end
|
||||
SET GLOBAL debug= '$debug_save';
|
||||
include/restart_slave.inc
|
||||
[connection master]
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
# Bug#58546 test rpl_packet timeout failure sporadically on PB
|
||||
# ----------------------------------------------------------------------
|
||||
# STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
|
||||
# possible that IO thread stopped after replicating part of a transaction
|
||||
# which SQL thread was executing. SQL thread would be hung if the
|
||||
# transaction could not be rolled back safely.
|
||||
# It caused some sporadic failures on PB2.
|
||||
#
|
||||
# This test verifies that when 'STOP SLAVE' is issued by a user, IO
|
||||
# thread will continue to fetch the rest events of the transaction which
|
||||
# is being executed by SQL thread and is not able to be rolled back safely.
|
||||
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1, 1);
|
||||
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
|
||||
[connection slave]
|
||||
include/restart_slave.inc
|
||||
BEGIN;
|
||||
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
|
||||
[connection master]
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(2, 2);
|
||||
INSERT INTO t2 VALUES(1);
|
||||
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
|
||||
COMMIT;
|
||||
[connection slave1]
|
||||
STOP SLAVE;
|
||||
[connection slave]
|
||||
ROLLBACK;
|
||||
[connection master]
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
[connection slave]
|
||||
include/wait_for_slave_to_stop.inc
|
||||
[connection slave1]
|
||||
include/start_slave.inc
|
||||
[connection master]
|
||||
DROP TABLE t1, t2;
|
||||
SET GLOBAL debug= $debug_save;
|
||||
include/rpl_end.inc
|
||||
|
@ -26,8 +26,8 @@ let $old_net_buffer_length= `SELECT @@global.net_buffer_length`;
|
||||
SET @@global.max_allowed_packet=1024;
|
||||
SET @@global.net_buffer_length=1024;
|
||||
|
||||
sync_slave_with_master;
|
||||
# Restart slave for setting to take effect
|
||||
connection slave;
|
||||
source include/stop_slave.inc;
|
||||
source include/start_slave.inc;
|
||||
|
||||
|
@ -54,7 +54,69 @@ source extra/rpl_tests/rpl_stop_slave.test;
|
||||
|
||||
--echo # Test end
|
||||
SET GLOBAL debug= '$debug_save';
|
||||
source include/restart_slave_sql.inc;
|
||||
|
||||
connection master;
|
||||
--source include/rpl_connection_master.inc
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo
|
||||
--echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
|
||||
--echo # ----------------------------------------------------------------------
|
||||
--echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
|
||||
--echo # possible that IO thread stopped after replicating part of a transaction
|
||||
--echo # which SQL thread was executing. SQL thread would be hung if the
|
||||
--echo # transaction could not be rolled back safely.
|
||||
--echo # It caused some sporadic failures on PB2.
|
||||
--echo #
|
||||
--echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
|
||||
--echo # thread will continue to fetch the rest events of the transaction which
|
||||
--echo # is being executed by SQL thread and is not able to be rolled back safely.
|
||||
|
||||
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1, 1);
|
||||
|
||||
let $debug_save= `SELECT @@GLOBAL.debug`;
|
||||
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
source include/restart_slave_sql.inc;
|
||||
|
||||
BEGIN;
|
||||
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(2, 2);
|
||||
INSERT INTO t2 VALUES(1);
|
||||
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
|
||||
COMMIT;
|
||||
|
||||
--source include/rpl_connection_slave1.inc
|
||||
let $show_statement= SHOW PROCESSLIST;
|
||||
let $field= Info;
|
||||
let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
|
||||
source include/wait_show_condition.inc;
|
||||
|
||||
send STOP SLAVE;
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
ROLLBACK;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
|
||||
--source include/rpl_connection_slave1.inc
|
||||
reap;
|
||||
source include/start_slave.inc;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
DROP TABLE t1, t2;
|
||||
SET GLOBAL debug= $debug_save;
|
||||
--source include/rpl_end.inc
|
||||
|
@ -64,12 +64,12 @@ SET last = pct;
|
||||
END IF;
|
||||
END WHILE;
|
||||
END//
|
||||
CREATE PROCEDURE check_pct(IN num DECIMAL)
|
||||
CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
|
||||
BEGIN
|
||||
IF (dirty_pct() < num) THEN
|
||||
IF (success_on_wait > 0) THEN
|
||||
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
||||
ELSE
|
||||
SELECT 'ABOVE_MAX' AS PCT_VALUE;
|
||||
SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
|
||||
END IF;
|
||||
END//
|
||||
CREATE TABLE t1(
|
||||
@ -83,7 +83,7 @@ CALL add_until(10);
|
||||
FLUSH TABLES;
|
||||
CALL add_records(500);
|
||||
'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
||||
CALL check_pct(10);
|
||||
CALL check_pct(1);
|
||||
PCT_VALUE
|
||||
BELOW_MAX
|
||||
DROP PROCEDURE add_records;
|
||||
|
@ -117,12 +117,12 @@ BEGIN
|
||||
END WHILE;
|
||||
END//
|
||||
|
||||
CREATE PROCEDURE check_pct(IN num DECIMAL)
|
||||
CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
|
||||
BEGIN
|
||||
IF (dirty_pct() < num) THEN
|
||||
IF (success_on_wait > 0) THEN
|
||||
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
||||
ELSE
|
||||
SELECT 'ABOVE_MAX' AS PCT_VALUE;
|
||||
SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
|
||||
END IF;
|
||||
END//
|
||||
|
||||
@ -155,7 +155,8 @@ let $wait_condition= SELECT (dirty_pct() <= @@global.innodb_max_dirty_pages_pct)
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
||||
CALL check_pct(10);
|
||||
# Value For $sucess will be set from include/wait_condition.inc file. It can have values 1 or 0. It will be 1 if dirty_pct() <= @@global.innodb_max_dirty_pages_pct else it will be 0.
|
||||
eval CALL check_pct($success);
|
||||
DROP PROCEDURE add_records;
|
||||
DROP PROCEDURE add_until;
|
||||
DROP PROCEDURE check_pct;
|
||||
|
Reference in New Issue
Block a user