mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge: 5.1-bt --> 5.1-bt local
This commit is contained in:
@ -77,14 +77,29 @@ static void message(const char* fmt, ...)
|
||||
|
||||
static void die(const char* fmt, ...)
|
||||
{
|
||||
DWORD last_err= GetLastError();
|
||||
va_list args;
|
||||
fprintf(stderr, "%s: FATAL ERROR, ", safe_process_name);
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
fprintf(stderr, "\n");
|
||||
va_end(args);
|
||||
if (int last_err= GetLastError())
|
||||
fprintf(stderr, "error: %d, %s\n", last_err, strerror(last_err));
|
||||
if (last_err)
|
||||
{
|
||||
char *message_text;
|
||||
if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER
|
||||
|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, last_err , 0, (LPSTR)&message_text,
|
||||
0, NULL))
|
||||
{
|
||||
fprintf(stderr,"error: %d, %s\n",last_err, message_text);
|
||||
LocalFree(message_text);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FormatMessage failed, print error code only */
|
||||
fprintf(stderr,"error:%d\n", last_err);
|
||||
}
|
||||
}
|
||||
fflush(stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ BEGIN {
|
||||
print "=======================================================\n";
|
||||
print " WARNING: Using mysql-test-run.pl version 1! \n";
|
||||
print "=======================================================\n";
|
||||
require "lib/v1/mysql-test-run.pl";
|
||||
exit(1);
|
||||
# Should use exec() here on *nix but this appears not to work on Windows
|
||||
exit(system($^X, "lib/v1/mysql-test-run.pl", @ARGV) >> 8);
|
||||
}
|
||||
elsif ( $version == 2 )
|
||||
{
|
||||
|
@ -687,8 +687,8 @@ SUCCESS
|
||||
|
||||
truncate table t2;
|
||||
call p_verify_status_increment(4, 0, 4, 0);
|
||||
SUCCESS
|
||||
|
||||
ERROR
|
||||
Expected commit increment: 4 actual: 2
|
||||
commit;
|
||||
# There is nothing left to commit
|
||||
call p_verify_status_increment(0, 0, 0, 0);
|
||||
@ -854,8 +854,8 @@ SUCCESS
|
||||
|
||||
truncate table t3;
|
||||
call p_verify_status_increment(4, 4, 4, 4);
|
||||
SUCCESS
|
||||
|
||||
ERROR
|
||||
Expected commit increment: 4 actual: 2
|
||||
create view v1 as select * from t2;
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
SUCCESS
|
||||
|
@ -215,7 +215,7 @@ COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
@ -223,22 +223,6 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
@ -347,17 +331,9 @@ COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t2
|
||||
@ -473,17 +449,9 @@ ROLLBACK
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t2
|
||||
|
@ -379,9 +379,7 @@ master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
@ -401,9 +399,7 @@ master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; ROLLBACK
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
|
@ -346,9 +346,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (3,3)
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,4)
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5,5)
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t2
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (6,6)
|
||||
@ -356,9 +354,7 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t2 (a int, b in
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (7,7)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8)
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9)
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10)
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100)
|
||||
|
@ -1,3 +1,4 @@
|
||||
RESET MASTER;
|
||||
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (a INT) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (1),(2),(3);
|
||||
|
@ -1,6 +1,13 @@
|
||||
source include/have_log_bin.inc;
|
||||
source include/have_innodb.inc;
|
||||
|
||||
# It is necessary to reset the master since otherwise the binlog test
|
||||
# might show the wrong binary log. The default for SHOW BINLOG EVENTS
|
||||
# is to show the first binary log, not the current one (which is
|
||||
# actually a better idea).
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
let $engine = InnoDB;
|
||||
source extra/binlog_tests/binlog_truncate.test;
|
||||
|
||||
|
@ -1,4 +1,11 @@
|
||||
source include/have_log_bin.inc;
|
||||
|
||||
# It is necessary to reset the master since otherwise the binlog test
|
||||
# might show the wrong binary log. The default for SHOW BINLOG EVENTS
|
||||
# is to show the first binary log, not the current one (which is
|
||||
# actually a better idea).
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
let $engine = MyISAM;
|
||||
source extra/binlog_tests/binlog_truncate.test;
|
||||
|
@ -963,9 +963,7 @@ master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
|
||||
master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; TRUNCATE t1
|
||||
master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
|
||||
master-bin.000001 # Xid 1 # #
|
||||
|
@ -5,10 +5,10 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
**** Resetting master and slave ****
|
||||
STOP SLAVE;
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
START SLAVE;
|
||||
include/start_slave.inc
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
@ -25,10 +25,10 @@ TRUNCATE TABLE t1;
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
DROP TABLE t1,t2;
|
||||
**** Resetting master and slave ****
|
||||
STOP SLAVE;
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
START SLAVE;
|
||||
include/start_slave.inc
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
|
@ -5,10 +5,10 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
**** Resetting master and slave ****
|
||||
STOP SLAVE;
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
START SLAVE;
|
||||
include/start_slave.inc
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
@ -25,10 +25,10 @@ TRUNCATE TABLE t1;
|
||||
Comparing tables master:test.t2 and slave:test.t2
|
||||
DROP TABLE t1,t2;
|
||||
**** Resetting master and slave ****
|
||||
STOP SLAVE;
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
START SLAVE;
|
||||
include/start_slave.inc
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
|
Reference in New Issue
Block a user