mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
merge
This commit is contained in:
@@ -1553,26 +1553,25 @@ drop table t1;
|
||||
# whole alter table code is being tested all around the test suite already.
|
||||
#
|
||||
|
||||
create table t1 (v varchar(32) not null);
|
||||
create table t1 (v varchar(32) not null) engine=csv;
|
||||
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
|
||||
select * from t1;
|
||||
# Fast alter, no copy performed
|
||||
alter table t1 change v v2 varchar(32);
|
||||
alter table t1 change v v2 varchar(32) not null;
|
||||
select * from t1;
|
||||
# Fast alter, no copy performed
|
||||
alter table t1 change v2 v varchar(64);
|
||||
alter table t1 change v2 v varchar(64) not null;
|
||||
select * from t1;
|
||||
update t1 set v = 'lmn' where v = 'hij';
|
||||
select * from t1;
|
||||
# Regular alter table
|
||||
alter table t1 add i int auto_increment not null primary key first;
|
||||
alter table t1 add i int not null first;
|
||||
select * from t1;
|
||||
update t1 set i=5 where i=3;
|
||||
update t1 set i=3 where v = 'abc';
|
||||
select * from t1;
|
||||
alter table t1 change i i bigint;
|
||||
alter table t1 change i i bigint not null;
|
||||
select * from t1;
|
||||
alter table t1 add unique key (i, v);
|
||||
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
|
||||
select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc');
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
|
||||
@@ -14,5 +14,8 @@ lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Ma
|
||||
mysqlhotcopy_myisam : bug#54129 2010-06-04 Horst
|
||||
mysqlhotcopy_archive : bug#54129 2010-06-04 Horst
|
||||
partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings
|
||||
plugin : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5
|
||||
plugin_load : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5
|
||||
plugin_not_embedded : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5
|
||||
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
|
||||
sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution
|
||||
|
||||
@@ -720,6 +720,10 @@ EXPLAIN EXTENDED SELECT 1 FROM
|
||||
t1 t2, t1 GROUP BY t1.a) AS d;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #54476: crash when group_concat and 'with rollup' in prepared statements
|
||||
--echo #
|
||||
@@ -734,6 +738,7 @@ EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
|
||||
@@ -1085,3 +1085,13 @@ drop table t1;
|
||||
--echo #
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55648: Server crash on MIX/MAX on maximum time value
|
||||
--echo #
|
||||
CREATE TABLE t1(c1 TIME NOT NULL);
|
||||
INSERT INTO t1 VALUES('837:59:59');
|
||||
INSERT INTO t1 VALUES('838:59:59');
|
||||
SELECT MAX(c1) FROM t1;
|
||||
DROP TABLE t1;
|
||||
--echo # End of the bug#55648
|
||||
|
||||
|
||||
@@ -467,6 +467,19 @@ select NAME_CONST('_id',1234) as id;
|
||||
|
||||
select connection_id() > 0;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #54461: crash with longblob and union or update with subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b LONGBLOB);
|
||||
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
|
||||
|
||||
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #52165: Assertion failed: file .\dtoa.c, line 465
|
||||
--echo #
|
||||
|
||||
@@ -821,4 +821,15 @@ select date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
select date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
|
||||
|
||||
#
|
||||
# Bug #55565: debug assertion when ordering by expressions with user
|
||||
# variable assignments
|
||||
#
|
||||
|
||||
CREATE TABLE t1(a DOUBLE NOT NULL);
|
||||
INSERT INTO t1 VALUES (0),(9.216e-096);
|
||||
--echo # should not crash
|
||||
SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -525,3 +525,28 @@ drop table t1;
|
||||
--echo #
|
||||
--echo # End of 5.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54106 assert in Protocol::end_statement,
|
||||
--echo # INSERT IGNORE ... SELECT ... UNION SELECT ...
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
||||
--error ER_FIELD_SPECIFIED_TWICE
|
||||
INSERT INTO t1 (a, a) VALUES (1, 1);
|
||||
# Verify that ER_FIELD_SPECIFIED_TWICE is not ignorable
|
||||
--error ER_FIELD_SPECIFIED_TWICE
|
||||
INSERT IGNORE t1 (a, a) VALUES (1, 1);
|
||||
|
||||
--error ER_FIELD_SPECIFIED_TWICE
|
||||
INSERT IGNORE t1 (a, a) SELECT 1,1;
|
||||
# Used to cause an assert
|
||||
--error ER_FIELD_SPECIFIED_TWICE
|
||||
INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -1,31 +1,4 @@
|
||||
# Can't run test of external client with embedded server
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
# Only run test if "mysql_upgrade" is found
|
||||
--require r/have_mysql_upgrade.result
|
||||
--disable_query_log
|
||||
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
||||
--enable_query_log
|
||||
|
||||
#
|
||||
# Hack:
|
||||
#
|
||||
# If running with Valgrind ($VALGRIND_TEST <> 0) then the resource
|
||||
# consumption (CPU) for upgrading a large log table will be intense.
|
||||
# Therefore, truncate the log table in advance and issue a statement
|
||||
# that should be logged.
|
||||
#
|
||||
if (`SELECT $VALGRIND_TEST`)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--disable_abort_on_error
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
SELECT 1;
|
||||
--enable_abort_on_error
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
}
|
||||
-- source include/mysql_upgrade_preparation.inc
|
||||
|
||||
#
|
||||
# Basic test that we can run mysql_upgrde and that it finds the
|
||||
|
||||
10
mysql-test/t/mysql_upgrade_ssl.test
Normal file
10
mysql-test/t/mysql_upgrade_ssl.test
Normal file
@@ -0,0 +1,10 @@
|
||||
# mysql_upgrade tests requiring SSL support
|
||||
|
||||
-- source include/have_ssl_communication.inc
|
||||
-- source include/mysql_upgrade_preparation.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55672 mysql_upgrade dies with internal error
|
||||
--echo #
|
||||
--exec $MYSQL_UPGRADE --skip-verbose --ssl --force 2>&1
|
||||
--exit
|
||||
@@ -325,6 +325,15 @@ eval select $mysql_errno as "after_!errno_masked_error" ;
|
||||
--error 1
|
||||
--exec echo "disable_abort_on_error; error 1000; select 3 from t1; error 1000; select 3 from t1;" | $MYSQL_TEST 2>&1
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Check some non-query statements that would fail
|
||||
# ----------------------------------------------------------------------------
|
||||
--exec illegal_command
|
||||
--cat_file does_not_exist
|
||||
--perl
|
||||
exit(1);
|
||||
EOF
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Switch the abort on error on and check the effect on $mysql_errno
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -863,7 +872,7 @@ while ($outer)
|
||||
}
|
||||
|
||||
# Test source in an if in a while which is false on 1st iteration
|
||||
# Also test --error in same context
|
||||
# Also test --error and --disable_abort_on_error in same context
|
||||
let $outer= 2; # Number of outer loops
|
||||
let $ifval= 0; # false 1st time
|
||||
while ($outer)
|
||||
@@ -874,6 +883,10 @@ while ($outer)
|
||||
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
|
||||
--error ER_NO_SUCH_TABLE
|
||||
SELECT * from nowhere;
|
||||
--disable_abort_on_error
|
||||
# Statement giving a different error, to make sure we don't mask it
|
||||
SELECT * FROM nowhere else;
|
||||
--enable_abort_on_error
|
||||
}
|
||||
dec $outer;
|
||||
inc $ifval;
|
||||
@@ -1092,6 +1105,36 @@ if (!$counter)
|
||||
echo Counter is not 0, (counter=0);
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Test if with some non-numerics
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
let $counter=alpha;
|
||||
if ($counter)
|
||||
{
|
||||
echo Counter is true, (counter=alpha);
|
||||
}
|
||||
let $counter= ;
|
||||
if ($counter)
|
||||
{
|
||||
echo oops, space is true;
|
||||
}
|
||||
let $counter=-0;
|
||||
if ($counter)
|
||||
{
|
||||
echo oops, -0 is true;
|
||||
}
|
||||
if (beta)
|
||||
{
|
||||
echo Beta is true;
|
||||
}
|
||||
let $counter=gamma;
|
||||
while ($counter)
|
||||
{
|
||||
echo while with string, only once;
|
||||
let $counter=000;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Test while, { and }
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -1437,7 +1480,6 @@ EOF
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
|
||||
|
||||
# connect when "disable_abort_on_error" caused "connection not found"
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
--disable_abort_on_error
|
||||
connect (con1,localhost,root,,);
|
||||
connection default;
|
||||
@@ -1724,7 +1766,16 @@ select 1;
|
||||
--reap
|
||||
EOF
|
||||
--error 1
|
||||
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1
|
||||
# Must filter unpredictable extra warning from output
|
||||
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in > $MYSQL_TMP_DIR/mysqltest.out 2>&1
|
||||
--perl
|
||||
my $dir= $ENV{'MYSQL_TMP_DIR'};
|
||||
open (FILE, "$dir/mysqltest.out");
|
||||
while (<FILE>) {
|
||||
print unless /Note: net_clear/; # This shows up on rare occations
|
||||
}
|
||||
EOF
|
||||
remove_file $MYSQL_TMP_DIR/mysqltest.out;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in;
|
||||
|
||||
drop table t1;
|
||||
|
||||
1
mysql-test/t/partition_not_blackhole-master.opt
Normal file
1
mysql-test/t/partition_not_blackhole-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--loose-skip-blackhole
|
||||
25
mysql-test/t/partition_not_blackhole.test
Normal file
25
mysql-test/t/partition_not_blackhole.test
Normal file
@@ -0,0 +1,25 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/not_blackhole.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#46086: crash when dropping a partitioned table and
|
||||
--echo # the original engine is disabled
|
||||
--echo # Copy a .frm and .par file which was created with:
|
||||
--echo # create table `t1` (`id` int primary key) engine=blackhole
|
||||
--echo # partition by key () partitions 1;
|
||||
--copy_file std_data/parts/t1_blackhole.frm $MYSQLD_DATADIR/test/t1.frm
|
||||
--copy_file std_data/parts/t1_blackhole.par $MYSQLD_DATADIR/test/t1.par
|
||||
SHOW TABLES;
|
||||
--error ER_NOT_FORM_FILE
|
||||
SHOW CREATE TABLE t1;
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
DROP TABLE t1;
|
||||
--list_files $MYSQLD_DATADIR/test t1*
|
||||
--remove_file $MYSQLD_DATADIR/test/t1.frm
|
||||
--remove_file $MYSQLD_DATADIR/test/t1.par
|
||||
@@ -931,3 +931,44 @@ insert into t2 values(52, 20070322, 456, 'filler') ;
|
||||
select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid;
|
||||
drop table t1, t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50939: Loose Index Scan unduly relies on engine to remember range
|
||||
--echo # endpoints
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
KEY ( a, b )
|
||||
) PARTITION BY HASH (a) PARTITIONS 1;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a INT,
|
||||
b INT,
|
||||
KEY ( a, b )
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
|
||||
INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 10, b + 10 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 20, b + 20 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
|
||||
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
|
||||
--echo # plans should be identical
|
||||
EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
|
||||
EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
|
||||
|
||||
FLUSH status;
|
||||
SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
|
||||
--echo # Should be no more than 4 reads.
|
||||
SHOW status LIKE 'handler_read_key';
|
||||
|
||||
FLUSH status;
|
||||
SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a;
|
||||
--echo # Should be no more than 4 reads.
|
||||
SHOW status LIKE 'handler_read_key';
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
@@ -1313,45 +1313,4 @@ SELECT * FROM t1 FORCE INDEX (PRIMARY)
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50939: Loose Index Scan unduly relies on engine to remember range
|
||||
--echo # endpoints
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
KEY ( a, b )
|
||||
) PARTITION BY HASH (a) PARTITIONS 1;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a INT,
|
||||
b INT,
|
||||
KEY ( a, b )
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
|
||||
INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 10, b + 10 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 20, b + 20 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
|
||||
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
|
||||
--echo # plans should be identical
|
||||
EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
|
||||
EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
|
||||
|
||||
FLUSH status;
|
||||
SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
|
||||
--echo # Should be no more than 4 reads.
|
||||
SHOW status LIKE 'handler_read_key';
|
||||
|
||||
FLUSH status;
|
||||
SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a;
|
||||
--echo # Should be no more than 4 reads.
|
||||
SHOW status LIKE 'handler_read_key';
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -63,6 +63,22 @@ DROP TABLE t1,t2,t3;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54568: create view cause Assertion failed: 0,
|
||||
--echo # file .\item_subselect.cc, line 836
|
||||
--echo #
|
||||
EXPLAIN SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
|
||||
DESCRIBE SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
|
||||
--echo # None of the below should crash
|
||||
CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
|
||||
CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
|
||||
DROP VIEW v1, v2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests.
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug#53236 Segfault in DTCollation::set(DTCollation&)
|
||||
--echo #
|
||||
|
||||
Reference in New Issue
Block a user