Commit a04007d9 authored by Timothy Smith's avatar Timothy Smith

Merge 5.1 main to 5.1-build

parents 5ee1339d dd47146d
......@@ -176,7 +176,7 @@ check_cpu () {
fi
cc_ver=`$cc --version | sed 1q`
cc_verno=`echo $cc_ver | sed -e 's/^.*gcc/gcc/g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'`
cc_verno=`echo $cc_ver | sed -e 's/^.*(GCC)//g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'`
set -- `echo $cc_verno | tr '.' ' '`
cc_major=$1
cc_minor=$2
......
......@@ -49,7 +49,7 @@ bin-dist: all
$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
# Remove BK's "SCCS" subdirectories from source distribution
# Create initial database files for Windows installations.
# Create initial database files for Windows installations and check them.
dist-hook:
rm -rf `find $(distdir) -type d -name SCCS -print`
mkdir -p $(distdir)/win
......@@ -57,6 +57,7 @@ dist-hook:
--builddir=$(top_builddir) \
--datadir=$(distdir)/win/data \
--srcdir=$(top_srcdir)
storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
tags:
support-files/build-tags
......
......@@ -246,7 +246,7 @@ extern int NEAR my_umask, /* Default creation mask */
NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
NEAR my_dont_interrupt; /* call remember_intr when set */
extern my_bool NEAR mysys_uses_curses, my_use_symdir;
extern ulong sf_malloc_cur_memory, sf_malloc_max_memory;
extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
extern ulong my_default_record_cache_size;
extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
......
......@@ -1103,6 +1103,9 @@ void Protocol_text::prepare_for_resend()
data->embedded_info->prev_ptr= &cur->next;
next_field=cur->data;
next_mysql_field= data->embedded_info->fields_list;
#ifndef DBUG_OFF
field_pos= 0;
#endif
DBUG_VOID_RETURN;
}
......
......@@ -77,6 +77,7 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(distdir)/std_data/ndb_backup51_data_be
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(distdir)/std_data/ndb_backup51_data_le
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(distdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/std_data/parts/*.MY* $(distdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(distdir)/std_data/funcs_1
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(distdir)/lib/My
......@@ -132,6 +133,7 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_be
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_le
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(DESTDIR)$(testdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/std_data/parts/*.MY* $(DESTDIR)$(testdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(DESTDIR)$(testdir)/std_data/funcs_1
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(DESTDIR)$(testdir)/lib/My
......
This diff is collapsed.
--require r/case_insensitive_file_system.require
--disable_query_log
show variables like "lower_case_file_system";
--enable_query_log
--require r/lowercase0.require
--disable_query_log
show variables like 'lower_case_%';
show variables like "lower_case_table_names";
--enable_query_log
--require r/lowercase2.require
--disable_query_log
show variables like 'lower_case_table_names';
--enable_query_log
# include/ps_ddl_1.inc
#
# Auxiliary script to be used in ps_ddl.test
#
prepare stmt_sf from 'select f_12093();';
prepare stmt_sp from 'call p_12093(f_12093())';
execute stmt_sf;
execute stmt_sp;
connection con1;
eval $my_drop;
#
connection default;
--echo # XXX: used to be a bug
execute stmt_sf;
--echo # XXX: used to be a bug
execute stmt_sp;
#
--echo # XXX: used to be a bug
execute stmt_sf;
--echo # XXX: used to be a bug
execute stmt_sp;
connection default;
......@@ -327,7 +327,6 @@ sub mtr_report_stats ($) {
/Sort aborted/ or
/Time-out in NDB/ or
/One can only use the --user.*root/ or
/Setting lower_case_table_names=2/ or
/Table:.* on (delete|rename)/ or
/You have an error in your SQL syntax/ or
/deprecated/ or
......@@ -402,7 +401,18 @@ sub mtr_report_stats ($) {
)) or
# Test case for Bug#31590 produces the following error:
/Out of sort memory; increase server sort buffer size/
/Out of sort memory; increase server sort buffer size/ or
# Bug#35161, test of auto repair --myisam-recover
/able.*_will_crash/ or
# lowercase_table3 using case sensitive option on
# case insensitive filesystem (InnoDB error).
/Cannot find or open table test\/BUG29839 from/ or
# When trying to set lower_case_table_names = 2
# on a case sensitive file system. Bug#37402.
/lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive. Now setting lower_case_table_names to 0 to avoid future problems./
)
{
next; # Skip these lines
......
Variable_name Value
lower_case_file_system ON
This diff is collapsed.
......@@ -5388,4 +5388,10 @@ select * from t1;
c1
That
drop table t1;
create table t1 (a int not null) engine=csv;
lock tables t1 read;
select * from t1;
ERROR HY000: File './test/t1.CSV' not found (Errcode: 2)
unlock tables;
drop table t1;
End of 5.1 tests
......@@ -1009,13 +1009,13 @@ Warning 1101 BLOB/TEXT column 'blurb' can't have a default value
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
INSERT INTO federated.t1 VALUES(4, "Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt:");
INSERT INTO federated.t1 VALUES(4, "Die �bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f�r jemanden, der seine Zielsprache ernst nimmt:");
SELECT * FROM federated.t1;
blurb_id blurb
1 MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.
2 All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.
3 A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined.
4 Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt:
4 Die �bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f�r jemanden, der seine Zielsprache ernst nimmt:
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`a` int NOT NULL,
......@@ -2118,6 +2118,17 @@ DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://';
DROP TABLE t1;
CREATE TABLE t1 (a LONGBLOB, b LONGBLOB);
INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaa', NULL);
CREATE TABLE t1
(a LONGBLOB, b LONGBLOB) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
CHECKSUM TABLE t1;
Table Checksum
test.t1 2465757603
DROP TABLE t1;
DROP TABLE t1;
End of 5.0 tests
create server 's1' foreign data wrapper 'mysql' options (port 3306);
drop server 's1';
End of 5.1 tests
......@@ -2125,4 +2136,3 @@ DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_CONCURRENT_INSERT;
......@@ -115,3 +115,21 @@ SELECT 1 REGEXP NULL;
1 REGEXP NULL
NULL
End of 5.0 tests
CREATE TABLE t1(a INT, b CHAR(4));
INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0');
PREPARE stmt1 FROM "SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1";
EXECUTE stmt1;
a
1
EXECUTE stmt1;
a
1
EXECUTE stmt1;
a
1
EXECUTE stmt1;
a
1
DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
End of 5.1 tests
......@@ -484,6 +484,7 @@ c1
handler t1 close;
read the result from the other connection
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
proceed with the normal connection
drop table t1;
......@@ -698,6 +699,7 @@ handler a2 read a first;
a
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
handler a1 close;
ERROR 42S02: Unknown table 'a1' in HANDLER
......
......@@ -3,4 +3,5 @@ create table t1(a int not null auto_increment primary key) engine=innodb;
insert into t1 set a = -1;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
drop table if exists t1;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
9223372036854775807 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (127, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
127 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (255, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
255 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (32767, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
32767 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (65535, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
65535 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (8388607, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
8388607 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (16777215, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
16777215 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (2147483647, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
2147483647 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (4294967295, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
4294967295 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
9223372036854775807 NULL
DROP TABLE t1;
CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (18446744073709551615, null);
INSERT INTO t1 (c2) VALUES ('innodb');
Got one of the listed errors
SELECT * FROM t1;
c1 c2
18446744073709551615 NULL
DROP TABLE t1;
CREATE TABLE t1(c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
SELECT c1 FROM t1;
c1
1
2
3
4
5
6
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
TRUNCATE TABLE t1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
SELECT c1 FROM t1;
c1
1
2
3
4
5
6
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
SELECT c1 FROM t1;
c1
1
2
3
4
5
6
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
DELETE FROM t1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
SELECT c1 FROM t1;
c1
1
2
3
7
8
9
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1
DROP TABLE t1;
......@@ -166,6 +166,7 @@ level id parent_id
1 1007 101
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
......@@ -190,6 +191,7 @@ create table t1 (a int) engine=innodb;
insert into t1 values (1), (2);
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
delete from t1 where a = 1;
select * from t1;
......@@ -738,6 +740,7 @@ world 2
hello 1
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
......@@ -3109,6 +3112,7 @@ BEGIN;
INSERT INTO t1 VALUES (1);
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
DROP TABLE t1;
CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB;
......@@ -3263,3 +3267,14 @@ AUTO_INCREMENT
200
DROP TABLE t2;
DROP TABLE t1;
CREATE TABLE t1 (c1 int default NULL,
c2 int default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
TRUNCATE TABLE t1;
affected rows: 0
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
TRUNCATE TABLE t1;
affected rows: 0
DROP TABLE t1;
f4 f8
xxx zzz
f4 f8
xxx zzz
......@@ -577,6 +577,7 @@ id select_type table type possible_keys key key_len ref rows Extra
INSERT INTO t2 SELECT * FROM t1;
OPTIMIZE TABLE t2;
Table Op Msg_type Msg_text
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
test.t2 optimize status OK
EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785;
id select_type table type possible_keys key key_len ref rows Extra
......
......@@ -750,8 +750,8 @@ ERROR 42S22: Unknown column 't1.b' in 'on clause'
select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
user User NULL mysql 0 mysql PRIMARY 2 A 3 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
user Host NULL mysql 0 mysql PRIMARY 1 A # NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
user User NULL mysql 0 mysql PRIMARY 2 A # NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
drop table t1;
drop table t2;
drop table t3;
......
Variable_name Value
lower_case_file_system ON
lower_case_table_names 0
......@@ -108,11 +108,11 @@ id
1
select * from v1 group by id limit 0;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 v1 id id 3 10 0 Y 32768 0 63
def test v1 v1 id id 3 10 0 Y 32768 0 63
id
select * from v1 where id=1000 group by id;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 v1 id id 3 10 0 Y 32768 0 63
def test v1 v1 id id 3 10 0 Y 32768 0 63
id
select * from v1 where id=1 group by id;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
......@@ -126,7 +126,7 @@ renamed
1
select * from v3 where renamed=1 group by renamed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def v3 renamed 8 12 0 Y 32896 0 63
def v3 v3 renamed renamed 8 12 0 Y 32896 0 63
renamed
drop table t1;
drop view v1,v2,v3;
......@@ -156,8 +156,8 @@ c1
3
SELECT v1.c1, v2.c2 FROM v1 JOIN v2 ON c1=c2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 v1 c1 c1 254 1 1 Y 0 0 8
def test t2 v2 c2 c2 254 1 1 Y 0 0 8
def test v1 v1 c1 c1 254 1 1 Y 0 0 8
def test v2 v2 c2 c2 254 1 1 Y 0 0 8
c1 c2
1 1
2 2
......
......@@ -538,7 +538,7 @@ PARTITION BY LIST (a)
(PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
drop table t1;
create table t1
(a int)
......@@ -1239,7 +1239,11 @@ SHOW TABLE STATUS;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Fixed 1 14 14 0 0 7 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
ALTER TABLE t1 OPTIMIZE PARTITION p0;
ERROR 42000: The storage engine for the table doesn't support optimize partition
Table Op Msg_type Msg_text
test.t1 optimize status OK
SHOW TABLE STATUS;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Fixed 1 7 7 0 1024 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
DROP TABLE t1;
CREATE TABLE t1 (a int, index(a)) PARTITION BY KEY(a);
ALTER TABLE t1 DISABLE KEYS;
......@@ -1499,13 +1503,17 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1
ALTER TABLE t1 ANALYZE PARTITION p1;
ERROR 42000: The storage engine for the table doesn't support analyze partition
Table Op Msg_type Msg_text
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p1;
ERROR 42000: The storage engine for the table doesn't support check partition
Table Op Msg_type Msg_text
test.t1 check status OK
ALTER TABLE t1 REPAIR PARTITION p1;
ERROR 42000: The storage engine for the table doesn't support repair partition
Table Op Msg_type Msg_text
test.t1 repair status OK
ALTER TABLE t1 OPTIMIZE PARTITION p1;
ERROR 42000: The storage engine for the table doesn't support optimize partition
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
CREATE TABLE t1 (s1 BIGINT UNSIGNED)
PARTITION BY RANGE (s1) (
......@@ -1604,4 +1612,29 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
drop table t1;
CREATE TABLE t1 (
`ID` bigint(20) NOT NULL AUTO_INCREMENT,
`createdDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`number` int,
PRIMARY KEY (`ID`, number)
)
PARTITION BY RANGE (number) (
PARTITION p0 VALUES LESS THAN (6),
PARTITION p1 VALUES LESS THAN (11)
);
create table t2 (
`ID` bigint(20),
`createdDate` TIMESTAMP,
`number` int
);
INSERT INTO t1 SET number=1;
insert into t2 select * from t1;
SELECT SLEEP(1);
SLEEP(1)
0
UPDATE t1 SET number=6;
select count(*) from t1, t2 where t1.createdDate = t2.createdDate;
count(*)
1
drop table t1, t2;
End of 5.1 tests
......@@ -445,7 +445,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 1365 0 Y 0 31 8
def key_len 253 4096 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 14 N 1 31 8
......@@ -461,7 +461,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 5 Y 0 31 8
def possible_keys 253 4096 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key_len 253 1365 1 Y 0 31 8
def key_len 253 4096 1 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 27 N 1 31 8
......
......@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 1365 0 Y 0 31 8
def key_len 253 4096 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
......
......@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 1365 0 Y 0 31 8
def key_len 253 4096 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
......
......@@ -1159,7 +1159,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 1365 0 Y 0 31 8
def key_len 253 4096 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
......
......@@ -1201,7 +1201,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 1365 0 Y 0 31 8
def key_len 253 4096 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
......@@ -4222,7 +4222,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 1365 0 Y 0 31 8
def key_len 253 4096 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
......
......@@ -1567,11 +1567,13 @@ drop table if exists t_12093;
drop function if exists f_12093;
drop function if exists f_12093_unrelated;
drop procedure if exists p_12093;
drop view if exists v_12093_unrelated;
create table t_12093 (a int);
create function f_12093() returns int return (select count(*) from t_12093);
create procedure p_12093(a int) select * from t_12093;
create function f_12093_unrelated() returns int return 2;
create procedure p_12093_unrelated() begin end;
create view v_12093_unrelated as select * from t_12093;
prepare stmt_sf from 'select f_12093();';
prepare stmt_sp from 'call p_12093(f_12093())';
execute stmt_sf;
......@@ -1580,6 +1582,27 @@ f_12093()
execute stmt_sp;
a
drop function f_12093_unrelated;
# XXX: used to be a bug
execute stmt_sf;
f_12093()
0
# XXX: used to be a bug
execute stmt_sp;
a
# XXX: used to be a bug
execute stmt_sf;
f_12093()
0
# XXX: used to be a bug
execute stmt_sp;
a
prepare stmt_sf from 'select f_12093();';
prepare stmt_sp from 'call p_12093(f_12093())';
execute stmt_sf;
f_12093()
0
execute stmt_sp;
a
drop procedure p_12093_unrelated;
# XXX: used to be a bug
execute stmt_sf;
......@@ -1595,7 +1618,29 @@ f_12093()
# XXX: used to be a bug
execute stmt_sp;
a
call p_verify_reprepare_count(2);
prepare stmt_sf from 'select f_12093();';
prepare stmt_sp from 'call p_12093(f_12093())';
execute stmt_sf;
f_12093()
0
execute stmt_sp;
a
drop view v_12093_unrelated;
# XXX: used to be a bug
execute stmt_sf;
f_12093()
0
# XXX: used to be a bug
execute stmt_sp;
a
# XXX: used to be a bug
execute stmt_sf;
f_12093()
0
# XXX: used to be a bug
execute stmt_sp;
a
call p_verify_reprepare_count(6);
SUCCESS
drop table t_12093;
......
......@@ -12,51 +12,51 @@ insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
-- after Bug#29394 is implemented.
check table t1 fast;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 5 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 27 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 5 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 27 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 check status Table is already up to date
check table t1 fast;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 5 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 27 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 5 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 27 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 check status Table is already up to date
check table t1 changed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 5 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 2 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 5 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 2 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 check status OK
insert into t1 values (5,5,5);
check table t1 changed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 5 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 2 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 5 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 2 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 check status OK
check table t1 medium;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 5 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 2 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 5 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 2 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 check status OK
check table t1 extended;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 5 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 2 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 5 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 2 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
......@@ -84,10 +84,10 @@ ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
-- after Bug#29394 is implemented.
optimize table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 8 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 2 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 8 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 2 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 optimize status OK
optimize table t1;
......@@ -154,10 +154,10 @@ insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0
-- after Bug#29394 is implemented.
analyze table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 7 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 2 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 7 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 2 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
......@@ -171,10 +171,10 @@ t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE
-- after Bug#29394 is implemented.
repair table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 42 7 Y 0 31 8
def Op 253 3 6 Y 0 31 8
def Msg_type 253 3 6 Y 0 31 8
def Msg_text 253 85 2 Y 0 31 8
def Table 253 128 7 Y 0 31 8
def Op 253 10 6 Y 0 31 8
def Msg_type 253 10 6 Y 0 31 8
def Msg_text 253 255 2 Y 0 31 8
Table Op Msg_type Msg_text
test.t1 repair status OK
show index from t1;
......@@ -878,8 +878,8 @@ latin1_bin latin1 47 Yes 1
----------------------------------------------------------------
SHOW CREATE DATABASE mysqltest1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Database 253 63 10 N 1 31 33
def Create Database 253 1023 69 N 1 31 33
def Database 253 192 10 N 1 31 33
def Create Database 253 3072 69 N 1 31 33
Database Create Database
mysqltest1 CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */
----------------------------------------------------------------
......@@ -891,8 +891,8 @@ mysqltest1
----------------------------------------------------------------
SHOW CREATE TABLE t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 63 2 N 1 31 33
def Create Table 253 1023 102 N 1 31 33
def Table 253 192 2 N 1 31 33
def Create Table 253 3072 102 N 1 31 33
Table Create Table
t1 CREATE TABLE `t1` (
`c` int(11) NOT NULL,
......@@ -1052,10 +1052,10 @@ NULL test t1_bi INSERT NULL test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW
----------------------------------------------------------------
SHOW CREATE VIEW v1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def View 253 63 2 N 1 31 33
def Create View 253 1023 103 N 1 31 33
def character_set_client 253 30 6 N 1 31 33
def collation_connection 253 30 6 N 1 31 33
def View 253 192 2 N 1 31 33
def Create View 253 3072 103 N 1 31 33
def character_set_client 253 96 6 N 1 31 33
def collation_connection 253 96 6 N 1 31 33
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` binary binary
----------------------------------------------------------------
......@@ -1078,12 +1078,12 @@ NULL test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary
----------------------------------------------------------------
SHOW CREATE PROCEDURE p1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Procedure 253 63 2 N 1 31 33
def Procedure 253 192 2 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def Create Procedure 253 1023 59 Y 0 31 33
def character_set_client 253 30 6 N 1 31 33
def collation_connection 253 30 6 N 1 31 33
def Database Collation 253 30 17 N 1 31 33
def Create Procedure 253 3072 59 Y 0 31 33
def character_set_client 253 96 6 N 1 31 33
def collation_connection 253 96 6 N 1 31 33
def Database Collation 253 96 17 N 1 31 33
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 1 binary binary latin1_swedish_ci
......@@ -1133,12 +1133,12 @@ p1 NULL test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL D
----------------------------------------------------------------
SHOW CREATE FUNCTION f1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Function 253 63 2 N 1 31 33
def Function 253 192 2 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def Create Function 253 1023 74 Y 0 31 33
def character_set_client 253 30 6 N 1 31 33
def collation_connection 253 30 6 N 1 31 33
def Database Collation 253 30 17 N 1 31 33
def Create Function 253 3072 74 Y 0 31 33
def character_set_client 253 96 6 N 1 31 33
def collation_connection 253 96 6 N 1 31 33
def Database Collation 253 96 17 N 1 31 33
Function sql_mode Create Function character_set_client collation_connection Database Collation
f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN 1 binary binary latin1_swedish_ci
......@@ -1244,6 +1244,36 @@ Slow_queries 2
show variables like 'myisam_recover_options';
Variable_name Value
myisam_recover_options OFF
CREATE TABLE t1 (
Codigo int(10) unsigned NOT NULL auto_increment,
Nombre varchar(255) default NULL,
Telefono varchar(255) default NULL,
Observaciones longtext,
Direccion varchar(255) default NULL,
Dni varchar(255) default NULL,
CP int(11) default NULL,
Provincia varchar(255) default NULL,
Poblacion varchar(255) default NULL,
PRIMARY KEY (Codigo)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
show create table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 64 2 N 1 31 7
def Create Table 253 1024 445 N 1 31 7
Table Create Table
t1 CREATE TABLE `t1` (
`Codigo` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Nombre` varchar(255) DEFAULT NULL,
`Telefono` varchar(255) DEFAULT NULL,
`Observaciones` longtext,
`Direccion` varchar(255) DEFAULT NULL,
`Dni` varchar(255) DEFAULT NULL,
`CP` int(11) DEFAULT NULL,
`Provincia` varchar(255) DEFAULT NULL,
`Poblacion` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Codigo`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8
drop table t1;
End of 5.0 tests
SHOW AUTHORS;
create database mysqltest;
......
......@@ -6820,6 +6820,22 @@ ttt
2
drop function func30787;
drop table t1;
create table t1(c1 INT);
create function f1(p1 int) returns varchar(32)
return 'aaa';
create view v1 as select f1(c1) as parent_control_name from t1;
create procedure p1()
begin
select parent_control_name as c1 from v1;
end //
call p1();
c1
call p1();
c1
drop procedure p1;
drop function f1;
drop view v1;
drop table t1;
# ------------------------------------------------------------------
# -- End of 5.0 tests
# ------------------------------------------------------------------
......
drop table if exists t0, t1, t2, t3, t4;
drop table if exists t0, t1, t2, t3, t4, t5;
create table t1 (oref int, grp int, ie int) ;
insert into t1 (oref, grp, ie) values
(1, 1, 1),
......@@ -780,3 +780,29 @@ SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0);
1
DROP TABLE t1, t2;
End of 5.0 tests
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (
a int(11) default null,
b int(11) default null,
key (a)
);
insert into t1 select A.a+10*(B.a+10*C.a),A.a+10*(B.a+10*C.a) from t0 A, t0 B, t0 C;
create table t2 (a int(11) default null);
insert into t2 values (0),(1);
create table t3 (a int(11) default null);
insert into t3 values (0),(1);
create table t4 (a int(11) default null);
insert into t4 values (0),(1);
create table t5 (a int(11) default null);
insert into t5 values (0),(1),(0),(1);
select * from t2, t3
where
t2.a < 10 and
t3.a+1 = 2 and
t3.a in (select t1.b from t1
where t1.a+1=t1.a+1 and
t1.a < (select t4.a+10
from t4, t5 limit 2));
ERROR 21000: Subquery returns more than 1 row
drop table t0, t1, t2, t3, t4, t5;
......@@ -19,6 +19,7 @@ a b
THE LION 13
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
......
......@@ -1529,6 +1529,11 @@ SELECT f1 FROM t1;
f1
99999999999999999999999999999.999999999999999999999999999999
DROP TABLE t1;
select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000);
(1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000)
0.812988073953673124592306939480
End of 5.0 tests
select cast(143.481 as decimal(4,1));
cast(143.481 as decimal(4,1))
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -192,14 +192,30 @@ DROP TABLE t1;
CREATE TABLE t1 (a int primary key)
ENGINE=NDB
PARTITION BY KEY(a);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair note The storage engine for the table doesn't support repair
ALTER TABLE t1 OPTIMIZE PARTITION p0;
ERROR HY000: Table storage engine for 't1' doesn't have this option
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
ALTER TABLE t1 CHECK PARTITION p0;
ERROR HY000: Table storage engine for 't1' doesn't have this option
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
ALTER TABLE t1 REPAIR PARTITION p0;
ERROR HY000: Table storage engine for 't1' doesn't have this option
Table Op Msg_type Msg_text
test.t1 repair note The storage engine for the table doesn't support repair
ALTER TABLE t1 ANALYZE PARTITION p0;
ERROR HY000: Table storage engine for 't1' doesn't have this option
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
ALTER TABLE t1 REBUILD PARTITION p0;
ERROR HY000: Table storage engine for 't1' doesn't have this option
DROP TABLE t1;
......
......@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 1365 0 Y 0 31 8
def key_len 253 4096 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
......
......@@ -175,15 +175,15 @@ DROP TABLE t1;
CREATE TABLE t1 (a int primary key)
ENGINE=NDB
PARTITION BY KEY(a);
--error 1031
ANALYZE TABLE t1;
CHECK TABLE t1;
OPTIMIZE TABLE t1;
REPAIR TABLE t1;
ALTER TABLE t1 OPTIMIZE PARTITION p0;
--error 1031
ALTER TABLE t1 CHECK PARTITION p0;
--error 1031
ALTER TABLE t1 REPAIR PARTITION p0;
--error 1031
ALTER TABLE t1 ANALYZE PARTITION p0;
--error 1031
--error ER_ILLEGAL_HA
ALTER TABLE t1 REBUILD PARTITION p0;
DROP TABLE t1;
......
......@@ -31,6 +31,9 @@ let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10
--echo # 1.4 ALTER ... ANALYZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
--echo # 1.5 ALTER ... ANALYZE PARTITION ALL;
let $alter= ALTER TABLE t1 ANALYZE PARTITION ALL;
--source suite/parts/inc/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 2 ALTER ... CHECK PARTITION
......@@ -47,6 +50,9 @@ let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
--echo # 2.4 ALTER ... CHECK PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
--echo # 2.5 ALTER ... CHECK PARTITION ALL;
let $alter= ALTER TABLE t1 CHECK PARTITION ALL;
--source suite/parts/inc/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 3 ALTER ... OPTIMIZE PARTITION
......@@ -63,6 +69,9 @@ let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_1
--echo # 3.4 ALTER ... OPTIMIZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
--echo # 3.5 ALTER ... OPTIMIZE PARTITION ALL;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION ALL;
--source suite/parts/inc/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 4 ALTER ... REBUILD PARTITION
......@@ -79,6 +88,9 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10
--echo # 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
--echo # 4.5 ALTER ... REBUILD PARTITION ALL;
let $alter= ALTER TABLE t1 REBUILD PARTITION ALL;
--source suite/parts/inc/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 5 ALTER ... REPAIR PARTITION
......@@ -95,6 +107,9 @@ let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
--echo # 5.4 ALTER ... REPAIR PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
--echo # 5.5 ALTER ... REPAIR PARTITION ALL;
let $alter= ALTER TABLE t1 REPAIR PARTITION ALL;
--source suite/parts/inc/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 6 ALTER ... REMOVE PARTITIONING
......
This diff is collapsed.
......@@ -473,16 +473,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -927,16 +928,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -1380,16 +1382,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -1896,16 +1899,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -2388,16 +2392,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -2841,16 +2846,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -3296,16 +3302,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -3749,16 +3756,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -4205,16 +4213,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -4656,16 +4665,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......@@ -5105,16 +5115,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze note The storage engine for the table doesn't support analyze
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check note The storage engine for the table doesn't support check
test.t1 check status OK
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 <some_value>
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note The storage engine for the table doesn't support optimize
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES;
# replacing t1.MYI with a corrupt + unclosed one created by doing:
# 'create table t1 (a int key(a))' head -c1024 t1.MYI > corrupt_t1.MYI
SELECT * FROM t1_will_crash;
a
1
2
3
4
5
6
7
8
9
10
11
Warnings:
Error 145 Table './test/t1_will_crash' is marked as crashed and should be repaired
Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
Error 1034 Size of indexfile is: 1024 Should be: 2048
Error 1034 Size of datafile is: 77 Should be: 7
Error 1034 Number of rows changed from 1 to 11
DROP TABLE t1_will_crash;
CREATE TABLE t1_will_crash (a INT, KEY (a))
ENGINE=MyISAM
PARTITION BY HASH(a)
PARTITIONS 3;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES;
# replacing t1#P#p1.MYI with a corrupt + unclosed one created by doing:
# 'create table t1 (a int key(a)) partition by hash (a) partitions 3'
# head -c1024 t1#P#p1.MYI > corrupt_t1#P#p1.MYI
SELECT * FROM t1_will_crash;
a
1
2
3
4
5
6
7
8
9
10
11
Warnings:
Error 145 Table './test/t1_will_crash#P#p1' is marked as crashed and should be repaired
Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
Error 1034 Size of indexfile is: 1024 Should be: 2048
Error 1034 Size of datafile is: 28 Should be: 7
Error 1034 Number of rows changed from 1 to 4
DROP TABLE t1_will_crash;
This diff is collapsed.
......@@ -7,5 +7,3 @@ partition_syntax_ndb : Bug#36735 Not supported
partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_ndb : Bug#30581 partition_value tests use disallowed CAST() function
partition_alter4_myisam : Bug#20129 / WL#4176
partition_alter4_innodb : Bug#20129 / WL#4176
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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