Merge from main branch

This commit is contained in:
Christoffer Hall 2009-06-29 14:55:22 +02:00
commit 0d54c57c2d
56 changed files with 769 additions and 1146 deletions

View file

@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.1.36)
AM_INIT_AUTOMAKE(mysql, 5.1.37)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
@ -1625,7 +1625,7 @@ esac
# Build optimized or debug version ?
# First check for gcc and g++
if test "$ac_cv_prog_gcc" = "yes"
if test "$GCC" = "yes"
then
DEBUG_CFLAGS="-g"
DEBUG_OPTIMIZE_CC="-O"
@ -1633,9 +1633,16 @@ then
else
DEBUG_CFLAGS="-g"
DEBUG_OPTIMIZE_CC=""
OPTIMIZE_CFLAGS="-O"
case $SYSTEM_TYPE in
*solaris*)
OPTIMIZE_CFLAGS="-O1"
;;
*)
OPTIMIZE_CFLAGS="-O"
;;
esac
fi
if test "$ac_cv_prog_cxx_g" = "yes"
if test "$GXX" = "yes"
then
DEBUG_CXXFLAGS="-g"
DEBUG_OPTIMIZE_CXX="-O"
@ -1643,7 +1650,14 @@ then
else
DEBUG_CXXFLAGS="-g"
DEBUG_OPTIMIZE_CXX=""
OPTIMIZE_CXXFLAGS="-O"
case $SYSTEM_TYPE in
*solaris*)
OPTIMIZE_CXXFLAGS="-O1"
;;
*)
OPTIMIZE_CXXFLAGS="-O"
;;
esac
fi
case $SYSTEM_TYPE in

View file

@ -106,7 +106,7 @@ void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *state, uchar *new_row);
my_bool my_hash_check(HASH *hash); /* Only in debug library */
#define my_hash_clear(H) bzero((char*) (H), sizeof(*(H)))
#define my_hash_inited(H) ((H)->array.buffer != 0)
#define my_hash_inited(H) ((H)->blength != 0)
#define my_hash_init_opt(A,B,C,D,E,F,G,H) \
(!my_hash_inited(A) && _my_hash_init(A,0,B,C,D,E,F,G, H CALLER_INFO))

View file

@ -41,3 +41,57 @@ reset slave;
start slave;
sync_with_master;
show status like 'slave_open_temp_tables';
#
#Bug#34654 RESET SLAVE does not clear LAST_IO_Err*
#
# clearing the status
stop slave;
reset slave;
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
echo *** errno must be zero: $last_io_errno ***;
#
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
#
change master to master_user='impossible_user_name';
start slave;
source include/wait_for_slave_io_error.inc;
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
--disable_query_log
eval SELECT $last_io_errno > 0 as ONE;
--enable_query_log
source include/stop_slave.inc;
change master to master_user='root';
source include/start_slave.inc;
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
--echo *** last errno must be zero: $last_io_errno ***
--echo *** last error must be blank: $last_io_error ***
#
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
#
source include/stop_slave.inc;
change master to master_user='impossible_user_name';
start slave;
source include/wait_for_slave_io_error.inc;
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
--disable_query_log
eval SELECT $last_io_errno > 0 as ONE;
--enable_query_log
source include/stop_slave.inc;
reset slave;
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
let $last_sql_errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
let $last_sql_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
--echo *** io last errno must be zero: $last_io_errno ***
--echo *** io last error must be blank: $last_io_error ***
--echo *** sql last errno must be zero: $last_sql_errno ***
--echo *** sql last error must be blank: $last_sql_error ***

View file

@ -669,7 +669,7 @@ call p_verify_status_increment(1, 0, 1, 0);
insert t1 set a=3;
call p_verify_status_increment(2, 2, 2, 2);
savepoint a;
call p_verify_status_increment(1, 0, 0, 0);
call p_verify_status_increment(1, 0, 1, 0);
insert t1 set a=4;
call p_verify_status_increment(2, 2, 2, 2);
release savepoint a;

View file

@ -0,0 +1,23 @@
# ==== Purpose ====
#
# Waits until the IO thread of the current connection has got an
# error, or until a timeout is reached.
#
# ==== Usage ====
#
# source include/wait_for_slave_io_error.inc;
#
# Parameters to this macro are $slave_timeout and
# $slave_keep_connection. See wait_for_slave_param.inc for
# descriptions.
let $old_slave_param_comparison= $slave_param_comparison;
let $slave_param= Last_IO_Errno;
let $slave_param_comparison= !=;
let $slave_param_value= 0;
let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
source include/wait_for_slave_param.inc;
let $slave_error_message= ;
let $slave_param_comparison= $old_slave_param_comparison;

View file

@ -766,7 +766,7 @@ call p_verify_status_increment(2, 2, 2, 2);
SUCCESS
savepoint a;
call p_verify_status_increment(1, 0, 0, 0);
call p_verify_status_increment(1, 0, 1, 0);
SUCCESS
insert t1 set a=4;

View file

@ -9,7 +9,7 @@ EXECUTE stmt1 USING @var1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob)
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES('ƒ\0')
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(0x8300)
SELECT HEX(f1) FROM t1;
HEX(f1)
8300
@ -29,22 +29,22 @@ HEX(s1) HEX(s2) d
466F6F2773206120426172 ED40ED41ED42 47.93
DROP PROCEDURE bug18293|
DROP TABLE t4|
SHOW BINLOG EVENTS FROM 369|
SHOW BINLOG EVENTS FROM 370|
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 369 Query 1 535 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
master-bin.000001 370 Query 1 536 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
s2 CHAR(50) CHARACTER SET cp932,
d DECIMAL(10,2))
master-bin.000001 535 Query 1 784 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
master-bin.000001 536 Query 1 785 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
IN ins2 CHAR(50) CHARACTER SET cp932,
IN ind DECIMAL(10,2))
BEGIN
INSERT INTO t4 VALUES (ins1, ins2, ind);
END
master-bin.000001 784 Query 1 1048 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
master-bin.000001 1048 Query 1 1137 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1137 Query 1 1216 use `test`; DROP TABLE t4
master-bin.000001 785 Query 1 1049 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
master-bin.000001 1049 Query 1 1138 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1138 Query 1 1217 use `test`; DROP TABLE t4
End of 5.0 tests
SHOW BINLOG EVENTS FROM 364;
SHOW BINLOG EVENTS FROM 365;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
CREATE TABLE t1 (a varchar(16)) character set cp932;

View file

@ -0,0 +1,26 @@
SET NAMES gbk;
CREATE TABLE t1 (
f1 BLOB
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
CREATE PROCEDURE p1(IN val BLOB)
BEGIN
SET @tval = val;
SET @sql_cmd = CONCAT_WS(' ', 'insert into t1(f1) values(?)');
PREPARE stmt FROM @sql_cmd;
EXECUTE stmt USING @tval;
DEALLOCATE PREPARE stmt;
END|
SET @`tcontent`:=_binary 0x50434B000900000000000000E9000000 COLLATE `binary`/*!*/;
CALL p1(@`tcontent`);
FLUSH LOGS;
DROP PROCEDURE p1;
RENAME TABLE t1 to t2;
SELECT hex(f1) FROM t2;
hex(f1)
50434B000900000000000000E9000000
SELECT hex(f1) FROM t1;
hex(f1)
50434B000900000000000000E9000000
DROP PROCEDURE p1;
DROP TABLE t1;
DROP TABLE t2;

View file

@ -0,0 +1,7 @@
set session transaction isolation level read committed;
create table bug45357(a int, b int,key(b))engine=innodb;
insert into bug45357 values (25170,6122);
update bug45357 set a=1 where b=30131;
delete from bug45357 where b < 20996;
delete from bug45357 where b < 7001;
drop table bug45357;

View file

@ -4457,4 +4457,83 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select '0' AS `a`,'0' AS `b`,'0' AS `c` from `test`.`t1` where 1
DROP TABLE t1;
#
# Bug#45266: Uninitialized variable lead to an empty result.
#
drop table if exists A,AA,B,BB;
CREATE TABLE `A` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`date_key` date NOT NULL,
`date_nokey` date NOT NULL,
`datetime_key` datetime NOT NULL,
`int_nokey` int(11) NOT NULL,
`time_key` time NOT NULL,
`time_nokey` time NOT NULL,
PRIMARY KEY (`pk`),
KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`),
KEY `datetime_key` (`datetime_key`)
);
CREATE TABLE `AA` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
`time_key` time NOT NULL,
KEY `time_key` (`time_key`),
PRIMARY KEY (`pk`)
);
CREATE TABLE `B` (
`date_nokey` date NOT NULL,
`date_key` date NOT NULL,
`time_key` time NOT NULL,
`datetime_nokey` datetime NOT NULL,
`varchar_key` varchar(1) NOT NULL,
KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`),
KEY `varchar_key` (`varchar_key`)
);
INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
CREATE TABLE `BB` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
`date_key` date NOT NULL,
`varchar_nokey` varchar(1) NOT NULL,
`date_nokey` date NOT NULL,
PRIMARY KEY (`pk`),
KEY `date_key` (`date_key`)
);
INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
SELECT table1 . `pk` AS field1
FROM
(BB AS table1 INNER JOIN
(AA AS table2 STRAIGHT_JOIN A AS table3
ON ( table3 . `date_key` = table2 . `pk` ))
ON ( table3 . `datetime_key` = table2 . `int_nokey` ))
WHERE ( table3 . `date_key` <= 4 AND table2 . `pk` = table1 . `varchar_nokey`)
GROUP BY field1 ;
field1
SELECT table3 .`date_key` field1
FROM
B table1 LEFT JOIN B table3 JOIN
(BB table6 JOIN A table7 ON table6 .`varchar_nokey`)
ON table6 .`int_nokey` ON table6 .`date_key`
WHERE NOT ( table1 .`varchar_key` AND table7 .`pk`) GROUP BY field1;
field1
NULL
SELECT table4 . `time_nokey` AS field1 FROM
(AA AS table1 CROSS JOIN
(AA AS table2 STRAIGHT_JOIN
(B AS table3 STRAIGHT_JOIN A AS table4
ON ( table4 . `date_key` = table3 . `time_key` ))
ON ( table4 . `pk` = table3 . `date_nokey` ))
ON ( table4 . `time_key` = table3 . `datetime_nokey` ))
WHERE ( table4 . `time_key` < table1 . `time_key` AND
table1 . `int_nokey` != 'f')
GROUP BY field1 ORDER BY field1 , field1;
field1
SELECT table1 .`time_key` field2 FROM B table1 LEFT JOIN BB JOIN A table5 ON table5 .`date_nokey` ON table5 .`int_nokey` GROUP BY field2;
field2
00:05:48
15:13:38
drop table A,AA,B,BB;
#end of test for bug#45266
End of 5.1 tests

View file

@ -2073,4 +2073,18 @@ select @a, @b;
drop trigger trg1;
drop trigger trg2;
drop table t1, t2;
CREATE TABLE t1 ( a INT, b INT );
CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY, b INT );
INSERT INTO t1 (a) VALUES (1);
CREATE TRIGGER tr1
BEFORE INSERT ON t2
FOR EACH ROW
BEGIN
UPDATE a_nonextisting_table SET a = 1;
END//
CREATE TABLE IF NOT EXISTS t2 ( a INT, b INT ) SELECT a, b FROM t1;
ERROR 42S02: Table 'test.a_nonextisting_table' doesn't exist
SELECT * FROM t2;
a b
DROP TABLE t1, t2;
End of 5.1 tests.

View file

@ -462,4 +462,18 @@ unlock tables;
select * from t1;
i
drop table t1;
CREATE DATABASE db1;
CREATE TABLE db1.t1 (a char(30)) ENGINE=MEMORY;
CREATE TRIGGER db1.trg AFTER INSERT ON db1.t1 FOR EACH ROW
INSERT INTO db1.t1 VALUES('Some very sensitive data goes here');
CREATE USER 'no_rights'@'localhost';
REVOKE ALL ON *.* FROM 'no_rights'@'localhost';
FLUSH PRIVILEGES;
SELECT trigger_name FROM INFORMATION_SCHEMA.TRIGGERS
WHERE trigger_schema = 'db1';
trigger_name
SHOW CREATE TRIGGER db1.trg;
ERROR 42000: Access denied; you need the TRIGGER privilege for this operation
DROP USER 'no_rights'@'localhost';
DROP DATABASE db1;
End of 5.1 tests.

View file

@ -81,3 +81,11 @@ xa rollback 'a';
xa start 'a';
xa end 'a';
xa rollback 'a';
xa start 'a';
xa end 'a';
xa prepare 'a';
xa commit 'a';
xa start 'a';
xa end 'a';
xa prepare 'a';
xa commit 'a';

View file

@ -0,0 +1,40 @@
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
# Establish connection con (user=dbdict_test)
SELECT *
FROM information_schema.character_sets
WHERE character_set_name IN ('utf8','latin1','binary')
ORDER BY character_set_name;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
binary binary Binary pseudo charset 1
latin1 latin1_swedish_ci cp1252 West European 1
utf8 utf8_general_ci UTF-8 Unicode 3
SELECT *
FROM information_schema.collations
WHERE character_set_name IN ('utf8','latin1','binary')
AND (collation_name LIKE CONCAT(character_set_name,'_general_ci')
OR
collation_name LIKE CONCAT(character_set_name,'_bin'))
ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
latin1_bin latin1 47 Yes 1
latin1_general_ci latin1 48 Yes 1
utf8_bin utf8 83 Yes 1
utf8_general_ci utf8 33 Yes Yes 1
SELECT *
FROM information_schema.collation_character_set_applicability
WHERE character_set_name IN ('utf8','latin1','binary')
AND (collation_name LIKE CONCAT(character_set_name,'_general_ci')
OR
collation_name LIKE CONCAT(character_set_name,'_bin'))
ORDER BY collation_name, character_set_name;
COLLATION_NAME CHARACTER_SET_NAME
latin1_bin latin1
latin1_general_ci latin1
utf8_bin utf8
utf8_general_ci utf8
# Switch to connection default + disconnect con
DROP USER dbdict_test@localhost;

View file

@ -1,312 +0,0 @@
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
# Establish connection con (user=dbdict_test)
SELECT *
FROM information_schema.character_sets
ORDER BY character_set_name;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
armscii8 armscii8_general_ci ARMSCII-8 Armenian 1
ascii ascii_general_ci US ASCII 1
big5 big5_chinese_ci Big5 Traditional Chinese 2
binary binary Binary pseudo charset 1
cp1250 cp1250_general_ci Windows Central European 1
cp1251 cp1251_general_ci Windows Cyrillic 1
cp1256 cp1256_general_ci Windows Arabic 1
cp1257 cp1257_general_ci Windows Baltic 1
cp850 cp850_general_ci DOS West European 1
cp852 cp852_general_ci DOS Central European 1
cp866 cp866_general_ci DOS Russian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
dec8 dec8_swedish_ci DEC West European 1
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
euckr euckr_korean_ci EUC-KR Korean 2
gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2
gbk gbk_chinese_ci GBK Simplified Chinese 2
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
greek greek_general_ci ISO 8859-7 Greek 1
hebrew hebrew_general_ci ISO 8859-8 Hebrew 1
hp8 hp8_english_ci HP West European 1
keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1
koi8r koi8r_general_ci KOI8-R Relcom Russian 1
koi8u koi8u_general_ci KOI8-U Ukrainian 1
latin1 latin1_swedish_ci cp1252 West European 1
latin2 latin2_general_ci ISO 8859-2 Central European 1
latin5 latin5_turkish_ci ISO 8859-9 Turkish 1
latin7 latin7_general_ci ISO 8859-13 Baltic 1
macce macce_general_ci Mac Central European 1
macroman macroman_general_ci Mac West European 1
sjis sjis_japanese_ci Shift-JIS Japanese 2
swe7 swe7_swedish_ci 7bit Swedish 1
tis620 tis620_thai_ci TIS620 Thai 1
ucs2 ucs2_general_ci UCS-2 Unicode 2
ujis ujis_japanese_ci EUC-JP Japanese 3
utf8 utf8_general_ci UTF-8 Unicode 3
SELECT *
FROM information_schema.collations
ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
armscii8_bin armscii8 64 0
armscii8_general_ci armscii8 32 Yes 0
ascii_bin ascii 65 0
ascii_general_ci ascii 11 Yes 0
big5_bin big5 84 Yes 1
big5_chinese_ci big5 1 Yes Yes 1
binary binary 63 Yes Yes 1
cp1250_bin cp1250 66 Yes 1
cp1250_croatian_ci cp1250 44 Yes 1
cp1250_czech_cs cp1250 34 Yes 2
cp1250_general_ci cp1250 26 Yes Yes 1
cp1250_polish_ci cp1250 99 Yes 1
cp1251_bin cp1251 50 0
cp1251_bulgarian_ci cp1251 14 0
cp1251_general_ci cp1251 51 Yes 0
cp1251_general_cs cp1251 52 0
cp1251_ukrainian_ci cp1251 23 0
cp1256_bin cp1256 67 0
cp1256_general_ci cp1256 57 Yes 0
cp1257_bin cp1257 58 0
cp1257_general_ci cp1257 59 Yes 0
cp1257_lithuanian_ci cp1257 29 0
cp850_bin cp850 80 0
cp850_general_ci cp850 4 Yes 0
cp852_bin cp852 81 0
cp852_general_ci cp852 40 Yes 0
cp866_bin cp866 68 0
cp866_general_ci cp866 36 Yes 0
cp932_bin cp932 96 Yes 1
cp932_japanese_ci cp932 95 Yes Yes 1
dec8_bin dec8 69 0
dec8_swedish_ci dec8 3 Yes 0
eucjpms_bin eucjpms 98 Yes 1
eucjpms_japanese_ci eucjpms 97 Yes Yes 1
euckr_bin euckr 85 Yes 1
euckr_korean_ci euckr 19 Yes Yes 1
gb2312_bin gb2312 86 Yes 1
gb2312_chinese_ci gb2312 24 Yes Yes 1
gbk_bin gbk 87 Yes 1
gbk_chinese_ci gbk 28 Yes Yes 1
geostd8_bin geostd8 93 0
geostd8_general_ci geostd8 92 Yes 0
greek_bin greek 70 0
greek_general_ci greek 25 Yes 0
hebrew_bin hebrew 71 0
hebrew_general_ci hebrew 16 Yes 0
hp8_bin hp8 72 0
hp8_english_ci hp8 6 Yes 0
keybcs2_bin keybcs2 73 0
keybcs2_general_ci keybcs2 37 Yes 0
koi8r_bin koi8r 74 0
koi8r_general_ci koi8r 7 Yes 0
koi8u_bin koi8u 75 0
koi8u_general_ci koi8u 22 Yes 0
latin1_bin latin1 47 Yes 1
latin1_danish_ci latin1 15 Yes 1
latin1_general_ci latin1 48 Yes 1
latin1_general_cs latin1 49 Yes 1
latin1_german1_ci latin1 5 Yes 1
latin1_german2_ci latin1 31 Yes 2
latin1_spanish_ci latin1 94 Yes 1
latin1_swedish_ci latin1 8 Yes Yes 1
latin2_bin latin2 77 Yes 1
latin2_croatian_ci latin2 27 Yes 1
latin2_czech_cs latin2 2 Yes 4
latin2_general_ci latin2 9 Yes Yes 1
latin2_hungarian_ci latin2 21 Yes 1
latin5_bin latin5 78 0
latin5_turkish_ci latin5 30 Yes 0
latin7_bin latin7 79 0
latin7_estonian_cs latin7 20 0
latin7_general_ci latin7 41 Yes 0
latin7_general_cs latin7 42 0
macce_bin macce 43 0
macce_general_ci macce 38 Yes 0
macroman_bin macroman 53 0
macroman_general_ci macroman 39 Yes 0
sjis_bin sjis 88 Yes 1
sjis_japanese_ci sjis 13 Yes Yes 1
swe7_bin swe7 82 0
swe7_swedish_ci swe7 10 Yes 0
tis620_bin tis620 89 Yes 1
tis620_thai_ci tis620 18 Yes Yes 4
ucs2_bin ucs2 90 Yes 1
ucs2_czech_ci ucs2 138 Yes 8
ucs2_danish_ci ucs2 139 Yes 8
ucs2_esperanto_ci ucs2 145 Yes 8
ucs2_estonian_ci ucs2 134 Yes 8
ucs2_general_ci ucs2 35 Yes Yes 1
ucs2_hungarian_ci ucs2 146 Yes 8
ucs2_icelandic_ci ucs2 129 Yes 8
ucs2_latvian_ci ucs2 130 Yes 8
ucs2_lithuanian_ci ucs2 140 Yes 8
ucs2_persian_ci ucs2 144 Yes 8
ucs2_polish_ci ucs2 133 Yes 8
ucs2_romanian_ci ucs2 131 Yes 8
ucs2_roman_ci ucs2 143 Yes 8
ucs2_slovak_ci ucs2 141 Yes 8
ucs2_slovenian_ci ucs2 132 Yes 8
ucs2_spanish2_ci ucs2 142 Yes 8
ucs2_spanish_ci ucs2 135 Yes 8
ucs2_swedish_ci ucs2 136 Yes 8
ucs2_turkish_ci ucs2 137 Yes 8
ucs2_unicode_ci ucs2 128 Yes 8
ujis_bin ujis 91 Yes 1
ujis_japanese_ci ujis 12 Yes Yes 1
utf8_bin utf8 83 Yes 1
utf8_czech_ci utf8 202 Yes 8
utf8_danish_ci utf8 203 Yes 8
utf8_esperanto_ci utf8 209 Yes 8
utf8_estonian_ci utf8 198 Yes 8
utf8_general_ci utf8 33 Yes Yes 1
utf8_hungarian_ci utf8 210 Yes 8
utf8_icelandic_ci utf8 193 Yes 8
utf8_latvian_ci utf8 194 Yes 8
utf8_lithuanian_ci utf8 204 Yes 8
utf8_persian_ci utf8 208 Yes 8
utf8_polish_ci utf8 197 Yes 8
utf8_romanian_ci utf8 195 Yes 8
utf8_roman_ci utf8 207 Yes 8
utf8_slovak_ci utf8 205 Yes 8
utf8_slovenian_ci utf8 196 Yes 8
utf8_spanish2_ci utf8 206 Yes 8
utf8_spanish_ci utf8 199 Yes 8
utf8_swedish_ci utf8 200 Yes 8
utf8_turkish_ci utf8 201 Yes 8
utf8_unicode_ci utf8 192 Yes 8
SELECT *
FROM information_schema.collation_character_set_applicability
ORDER BY collation_name, character_set_name;
COLLATION_NAME CHARACTER_SET_NAME
armscii8_bin armscii8
armscii8_general_ci armscii8
ascii_bin ascii
ascii_general_ci ascii
big5_bin big5
big5_chinese_ci big5
binary binary
cp1250_bin cp1250
cp1250_croatian_ci cp1250
cp1250_czech_cs cp1250
cp1250_general_ci cp1250
cp1250_polish_ci cp1250
cp1251_bin cp1251
cp1251_bulgarian_ci cp1251
cp1251_general_ci cp1251
cp1251_general_cs cp1251
cp1251_ukrainian_ci cp1251
cp1256_bin cp1256
cp1256_general_ci cp1256
cp1257_bin cp1257
cp1257_general_ci cp1257
cp1257_lithuanian_ci cp1257
cp850_bin cp850
cp850_general_ci cp850
cp852_bin cp852
cp852_general_ci cp852
cp866_bin cp866
cp866_general_ci cp866
cp932_bin cp932
cp932_japanese_ci cp932
dec8_bin dec8
dec8_swedish_ci dec8
eucjpms_bin eucjpms
eucjpms_japanese_ci eucjpms
euckr_bin euckr
euckr_korean_ci euckr
filename filename
gb2312_bin gb2312
gb2312_chinese_ci gb2312
gbk_bin gbk
gbk_chinese_ci gbk
geostd8_bin geostd8
geostd8_general_ci geostd8
greek_bin greek
greek_general_ci greek
hebrew_bin hebrew
hebrew_general_ci hebrew
hp8_bin hp8
hp8_english_ci hp8
keybcs2_bin keybcs2
keybcs2_general_ci keybcs2
koi8r_bin koi8r
koi8r_general_ci koi8r
koi8u_bin koi8u
koi8u_general_ci koi8u
latin1_bin latin1
latin1_danish_ci latin1
latin1_general_ci latin1
latin1_general_cs latin1
latin1_german1_ci latin1
latin1_german2_ci latin1
latin1_spanish_ci latin1
latin1_swedish_ci latin1
latin2_bin latin2
latin2_croatian_ci latin2
latin2_czech_cs latin2
latin2_general_ci latin2
latin2_hungarian_ci latin2
latin5_bin latin5
latin5_turkish_ci latin5
latin7_bin latin7
latin7_estonian_cs latin7
latin7_general_ci latin7
latin7_general_cs latin7
macce_bin macce
macce_general_ci macce
macroman_bin macroman
macroman_general_ci macroman
sjis_bin sjis
sjis_japanese_ci sjis
swe7_bin swe7
swe7_swedish_ci swe7
tis620_bin tis620
tis620_thai_ci tis620
ucs2_bin ucs2
ucs2_czech_ci ucs2
ucs2_danish_ci ucs2
ucs2_esperanto_ci ucs2
ucs2_estonian_ci ucs2
ucs2_general_ci ucs2
ucs2_hungarian_ci ucs2
ucs2_icelandic_ci ucs2
ucs2_latvian_ci ucs2
ucs2_lithuanian_ci ucs2
ucs2_persian_ci ucs2
ucs2_polish_ci ucs2
ucs2_romanian_ci ucs2
ucs2_roman_ci ucs2
ucs2_slovak_ci ucs2
ucs2_slovenian_ci ucs2
ucs2_spanish2_ci ucs2
ucs2_spanish_ci ucs2
ucs2_swedish_ci ucs2
ucs2_turkish_ci ucs2
ucs2_unicode_ci ucs2
ujis_bin ujis
ujis_japanese_ci ujis
utf8_bin utf8
utf8_czech_ci utf8
utf8_danish_ci utf8
utf8_esperanto_ci utf8
utf8_estonian_ci utf8
utf8_general_ci utf8
utf8_hungarian_ci utf8
utf8_icelandic_ci utf8
utf8_latvian_ci utf8
utf8_lithuanian_ci utf8
utf8_persian_ci utf8
utf8_polish_ci utf8
utf8_romanian_ci utf8
utf8_roman_ci utf8
utf8_slovak_ci utf8
utf8_slovenian_ci utf8
utf8_spanish2_ci utf8
utf8_spanish_ci utf8
utf8_swedish_ci utf8
utf8_turkish_ci utf8
utf8_unicode_ci utf8
# Switch to connection default + disconnect con
DROP USER dbdict_test@localhost;

View file

@ -1,314 +0,0 @@
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
# Establish connection con (user=dbdict_test)
SELECT *
FROM information_schema.character_sets
ORDER BY character_set_name;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
armscii8 armscii8_general_ci ARMSCII-8 Armenian 1
ascii ascii_general_ci US ASCII 1
big5 big5_chinese_ci Big5 Traditional Chinese 2
binary binary Binary pseudo charset 1
cp1250 cp1250_general_ci Windows Central European 1
cp1251 cp1251_general_ci Windows Cyrillic 1
cp1256 cp1256_general_ci Windows Arabic 1
cp1257 cp1257_general_ci Windows Baltic 1
cp850 cp850_general_ci DOS West European 1
cp852 cp852_general_ci DOS Central European 1
cp866 cp866_general_ci DOS Russian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
dec8 dec8_swedish_ci DEC West European 1
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
euckr euckr_korean_ci EUC-KR Korean 2
gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2
gbk gbk_chinese_ci GBK Simplified Chinese 2
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
greek greek_general_ci ISO 8859-7 Greek 1
hebrew hebrew_general_ci ISO 8859-8 Hebrew 1
hp8 hp8_english_ci HP West European 1
keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1
koi8r koi8r_general_ci KOI8-R Relcom Russian 1
koi8u koi8u_general_ci KOI8-U Ukrainian 1
latin1 latin1_swedish_ci cp1252 West European 1
latin2 latin2_general_ci ISO 8859-2 Central European 1
latin5 latin5_turkish_ci ISO 8859-9 Turkish 1
latin7 latin7_general_ci ISO 8859-13 Baltic 1
macce macce_general_ci Mac Central European 1
macroman macroman_general_ci Mac West European 1
sjis sjis_japanese_ci Shift-JIS Japanese 2
swe7 swe7_swedish_ci 7bit Swedish 1
tis620 tis620_thai_ci TIS620 Thai 1
ucs2 ucs2_general_ci UCS-2 Unicode 2
ujis ujis_japanese_ci EUC-JP Japanese 3
utf8 utf8_general_ci UTF-8 Unicode 3
SELECT *
FROM information_schema.collations
ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
armscii8_bin armscii8 64 0
armscii8_general_ci armscii8 32 Yes 0
ascii_bin ascii 65 0
ascii_general_ci ascii 11 Yes 0
big5_bin big5 84 Yes 1
big5_chinese_ci big5 1 Yes Yes 1
binary binary 63 Yes Yes 1
cp1250_bin cp1250 66 Yes 1
cp1250_croatian_ci cp1250 44 Yes 1
cp1250_czech_cs cp1250 34 Yes 2
cp1250_general_ci cp1250 26 Yes Yes 1
cp1250_polish_ci cp1250 99 Yes 1
cp1251_bin cp1251 50 0
cp1251_bulgarian_ci cp1251 14 0
cp1251_general_ci cp1251 51 Yes 0
cp1251_general_cs cp1251 52 0
cp1251_ukrainian_ci cp1251 23 0
cp1256_bin cp1256 67 0
cp1256_general_ci cp1256 57 Yes 0
cp1257_bin cp1257 58 0
cp1257_general_ci cp1257 59 Yes 0
cp1257_lithuanian_ci cp1257 29 0
cp850_bin cp850 80 0
cp850_general_ci cp850 4 Yes 0
cp852_bin cp852 81 0
cp852_general_ci cp852 40 Yes 0
cp866_bin cp866 68 0
cp866_general_ci cp866 36 Yes 0
cp932_bin cp932 96 Yes 1
cp932_japanese_ci cp932 95 Yes Yes 1
dec8_bin dec8 69 0
dec8_swedish_ci dec8 3 Yes 0
eucjpms_bin eucjpms 98 Yes 1
eucjpms_japanese_ci eucjpms 97 Yes Yes 1
euckr_bin euckr 85 Yes 1
euckr_korean_ci euckr 19 Yes Yes 1
gb2312_bin gb2312 86 Yes 1
gb2312_chinese_ci gb2312 24 Yes Yes 1
gbk_bin gbk 87 Yes 1
gbk_chinese_ci gbk 28 Yes Yes 1
geostd8_bin geostd8 93 0
geostd8_general_ci geostd8 92 Yes 0
greek_bin greek 70 0
greek_general_ci greek 25 Yes 0
hebrew_bin hebrew 71 0
hebrew_general_ci hebrew 16 Yes 0
hp8_bin hp8 72 0
hp8_english_ci hp8 6 Yes 0
keybcs2_bin keybcs2 73 0
keybcs2_general_ci keybcs2 37 Yes 0
koi8r_bin koi8r 74 0
koi8r_general_ci koi8r 7 Yes 0
koi8u_bin koi8u 75 0
koi8u_general_ci koi8u 22 Yes 0
latin1_bin latin1 47 Yes 1
latin1_danish_ci latin1 15 Yes 1
latin1_general_ci latin1 48 Yes 1
latin1_general_cs latin1 49 Yes 1
latin1_german1_ci latin1 5 Yes 1
latin1_german2_ci latin1 31 Yes 2
latin1_spanish_ci latin1 94 Yes 1
latin1_swedish_ci latin1 8 Yes Yes 1
latin2_bin latin2 77 Yes 1
latin2_croatian_ci latin2 27 Yes 1
latin2_czech_cs latin2 2 Yes 4
latin2_general_ci latin2 9 Yes Yes 1
latin2_hungarian_ci latin2 21 Yes 1
latin5_bin latin5 78 0
latin5_turkish_ci latin5 30 Yes 0
latin7_bin latin7 79 0
latin7_estonian_cs latin7 20 0
latin7_general_ci latin7 41 Yes 0
latin7_general_cs latin7 42 0
macce_bin macce 43 0
macce_general_ci macce 38 Yes 0
macroman_bin macroman 53 0
macroman_general_ci macroman 39 Yes 0
sjis_bin sjis 88 Yes 1
sjis_japanese_ci sjis 13 Yes Yes 1
swe7_bin swe7 82 0
swe7_swedish_ci swe7 10 Yes 0
tis620_bin tis620 89 Yes 1
tis620_thai_ci tis620 18 Yes Yes 4
ucs2_bin ucs2 90 Yes 1
ucs2_czech_ci ucs2 138 Yes 8
ucs2_danish_ci ucs2 139 Yes 8
ucs2_esperanto_ci ucs2 145 Yes 8
ucs2_estonian_ci ucs2 134 Yes 8
ucs2_general_ci ucs2 35 Yes Yes 1
ucs2_hungarian_ci ucs2 146 Yes 8
ucs2_icelandic_ci ucs2 129 Yes 8
ucs2_latvian_ci ucs2 130 Yes 8
ucs2_lithuanian_ci ucs2 140 Yes 8
ucs2_persian_ci ucs2 144 Yes 8
ucs2_polish_ci ucs2 133 Yes 8
ucs2_romanian_ci ucs2 131 Yes 8
ucs2_roman_ci ucs2 143 Yes 8
ucs2_slovak_ci ucs2 141 Yes 8
ucs2_slovenian_ci ucs2 132 Yes 8
ucs2_spanish2_ci ucs2 142 Yes 8
ucs2_spanish_ci ucs2 135 Yes 8
ucs2_swedish_ci ucs2 136 Yes 8
ucs2_turkish_ci ucs2 137 Yes 8
ucs2_unicode_ci ucs2 128 Yes 8
ujis_bin ujis 91 Yes 1
ujis_japanese_ci ujis 12 Yes Yes 1
utf8_bin utf8 83 Yes 1
utf8_czech_ci utf8 202 Yes 8
utf8_danish_ci utf8 203 Yes 8
utf8_esperanto_ci utf8 209 Yes 8
utf8_estonian_ci utf8 198 Yes 8
utf8_general_ci utf8 33 Yes Yes 1
utf8_general_cs utf8 254 Yes 1
utf8_hungarian_ci utf8 210 Yes 8
utf8_icelandic_ci utf8 193 Yes 8
utf8_latvian_ci utf8 194 Yes 8
utf8_lithuanian_ci utf8 204 Yes 8
utf8_persian_ci utf8 208 Yes 8
utf8_polish_ci utf8 197 Yes 8
utf8_romanian_ci utf8 195 Yes 8
utf8_roman_ci utf8 207 Yes 8
utf8_slovak_ci utf8 205 Yes 8
utf8_slovenian_ci utf8 196 Yes 8
utf8_spanish2_ci utf8 206 Yes 8
utf8_spanish_ci utf8 199 Yes 8
utf8_swedish_ci utf8 200 Yes 8
utf8_turkish_ci utf8 201 Yes 8
utf8_unicode_ci utf8 192 Yes 8
SELECT *
FROM information_schema.collation_character_set_applicability
ORDER BY collation_name, character_set_name;
COLLATION_NAME CHARACTER_SET_NAME
armscii8_bin armscii8
armscii8_general_ci armscii8
ascii_bin ascii
ascii_general_ci ascii
big5_bin big5
big5_chinese_ci big5
binary binary
cp1250_bin cp1250
cp1250_croatian_ci cp1250
cp1250_czech_cs cp1250
cp1250_general_ci cp1250
cp1250_polish_ci cp1250
cp1251_bin cp1251
cp1251_bulgarian_ci cp1251
cp1251_general_ci cp1251
cp1251_general_cs cp1251
cp1251_ukrainian_ci cp1251
cp1256_bin cp1256
cp1256_general_ci cp1256
cp1257_bin cp1257
cp1257_general_ci cp1257
cp1257_lithuanian_ci cp1257
cp850_bin cp850
cp850_general_ci cp850
cp852_bin cp852
cp852_general_ci cp852
cp866_bin cp866
cp866_general_ci cp866
cp932_bin cp932
cp932_japanese_ci cp932
dec8_bin dec8
dec8_swedish_ci dec8
eucjpms_bin eucjpms
eucjpms_japanese_ci eucjpms
euckr_bin euckr
euckr_korean_ci euckr
filename filename
gb2312_bin gb2312
gb2312_chinese_ci gb2312
gbk_bin gbk
gbk_chinese_ci gbk
geostd8_bin geostd8
geostd8_general_ci geostd8
greek_bin greek
greek_general_ci greek
hebrew_bin hebrew
hebrew_general_ci hebrew
hp8_bin hp8
hp8_english_ci hp8
keybcs2_bin keybcs2
keybcs2_general_ci keybcs2
koi8r_bin koi8r
koi8r_general_ci koi8r
koi8u_bin koi8u
koi8u_general_ci koi8u
latin1_bin latin1
latin1_danish_ci latin1
latin1_general_ci latin1
latin1_general_cs latin1
latin1_german1_ci latin1
latin1_german2_ci latin1
latin1_spanish_ci latin1
latin1_swedish_ci latin1
latin2_bin latin2
latin2_croatian_ci latin2
latin2_czech_cs latin2
latin2_general_ci latin2
latin2_hungarian_ci latin2
latin5_bin latin5
latin5_turkish_ci latin5
latin7_bin latin7
latin7_estonian_cs latin7
latin7_general_ci latin7
latin7_general_cs latin7
macce_bin macce
macce_general_ci macce
macroman_bin macroman
macroman_general_ci macroman
sjis_bin sjis
sjis_japanese_ci sjis
swe7_bin swe7
swe7_swedish_ci swe7
tis620_bin tis620
tis620_thai_ci tis620
ucs2_bin ucs2
ucs2_czech_ci ucs2
ucs2_danish_ci ucs2
ucs2_esperanto_ci ucs2
ucs2_estonian_ci ucs2
ucs2_general_ci ucs2
ucs2_hungarian_ci ucs2
ucs2_icelandic_ci ucs2
ucs2_latvian_ci ucs2
ucs2_lithuanian_ci ucs2
ucs2_persian_ci ucs2
ucs2_polish_ci ucs2
ucs2_romanian_ci ucs2
ucs2_roman_ci ucs2
ucs2_slovak_ci ucs2
ucs2_slovenian_ci ucs2
ucs2_spanish2_ci ucs2
ucs2_spanish_ci ucs2
ucs2_swedish_ci ucs2
ucs2_turkish_ci ucs2
ucs2_unicode_ci ucs2
ujis_bin ujis
ujis_japanese_ci ujis
utf8_bin utf8
utf8_czech_ci utf8
utf8_danish_ci utf8
utf8_esperanto_ci utf8
utf8_estonian_ci utf8
utf8_general_ci utf8
utf8_general_cs utf8
utf8_hungarian_ci utf8
utf8_icelandic_ci utf8
utf8_latvian_ci utf8
utf8_lithuanian_ci utf8
utf8_persian_ci utf8
utf8_polish_ci utf8
utf8_romanian_ci utf8
utf8_roman_ci utf8
utf8_slovak_ci utf8
utf8_slovenian_ci utf8
utf8_spanish2_ci utf8
utf8_spanish_ci utf8
utf8_swedish_ci utf8
utf8_turkish_ci utf8
utf8_unicode_ci utf8
# Switch to connection default + disconnect con
DROP USER dbdict_test@localhost;

View file

@ -1,312 +0,0 @@
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
# Establish connection con (user=dbdict_test)
SELECT *
FROM information_schema.character_sets
ORDER BY character_set_name;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
armscii8 armscii8_general_ci ARMSCII-8 Armenian 1
ascii ascii_general_ci US ASCII 1
big5 big5_chinese_ci Big5 Traditional Chinese 2
binary binary Binary pseudo charset 1
cp1250 cp1250_general_ci Windows Central European 1
cp1251 cp1251_general_ci Windows Cyrillic 1
cp1256 cp1256_general_ci Windows Arabic 1
cp1257 cp1257_general_ci Windows Baltic 1
cp850 cp850_general_ci DOS West European 1
cp852 cp852_general_ci DOS Central European 1
cp866 cp866_general_ci DOS Russian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
dec8 dec8_swedish_ci DEC West European 1
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
euckr euckr_korean_ci EUC-KR Korean 2
gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2
gbk gbk_chinese_ci GBK Simplified Chinese 2
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
greek greek_general_ci ISO 8859-7 Greek 1
hebrew hebrew_general_ci ISO 8859-8 Hebrew 1
hp8 hp8_english_ci HP West European 1
keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1
koi8r koi8r_general_ci KOI8-R Relcom Russian 1
koi8u koi8u_general_ci KOI8-U Ukrainian 1
latin1 latin1_swedish_ci cp1252 West European 1
latin2 latin2_general_ci ISO 8859-2 Central European 1
latin5 latin5_turkish_ci ISO 8859-9 Turkish 1
latin7 latin7_general_ci ISO 8859-13 Baltic 1
macce macce_general_ci Mac Central European 1
macroman macroman_general_ci Mac West European 1
sjis sjis_japanese_ci Shift-JIS Japanese 2
swe7 swe7_swedish_ci 7bit Swedish 1
tis620 tis620_thai_ci TIS620 Thai 1
ucs2 ucs2_general_ci UCS-2 Unicode 2
ujis ujis_japanese_ci EUC-JP Japanese 3
utf8 utf8_general_ci UTF-8 Unicode 3
SELECT *
FROM information_schema.collations
ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
armscii8_bin armscii8 64 0
armscii8_general_ci armscii8 32 Yes 0
ascii_bin ascii 65 0
ascii_general_ci ascii 11 Yes 0
big5_bin big5 84 Yes 1
big5_chinese_ci big5 1 Yes Yes 1
binary binary 63 Yes Yes 1
cp1250_bin cp1250 66 Yes 1
cp1250_croatian_ci cp1250 44 Yes 1
cp1250_czech_cs cp1250 34 Yes 2
cp1250_general_ci cp1250 26 Yes Yes 1
cp1250_polish_ci cp1250 99 Yes 1
cp1251_bin cp1251 50 0
cp1251_bulgarian_ci cp1251 14 0
cp1251_general_ci cp1251 51 Yes 0
cp1251_general_cs cp1251 52 0
cp1251_ukrainian_ci cp1251 23 0
cp1256_bin cp1256 67 0
cp1256_general_ci cp1256 57 Yes 0
cp1257_bin cp1257 58 0
cp1257_general_ci cp1257 59 Yes 0
cp1257_lithuanian_ci cp1257 29 0
cp850_bin cp850 80 0
cp850_general_ci cp850 4 Yes 0
cp852_bin cp852 81 0
cp852_general_ci cp852 40 Yes 0
cp866_bin cp866 68 0
cp866_general_ci cp866 36 Yes 0
cp932_bin cp932 96 Yes 1
cp932_japanese_ci cp932 95 Yes Yes 1
dec8_bin dec8 69 0
dec8_swedish_ci dec8 3 Yes 0
eucjpms_bin eucjpms 98 Yes 1
eucjpms_japanese_ci eucjpms 97 Yes Yes 1
euckr_bin euckr 85 Yes 1
euckr_korean_ci euckr 19 Yes Yes 1
gb2312_bin gb2312 86 Yes 1
gb2312_chinese_ci gb2312 24 Yes Yes 1
gbk_bin gbk 87 Yes 1
gbk_chinese_ci gbk 28 Yes Yes 1
geostd8_bin geostd8 93 0
geostd8_general_ci geostd8 92 Yes 0
greek_bin greek 70 0
greek_general_ci greek 25 Yes 0
hebrew_bin hebrew 71 0
hebrew_general_ci hebrew 16 Yes 0
hp8_bin hp8 72 0
hp8_english_ci hp8 6 Yes 0
keybcs2_bin keybcs2 73 0
keybcs2_general_ci keybcs2 37 Yes 0
koi8r_bin koi8r 74 0
koi8r_general_ci koi8r 7 Yes 0
koi8u_bin koi8u 75 0
koi8u_general_ci koi8u 22 Yes 0
latin1_bin latin1 47 Yes 1
latin1_danish_ci latin1 15 Yes 1
latin1_general_ci latin1 48 Yes 1
latin1_general_cs latin1 49 Yes 1
latin1_german1_ci latin1 5 Yes 1
latin1_german2_ci latin1 31 Yes 2
latin1_spanish_ci latin1 94 Yes 1
latin1_swedish_ci latin1 8 Yes Yes 1
latin2_bin latin2 77 Yes 1
latin2_croatian_ci latin2 27 Yes 1
latin2_czech_cs latin2 2 Yes 4
latin2_general_ci latin2 9 Yes Yes 1
latin2_hungarian_ci latin2 21 Yes 1
latin5_bin latin5 78 0
latin5_turkish_ci latin5 30 Yes 0
latin7_bin latin7 79 0
latin7_estonian_cs latin7 20 0
latin7_general_ci latin7 41 Yes 0
latin7_general_cs latin7 42 0
macce_bin macce 43 0
macce_general_ci macce 38 Yes 0
macroman_bin macroman 53 0
macroman_general_ci macroman 39 Yes 0
sjis_bin sjis 88 Yes 1
sjis_japanese_ci sjis 13 Yes Yes 1
swe7_bin swe7 82 0
swe7_swedish_ci swe7 10 Yes 0
tis620_bin tis620 89 Yes 1
tis620_thai_ci tis620 18 Yes Yes 4
ucs2_bin ucs2 90 Yes 1
ucs2_czech_ci ucs2 138 Yes 8
ucs2_danish_ci ucs2 139 Yes 8
ucs2_esperanto_ci ucs2 145 Yes 8
ucs2_estonian_ci ucs2 134 Yes 8
ucs2_general_ci ucs2 35 Yes Yes 1
ucs2_hungarian_ci ucs2 146 Yes 8
ucs2_icelandic_ci ucs2 129 Yes 8
ucs2_latvian_ci ucs2 130 Yes 8
ucs2_lithuanian_ci ucs2 140 Yes 8
ucs2_persian_ci ucs2 144 Yes 8
ucs2_polish_ci ucs2 133 Yes 8
ucs2_romanian_ci ucs2 131 Yes 8
ucs2_roman_ci ucs2 143 Yes 8
ucs2_slovak_ci ucs2 141 Yes 8
ucs2_slovenian_ci ucs2 132 Yes 8
ucs2_spanish2_ci ucs2 142 Yes 8
ucs2_spanish_ci ucs2 135 Yes 8
ucs2_swedish_ci ucs2 136 Yes 8
ucs2_turkish_ci ucs2 137 Yes 8
ucs2_unicode_ci ucs2 128 Yes 8
ujis_bin ujis 91 Yes 1
ujis_japanese_ci ujis 12 Yes Yes 1
utf8_bin utf8 83 Yes 1
utf8_czech_ci utf8 202 Yes 8
utf8_danish_ci utf8 203 Yes 8
utf8_esperanto_ci utf8 209 Yes 8
utf8_estonian_ci utf8 198 Yes 8
utf8_general_ci utf8 33 Yes Yes 1
utf8_hungarian_ci utf8 210 Yes 8
utf8_icelandic_ci utf8 193 Yes 8
utf8_latvian_ci utf8 194 Yes 8
utf8_lithuanian_ci utf8 204 Yes 8
utf8_persian_ci utf8 208 Yes 8
utf8_polish_ci utf8 197 Yes 8
utf8_romanian_ci utf8 195 Yes 8
utf8_roman_ci utf8 207 Yes 8
utf8_slovak_ci utf8 205 Yes 8
utf8_slovenian_ci utf8 196 Yes 8
utf8_spanish2_ci utf8 206 Yes 8
utf8_spanish_ci utf8 199 Yes 8
utf8_swedish_ci utf8 200 Yes 8
utf8_turkish_ci utf8 201 Yes 8
utf8_unicode_ci utf8 192 Yes 8
SELECT *
FROM information_schema.collation_character_set_applicability
ORDER BY collation_name, character_set_name;
COLLATION_NAME CHARACTER_SET_NAME
armscii8_bin armscii8
armscii8_general_ci armscii8
ascii_bin ascii
ascii_general_ci ascii
big5_bin big5
big5_chinese_ci big5
binary binary
cp1250_bin cp1250
cp1250_croatian_ci cp1250
cp1250_czech_cs cp1250
cp1250_general_ci cp1250
cp1250_polish_ci cp1250
cp1251_bin cp1251
cp1251_bulgarian_ci cp1251
cp1251_general_ci cp1251
cp1251_general_cs cp1251
cp1251_ukrainian_ci cp1251
cp1256_bin cp1256
cp1256_general_ci cp1256
cp1257_bin cp1257
cp1257_general_ci cp1257
cp1257_lithuanian_ci cp1257
cp850_bin cp850
cp850_general_ci cp850
cp852_bin cp852
cp852_general_ci cp852
cp866_bin cp866
cp866_general_ci cp866
cp932_bin cp932
cp932_japanese_ci cp932
dec8_bin dec8
dec8_swedish_ci dec8
eucjpms_bin eucjpms
eucjpms_japanese_ci eucjpms
euckr_bin euckr
euckr_korean_ci euckr
filename filename
gb2312_bin gb2312
gb2312_chinese_ci gb2312
gbk_bin gbk
gbk_chinese_ci gbk
geostd8_bin geostd8
geostd8_general_ci geostd8
greek_bin greek
greek_general_ci greek
hebrew_bin hebrew
hebrew_general_ci hebrew
hp8_bin hp8
hp8_english_ci hp8
keybcs2_bin keybcs2
keybcs2_general_ci keybcs2
koi8r_bin koi8r
koi8r_general_ci koi8r
koi8u_bin koi8u
koi8u_general_ci koi8u
latin1_bin latin1
latin1_danish_ci latin1
latin1_general_ci latin1
latin1_general_cs latin1
latin1_german1_ci latin1
latin1_german2_ci latin1
latin1_spanish_ci latin1
latin1_swedish_ci latin1
latin2_bin latin2
latin2_croatian_ci latin2
latin2_czech_cs latin2
latin2_general_ci latin2
latin2_hungarian_ci latin2
latin5_bin latin5
latin5_turkish_ci latin5
latin7_bin latin7
latin7_estonian_cs latin7
latin7_general_ci latin7
latin7_general_cs latin7
macce_bin macce
macce_general_ci macce
macroman_bin macroman
macroman_general_ci macroman
sjis_bin sjis
sjis_japanese_ci sjis
swe7_bin swe7
swe7_swedish_ci swe7
tis620_bin tis620
tis620_thai_ci tis620
ucs2_bin ucs2
ucs2_czech_ci ucs2
ucs2_danish_ci ucs2
ucs2_esperanto_ci ucs2
ucs2_estonian_ci ucs2
ucs2_general_ci ucs2
ucs2_hungarian_ci ucs2
ucs2_icelandic_ci ucs2
ucs2_latvian_ci ucs2
ucs2_lithuanian_ci ucs2
ucs2_persian_ci ucs2
ucs2_polish_ci ucs2
ucs2_romanian_ci ucs2
ucs2_roman_ci ucs2
ucs2_slovak_ci ucs2
ucs2_slovenian_ci ucs2
ucs2_spanish2_ci ucs2
ucs2_spanish_ci ucs2
ucs2_swedish_ci ucs2
ucs2_turkish_ci ucs2
ucs2_unicode_ci ucs2
ujis_bin ujis
ujis_japanese_ci ujis
utf8_bin utf8
utf8_czech_ci utf8
utf8_danish_ci utf8
utf8_esperanto_ci utf8
utf8_estonian_ci utf8
utf8_general_ci utf8
utf8_hungarian_ci utf8
utf8_icelandic_ci utf8
utf8_latvian_ci utf8
utf8_lithuanian_ci utf8
utf8_persian_ci utf8
utf8_polish_ci utf8
utf8_romanian_ci utf8
utf8_roman_ci utf8
utf8_slovak_ci utf8
utf8_slovenian_ci utf8
utf8_spanish2_ci utf8
utf8_spanish_ci utf8
utf8_swedish_ci utf8
utf8_turkish_ci utf8
utf8_unicode_ci utf8
# Switch to connection default + disconnect con
DROP USER dbdict_test@localhost;

View file

@ -18241,8 +18241,6 @@ END//
CALL sp70_n(-1e+40);
f1
-10000000000000000000000000000000000000000
Warnings:
Note 1265 Data truncated for column 'f1' at row 1
CALL sp70_n( -10000000000000000000000000000000000000000 );
f1
-10000000000000000000000000000000000000000
@ -18255,8 +18253,6 @@ END//
CALL sp71_nu(1.00e+40);
f1
10000000000000000000000000000000000000000
Warnings:
Note 1265 Data truncated for column 'f1' at row 1
CALL sp71_nu( 10000000000000000000000000000000000000000 );
f1
10000000000000000000000000000000000000000
@ -18269,8 +18265,6 @@ END//
CALL sp72_nuz(1.00e+40);
f1
0000000000000000000000010000000000000000000000000000000000000000
Warnings:
Note 1265 Data truncated for column 'f1' at row 1
CALL sp72_nuz( 10000000000000000000000000000000000000000 );
f1
0000000000000000000000010000000000000000000000000000000000000000
@ -18283,8 +18277,6 @@ END//
CALL sp73_n_z(1.00e+40);
f1
0000000000000000000000010000000000000000000000000000000000000000
Warnings:
Note 1265 Data truncated for column 'f1' at row 1
CALL sp73_n_z( 10000000000000000000000000000000000000000 );
f1
0000000000000000000000010000000000000000000000000000000000000000

View file

@ -1,58 +1,16 @@
# suite/funcs_1/datadict/charset_collation.inc
# suite/funcs_1/t/charset_collation.test
#
# Tests checking the content of the information_schema tables
# character_sets
# collations
# collation_character_set_applicability
#
#
# The amount and properties of character_sets/collations depend on the
# build type
# 2007-12 MySQL 5.0, 2008-06 MySQL 5.1
# ---------------------------------------------------------------------
#
# Variant 1 fits to
# version_comment MySQL Enterprise Server (Commercial)
# version_comment MySQL Enterprise Server (GPL)
# version_comment MySQL Classic Server (Commercial)
# version_comment MySQL Pushbuild Edition, build <number>
# (version_comment Source distribution
# and
# compile was without "max" - > no collation 'utf8_general_ci')
#
# Variant 2 fits to
# version_comment MySQL Enterprise Server (GPL)
# version_comment MySQL Classic Server (Commercial)
# version_comment MySQL Pushbuild Edition, build <number>
# (version_comment Source distribution
# and
# compile was without "max" - > collation 'utf8_general_ci' exists)
#
# Difference between variant 1 and 2 is the collation 'utf8_general_ci'.
#
# Variant 3 fits to
# version_comment MySQL Community Server (GPL)
# version_comment MySQL Cluster Server (Commercial)
# version_comment MySQL Advanced Server (GPL) 5.1
# version_comment MySQL Advanced Server (Commercial) 5.1
#
# Difference between variant 3 and 2 is within the collation properties
# IS_COMPILED and SORTLEN.
#
# 2008-06 All time excluded variant is "vanilla".
# How to build "vanilla":
# ./BUILD/autorun.sh
# ./configure
# ./make
# Some properties of "vanilla"
# version_comment Source distribution
# Compared to the variants 1 to 3 a lot of character sets are missing.
# Example: "ucs2_bin" is in variant 1 to 3 but not in "vanilla".
#
# Created:
# 2007-12-18 mleich - remove the unstable character_set/collation subtests
# from include/datadict-master.inc
# - create this new test
# 2009-04-28 mleich Replace the charset_collation_* test which failed too often
# because of changes
# - in general available character sets and collations
# - in build types
# (Bug#40545, Bug#40209, Bug#40618, Bug#38346)
#
# Create a low privileged user.
@ -61,7 +19,6 @@ DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
--echo # Establish connection con (user=dbdict_test)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (con,localhost,dbdict_test,,);
################################################################################
#
@ -97,32 +54,48 @@ connect (con,localhost,dbdict_test,,);
# combinations for which the current user and PUBLIC have no
# USAGE privilege.
#
# Notes (2007-12-19 mleich):
# Notes (2009-04-28 mleich):
# - The requirements are outdated because grant/revoke privilege for using a
# characterset/collation were never implemented.
# Therefore the tests should simply check the content of these tables.
#
# Therefore the tests focus on the completeness and correctness of the
# content (rows and columns) of these tables.
# - The amount of collations/character sets grows with new MySQL releases.
#
# - Even within the same release the amount of records within these tables
# Even within the same release the amount of records within these tables
# can differ between different build types (community, enterprise, source,...)
#
# Therefore we limit the queries to character sets and collations which
# - exist in all build types
# - have in all build types the same "state".
# The character set
# - utf8 is used for Metadata
# - ascii is a quite usual
# The collations <character set>_general_ci and <character set>_bin seem
# to be available all time.
#
################################################################################
let $char_set_condition= character_set_name IN ('utf8','latin1','binary');
let $collation_condition=
(collation_name LIKE CONCAT(character_set_name,'_general_ci')
OR
collation_name LIKE CONCAT(character_set_name,'_bin'));
--echo
SELECT *
eval SELECT *
FROM information_schema.character_sets
WHERE $char_set_condition
ORDER BY character_set_name;
--echo
SELECT *
eval SELECT *
FROM information_schema.collations
WHERE $char_set_condition
AND $collation_condition
ORDER BY collation_name;
echo;
--echo
SELECT *
eval SELECT *
FROM information_schema.collation_character_set_applicability
WHERE $char_set_condition
AND $collation_condition
ORDER BY collation_name, character_set_name;

View file

@ -1,32 +0,0 @@
# Tests checking the content of the information_schema tables
# character_sets
# collations
# collation_character_set_applicability
#
# Content variant 1 which should fit to
# Enterprise or Classic builds (binaries provided by MySQL)
# Pushbuilds
# Source builds without "max"
#
# Please read suite/funcs_1/datadict/charset_collation.inc for
# additional information.
#
# Created:
# 2007-12-18 mleich - remove the unstable character_set/collation subtests
# from include/datadict-master.inc
# - create this new test
#
if (`SELECT EXISTS (SELECT 1 FROM information_schema.collations
WHERE collation_name = 'utf8_general_cs')
OR ( @@version_comment NOT LIKE '%Source%'
AND @@version_comment NOT LIKE '%Enterprise%'
AND @@version_comment NOT LIKE '%Classic%'
AND @@version_comment NOT LIKE '%Pushbuild%')
OR (SELECT count(*) = 0 FROM information_schema.collations
WHERE collation_name = 'ucs2_bin')`)
{
skip Test needs Enterprise, Classic , regular Pushbuild or Source-without-max build;
}
--source suite/funcs_1/datadict/charset_collation.inc

View file

@ -1,24 +0,0 @@
# Tests checking the content of the information_schema tables
# character_sets
# collations
# collation_character_set_applicability
#
# Content variant 2 (compile from source with "max")
#
# Please read suite/funcs_1/datadict/charset_collation.inc for
# additional information.
#
# Created:
# 2007-12-18 mleich - remove the unstable character_set/collation subtests
# from include/datadict-master.inc
# - create this new test
#
if (`SELECT @@version_comment NOT LIKE '%Source%'
OR NOT EXISTS (SELECT 1 FROM information_schema.collations
WHERE collation_name = 'utf8_general_cs')`)
{
skip Test needs Source build with "max";
}
--source suite/funcs_1/datadict/charset_collation.inc

View file

@ -1,25 +0,0 @@
# Tests checking the content of the information_schema tables
# character_sets
# collations
# collation_character_set_applicability
#
# Content variant 3 which should fit to
# Community and Cluster builds (binaries provided by MySQL)
#
# Please read suite/funcs_1/datadict/charset_collation.inc for
# additional information.
#
# Created:
# 2007-12-18 mleich - remove the unstable character_set/collation subtests
# from include/datadict-master.inc
# - create this new test
#
if (`SELECT @@version_comment NOT LIKE '%Community%'
AND @@version_comment NOT LIKE '%Cluster%'
AND @@version_comment NOT LIKE '%Advanced%'`)
{
skip Test needs Community, Cluster or Advanced build;
}
--source suite/funcs_1/datadict/charset_collation.inc

View file

@ -11,6 +11,3 @@
##############################################################################
ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL
charset_collation_1: Bug#38346, Bug#40209, Bug#40545, Bug#40618
charset_collation_2: Bug#38346, Bug#40209, Bug#40545, Bug#40618
charset_collation_3: Bug#38346, Bug#40209, Bug#40545, Bug#40618

View file

@ -22429,7 +22429,9 @@ BEGIN
END//
delimiter ;//
--disable_warnings
CALL sp70_n(-1e+40);
--enable_warnings
eval CALL sp70_n( $minus_40 );
@ -22445,7 +22447,9 @@ BEGIN
END//
delimiter ;//
--disable_warnings
CALL sp71_nu(1.00e+40);
--enable_warnings
eval CALL sp71_nu( $plus_40 );
@ -22461,7 +22465,9 @@ BEGIN
END//
delimiter ;//
--disable_warnings
CALL sp72_nuz(1.00e+40);
--enable_warnings
eval CALL sp72_nuz( $plus_40 );
@ -22477,7 +22483,9 @@ BEGIN
END//
delimiter ;//
--disable_warnings
CALL sp73_n_z(1.00e+40);
--enable_warnings
eval CALL sp73_n_z( $plus_40 );

View file

@ -0,0 +1,33 @@
drop table if exists t1;
create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
c
h
ch
i
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
c
h
ch
i
drop table t1;
create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
c
abc
abcd
aaaa
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
c
abc
abcd
aaaa
drop table t1;

View file

@ -0,0 +1,26 @@
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source suite/ibmdb2i/include/have_i61.inc;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
drop table t1;
create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
drop table t1;

View file

@ -174,3 +174,26 @@ start slave;
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 0
stop slave;
reset slave;
*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
*** last errno must be zero: 0 ***
*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
reset slave;
*** io last errno must be zero: 0 ***
*** io last error must be blank: ***
*** sql last errno must be zero: 0 ***
*** sql last error must be blank: ***

View file

@ -174,3 +174,26 @@ start slave;
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 1
stop slave;
reset slave;
*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
*** last errno must be zero: 0 ***
*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
reset slave;
*** io last errno must be zero: 0 ***
*** io last error must be blank: ***
*** sql last errno must be zero: 0 ***
*** sql last error must be blank: ***

View file

@ -22,7 +22,7 @@ CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)|
SELECT HEX(s1),HEX(s2),d FROM t4|
DROP PROCEDURE bug18293|
DROP TABLE t4|
SHOW BINLOG EVENTS FROM 369|
SHOW BINLOG EVENTS FROM 370|
delimiter ;|
--echo End of 5.0 tests
@ -31,8 +31,9 @@ delimiter ;|
# #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump
# Note: 364 is a magic position (found experimentally, depends on
# the log's contents) that caused the server crash.
--error 1220
SHOW BINLOG EVENTS FROM 364;
SHOW BINLOG EVENTS FROM 365;
--echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
CREATE TABLE t1 (a varchar(16)) character set cp932;

View file

@ -0,0 +1,36 @@
-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/have_gbk.inc
SET NAMES gbk;
--character_set gbk
CREATE TABLE t1 (
f1 BLOB
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
delimiter |;
CREATE PROCEDURE p1(IN val BLOB)
BEGIN
SET @tval = val;
SET @sql_cmd = CONCAT_WS(' ', 'insert into t1(f1) values(?)');
PREPARE stmt FROM @sql_cmd;
EXECUTE stmt USING @tval;
DEALLOCATE PREPARE stmt;
END|
delimiter ;|
SET @`tcontent`:=_binary 0x50434B000900000000000000E9000000 COLLATE `binary`/*!*/;
CALL p1(@`tcontent`);
FLUSH LOGS;
DROP PROCEDURE p1;
RENAME TABLE t1 to t2;
let $MYSQLD_DATADIR= `select @@datadir`;
--exec $MYSQL_BINLOG --force-if-open --short-form $MYSQLD_DATADIR/master-bin.000001 | $MYSQL
SELECT hex(f1) FROM t2;
SELECT hex(f1) FROM t1;
DROP PROCEDURE p1;
DROP TABLE t1;
DROP TABLE t2;

View file

@ -0,0 +1,10 @@
-- source include/have_innodb.inc
set session transaction isolation level read committed;
create table bug45357(a int, b int,key(b))engine=innodb;
insert into bug45357 values (25170,6122);
update bug45357 set a=1 where b=30131;
delete from bug45357 where b < 20996;
delete from bug45357 where b < 7001;
drop table bug45357;

View file

@ -3799,4 +3799,90 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20;
DROP TABLE t1;
--echo #
--echo # Bug#45266: Uninitialized variable lead to an empty result.
--echo #
--disable_warnings
drop table if exists A,AA,B,BB;
CREATE TABLE `A` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`date_key` date NOT NULL,
`date_nokey` date NOT NULL,
`datetime_key` datetime NOT NULL,
`int_nokey` int(11) NOT NULL,
`time_key` time NOT NULL,
`time_nokey` time NOT NULL,
PRIMARY KEY (`pk`),
KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`),
KEY `datetime_key` (`datetime_key`)
);
CREATE TABLE `AA` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
`time_key` time NOT NULL,
KEY `time_key` (`time_key`),
PRIMARY KEY (`pk`)
);
CREATE TABLE `B` (
`date_nokey` date NOT NULL,
`date_key` date NOT NULL,
`time_key` time NOT NULL,
`datetime_nokey` datetime NOT NULL,
`varchar_key` varchar(1) NOT NULL,
KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`),
KEY `varchar_key` (`varchar_key`)
);
INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
CREATE TABLE `BB` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
`date_key` date NOT NULL,
`varchar_nokey` varchar(1) NOT NULL,
`date_nokey` date NOT NULL,
PRIMARY KEY (`pk`),
KEY `date_key` (`date_key`)
);
INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
# Test #1
SELECT table1 . `pk` AS field1
FROM
(BB AS table1 INNER JOIN
(AA AS table2 STRAIGHT_JOIN A AS table3
ON ( table3 . `date_key` = table2 . `pk` ))
ON ( table3 . `datetime_key` = table2 . `int_nokey` ))
WHERE ( table3 . `date_key` <= 4 AND table2 . `pk` = table1 . `varchar_nokey`)
GROUP BY field1 ;
SELECT table3 .`date_key` field1
FROM
B table1 LEFT JOIN B table3 JOIN
(BB table6 JOIN A table7 ON table6 .`varchar_nokey`)
ON table6 .`int_nokey` ON table6 .`date_key`
WHERE NOT ( table1 .`varchar_key` AND table7 .`pk`) GROUP BY field1;
# Test #2
SELECT table4 . `time_nokey` AS field1 FROM
(AA AS table1 CROSS JOIN
(AA AS table2 STRAIGHT_JOIN
(B AS table3 STRAIGHT_JOIN A AS table4
ON ( table4 . `date_key` = table3 . `time_key` ))
ON ( table4 . `pk` = table3 . `date_nokey` ))
ON ( table4 . `time_key` = table3 . `datetime_nokey` ))
WHERE ( table4 . `time_key` < table1 . `time_key` AND
table1 . `int_nokey` != 'f')
GROUP BY field1 ORDER BY field1 , field1;
SELECT table1 .`time_key` field2 FROM B table1 LEFT JOIN BB JOIN A table5 ON table5 .`date_nokey` ON table5 .`int_nokey` GROUP BY field2;
--enable_warnings
drop table A,AA,B,BB;
--echo #end of test for bug#45266
--echo End of 5.1 tests

View file

@ -2370,4 +2370,30 @@ drop trigger trg1;
drop trigger trg2;
drop table t1, t2;
#
# Bug#44653: Server crash noticed when executing random queries with partitions.
#
CREATE TABLE t1 ( a INT, b INT );
CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY, b INT );
INSERT INTO t1 (a) VALUES (1);
delimiter //;
CREATE TRIGGER tr1
BEFORE INSERT ON t2
FOR EACH ROW
BEGIN
UPDATE a_nonextisting_table SET a = 1;
END//
delimiter ;//
--disable_abort_on_error
CREATE TABLE IF NOT EXISTS t2 ( a INT, b INT ) SELECT a, b FROM t1;
--enable_abort_on_error
# Caused failed assertion
SELECT * FROM t2;
DROP TABLE t1, t2;
--echo End of 5.1 tests.

View file

@ -909,4 +909,27 @@ select * from t1;
drop table t1;
disconnect flush;
#
# Bug#45412 SHOW CREATE TRIGGER does not require privileges to disclose trigger data
#
CREATE DATABASE db1;
CREATE TABLE db1.t1 (a char(30)) ENGINE=MEMORY;
CREATE TRIGGER db1.trg AFTER INSERT ON db1.t1 FOR EACH ROW
INSERT INTO db1.t1 VALUES('Some very sensitive data goes here');
CREATE USER 'no_rights'@'localhost';
REVOKE ALL ON *.* FROM 'no_rights'@'localhost';
FLUSH PRIVILEGES;
connect (con1,localhost,no_rights,,);
SELECT trigger_name FROM INFORMATION_SCHEMA.TRIGGERS
WHERE trigger_schema = 'db1';
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
SHOW CREATE TRIGGER db1.trg;
connection default;
disconnect con1;
DROP USER 'no_rights'@'localhost';
DROP DATABASE db1;
--echo End of 5.1 tests.

View file

@ -135,6 +135,20 @@ xa start 'a';
xa end 'a';
xa rollback 'a';
#
# Bug#45548: XA transaction without access to InnoDB tables crashes the server
#
xa start 'a';
xa end 'a';
xa prepare 'a';
xa commit 'a';
xa start 'a';
xa end 'a';
xa prepare 'a';
xa commit 'a';
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc

View file

@ -45,6 +45,32 @@ static uint calc_hash(const HASH *hash, const uchar *key, size_t length)
return nr1;
}
/**
@brief Initialize the hash
@details
Initialize the hash, by defining and giving valid values for
its elements. The failure to allocate memory for the
hash->array element will not result in a fatal failure. The
dynamic array that is part of the hash will allocate memory
as required during insertion.
@param[in,out] hash The hash that is initialized
@param[in] charset The charater set information
@param[in] size The hash size
@param[in] key_offest The key offset for the hash
@param[in] key_length The length of the key used in
the hash
@param[in] get_key get the key for the hash
@param[in] free_element pointer to the function that
does cleanup
@param[in] CALLER_INFO_PROTO flag that define the behaviour
of the hash
@return inidicates success or failure of initialization
@retval 0 success
@retval 1 failure
*/
my_bool
_my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
ulong size, size_t key_offset, size_t key_length,
@ -55,12 +81,6 @@ _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
DBUG_PRINT("enter",("hash: 0x%lx size: %u", (long) hash, (uint) size));
hash->records=0;
if (my_init_dynamic_array_ci(&hash->array, sizeof(HASH_LINK), size,
growth_size))
{
hash->free=0; /* Allow call to my_hash_free */
DBUG_RETURN(1);
}
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
@ -68,7 +88,8 @@ _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
hash->free=free_element;
hash->flags=flags;
hash->charset=charset;
DBUG_RETURN(0);
DBUG_RETURN(my_init_dynamic_array_ci(&hash->array,
sizeof(HASH_LINK), size, growth_size));
}
@ -114,6 +135,7 @@ void my_hash_free(HASH *hash)
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
}

View file

@ -20,6 +20,7 @@
#include <mysys_err.h>
#include <my_getopt.h>
#include <errno.h>
#include <m_string.h>
typedef void (*init_func_p)(const struct my_option *option, uchar* *variable,
longlong value);
@ -649,8 +650,18 @@ static int setval(const struct my_option *opts, uchar* *value, char *argument,
return EXIT_OUT_OF_MEMORY;
break;
case GET_ENUM:
if (((*(int*)result_pos)= find_type(argument, opts->typelib, 2) - 1) < 0)
return EXIT_ARGUMENT_INVALID;
if (((*(int*)result_pos)=
find_type(argument, opts->typelib, 2) - 1) < 0)
{
/*
Accept an integer representation of the enumerated item.
*/
char *endptr;
unsigned int arg= (unsigned int) strtol(argument, &endptr, 10);
if (*endptr || arg >= opts->typelib->count)
return EXIT_ARGUMENT_INVALID;
*(int*)result_pos= arg;
}
break;
case GET_SET:
*((ulonglong*)result_pos)= find_typeset(argument, opts->typelib, &err);

View file

@ -1,7 +1,7 @@
#!/usr/bin/perl
use Getopt::Long;
use POSIX qw(strftime);
use POSIX qw(strftime getcwd);
$|=1;
$VER="2.16";
@ -295,6 +295,7 @@ sub start_mysqlds()
{
@options = defaults_for_group($groups[$i]);
$basedir_found= 0; # The default
$mysqld_found= 1; # The default
$mysqld_found= 0 if (!length($mysqld));
$com= "$mysqld";
@ -310,6 +311,14 @@ sub start_mysqlds()
$com= $options[$j];
$mysqld_found= 1;
}
elsif ("--basedir=" eq substr($options[$j], 0, 10))
{
$basedir= $options[$j];
$basedir =~ s/^--basedir=//;
$basedir_found= 1;
$options[$j]= quote_shell_word($options[$j]);
$tmp.= " $options[$j]";
}
else
{
$options[$j]= quote_shell_word($options[$j]);
@ -337,7 +346,16 @@ sub start_mysqlds()
print "group [$groups[$i]] separately.\n";
exit(1);
}
if ($basedir_found)
{
$curdir=getcwd();
chdir($basedir) or die "Can't change to datadir $basedir";
}
system($com);
if ($basedir_found)
{
chdir($curdir) or die "Can't change back to original dir $curdir";
}
}
if (!$i && !$opt_no_log)
{

View file

@ -1242,9 +1242,10 @@ int ha_commit_one_phase(THD *thd, bool all)
#endif
thd->variables.tx_isolation=thd->session_tx_isolation;
}
if (is_real_trans)
thd->transaction.cleanup();
}
/* Free resources and perform other cleanup even for 'empty' transactions. */
if (is_real_trans)
thd->transaction.cleanup();
#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
}

View file

@ -2771,8 +2771,8 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
CHARSET_INFO *tocs= thd->variables.collation_connection;
uint32 dummy_offset;
value.cs_info.character_set_of_placeholder=
value.cs_info.character_set_client= fromcs;
value.cs_info.character_set_of_placeholder= fromcs;
value.cs_info.character_set_client= thd->variables.character_set_client;
/*
Setup source and destination character sets so that they
are different only if conversion is necessary: this will

View file

@ -983,6 +983,7 @@ static void close_connections(void)
}
(void) pthread_mutex_unlock(&LOCK_thread_count);
close_active_mi();
DBUG_PRINT("quit",("close_connections thread"));
DBUG_VOID_RETURN;
}

View file

@ -668,7 +668,7 @@ static int end_slave_on_walk(Master_info* mi, uchar* /*unused*/)
/*
Free all resources used by slave
Release slave threads at time of executing shutdown.
SYNOPSIS
end_slave()
@ -694,14 +694,31 @@ void end_slave()
once multi-master code is ready.
*/
terminate_slave_threads(active_mi,SLAVE_FORCE_ALL);
end_master_info(active_mi);
delete active_mi;
active_mi= 0;
}
pthread_mutex_unlock(&LOCK_active_mi);
DBUG_VOID_RETURN;
}
/**
Free all resources used by slave threads at time of executing shutdown.
The routine must be called after all possible users of @c active_mi
have left.
SYNOPSIS
close_active_mi()
*/
void close_active_mi()
{
pthread_mutex_lock(&LOCK_active_mi);
if (active_mi)
{
end_master_info(active_mi);
delete active_mi;
active_mi= 0;
}
pthread_mutex_unlock(&LOCK_active_mi);
}
static bool io_slave_killed(THD* thd, Master_info* mi)
{
@ -2401,6 +2418,7 @@ pthread_handler_t handle_slave_io(void *arg)
pthread_detach_this_thread();
thd->thread_stack= (char*) &thd; // remember where our stack is
mi->clear_error();
if (init_slave_thread(thd, SLAVE_THD_IO))
{
pthread_cond_broadcast(&mi->start_cond);
@ -2515,6 +2533,7 @@ requesting master dump") ||
goto connected;
});
DBUG_ASSERT(mi->last_error().number == 0);
while (!io_slave_killed(thd,mi))
{
ulong event_len;
@ -3714,6 +3733,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
if (!slave_was_killed)
{
mi->clear_error(); // clear possible left over reconnect error
if (reconnect)
{
if (!suppress_warnings && global_system_variables.log_warnings)

View file

@ -174,7 +174,8 @@ const char *print_slave_db_safe(const char *db);
int check_expected_error(THD* thd, Relay_log_info const *rli, int error_code);
void skip_load_data_infile(NET* net);
void end_slave(); /* clean up */
void end_slave(); /* release slave threads */
void close_active_mi(); /* clean up slave threads data */
void clear_until_condition(Relay_log_info* rli);
void clear_slave_error(Relay_log_info* rli);
void end_relay_log_info(Relay_log_info* rli);

View file

@ -2963,6 +2963,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table->insert_values= 0;
table->fulltext_searched= 0;
table->file->ft_handler= 0;
table->reginfo.impossible_range= 0;
/* Catch wrong handling of the auto_increment_field_not_null. */
DBUG_ASSERT(!table->auto_increment_field_not_null);
table->auto_increment_field_not_null= FALSE;

View file

@ -546,6 +546,7 @@ THD::THD()
first_successful_insert_id_in_prev_stmt_for_binlog(0),
first_successful_insert_id_in_cur_stmt(0),
stmt_depends_on_first_successful_insert_id_in_prev_stmt(FALSE),
examined_row_count(0),
global_read_lock(0),
is_fatal_error(0),
transaction_rollback_request(0),

View file

@ -3098,7 +3098,10 @@ bool select_insert::send_data(List<Item> &values)
store_values(values);
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
if (thd->is_error())
{
table->auto_increment_field_not_null= FALSE;
DBUG_RETURN(1);
}
if (table_list) // Not CREATE ... SELECT
{
switch (table_list->view_check_option(thd, info.ignore)) {

View file

@ -1560,14 +1560,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break;
}
/* If commit fails, we should be able to reset the OK status. */
thd->main_da.can_overwrite_status= TRUE;
ha_autocommit_or_rollback(thd, thd->is_error());
thd->main_da.can_overwrite_status= FALSE;
thd->transaction.stmt.reset();
/* report error issued during command execution */
if (thd->killed_errno())
{
@ -1580,6 +1572,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->mysys_var->abort= 0;
}
/* If commit fails, we should be able to reset the OK status. */
thd->main_da.can_overwrite_status= TRUE;
ha_autocommit_or_rollback(thd, thd->is_error());
thd->main_da.can_overwrite_status= FALSE;
thd->transaction.stmt.reset();
net_end_statement(thd);
query_cache_end_of_result(thd);

View file

@ -1043,6 +1043,7 @@ int reset_slave(THD *thd, Master_info* mi)
Reset errors (the idea is that we forget about the
old master).
*/
mi->clear_error();
mi->rli.clear_error();
mi->rli.clear_until_condition();

View file

@ -2432,7 +2432,6 @@ static ha_rows get_quick_record_count(THD *thd, SQL_SELECT *select,
if (select)
{
select->head=table;
table->reginfo.impossible_range=0;
if ((error= select->test_quick_select(thd, *(key_map *)keys,(table_map) 0,
limit, 0)) == 1)
DBUG_RETURN(select->quick->records);

View file

@ -7071,6 +7071,12 @@ bool show_create_trigger(THD *thd, const sp_name *trg_name)
if (!lst)
return TRUE;
if (check_table_access(thd, TRIGGER_ACL, lst, 1, TRUE))
{
my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "TRIGGER");
return TRUE;
}
/*
Open the table by name in order to load Table_triggers_list object.

View file

@ -107,6 +107,10 @@ typedef struct st_reginfo { /* Extra info about reg */
struct st_join_table *join_tab; /* Used by SELECT() */
enum thr_lock_type lock_type; /* How database is used */
bool not_exists_optimize;
/*
TRUE <=> range optimizer found that there is no rows satisfying
table conditions.
*/
bool impossible_range;
} REGINFO;

View file

@ -44,7 +44,7 @@ OF SUCH DAMAGE.
between corresponding array slots but is incomplete without case-sensitivity
markers dynamically added to the mySqlSortSequence names.
*/
#define MAX_COLLATION 89
#define MAX_COLLATION 87
static const char* mySQLCollation[MAX_COLLATION] =
{
{"ascii_general"},
@ -52,7 +52,6 @@ static const char* mySQLCollation[MAX_COLLATION] =
{"big5_chinese"},
{"big5"},
{"cp1250_croatian"},
{"cp1250_czech"},
{"cp1250_general"},
{"cp1250_polish"},
{"cp1250"},
@ -84,7 +83,6 @@ static const char* mySQLCollation[MAX_COLLATION] =
{"latin1_swedish"},
{"latin1"},
{"latin2_croatian"},
{"latin2_czech"},
{"latin2_general"},
{"latin2_hungarian"},
{"latin2"},
@ -146,7 +144,6 @@ static const char* mySqlSortSequence[MAX_COLLATION] =
{"QACHT04B0"},
{"QBCHT04B0"},
{"QALA20481"},
{"QBLA20481"},
{"QCLA20481"},
{"QDLA20481"},
{"QELA20481"},
@ -178,7 +175,6 @@ static const char* mySqlSortSequence[MAX_COLLATION] =
{"QELA1047C"},
{"QFLA1047C"},
{"QCLA20366"},
{"QDLA20366"},
{"QELA20366"},
{"QFLA20366"},
{"QGLA20366"},
@ -190,8 +186,8 @@ static const char* mySqlSortSequence[MAX_COLLATION] =
{"QDJPN04B0"},
{"QATHA0346"},
{"QBTHA0346"},
{"ACS"},
{"ADA"},
{"ACS_CZ"},
{"ADA_DK"},
{"AEO"},
{"AET"},
{"QAUCS04B0"},
@ -211,8 +207,8 @@ static const char* mySqlSortSequence[MAX_COLLATION] =
{"*HEX"},
{"QEJPN04B0"},
{"QFJPN04B0"},
{"ACS"},
{"ADA"},
{"ACS_CZ"},
{"ADA_DK"},
{"AEO"},
{"AET"},
{"QAUCS04B0"},

View file

@ -23,6 +23,7 @@ Created 10/16/1994 Heikki Tuuri
#include "btr0cur.ic"
#endif
#include "mtr0log.h"
#include "page0page.h"
#include "rem0rec.h"
#include "rem0cmp.h"

View file

@ -7,6 +7,7 @@ Created 3/26/1996 Heikki Tuuri
*******************************************************/
#include "srv0srv.h"
#include "mtr0log.h"
/**********************************************************************
Gets a rollback segment header. */

View file

@ -1529,9 +1529,14 @@ row_unlock_for_mysql(
index = btr_pcur_get_btr_cur(clust_pcur)->index;
}
if (UNIV_UNLIKELY(!(index->type & DICT_CLUSTERED))) {
/* This is not a clustered index record. We
do not know how to unlock the record. */
goto no_unlock;
}
/* If the record has been modified by this
transaction, do not unlock it. */
ut_a(index->type & DICT_CLUSTERED);
if (index->trx_id_offset) {
rec_trx_id = trx_read_trx_id(rec
@ -1568,7 +1573,7 @@ row_unlock_for_mysql(
prebuilt->select_lock_type);
}
}
no_unlock:
mtr_commit(&mtr);
}

View file

@ -23,6 +23,7 @@ Created 3/26/1996 Heikki Tuuri
#include "que0que.h"
#include "trx0purge.h"
#include "row0row.h"
#include "mtr0log.h"
/*=========== UNDO LOG RECORD CREATION AND DECODING ====================*/