mirror of
https://github.com/MariaDB/server.git
synced 2025-11-19 19:03:26 +03:00
Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/ndbdev/jmiller/clones/mysql-5.1-new
This commit is contained in:
@@ -702,11 +702,11 @@ insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd
|
||||
ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a int, key(a)) engine=heap;
|
||||
insert delayed into t1 values (0);
|
||||
insert into t1 values (0);
|
||||
delete from t1;
|
||||
select * from t1;
|
||||
a
|
||||
insert delayed into t1 values (0), (1);
|
||||
insert into t1 values (0), (1);
|
||||
select * from t1 where a = 0;
|
||||
a
|
||||
0
|
||||
|
||||
@@ -62,3 +62,5 @@ SHOW INSTANCES;
|
||||
instance_name status
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
SHOW INSTANCE STATUS;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
|
||||
@@ -25,7 +25,7 @@ select ((@id := kill_id) - kill_id) from t3;
|
||||
((@id := kill_id) - kill_id)
|
||||
0
|
||||
kill @id;
|
||||
ERROR 08S01: Server shutdown in progress
|
||||
Got one of the listed errors
|
||||
drop table t1, t2, t3;
|
||||
select get_lock("a", 10);
|
||||
get_lock("a", 10)
|
||||
|
||||
@@ -678,6 +678,61 @@ CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
|
||||
select * from t1;
|
||||
b
|
||||
drop table t1;
|
||||
create table t1 (a int) engine=ndb;
|
||||
create table t2 (a int) engine=ndb;
|
||||
insert into t1 values (1);
|
||||
insert into t2 values (1);
|
||||
delete t1.* from t1, t2 where t1.a = t2.a;
|
||||
select * from t1;
|
||||
a
|
||||
select * from t2;
|
||||
a
|
||||
1
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
CREATE TABLE t1 (
|
||||
i INT,
|
||||
j INT,
|
||||
x INT,
|
||||
y INT,
|
||||
z INT
|
||||
) engine=ndb;
|
||||
CREATE TABLE t2 (
|
||||
i INT,
|
||||
k INT,
|
||||
x INT,
|
||||
y INT,
|
||||
z INT
|
||||
) engine=ndb;
|
||||
CREATE TABLE t3 (
|
||||
j INT,
|
||||
k INT,
|
||||
x INT,
|
||||
y INT,
|
||||
z INT
|
||||
) engine=ndb;
|
||||
INSERT INTO t1 VALUES ( 1, 2,13,14,15);
|
||||
INSERT INTO t2 VALUES ( 1, 3,23,24,25);
|
||||
INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36);
|
||||
UPDATE t1 AS a
|
||||
INNER JOIN t2 AS b
|
||||
ON a.i = b.i
|
||||
INNER JOIN t3 AS c
|
||||
ON a.j = c.j AND b.k = c.k
|
||||
SET a.x = b.x,
|
||||
a.y = b.y,
|
||||
a.z = (
|
||||
SELECT sum(z)
|
||||
FROM t3
|
||||
WHERE y = 34
|
||||
)
|
||||
WHERE b.x = 23;
|
||||
select * from t1;
|
||||
i j x y z
|
||||
1 2 23 24 71
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
create table atablewithareallylongandirritatingname (a int);
|
||||
insert into atablewithareallylongandirritatingname values (2);
|
||||
select * from atablewithareallylongandirritatingname;
|
||||
|
||||
@@ -440,10 +440,10 @@ drop table t1;
|
||||
# Bug 12796: Record doesn't show when selecting through index
|
||||
#
|
||||
CREATE TABLE t1 (a int, key(a)) engine=heap;
|
||||
insert delayed into t1 values (0);
|
||||
insert into t1 values (0);
|
||||
delete from t1;
|
||||
select * from t1;
|
||||
insert delayed into t1 values (0), (1);
|
||||
insert into t1 values (0), (1);
|
||||
select * from t1 where a = 0;
|
||||
drop table t1;
|
||||
|
||||
|
||||
@@ -140,3 +140,12 @@ SHOW INSTANCES;
|
||||
--exec $MYSQL_TEST_DIR/t/kill_n_check.sh $IM_MYSQLD2_PATH_PID killed
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.8. Check that Instance Manager returns an error on
|
||||
# incomplete SHOW INSTANCE STATUS command.
|
||||
#
|
||||
###########################################################################
|
||||
--error 1149
|
||||
SHOW INSTANCE STATUS;
|
||||
|
||||
@@ -84,7 +84,7 @@ select ((@id := kill_id) - kill_id) from t3;
|
||||
kill @id;
|
||||
|
||||
connection conn1;
|
||||
-- error 1053
|
||||
-- error 1053,2013
|
||||
reap;
|
||||
|
||||
connection default;
|
||||
|
||||
@@ -625,6 +625,72 @@ CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #17249 delete statement with join where clause fails
|
||||
# when table do not have pk
|
||||
#
|
||||
|
||||
create table t1 (a int) engine=ndb;
|
||||
create table t2 (a int) engine=ndb;
|
||||
insert into t1 values (1);
|
||||
insert into t2 values (1);
|
||||
delete t1.* from t1, t2 where t1.a = t2.a;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
#
|
||||
# Bug #17257 update fails for inner joins if tables
|
||||
# do not have Primary Key
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
i INT,
|
||||
j INT,
|
||||
x INT,
|
||||
y INT,
|
||||
z INT
|
||||
) engine=ndb;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
i INT,
|
||||
k INT,
|
||||
x INT,
|
||||
y INT,
|
||||
z INT
|
||||
) engine=ndb;
|
||||
|
||||
CREATE TABLE t3 (
|
||||
j INT,
|
||||
k INT,
|
||||
x INT,
|
||||
y INT,
|
||||
z INT
|
||||
) engine=ndb;
|
||||
|
||||
INSERT INTO t1 VALUES ( 1, 2,13,14,15);
|
||||
INSERT INTO t2 VALUES ( 1, 3,23,24,25);
|
||||
INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36);
|
||||
|
||||
UPDATE t1 AS a
|
||||
INNER JOIN t2 AS b
|
||||
ON a.i = b.i
|
||||
INNER JOIN t3 AS c
|
||||
ON a.j = c.j AND b.k = c.k
|
||||
SET a.x = b.x,
|
||||
a.y = b.y,
|
||||
a.z = (
|
||||
SELECT sum(z)
|
||||
FROM t3
|
||||
WHERE y = 34
|
||||
)
|
||||
WHERE b.x = 23;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user