mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-7635: Update tests to adapt to the new default sql_mode
This commit is contained in:
@ -18,7 +18,7 @@ CREATE TABLE t1 (`tinyint` TINYINT,
|
||||
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
|
||||
### insert max unsigned
|
||||
### a) declarative
|
||||
INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
|
||||
INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
|
||||
#########################################
|
||||
SELECT * FROM t1;
|
||||
tinyint 127
|
||||
@ -58,7 +58,7 @@ include/diff_tables.inc [master:t1,slave:t1]
|
||||
connection master;
|
||||
TRUNCATE t1;
|
||||
### b) user var
|
||||
INSERT INTO t1 VALUES (@positive,
|
||||
INSERT IGNORE INTO t1 VALUES (@positive,
|
||||
@positive,
|
||||
@positive,
|
||||
@positive,
|
||||
@ -112,7 +112,7 @@ connection master;
|
||||
TRUNCATE t1;
|
||||
### insert min signed
|
||||
### a) declarative
|
||||
INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
|
||||
INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
|
||||
#########################################
|
||||
SELECT * FROM t1;
|
||||
tinyint -128
|
||||
@ -152,7 +152,7 @@ include/diff_tables.inc [master:t1,slave:t1]
|
||||
connection master;
|
||||
TRUNCATE t1;
|
||||
### b) user var
|
||||
INSERT INTO t1 VALUES (@negative,
|
||||
INSERT IGNORE INTO t1 VALUES (@negative,
|
||||
@negative,
|
||||
@negative,
|
||||
@negative,
|
||||
@ -210,12 +210,14 @@ DROP TABLE t1;
|
||||
connection slave;
|
||||
include/rpl_reset.inc
|
||||
connection master;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM;
|
||||
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW SET @aux = -1 ;
|
||||
SET @aux = 10294947273192243200;
|
||||
SET @aux1= @aux;
|
||||
INSERT INTO t1 VALUES (@aux) , (@aux1);
|
||||
ERROR 23000: Duplicate entry '2147483647' for key 'PRIMARY'
|
||||
SET sql_mode = DEFAULT;
|
||||
connection slave;
|
||||
## assertion: master and slave tables are in sync
|
||||
include/diff_tables.inc [master:t1,slave:t1]
|
||||
|
Reference in New Issue
Block a user