Commit ab619991 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.1-new-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


sql/sql_select.cc:
  Auto merged
parents 931aa19a b4649198
......@@ -9,8 +9,6 @@ unless($event eq 'outgoing pull' || $event eq 'outgoing push' ||
exit 0;
}
print "Checking for bad changesets from old crashed 5.1 tree...\n";
my @bad_csets=
( 'monty@mysql.com|ChangeSet|20060418090255|16983',
'monty@mysql.com|ChangeSet|20060418090458|02628',
......@@ -80,6 +78,4 @@ END
}
}
print "No bad changesets found, proceeding.\n";
exit 0;
......@@ -9,8 +9,6 @@ unless($event eq 'outgoing pull' || $event eq 'outgoing push' ||
exit 0;
}
print "Checking for bad changesets from old crashed 5.1 tree...\n";
my @bad_csets=
( 'monty@mysql.com|ChangeSet|20060418090255|16983',
'monty@mysql.com|ChangeSet|20060418090458|02628',
......@@ -80,6 +78,4 @@ END
}
}
print "No bad changesets found, proceeding.\n";
exit 0;
......@@ -31,13 +31,6 @@ eval SET SESSION STORAGE_ENGINE = $engine_type;
drop table if exists t1,t2,t1m,t1i,t2m,t2i,t4;
--enable_warnings
#
# Bug#17530: Incorrect key truncation on table creation caused server crash.
#
create table t1(f1 varchar(800) binary not null, key(f1))
character set utf8 collate utf8_general_ci;
insert into t1 values('aaa');
drop table t1;
# BUG#16798: Uninitialized row buffer reads in ref-or-null optimizer
# (repeatable only w/innodb).
......@@ -415,6 +408,28 @@ create table t1(f1 varchar(800) binary not null, key(f1))
insert into t1 values('aaa');
drop table t1;
#
# Bug#22781: SQL_BIG_RESULT fails to influence sort plan
#
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
INSERT INTO t1 VALUES ( 1 , 1 , 1);
INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1;
EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
DROP TABLE t1;
--echo End of 5.0 tests
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
# UPDATE": if the row is updated, it's like a regular UPDATE:
# LAST_INSERT_ID() is not affected.
......@@ -466,3 +481,5 @@ select last_insert_id();
select * from t2;
drop table t2;
--echo End of 5.1 tests
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2,t1m,t1i,t2m,t2i,t4;
create table t1(f1 varchar(800) binary not null, key(f1))
character set utf8 collate utf8_general_ci;
Warnings:
Warning 1071 Specified key was too long; max key length is 765 bytes
insert into t1 values('aaa');
drop table t1;
create table t1 (
c_id int(11) not null default '0',
org_id int(11) default null,
......@@ -379,6 +373,23 @@ Warnings:
Warning 1071 Specified key was too long; max key length is 765 bytes
insert into t1 values('aaa');
drop table t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
INSERT INTO t1 VALUES ( 1 , 1 , 1);
INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1;
INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1;
EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 5 NULL 128
EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
DROP TABLE t1;
End of 5.0 tests
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
`a` int(11) default NULL,
......@@ -447,3 +458,4 @@ k a c
11 15 1
12 20 1
drop table t2;
End of 5.1 tests
......@@ -40,12 +40,21 @@ if we are compiling on Windows. */
# undef VERSION
/* Include the header file generated by GNU autoconf */
#ifndef __WIN__
# include "config.h"
#endif
# ifdef HAVE_SCHED_H
# include <sched.h>
# endif
/* When compiling for Itanium IA64, undefine the flag below to prevent use
of the 32-bit x86 assembler in mutex operations. */
#if defined(__WIN__) && !defined(WIN64) && !defined(_WIN64)
#define UNIV_CAN_USE_X86_ASSEMBLER
#endif
/* We only try to do explicit inlining of functions with gcc and
Microsoft Visual C++ */
......
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