Commit 1f93b0c8 authored by unknown's avatar unknown

Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  dl145s.mysql.com:/users/mhansson/mysql/autopush/5.0o-bug24010

parents a1234294 ddb5a563
......@@ -434,3 +434,22 @@ Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 21
DROP TABLE t1;
CREATE TABLE t1 (
a INT(11),
quux decimal( 31, 30 ),
UNIQUE KEY bar (a),
KEY quux (quux)
);
INSERT INTO
t1 ( a, quux )
VALUES
( 1, 1 ),
( 2, 0.1 );
INSERT INTO t1( a )
SELECT @newA := 1 + a FROM t1 WHERE quux <= 0.1;
SELECT * FROM t1;
a quux
1 1.000000000000000000000000000000
2 0.100000000000000000000000000000
3 NULL
DROP TABLE t1;
......@@ -342,3 +342,29 @@ UPDATE t1 SET user_id=null WHERE request_id=999999999999999999999999999999;
show status like '%Handler_read%';
DROP TABLE t1;
#
# Bug #24010: INSERT INTO ... SELECT fails on unique constraint with data it
# doesn't select
#
CREATE TABLE t1 (
a INT(11),
quux decimal( 31, 30 ),
UNIQUE KEY bar (a),
KEY quux (quux)
);
INSERT INTO
t1 ( a, quux )
VALUES
( 1, 1 ),
( 2, 0.1 );
INSERT INTO t1( a )
SELECT @newA := 1 + a FROM t1 WHERE quux <= 0.1;
SELECT * FROM t1;
DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment