mirror of
https://github.com/MariaDB/server.git
synced 2025-08-27 13:04:36 +03:00
merged 5.1-5.1.29-rc -> 5.1-bugteam
This commit is contained in:
@@ -40,9 +40,9 @@ IN ind DECIMAL(10,2))
|
||||
BEGIN
|
||||
INSERT INTO t4 VALUES (ins1, ins2, ind);
|
||||
END
|
||||
master-bin.000001 784 Query 1 992 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
|
||||
master-bin.000001 992 Query 1 1081 use `test`; DROP PROCEDURE bug18293
|
||||
master-bin.000001 1081 Query 1 1160 use `test`; DROP TABLE t4
|
||||
master-bin.000001 784 Query 1 1048 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
|
||||
master-bin.000001 1048 Query 1 1137 use `test`; DROP PROCEDURE bug18293
|
||||
master-bin.000001 1137 Query 1 1216 use `test`; DROP TABLE t4
|
||||
End of 5.0 tests
|
||||
SHOW BINLOG EVENTS FROM 364;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
|
||||
|
@@ -1416,4 +1416,41 @@ SELECT AVG(a), CAST(AVG(a) AS DECIMAL) FROM t1;
|
||||
AVG(a) CAST(AVG(a) AS DECIMAL)
|
||||
15 15
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE derived1 (a bigint(21));
|
||||
INSERT INTO derived1 VALUES (2);
|
||||
CREATE TABLE D (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
int_nokey int(11) DEFAULT NULL,
|
||||
int_key int(11) DEFAULT NULL,
|
||||
filler blob,
|
||||
PRIMARY KEY (pk),
|
||||
KEY int_key (int_key)
|
||||
);
|
||||
INSERT INTO D VALUES
|
||||
(39,40,4,repeat(' X', 42)),
|
||||
(43,56,4,repeat(' X', 42)),
|
||||
(47,12,4,repeat(' X', 42)),
|
||||
(71,28,4,repeat(' X', 42)),
|
||||
(76,54,4,repeat(' X', 42)),
|
||||
(83,45,4,repeat(' X', 42)),
|
||||
(105,53,12,NULL);
|
||||
SELECT
|
||||
(SELECT COUNT( int_nokey )
|
||||
FROM derived1 AS X
|
||||
WHERE
|
||||
X.int_nokey < 61
|
||||
GROUP BY pk
|
||||
LIMIT 1)
|
||||
FROM D AS X
|
||||
WHERE X.int_key < 13
|
||||
GROUP BY int_nokey LIMIT 1;
|
||||
(SELECT COUNT( int_nokey )
|
||||
FROM derived1 AS X
|
||||
WHERE
|
||||
X.int_nokey < 61
|
||||
GROUP BY pk
|
||||
LIMIT 1)
|
||||
1
|
||||
DROP TABLE derived1;
|
||||
DROP TABLE D;
|
||||
End of 5.0 tests
|
||||
|
@@ -1,4 +1,5 @@
|
||||
drop table if exists t1;
|
||||
set binlog_format=mixed;
|
||||
set session transaction isolation level read committed;
|
||||
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
|
||||
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
|
||||
@@ -6,6 +7,7 @@ set autocommit=0;
|
||||
select * from t1 where a=3 lock in share mode;
|
||||
a
|
||||
3
|
||||
set binlog_format=mixed;
|
||||
set session transaction isolation level read committed;
|
||||
set autocommit=0;
|
||||
update t1 set a=10 where a=5;
|
||||
|
@@ -1024,6 +1024,7 @@ id code name
|
||||
4 2 Erik
|
||||
5 3 Sasha
|
||||
COMMIT;
|
||||
SET binlog_format='MIXED';
|
||||
BEGIN;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
|
||||
@@ -2961,9 +2962,11 @@ drop table t1,t2;
|
||||
create table t1(a int not null, b int, primary key(a)) engine=innodb;
|
||||
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
|
||||
commit;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
update t1 set b = 5 where b = 1;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
select * from t1 where a = 7 and b = 3 for update;
|
||||
@@ -3002,6 +3005,7 @@ d e
|
||||
3 1
|
||||
8 6
|
||||
12 1
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
insert into t1 select * from t2;
|
||||
@@ -3032,30 +3036,39 @@ a b
|
||||
3 1
|
||||
8 6
|
||||
12 1
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
insert into t1 select * from t2;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
update t3 set b = (select b from t2 where a = d);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
insert into t5 (select * from t2 lock in share mode);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
update t6 set e = (select b from t2 where a = d lock in share mode);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
insert into t8 (select * from t2 for update);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
update t9 set e = (select b from t2 where a = d for update);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
create table t10(a int not null, b int, primary key(a)) engine=innodb select * from t2 for update;
|
||||
@@ -3202,6 +3215,7 @@ id
|
||||
-10
|
||||
1
|
||||
DROP TABLE t1;
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
@@ -3212,6 +3226,7 @@ CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
@@ -3219,10 +3234,12 @@ COMMIT;
|
||||
SELECT * FROM t1 WHERE a=1;
|
||||
a
|
||||
1
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
@@ -1512,6 +1512,7 @@ ok
|
||||
drop table t1;
|
||||
SET SESSION AUTOCOMMIT = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
set binlog_format=mixed;
|
||||
# Switch to connection con1
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256))
|
||||
ENGINE = InnoDB;
|
||||
|
@@ -5,8 +5,8 @@ INIT_VALUE
|
||||
SELECT @@log AS INIT_VALUE;
|
||||
INIT_VALUE
|
||||
1
|
||||
SET @@global.log = ON;
|
||||
SET global log = 0;
|
||||
SET @@global.general_log = ON;
|
||||
SET global general_log = 0;
|
||||
'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
|
||||
'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
|
||||
'#--------------------FN_DYNVARS_062_02-------------------------#'
|
||||
|
@@ -5,17 +5,17 @@ SELECT @start_global_value;
|
||||
'#--------------------FN_DYNVARS_064_01-------------------------#'
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SET @@global.log_bin_trust_routine_creators = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
0
|
||||
'#--------------------FN_DYNVARS_064_02-------------------------#'
|
||||
SET @@global.log_bin_trust_routine_creators = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
|
||||
@@global.log_bin_trust_routine_creators = 'FALSE'
|
||||
1
|
||||
@@ -24,37 +24,37 @@ Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
|
||||
'#--------------------FN_DYNVARS_064_03-------------------------#'
|
||||
SET @@global.log_bin_trust_routine_creators = ON;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
1
|
||||
SET @@global.log_bin_trust_routine_creators = OFF;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
0
|
||||
SET @@global.log_bin_trust_routine_creators = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
0
|
||||
SET @@global.log_bin_trust_routine_creators = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
1
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
1
|
||||
SET @@global.log_bin_trust_routine_creators = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
0
|
||||
@@ -70,7 +70,7 @@ SET @@global.log_bin_trust_routine_creators = "OFFF";
|
||||
ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'OFFF'
|
||||
SET @@global.log_bin_trust_routine_creators = OF;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
0
|
||||
@@ -96,14 +96,14 @@ ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable
|
||||
'#---------------------FN_DYNVARS_064_07----------------------#'
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
|
||||
@@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators
|
||||
1
|
||||
'#---------------------FN_DYNVARS_064_08----------------------#'
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@log_bin_trust_routine_creators;
|
||||
@@log_bin_trust_routine_creators
|
||||
1
|
||||
@@ -115,7 +115,7 @@ SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators
|
||||
ERROR 42S22: Unknown column 'log_bin_trust_routine_creators' in 'field list'
|
||||
SET @@global.log_bin_trust_routine_creators = @start_global_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
@@global.log_bin_trust_routine_creators
|
||||
1
|
||||
|
@@ -187,6 +187,8 @@ SELECT @@general_log, @@log;
|
||||
@@general_log @@log
|
||||
1 1
|
||||
SET GLOBAL log = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
|
||||
SHOW VARIABLES LIKE 'general_log';
|
||||
Variable_name Value
|
||||
general_log OFF
|
||||
@@ -216,6 +218,8 @@ SELECT @@slow_query_log, @@log_slow_queries;
|
||||
@@slow_query_log @@log_slow_queries
|
||||
0 0
|
||||
SET GLOBAL log_slow_queries = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
|
||||
SHOW VARIABLES LIKE 'slow_query_log';
|
||||
Variable_name Value
|
||||
slow_query_log OFF
|
||||
@@ -270,4 +274,28 @@ SET GLOBAL general_log_file = @general_log_file_saved;
|
||||
SET GLOBAL slow_query_log_file = @slow_query_log_file_saved;
|
||||
|
||||
# -- End of Bug#32748.
|
||||
deprecated:
|
||||
SET GLOBAL log = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
|
||||
SET GLOBAL log_slow_queries = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
|
||||
SET GLOBAL log = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
|
||||
SET GLOBAL log_slow_queries = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
|
||||
not deprecated:
|
||||
SELECT @@global.general_log_file INTO @my_glf;
|
||||
SELECT @@global.slow_query_log_file INTO @my_sqlf;
|
||||
SET GLOBAL general_log = 0;
|
||||
SET GLOBAL slow_query_log = 0;
|
||||
SET GLOBAL general_log_file = 'WL4403_G.log';
|
||||
SET GLOBAL slow_query_log_file = 'WL4403_SQ.log';
|
||||
SET GLOBAL general_log_file = @my_glf;
|
||||
SET GLOBAL slow_query_log_file = @my_sqlf;
|
||||
SET GLOBAL general_log = DEFAULT;
|
||||
SET GLOBAL slow_query_log = DEFAULT;
|
||||
End of 5.1 tests
|
||||
|
@@ -1658,4 +1658,74 @@ c1
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
SET SQL_MODE= @orig_sql_mode;
|
||||
create table t1 (s1 int) partition by hash(s1) partitions 2;
|
||||
create index i on t1 (s1);
|
||||
insert into t1 values (1);
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1 order by s1 desc;
|
||||
select * from t1;
|
||||
s1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
drop table t1;
|
||||
create table t1 (s1 int) partition by range(s1)
|
||||
(partition pa1 values less than (10),
|
||||
partition pa2 values less than MAXVALUE);
|
||||
create index i on t1 (s1);
|
||||
insert into t1 values (1);
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1 order by s1 desc;
|
||||
select * from t1;
|
||||
s1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
drop table t1;
|
||||
create table t1 (s1 int) partition by range(s1)
|
||||
(partition pa1 values less than (10),
|
||||
partition pa2 values less than MAXVALUE);
|
||||
create index i on t1 (s1);
|
||||
insert into t1 values (20);
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1 order by s1 desc;
|
||||
select * from t1;
|
||||
s1
|
||||
20
|
||||
20
|
||||
20
|
||||
20
|
||||
20
|
||||
20
|
||||
20
|
||||
20
|
||||
drop table t1;
|
||||
create table t1 (s1 int) partition by range(s1)
|
||||
(partition pa1 values less than (10),
|
||||
partition pa2 values less than MAXVALUE);
|
||||
create index i on t1 (s1);
|
||||
insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8);
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1;
|
||||
insert into t1 select s1 from t1 order by s1 desc;
|
||||
insert into t1 select s1 from t1 where s1=3;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
288
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
@@ -161,3 +161,30 @@ SELECT @a, @b;
|
||||
1 1
|
||||
DROP TABLE t2, t1;
|
||||
End of 5.0 tests
|
||||
BUG#31612
|
||||
Trigger fired multiple times leads to gaps in auto_increment sequence
|
||||
create table t1 (a int, val char(1)) engine=InnoDB;
|
||||
create table t2 (b int auto_increment primary key,
|
||||
val char(1)) engine=InnoDB;
|
||||
create trigger t1_after_insert after
|
||||
insert on t1 for each row insert into t2 set val=NEW.val;
|
||||
insert into t1 values ( 123, 'a'), ( 123, 'b'), ( 123, 'c'),
|
||||
(123, 'd'), (123, 'e'), (123, 'f'), (123, 'g');
|
||||
insert into t1 values ( 654, 'a'), ( 654, 'b'), ( 654, 'c'),
|
||||
(654, 'd'), (654, 'e'), (654, 'f'), (654, 'g');
|
||||
select * from t2 order by b;
|
||||
b val
|
||||
1 a
|
||||
2 b
|
||||
3 c
|
||||
4 d
|
||||
5 e
|
||||
6 f
|
||||
7 g
|
||||
8 a
|
||||
9 b
|
||||
10 c
|
||||
11 d
|
||||
12 e
|
||||
13 f
|
||||
14 g
|
||||
|
@@ -21,8 +21,10 @@ INSERT INTO t1 VALUES(24, 24);
|
||||
'#----------------------------FN_DYNVARS_184_01--------------------------------------#'
|
||||
** Connection con0 **
|
||||
SET SESSION tx_isolation = 'READ-UNCOMMITTED';
|
||||
set binlog_format=mixed;
|
||||
** Connection con1 **
|
||||
SET SESSION tx_isolation = 'READ-UNCOMMITTED';
|
||||
set binlog_format=mixed;
|
||||
** Connection con0 **
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 WHERE a IN (2,4,6,8) FOR UPDATE;
|
||||
|
@@ -167,7 +167,7 @@ max_error_count 10
|
||||
drop table t1;
|
||||
set table_type=MYISAM;
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead
|
||||
Warning 1287 The syntax '@@table_type' is deprecated and will be removed in MySQL 5.2. Please use '@@storage_engine' instead
|
||||
create table t1 (a int);
|
||||
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
update t1 set a='abc';
|
||||
|
Reference in New Issue
Block a user