mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
This commit is contained in:
commit
ca090321bf
238 changed files with 1095 additions and 6090 deletions
|
|
@ -14,6 +14,7 @@ main.information_schema # Bug#47449 2009-09-19 alik main.inform
|
|||
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
||||
main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
|
||||
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
|
||||
main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
|
||||
main.mysqlbinlog_row @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
||||
main.mysqlbinlog_row_innodb @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
||||
main.mysqlbinlog_row_myisam @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
||||
|
|
@ -25,7 +26,6 @@ main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases
|
|||
main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
parts.partition_alter4_innodb # Bug#45299 2010-06-28 alik Test "partition_alter4_innodb" is taking too long, timeout
|
||||
perfschema.pfs_upgrade # Bug#53102 2010-06-15 alik perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode
|
||||
|
||||
rpl.rpl_heartbeat_basic # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again
|
||||
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
|
||||
|
|
|
|||
|
|
@ -12775,3 +12775,29 @@ a
|
|||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int) ENGINE=ARCHIVE;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
FLUSH TABLES;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -382,3 +382,14 @@ INSERT INTO t1 VALUES('A ', 'A ');
|
|||
ERROR 23000: Duplicate entry 'A -A ' for key 'key1'
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c
|
||||
# on DELETE statement
|
||||
#
|
||||
CREATE TABLE t1 (col_int_nokey INT,
|
||||
col_int_key INT,
|
||||
INDEX(col_int_key) USING HASH) ENGINE = HEAP;
|
||||
INSERT INTO t1 (col_int_nokey, col_int_key) VALUES (3, 0), (4, 0), (3, 1);
|
||||
DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
|
|
|
|||
|
|
@ -1,208 +0,0 @@
|
|||
DROP TABLE IF EXISTS t1,t2;
|
||||
DROP DATABASE IF EXISTS test_$1;
|
||||
create database test_$1;
|
||||
create table test_$1.r1 (i int) raid_type=1;
|
||||
create table test_$1.r2 (i int) raid_type=1 raid_chunks=32;
|
||||
drop database test_$1;
|
||||
create database test_$1;
|
||||
create table test_$1.r2 (i int) raid_type=1 raid_chunks=257;
|
||||
show create table test_$1.r2;
|
||||
Table Create Table
|
||||
r2 CREATE TABLE `r2` (
|
||||
`i` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 RAID_TYPE=striped RAID_CHUNKS=255 RAID_CHUNKSIZE=256
|
||||
drop database test_$1;
|
||||
CREATE TABLE t1 (
|
||||
id int unsigned not null auto_increment primary key,
|
||||
c char(255) not null
|
||||
) RAID_TYPE=STRIPED RAID_CHUNKS=2 RAID_CHUNKSIZE=123;
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
450
|
||||
ALTER TABLE t1 ADD COLUMN x INT UNSIGNED NOT NULL;
|
||||
ALTER TABLE t1 ADD KEY c (c);
|
||||
ALTER TABLE t1 DROP KEY c;
|
||||
ALTER TABLE t1 DROP COLUMN x;
|
||||
ALTER TABLE t1 RENAME t2;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
450
|
||||
DROP TABLE t2;
|
||||
/* variable rows */
|
||||
CREATE TABLE t1 (
|
||||
id int unsigned not null auto_increment primary key,
|
||||
c varchar(255) not null
|
||||
) RAID_TYPE=STRIPED RAID_CHUNKS=5 RAID_CHUNKSIZE=121;
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
450
|
||||
ALTER TABLE t1 ADD COLUMN x INT UNSIGNED NOT NULL;
|
||||
ALTER TABLE t1 ADD KEY c (c);
|
||||
ALTER TABLE t1 DROP KEY c;
|
||||
ALTER TABLE t1 DROP COLUMN x;
|
||||
ALTER TABLE t1 RENAME t2;
|
||||
ALTER TABLE t2 CHANGE COLUMN c c VARCHAR(251) NOT NULL;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
450
|
||||
DROP TABLE t2;
|
||||
29
mysql-test/suite/perfschema/include/upgrade_check.inc
Normal file
29
mysql-test/suite/perfschema/include/upgrade_check.inc
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Copyright (C) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# Routine to be called by pfs_upgrade.test
|
||||
# $out_file and $err_file must be set within pfs_upgrade.test.
|
||||
#
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $out_file 2> $err_file
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $err_file
|
||||
--error 0,1
|
||||
--remove_file $out_file
|
||||
--error 0,1
|
||||
--remove_file $err_file
|
||||
|
||||
|
|
@ -65,3 +65,4 @@ Variable_name Value
|
|||
Qcache_hits 1
|
||||
SET GLOBAL query_cache_size= default;
|
||||
drop table t1;
|
||||
flush status;
|
||||
|
|
|
|||
|
|
@ -55,14 +55,21 @@ THREAD_ID EVENT_ID
|
|||
[THREAD_ID] [EVENT_ID]
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
DROP TABLE IF EXISTS t_event;
|
||||
DROP EVENT IF EXISTS t_ps_event;
|
||||
CREATE TABLE t_event AS
|
||||
SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
WHERE 1 = 2;
|
||||
CREATE EVENT t_ps_event
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
||||
DO SELECT DISTINCT EVENT_ID
|
||||
DO INSERT INTO t_event
|
||||
SELECT DISTINCT EVENT_ID
|
||||
FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
JOIN performance_schema.EVENTS_WAITS_HISTORY USING (EVENT_ID)
|
||||
ORDER BY EVENT_ID
|
||||
LIMIT 1;
|
||||
ALTER TABLE t1 ADD COLUMN c INT;
|
||||
DROP TRIGGER IF EXISTS t_ps_trigger;
|
||||
CREATE TRIGGER t_ps_trigger BEFORE INSERT ON t1
|
||||
FOR EACH ROW BEGIN
|
||||
SET NEW.c = (SELECT MAX(EVENT_ID)
|
||||
|
|
@ -76,6 +83,7 @@ id c
|
|||
12 [EVENT_ID]
|
||||
13 [EVENT_ID]
|
||||
DROP TRIGGER t_ps_trigger;
|
||||
DROP PROCEDURE IF EXISTS t_ps_proc;
|
||||
CREATE PROCEDURE t_ps_proc(IN tid INT, OUT pid INT)
|
||||
BEGIN
|
||||
SELECT id FROM performance_schema.PROCESSLIST
|
||||
|
|
@ -83,6 +91,7 @@ WHERE THREAD_ID = tid INTO pid;
|
|||
END;
|
||||
|
|
||||
CALL t_ps_proc(0, @p_id);
|
||||
DROP FUNCTION IF EXISTS t_ps_proc;
|
||||
CREATE FUNCTION t_ps_func(tid INT) RETURNS int
|
||||
BEGIN
|
||||
return (SELECT id FROM performance_schema.PROCESSLIST
|
||||
|
|
@ -92,6 +101,10 @@ END;
|
|||
SELECT t_ps_func(0) = @p_id;
|
||||
t_ps_func(0) = @p_id
|
||||
1
|
||||
SELECT * FROM t_event;
|
||||
EVENT_ID
|
||||
[EVENT_ID]
|
||||
DROP PROCEDURE t_ps_proc;
|
||||
DROP FUNCTION t_ps_func;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_event;
|
||||
|
|
|
|||
|
|
@ -56,10 +56,6 @@ where name like "wait/synch/mutex/sql/LOCK_thread_count";
|
|||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_mapped_file";
|
||||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_status";
|
||||
count(name)
|
||||
1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for invalid server start options
|
||||
|
|
@ -19,8 +19,11 @@
|
|||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_1.txt;
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--error 7
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $MYSQLTEST_VARDIR/tmp/bad_option_1.txt 2>&1
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $outfile 2>&1
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
|
|
@ -42,4 +45,5 @@ perl;
|
|||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for ambiguous server start options
|
||||
|
|
@ -19,8 +19,11 @@
|
|||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt;
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--error 3
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-max_=12 > $MYSQLTEST_VARDIR/tmp/bad_option_2.txt 2>&1
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-max_=12 > $outfile 2>&1
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
|
|
@ -41,4 +44,5 @@ perl;
|
|||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
|
|||
unlock tables;
|
||||
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--echo connection default;
|
||||
connection default;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,15 @@
|
|||
--source include/have_perfschema.inc
|
||||
--source include/have_lowercase0.inc
|
||||
|
||||
# Some initial settings + Preemptive cleanup
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err;
|
||||
let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out;
|
||||
--error 0,1
|
||||
--remove_file $out_file
|
||||
--error 0,1
|
||||
--remove_file $err_file
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists test.user_table;
|
||||
drop procedure if exists test.user_proc;
|
||||
|
|
@ -29,22 +38,20 @@ drop function if exists test.user_func;
|
|||
drop event if exists test.user_event;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
|
||||
|
||||
create table test.user_table(a int);
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--error 0,1
|
||||
--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
|
||||
--copy_file $MYSQLD_DATADIR/test/user_table.frm $MYSQLD_DATADIR/performance_schema/user_table.frm
|
||||
|
||||
# Make sure the table is visible
|
||||
use performance_schema;
|
||||
show tables like "user_table";
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
# Make sure the table is still visible
|
||||
show tables like "user_table";
|
||||
|
|
@ -54,22 +61,20 @@ use test;
|
|||
--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
|
||||
drop table test.user_table;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
|
||||
|
||||
create view test.user_view as select "Not supposed to be here";
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--error 0,1
|
||||
--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
|
||||
--copy_file $MYSQLD_DATADIR/test/user_view.frm $MYSQLD_DATADIR/performance_schema/user_view.frm
|
||||
|
||||
# Make sure the view is visible
|
||||
use performance_schema;
|
||||
show tables like "user_view";
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
# Make sure the view is still visible
|
||||
show tables like "user_view";
|
||||
|
|
@ -79,6 +84,7 @@ use test;
|
|||
--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
|
||||
drop view test.user_view;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
|
||||
|
||||
create procedure test.user_proc()
|
||||
|
|
@ -86,17 +92,14 @@ create procedure test.user_proc()
|
|||
|
||||
update mysql.proc set db='performance_schema' where name='user_proc';
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
select name from mysql.proc where db='performance_schema';
|
||||
|
||||
update mysql.proc set db='test' where name='user_proc';
|
||||
drop procedure test.user_proc;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func"
|
||||
|
||||
create function test.user_func() returns integer
|
||||
|
|
@ -104,17 +107,14 @@ create function test.user_func() returns integer
|
|||
|
||||
update mysql.proc set db='performance_schema' where name='user_func';
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
select name from mysql.proc where db='performance_schema';
|
||||
|
||||
update mysql.proc set db='test' where name='user_func';
|
||||
drop function test.user_func;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with EVENT performance_schema.user_event"
|
||||
|
||||
create event test.user_event on schedule every 1 day do
|
||||
|
|
@ -122,17 +122,10 @@ create event test.user_event on schedule every 1 day do
|
|||
|
||||
update mysql.event set db='performance_schema' where name='user_event';
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
select name from mysql.event where db='performance_schema';
|
||||
|
||||
update mysql.event set db='test' where name='user_event';
|
||||
drop event test.user_event;
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
|
|
|
|||
|
|
@ -350,9 +350,9 @@ TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
|
|||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
|
||||
|
||||
--echo # Clean up
|
||||
|
||||
--connection default
|
||||
--disconnect pfs_user_4
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM pfs_user_4;
|
||||
DROP USER pfs_user_4;
|
||||
flush privileges;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
|
|
@ -33,7 +33,6 @@ SET GLOBAL query_cache_size=1355776;
|
|||
|
||||
flush query cache;
|
||||
reset query cache;
|
||||
# Reset Qcache_* to a known state
|
||||
flush status;
|
||||
|
||||
select * from t1;
|
||||
|
|
@ -67,4 +66,5 @@ show status like "Qcache_hits";
|
|||
SET GLOBAL query_cache_size= default;
|
||||
|
||||
drop table t1;
|
||||
flush status;
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
|
|||
--enable_result_log
|
||||
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--echo connection default;
|
||||
connection default;
|
||||
|
|
|
|||
1
mysql-test/suite/perfschema/t/selects-master.opt
Normal file
1
mysql-test/suite/perfschema/t/selects-master.opt
Normal file
|
|
@ -0,0 +1 @@
|
|||
--event-scheduler
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
|
@ -85,20 +85,32 @@ LIMIT 5;
|
|||
|
||||
# EVENT
|
||||
|
||||
# Check that the event_scheduler is really running
|
||||
--source include/running_event_scheduler.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t_event;
|
||||
DROP EVENT IF EXISTS t_ps_event;
|
||||
--enable_warnings
|
||||
CREATE TABLE t_event AS
|
||||
SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
WHERE 1 = 2;
|
||||
CREATE EVENT t_ps_event
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
||||
DO SELECT DISTINCT EVENT_ID
|
||||
DO INSERT INTO t_event
|
||||
SELECT DISTINCT EVENT_ID
|
||||
FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
JOIN performance_schema.EVENTS_WAITS_HISTORY USING (EVENT_ID)
|
||||
ORDER BY EVENT_ID
|
||||
LIMIT 1;
|
||||
|
||||
--sleep 2
|
||||
|
||||
# TRIGGER
|
||||
|
||||
ALTER TABLE t1 ADD COLUMN c INT;
|
||||
|
||||
--disable_warnings
|
||||
DROP TRIGGER IF EXISTS t_ps_trigger;
|
||||
--enable_warnings
|
||||
delimiter |;
|
||||
|
||||
CREATE TRIGGER t_ps_trigger BEFORE INSERT ON t1
|
||||
|
|
@ -119,6 +131,9 @@ DROP TRIGGER t_ps_trigger;
|
|||
|
||||
# PROCEDURE
|
||||
|
||||
--disable_warnings
|
||||
DROP PROCEDURE IF EXISTS t_ps_proc;
|
||||
--enable_warnings
|
||||
delimiter |;
|
||||
|
||||
CREATE PROCEDURE t_ps_proc(IN tid INT, OUT pid INT)
|
||||
|
|
@ -135,6 +150,9 @@ CALL t_ps_proc(0, @p_id);
|
|||
|
||||
# FUNCTION
|
||||
|
||||
--disable_warnings
|
||||
DROP FUNCTION IF EXISTS t_ps_proc;
|
||||
--enable_warnings
|
||||
delimiter |;
|
||||
|
||||
CREATE FUNCTION t_ps_func(tid INT) RETURNS int
|
||||
|
|
@ -149,8 +167,17 @@ delimiter ;|
|
|||
|
||||
SELECT t_ps_func(0) = @p_id;
|
||||
|
||||
DROP PROCEDURE t_ps_proc;
|
||||
DROP FUNCTION t_ps_func;
|
||||
# We might reach this point too early which means the event scheduler has not
|
||||
# execute our "t_ps_event". Therefore we poll till the record was inserted
|
||||
# and run our test statement afterwards.
|
||||
let $wait_timeout= 20;
|
||||
let $wait_condition= SELECT COUNT(*) = 1 FROM t_event;
|
||||
--source include/wait_condition.inc
|
||||
--replace_column 1 [EVENT_ID]
|
||||
SELECT * FROM t_event;
|
||||
|
||||
# Clean up
|
||||
DROP PROCEDURE t_ps_proc;
|
||||
DROP FUNCTION t_ps_func;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_event;
|
||||
|
|
|
|||
|
|
@ -80,9 +80,6 @@ select count(name) from MUTEX_INSTANCES
|
|||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_thread_count";
|
||||
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_mapped_file";
|
||||
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_status";
|
||||
|
||||
|
|
|
|||
|
|
@ -1701,3 +1701,24 @@ SELECT * FROM t1;
|
|||
REPAIR TABLE t1 EXTENDED;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int) ENGINE=ARCHIVE;
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
remove_file $MYSQLD_DATADIR/test/t1.frm;
|
||||
FLUSH TABLES;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -284,3 +284,20 @@ INSERT INTO t1 VALUES('A ', 'A ');
|
|||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c
|
||||
--echo # on DELETE statement
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (col_int_nokey INT,
|
||||
col_int_key INT,
|
||||
INDEX(col_int_key) USING HASH) ENGINE = HEAP;
|
||||
INSERT INTO t1 (col_int_nokey, col_int_key) VALUES (3, 0), (4, 0), (3, 1);
|
||||
|
||||
DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ type_long_blob longblob,
|
|||
index(type_short)
|
||||
) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed CHARSET=latin1;
|
||||
|
||||
# Not tested above: RAID_# UNION INSERT_METHOD DATA DIRECTORY INDEX DIRECTORY
|
||||
# Not tested above: UNION INSERT_METHOD DATA DIRECTORY INDEX DIRECTORY
|
||||
show create table t1;
|
||||
insert into t1 (type_timestamp) values ("2003-02-07 10:00:01");
|
||||
select * from t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue