mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge with 5.1
Fixes to get Aria handler tests to work. Fixes LP#697597 "HANDLER + Aria asserts in maria-5.3-handler"
This commit is contained in:
@@ -1597,7 +1597,17 @@ TRUNCATE t1;
|
||||
INSERT INTO t1 VALUES (1,'init');
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
# retry the UPDATE in case it times out the lock before con1 has time
|
||||
# to COMMIT.
|
||||
DECLARE do_retry INT DEFAULT 0;
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET do_retry = 1;
|
||||
retry_loop:LOOP
|
||||
UPDATE t1 SET b = CONCAT(b, '+con2') WHERE a = 1;
|
||||
IF do_retry = 0 THEN
|
||||
LEAVE retry_loop;
|
||||
END IF;
|
||||
SET do_retry = 0;
|
||||
END LOOP;
|
||||
INSERT INTO t2 VALUES ();
|
||||
END|
|
||||
BEGIN;
|
||||
@@ -2609,6 +2619,14 @@ ref NULL
|
||||
rows 3
|
||||
Extra Using index
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# ALTER TABLE IGNORE didn't ignore duplicates for unique add index
|
||||
#
|
||||
create table t1 (a int primary key, b int) engine = innodb;
|
||||
insert into t1 values (1,1),(2,1);
|
||||
alter ignore table t1 add unique `main` (b);
|
||||
drop table t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Test for bug #39932 "create table fails if column for FK is in different
|
||||
|
@@ -12,6 +12,7 @@ create table C(id int not null auto_increment primary key, f1 int not null, fore
|
||||
insert into A values(1), (2);
|
||||
|
||||
--disable_query_log
|
||||
begin;
|
||||
let $i=257;
|
||||
while ($i)
|
||||
{
|
||||
@@ -24,6 +25,7 @@ while ($i)
|
||||
insert into C(f1) values(2);
|
||||
dec $i;
|
||||
}
|
||||
commit;
|
||||
--enable_query_log
|
||||
|
||||
# Following Deletes should not report error
|
||||
|
@@ -840,6 +840,17 @@ CREATE INDEX b ON t1(a,b,c,d);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # ALTER TABLE IGNORE didn't ignore duplicates for unique add index
|
||||
--echo #
|
||||
|
||||
create table t1 (a int primary key, b int) engine = innodb;
|
||||
insert into t1 values (1,1),(2,1);
|
||||
alter ignore table t1 add unique `main` (b);
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user