mirror of
https://github.com/MariaDB/server.git
synced 2025-12-12 08:01:43 +03:00
merge from 5.5 repo.
This commit is contained in:
@@ -200,7 +200,7 @@ START SLAVE;
|
||||
--let $slave_param_value=1236
|
||||
--source include/wait_for_slave_param.inc
|
||||
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
--let $slave_field_result_replace= / at [0-9]*/ at XXX/
|
||||
--let $status_items= Last_IO_Errno, Last_IO_Error
|
||||
--source include/show_slave_status.inc
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if (!$EXAMPLE_PLUGIN) {
|
||||
#
|
||||
# Check if --plugin-dir was setup for exampledb
|
||||
#
|
||||
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$EXAMPLE_PLUGIN_OPT'`) {
|
||||
if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$EXAMPLE_PLUGIN_OPT/'`) {
|
||||
--skip Example plugin requires that --plugin-dir is set to the example plugin dir (either the .opt file does not contain \$EXAMPLE_PLUGIN_OPT or another plugin is in use)
|
||||
}
|
||||
enable_query_log;
|
||||
|
||||
@@ -16,6 +16,6 @@ if (!$SEMISYNC_MASTER_PLUGIN)
|
||||
#
|
||||
# Check if --plugin-dir was setup for semisync
|
||||
#
|
||||
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$SEMISYNC_PLUGIN_OPT'`) {
|
||||
if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$SEMISYNC_PLUGIN_OPT/'`) {
|
||||
--skip SEMISYNC plugin requires that --plugin-dir is set to the semisync plugin dir (either the .opt file does not contain \$SEMISYNC_PLUGIN_OPT or another plugin is in use)
|
||||
}
|
||||
|
||||
@@ -15,6 +15,6 @@ if (!$SIMPLE_PARSER) {
|
||||
#
|
||||
# Check if --plugin-dir was setup for simple parser
|
||||
#
|
||||
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$SIMPLE_PARSER_OPT'`) {
|
||||
if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$SIMPLE_PARSER_OPT/'`) {
|
||||
--skip simple parser requires that --plugin-dir is set to the udf plugin dir (either the .opt file does not contain \$UDF_EXAMPLE_LIB_OPT or another plugin is in use)
|
||||
}
|
||||
|
||||
@@ -15,6 +15,6 @@ if (!$UDF_EXAMPLE_LIB) {
|
||||
#
|
||||
# Check if --plugin-dir was setup for udf
|
||||
#
|
||||
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$UDF_EXAMPLE_LIB_OPT'`) {
|
||||
if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$UDF_EXAMPLE_LIB_OPT/'`) {
|
||||
--skip UDF requires that --plugin-dir is set to the udf plugin dir (either the .opt file does not contain \$UDF_EXAMPLE_LIB_OPT or another plugin is in use)
|
||||
}
|
||||
|
||||
9
mysql-test/include/libdaemon_example.ini
Normal file
9
mysql-test/include/libdaemon_example.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Plugin configuration file. Place the following on a separate line:
|
||||
#
|
||||
# library binary file name (without .so or .dll)
|
||||
# component_name
|
||||
# [component_name] - additional components in plugin
|
||||
#
|
||||
liblibdaemon_example
|
||||
daemon_example
|
||||
@@ -56,10 +56,17 @@
|
||||
#
|
||||
# --let $status_items= Master_Log_File, Relay_Master_Log_File
|
||||
#
|
||||
# $slave_io_error_replace
|
||||
# $slave_field_result_replace
|
||||
# If set, one or more regex patterns for replacing variable
|
||||
# text in the error message. Syntax as --replace-regex
|
||||
#
|
||||
# $slave_sql_mode
|
||||
# If set, change the slave sql mode during this macro, reverting
|
||||
# to the previous on exit. Default sql_mode is NO_BACKSLASH_ESCAPES
|
||||
# to allow replace '\' by '/' making paths OS independent. Example:
|
||||
#
|
||||
# --let $slave_sql_mode= NO_BACKSLASH_ESCAPES
|
||||
#
|
||||
|
||||
|
||||
--let $_show_slave_status_items=$status_items
|
||||
@@ -69,13 +76,30 @@ if (!$status_items)
|
||||
}
|
||||
|
||||
|
||||
--let $_slave_sql_mode= NO_BACKSLASH_ESCAPES
|
||||
if ($slave_sql_mode)
|
||||
{
|
||||
--let $_slave_sql_mode= $slave_sql_mode
|
||||
}
|
||||
--let $_previous_slave_sql_mode = `SELECT @@sql_mode`
|
||||
--disable_query_log
|
||||
eval SET sql_mode= '$_slave_sql_mode';
|
||||
--enable_query_log
|
||||
|
||||
|
||||
while ($_show_slave_status_items)
|
||||
{
|
||||
--let $_show_slave_status_name= `SELECT SUBSTRING_INDEX('$_show_slave_status_items', ',', 1)`
|
||||
--let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))`
|
||||
|
||||
--let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1)
|
||||
--replace_regex $slave_io_error_replace
|
||||
--let $_slave_field_result_replace= /[\\]/\// $slave_field_result_replace
|
||||
--replace_regex $_slave_field_result_replace
|
||||
--let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`
|
||||
--echo $_show_slave_status_name = '$_show_slave_status_value'
|
||||
}
|
||||
|
||||
|
||||
--disable_query_log
|
||||
eval SET sql_mode= '$_previous_slave_sql_mode';
|
||||
--enable_query_log
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Several test primitives from mysql-test/extra/rpl_tests
|
||||
# shared for test cases for MyISAM, InnoDB, NDB and other
|
||||
# engines. But for NDB all events will be added by NDB
|
||||
# injector and now there are no way to detect the state of
|
||||
# NDB injector therefore this primitive waits 5 sec
|
||||
# if engine type is NDB.
|
||||
# In future that should be fixed by waiting of proper
|
||||
# state of NDB injector.
|
||||
# Several test primitives from mysql-test/extra/rpl_tests
|
||||
# are shared for test cases for MyISAM, InnoDB, NDB and
|
||||
# other engines.
|
||||
# For NDB engine all events will be added by NDB injector
|
||||
# so tests only can continue after injector is ready,
|
||||
# this test waits for proper injector thread state.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
@@ -17,25 +15,12 @@
|
||||
# ==== Parameters =====
|
||||
#
|
||||
# $engine_type
|
||||
# Type of engine. If type is NDB then it waits $wait_time sec
|
||||
#
|
||||
# $wait_time
|
||||
# Test will wait $wait_time seconds
|
||||
|
||||
let $_wait_time= 5;
|
||||
|
||||
if (!$wait_time) {
|
||||
let $_wait_time= $wait_time;
|
||||
}
|
||||
# Type of engine. If type is NDB then it waits for injector
|
||||
# thread proper state.
|
||||
|
||||
if (`SELECT UPPER(LEFT('$engine_type',3)) = 'NDB'`) {
|
||||
while (!$_wait_time) {
|
||||
let $_wait_time_internal= 10;
|
||||
while (!$_wait_time_internal) {
|
||||
sleep 0.1;
|
||||
dec $_wait_time_internal;
|
||||
}
|
||||
dec $_wait_time;
|
||||
}
|
||||
let $show_statement= SHOW PROCESSLIST;
|
||||
let $field= State;
|
||||
let $condition= = 'Waiting for event from ndbcluster';
|
||||
source include/wait_show_condition.inc;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ if ($show_slave_io_error)
|
||||
{
|
||||
--let $_wait_for_slave_io_error_old_status_items= $status_items
|
||||
--let $status_items= Last_IO_Error
|
||||
--let $slave_field_result_replace= $slave_io_error_replace
|
||||
--source include/show_slave_status.inc
|
||||
--let $status_items= $_wait_for_slave_io_error_old_status_items
|
||||
}
|
||||
|
||||
@@ -438,3 +438,67 @@ Level Code Message
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` where ((`test`.`t1`.`a` = 0) and ('0' = `test`.`t1`.`b`))
|
||||
DROP TABLE t1;
|
||||
# End of 5.1 tests
|
||||
#
|
||||
# Bug#13463415 63502: INCORRECT RESULTS OF BIGINT AND DECIMAL COMPARISON
|
||||
#
|
||||
CREATE TABLE t_bigint(id BIGINT);
|
||||
INSERT INTO t_bigint VALUES (1), (2);
|
||||
SELECT id, id >= 1.1 FROM t_bigint;
|
||||
id id >= 1.1
|
||||
1 0
|
||||
2 1
|
||||
SELECT id, 1.1 <= id FROM t_bigint;
|
||||
id 1.1 <= id
|
||||
1 0
|
||||
2 1
|
||||
SELECT id, id = 1.1 FROM t_bigint;
|
||||
id id = 1.1
|
||||
1 0
|
||||
2 0
|
||||
SELECT id, 1.1 = id FROM t_bigint;
|
||||
id 1.1 = id
|
||||
1 0
|
||||
2 0
|
||||
SELECT * from t_bigint WHERE id = 1.1;
|
||||
id
|
||||
SELECT * from t_bigint WHERE id = 1.1e0;
|
||||
id
|
||||
SELECT * from t_bigint WHERE id = '1.1';
|
||||
id
|
||||
SELECT * from t_bigint WHERE id = '1.1e0';
|
||||
id
|
||||
SELECT * from t_bigint WHERE id IN (1.1, 2.2);
|
||||
id
|
||||
SELECT * from t_bigint WHERE id IN (1.1e0, 2.2e0);
|
||||
id
|
||||
SELECT * from t_bigint WHERE id IN ('1.1', '2.2');
|
||||
id
|
||||
SELECT * from t_bigint WHERE id IN ('1.1e0', '2.2e0');
|
||||
id
|
||||
SELECT * from t_bigint WHERE id BETWEEN 1.1 AND 1.9;
|
||||
id
|
||||
SELECT * from t_bigint WHERE id BETWEEN 1.1e0 AND 1.9e0;
|
||||
id
|
||||
SELECT * from t_bigint WHERE id BETWEEN '1.1' AND '1.9';
|
||||
id
|
||||
SELECT * from t_bigint WHERE id BETWEEN '1.1e0' AND '1.9e0';
|
||||
id
|
||||
DROP TABLE t_bigint;
|
||||
#
|
||||
# Bug#11758543 50756: BIGINT '100' MATCHES 1.001E2
|
||||
#
|
||||
CREATE TABLE t1 (a BIGINT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 WHERE coalesce(a) BETWEEN 0 and 0.9;
|
||||
a
|
||||
SELECT * FROM t1 WHERE coalesce(a)=0.9;
|
||||
a
|
||||
SELECT * FROM t1 WHERE coalesce(a) in (0.8,0.9);
|
||||
a
|
||||
SELECT * FROM t1 WHERE a BETWEEN 0 AND 0.9;
|
||||
a
|
||||
SELECT * FROM t1 WHERE a=0.9;
|
||||
a
|
||||
SELECT * FROM t1 WHERE a IN (0.8,0.9);
|
||||
a
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -1928,6 +1928,30 @@ D120
|
||||
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
|
||||
HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
|
||||
D120D18E
|
||||
#
|
||||
# Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci);
|
||||
INSERT INTO t1 VALUES ('a'),('r'),('s'),(_latin1 0xDF),(_latin1 0xF7),('t'),('z');
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
a
|
||||
r
|
||||
s
|
||||
t
|
||||
z
|
||||
ß
|
||||
÷
|
||||
SELECT a, COUNT(*) FROM t1 GROUP BY a;
|
||||
a COUNT(*)
|
||||
a 1
|
||||
r 1
|
||||
s 1
|
||||
t 1
|
||||
z 1
|
||||
ß 1
|
||||
÷ 1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
Start of 5.4 tests
|
||||
SET NAMES utf8mb3;
|
||||
|
||||
@@ -469,6 +469,8 @@ SELECT HEX(a) FROM t2 WHERE a IN
|
||||
HEX(a)
|
||||
7FFFFFFFFFFFFFFE
|
||||
7FFFFFFFFFFFFFFF
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'abc'
|
||||
CREATE TABLE t3 (a BIGINT UNSIGNED);
|
||||
INSERT INTO t3 VALUES (9223372036854775551);
|
||||
SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42);
|
||||
|
||||
@@ -2826,5 +2826,41 @@ SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc));
|
||||
((0xf3) * (rpad(1.0,2048,1)) << (0xcc))
|
||||
0
|
||||
#
|
||||
# Bug#13359121 LARGE NUMBERS, /STRINGS/DTOA.C:662:
|
||||
# BALLOC: ASSERTION `K <= 15' FAILED.
|
||||
# Bug#12985021 SIMPLE QUERY WITH DECIMAL NUMBERS TAKE AN
|
||||
# EXTRAORDINARY LONG TIME TO EXECUTE
|
||||
SELECT @tmp_max:= @@global.max_allowed_packet;
|
||||
@tmp_max:= @@global.max_allowed_packet
|
||||
1048576
|
||||
SET @@global.max_allowed_packet=1024*1024*1024;
|
||||
SELECT @@global.max_allowed_packet;
|
||||
@@global.max_allowed_packet
|
||||
1073741824
|
||||
do
|
||||
format(rpad('111111111.1',
|
||||
1111111,
|
||||
'999999999999999999999999999999999999999999'),0,'be_BY')
|
||||
;
|
||||
DO
|
||||
round(
|
||||
concat( (
|
||||
coalesce( (
|
||||
linefromwkb('2147483648',
|
||||
-b'1111111111111111111111111111111111111111111')),
|
||||
( convert('[.DC2.]',decimal(30,30)) ),
|
||||
bit_count('')
|
||||
) ),
|
||||
( lpad( ( elt('01','}:K5')),
|
||||
sha1('P'),
|
||||
( ( select '-9223372036854775808.1' > all (select '')))
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '[.DC2.]'
|
||||
SET @@global.max_allowed_packet:= @tmp_max;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
||||
@@ -1402,8 +1402,220 @@ NULL
|
||||
# Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
|
||||
#
|
||||
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
|
||||
#
|
||||
# BUG#13458237 INCONSISTENT HANDLING OF INVALIDE DATES WITH ZERO DAY
|
||||
# SIMILAR TO '2009-10-00'
|
||||
#
|
||||
SELECT
|
||||
DATE('20091000'),
|
||||
STR_TO_DATE('200910','%Y%m'),
|
||||
LAST_DAY('2009-10-00'),
|
||||
LAST_DAY(DATE('2009-10-00')),
|
||||
LAST_DAY(DATE'2009-10-00'),
|
||||
LAST_DAY(STR_TO_DATE('200910','%Y%m')),
|
||||
WEEK('2009-10-00'),
|
||||
WEEK(DATE('2009-10-00')),
|
||||
WEEK(DATE'2009-10-00'),
|
||||
WEEK(STR_TO_DATE('200910','%Y%m')),
|
||||
WEEKOFYEAR('2009-10-00'),
|
||||
WEEKOFYEAR(DATE('2009-10-00')),
|
||||
WEEKOFYEAR(DATE'2009-10-00'),
|
||||
WEEKOFYEAR(STR_TO_DATE('200910','%Y%m')),
|
||||
DAYOFYEAR('2009-10-00'),
|
||||
DAYOFYEAR(DATE('2009-10-00')),
|
||||
DAYOFYEAR(DATE'2009-10-00'),
|
||||
DAYOFYEAR(STR_TO_DATE('200910','%Y%m')),
|
||||
WEEKDAY('2009-10-00'),
|
||||
WEEKDAY(DATE('2009-10-00')),
|
||||
WEEKDAY(DATE'2009-10-00'),
|
||||
WEEKDAY(STR_TO_DATE('200910','%Y%m')),
|
||||
TO_DAYs('2009-10-00'),
|
||||
TO_DAYs(DATE('2009-10-00')),
|
||||
TO_DAYs(DATE'2009-10-00'),
|
||||
TO_DAYs(STR_TO_DATE('200910','%Y%m'));
|
||||
DATE('20091000') 2009-10-00
|
||||
STR_TO_DATE('200910','%Y%m') 2009-10-00
|
||||
LAST_DAY('2009-10-00') NULL
|
||||
LAST_DAY(DATE('2009-10-00')) 2009-10-31
|
||||
LAST_DAY(DATE'2009-10-00') NULL
|
||||
LAST_DAY(STR_TO_DATE('200910','%Y%m')) 2009-10-31
|
||||
WEEK('2009-10-00') NULL
|
||||
WEEK(DATE('2009-10-00')) 39
|
||||
WEEK(DATE'2009-10-00') NULL
|
||||
WEEK(STR_TO_DATE('200910','%Y%m')) NULL
|
||||
WEEKOFYEAR('2009-10-00') NULL
|
||||
WEEKOFYEAR(DATE('2009-10-00')) 40
|
||||
WEEKOFYEAR(DATE'2009-10-00') NULL
|
||||
WEEKOFYEAR(STR_TO_DATE('200910','%Y%m')) NULL
|
||||
DAYOFYEAR('2009-10-00') NULL
|
||||
DAYOFYEAR(DATE('2009-10-00')) 273
|
||||
DAYOFYEAR(DATE'2009-10-00') NULL
|
||||
DAYOFYEAR(STR_TO_DATE('200910','%Y%m')) NULL
|
||||
WEEKDAY('2009-10-00') NULL
|
||||
WEEKDAY(DATE('2009-10-00')) 2
|
||||
WEEKDAY(DATE'2009-10-00') NULL
|
||||
WEEKDAY(STR_TO_DATE('200910','%Y%m')) NULL
|
||||
TO_DAYs('2009-10-00') NULL
|
||||
TO_DAYs(DATE('2009-10-00')) 734045
|
||||
TO_DAYs(DATE'2009-10-00') NULL
|
||||
TO_DAYs(STR_TO_DATE('200910','%Y%m')) NULL
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '0'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '200910' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '200910' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '200910' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '200910' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '2009-10-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '200910' for function str_to_date
|
||||
SELECT
|
||||
DATE('00000100'),
|
||||
STR_TO_DATE('000001','%Y%m'),
|
||||
LAST_DAY('0000-01-00'),
|
||||
LAST_DAY(DATE('0000-01-00')),
|
||||
LAST_DAY(DATE'0000-01-00'),
|
||||
LAST_DAY(STR_TO_DATE('000001','%Y%m')),
|
||||
WEEK('0000-01-00'),
|
||||
WEEK(DATE('0000-01-00')),
|
||||
WEEK(DATE'0000-01-00'),
|
||||
WEEK(STR_TO_DATE('000001','%Y%m')),
|
||||
WEEKOFYEAR('0000-01-00'),
|
||||
WEEKOFYEAR(DATE('0000-01-00')),
|
||||
WEEKOFYEAR(DATE'0000-01-00'),
|
||||
WEEKOFYEAR(STR_TO_DATE('000001','%Y%m')),
|
||||
DAYOFYEAR('0000-01-00'),
|
||||
DAYOFYEAR(DATE('0000-01-00')),
|
||||
DAYOFYEAR(DATE'0000-01-00'),
|
||||
DAYOFYEAR(STR_TO_DATE('000001','%Y%m')),
|
||||
WEEKDAY('0000-01-00'),
|
||||
WEEKDAY(DATE('0000-01-00')),
|
||||
WEEKDAY(DATE'0000-01-00'),
|
||||
WEEKDAY(STR_TO_DATE('000001','%Y%m')),
|
||||
TO_DAYs('0000-01-00'),
|
||||
TO_DAYs(DATE('0000-01-00')),
|
||||
TO_DAYs(DATE'0000-01-00'),
|
||||
TO_DAYs(STR_TO_DATE('000001','%Y%m'));
|
||||
DATE('00000100') 0000-01-00
|
||||
STR_TO_DATE('000001','%Y%m') 0000-01-00
|
||||
LAST_DAY('0000-01-00') NULL
|
||||
LAST_DAY(DATE('0000-01-00')) 0000-01-31
|
||||
LAST_DAY(DATE'0000-01-00') NULL
|
||||
LAST_DAY(STR_TO_DATE('000001','%Y%m')) 0000-01-31
|
||||
WEEK('0000-01-00') NULL
|
||||
WEEK(DATE('0000-01-00')) 52
|
||||
WEEK(DATE'0000-01-00') NULL
|
||||
WEEK(STR_TO_DATE('000001','%Y%m')) NULL
|
||||
WEEKOFYEAR('0000-01-00') NULL
|
||||
WEEKOFYEAR(DATE('0000-01-00')) 52
|
||||
WEEKOFYEAR(DATE'0000-01-00') NULL
|
||||
WEEKOFYEAR(STR_TO_DATE('000001','%Y%m')) NULL
|
||||
DAYOFYEAR('0000-01-00') NULL
|
||||
DAYOFYEAR(DATE('0000-01-00')) 0
|
||||
DAYOFYEAR(DATE'0000-01-00') NULL
|
||||
DAYOFYEAR(STR_TO_DATE('000001','%Y%m')) NULL
|
||||
WEEKDAY('0000-01-00') NULL
|
||||
WEEKDAY(DATE('0000-01-00')) 5
|
||||
WEEKDAY(DATE'0000-01-00') NULL
|
||||
WEEKDAY(STR_TO_DATE('000001','%Y%m')) NULL
|
||||
TO_DAYs('0000-01-00') NULL
|
||||
TO_DAYs(DATE('0000-01-00')) 0
|
||||
TO_DAYs(DATE'0000-01-00') NULL
|
||||
TO_DAYs(STR_TO_DATE('000001','%Y%m')) NULL
|
||||
Warnings:
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '000001' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '000001' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '000001' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '000001' for function str_to_date
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1292
|
||||
Message Incorrect datetime value: '0000-01-00'
|
||||
Level Warning
|
||||
Code 1411
|
||||
Message Incorrect datetime value: '000001' for function str_to_date
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#57039: constant subtime expression returns incorrect result.
|
||||
|
||||
@@ -23,12 +23,24 @@ wacky libdaemon_example.so
|
||||
wicky libdaemon_example.so
|
||||
wonky libdaemon_example.so
|
||||
#
|
||||
# Ensure the plugin is loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
||||
name dl
|
||||
daemon_example libdaemon_example.so
|
||||
#
|
||||
# Ensure the plugin is replaced.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
||||
name dl
|
||||
daemon_example liblibdaemon_example.so
|
||||
#
|
||||
# Disable the plugin...
|
||||
#
|
||||
#
|
||||
# Ensure the plugin isn't loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
||||
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
||||
name dl
|
||||
#
|
||||
# Attempt to load non-existant plugin
|
||||
|
||||
@@ -671,6 +671,9 @@ The following options may be given as the first argument:
|
||||
replication.
|
||||
--sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
|
||||
for the complete list of valid sql modes
|
||||
--stored-program-cache=#
|
||||
The soft upper limit for number of cached stored routines
|
||||
for one connection.
|
||||
-s, --symbolic-links
|
||||
Enable symbolic link support.
|
||||
--sync-binlog=# Synchronously flush binary log to disk after every #th
|
||||
@@ -935,6 +938,7 @@ slow-query-log FALSE
|
||||
sort-buffer-size 2097152
|
||||
sporadic-binlog-dump-fail FALSE
|
||||
sql-mode
|
||||
stored-program-cache 256
|
||||
symbolic-links FALSE
|
||||
sync-binlog 0
|
||||
sync-frm TRUE
|
||||
|
||||
@@ -679,6 +679,9 @@ The following options may be given as the first argument:
|
||||
--sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
|
||||
for the complete list of valid sql modes
|
||||
--standalone Dummy option to start as a standalone program (NT).
|
||||
--stored-program-cache=#
|
||||
The soft upper limit for number of cached stored routines
|
||||
for one connection.
|
||||
-s, --symbolic-links
|
||||
Enable symbolic link support.
|
||||
--sync-binlog=# Synchronously flush binary log to disk after every #th
|
||||
@@ -946,6 +949,7 @@ slow-start-timeout 15000
|
||||
sort-buffer-size 2097152
|
||||
sporadic-binlog-dump-fail FALSE
|
||||
sql-mode
|
||||
stored-program-cache 256
|
||||
symbolic-links FALSE
|
||||
sync-binlog 0
|
||||
sync-frm TRUE
|
||||
|
||||
@@ -8,6 +8,6 @@ name TINYBLOB NOT NULL,
|
||||
modified TIMESTAMP DEFAULT '0000-00-00 00:00:00',
|
||||
INDEX namelocs (name(255))) ENGINE = MyISAM
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
LOAD DATA LOCAL INFILE 'init_file.txt'
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/init_file.txt'
|
||||
INTO TABLE t1 (name);
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -1767,4 +1767,121 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
|
||||
pk i4 pk i4
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#13519696 - 62940: SELECT RESULTS VARY WITH VERSION AND
|
||||
# WITH/WITHOUT INDEX RANGE SCAN
|
||||
#
|
||||
create table t1 (id int unsigned not null auto_increment primary key);
|
||||
insert into t1 values (null);
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
create table t2 (
|
||||
id int unsigned not null auto_increment,
|
||||
val decimal(5,3) not null,
|
||||
primary key (id,val),
|
||||
unique key (val,id),
|
||||
unique key (id));
|
||||
insert into t2 select null,id*0.0009 from t1;
|
||||
select count(val) from t2 ignore index (val) where val > 0.1155;
|
||||
count(val)
|
||||
128
|
||||
select count(val) from t2 force index (val) where val > 0.1155;
|
||||
count(val)
|
||||
128
|
||||
drop table t2, t1;
|
||||
#
|
||||
# BUG#13453382 - REGRESSION SINCE 5.1.39, RANGE OPTIMIZER WRONG
|
||||
# RESULTS WITH DECIMAL CONVERSION
|
||||
#
|
||||
create table t1 (a int,b int,c int,primary key (a,c));
|
||||
insert into t1 values (1,1,2),(1,1,3),(1,1,4);
|
||||
select convert(3, signed integer) > 2.9;
|
||||
convert(3, signed integer) > 2.9
|
||||
1
|
||||
select * from t1 force index (primary) where a=1 and c>= 2.9;
|
||||
a b c
|
||||
1 1 3
|
||||
1 1 4
|
||||
select * from t1 ignore index (primary) where a=1 and c>= 2.9;
|
||||
a b c
|
||||
1 1 3
|
||||
1 1 4
|
||||
select * from t1 force index (primary) where a=1 and c> 2.9;
|
||||
a b c
|
||||
1 1 3
|
||||
1 1 4
|
||||
select * from t1 ignore index (primary) where a=1 and c> 2.9;
|
||||
a b c
|
||||
1 1 3
|
||||
1 1 4
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#13463488 - 63437: CHAR & BETWEEN WITH INDEX RETURNS WRONG
|
||||
# RESULT AFTER MYSQL 5.1.
|
||||
#
|
||||
CREATE TABLE t1(
|
||||
F1 CHAR(5) NOT NULL,
|
||||
F2 CHAR(5) NOT NULL,
|
||||
F3 CHAR(5) NOT NULL,
|
||||
PRIMARY KEY(F1),
|
||||
INDEX IDX_F2(F2)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
('A','A','A'),('AA','AA','AA'),('AAA','AAA','AAA'),
|
||||
('AAAA','AAAA','AAAA'),('AAAAA','AAAAA','AAAAA');
|
||||
SELECT * FROM t1 WHERE F1 = 'A ';
|
||||
F1 F2 F3
|
||||
A A A
|
||||
SELECT * FROM t1 IGNORE INDEX(PRIMARY) WHERE F1 = 'A ';
|
||||
F1 F2 F3
|
||||
A A A
|
||||
SELECT * FROM t1 WHERE F1 >= 'A ';
|
||||
F1 F2 F3
|
||||
A A A
|
||||
AA AA AA
|
||||
AAA AAA AAA
|
||||
AAAA AAAA AAAA
|
||||
AAAAA AAAAA AAAAA
|
||||
SELECT * FROM t1 WHERE F1 > 'A ';
|
||||
F1 F2 F3
|
||||
AA AA AA
|
||||
AAA AAA AAA
|
||||
AAAA AAAA AAAA
|
||||
AAAAA AAAAA AAAAA
|
||||
SELECT * FROM t1 WHERE F1 BETWEEN 'A ' AND 'AAAAA';
|
||||
F1 F2 F3
|
||||
A A A
|
||||
AA AA AA
|
||||
AAA AAA AAA
|
||||
AAAA AAAA AAAA
|
||||
AAAAA AAAAA AAAAA
|
||||
SELECT * FROM t1 WHERE F2 BETWEEN 'A ' AND 'AAAAA';
|
||||
F1 F2 F3
|
||||
A A A
|
||||
AA AA AA
|
||||
AAA AAA AAA
|
||||
AAAA AAAA AAAA
|
||||
AAAAA AAAAA AAAAA
|
||||
SELECT * FROM t1 WHERE F3 BETWEEN 'A ' AND 'AAAAA';
|
||||
F1 F2 F3
|
||||
A A A
|
||||
AA AA AA
|
||||
AAA AAA AAA
|
||||
AAAA AAAA AAAA
|
||||
AAAAA AAAAA AAAAA
|
||||
SELECT * FROM t1 IGNORE INDEX(PRIMARY) WHERE F1 BETWEEN 'A ' AND
|
||||
'AAAAA';
|
||||
F1 F2 F3
|
||||
A A A
|
||||
AA AA AA
|
||||
AAA AAA AAA
|
||||
AAAA AAAA AAAA
|
||||
AAAAA AAAAA AAAAA
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -206,8 +206,8 @@ DROP TABLE t1;
|
||||
# FAILED
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
# Connection con2
|
||||
@@ -217,12 +217,14 @@ INSERT INTO t2 SELECT a FROM t1;
|
||||
# Connection default
|
||||
# Waiting until INSERT ... is blocked
|
||||
DELETE FROM t1;
|
||||
COMMIT;
|
||||
# Connection con2
|
||||
# Reaping: INSERT INTO t2 SELECT a FROM t1
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
XA COMMIT 'xid1';
|
||||
ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected
|
||||
# Connection default
|
||||
COMMIT;
|
||||
# Connection con2
|
||||
XA START 'xid1';
|
||||
XA END 'xid1';
|
||||
XA PREPARE 'xid1';
|
||||
|
||||
@@ -11,7 +11,7 @@ reset slave;
|
||||
start slave;
|
||||
include/wait_for_slave_param.inc [Last_IO_Errno]
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event '' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
reset master;
|
||||
stop slave;
|
||||
reset slave;
|
||||
|
||||
@@ -270,6 +270,7 @@ Heartbeat event received
|
||||
include/rpl_reset.inc
|
||||
include/stop_slave.inc
|
||||
include/rpl_change_topology.inc [new topology=1->2->1]
|
||||
CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
|
||||
include/start_slave.inc
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10));
|
||||
INSERT INTO t1 VALUES(1, 'on master');
|
||||
|
||||
@@ -9,7 +9,7 @@ change master to master_log_pos=MASTER_LOG_POS;
|
||||
Read_Master_Log_Pos = '75'
|
||||
start slave;
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
include/stop_slave_sql.inc
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
|
||||
@@ -5,7 +5,7 @@ CREATE TABLE t1(c1 INT);
|
||||
FLUSH LOGS;
|
||||
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000002' at XXX, the last byte read from 'master-bin.000002' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000002' at XXX, the last byte read from './master-bin.000002' at XXX.''
|
||||
CREATE TABLE t2(c1 INT);
|
||||
FLUSH LOGS;
|
||||
CREATE TABLE t3(c1 INT);
|
||||
|
||||
@@ -37,7 +37,7 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
|
||||
INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
|
||||
10
mysql-test/suite/rpl/r/rpl_start_stop_slave.result
Normal file
10
mysql-test/suite/rpl/r/rpl_start_stop_slave.result
Normal file
@@ -0,0 +1,10 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
set @time_before_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time before the query]
|
||||
[Connection ID of the slave I/O thread found]
|
||||
kill <connection_id>;
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time after the query]
|
||||
[Killing of the slave IO thread was successful]
|
||||
include/rpl_end.inc
|
||||
@@ -75,7 +75,7 @@ CHANGE MASTER TO master_log_pos=MASTER_POS;
|
||||
START SLAVE;
|
||||
include/wait_for_slave_param.inc [Last_IO_Errno]
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
#
|
||||
# Bug#13050593 swallows `\' from Last_IO_Error
|
||||
# todo: uncomment the filter once the bug is fixed.
|
||||
#
|
||||
--source include/not_windows.inc
|
||||
|
||||
call mtr.add_suppression("Error in Log_event::read_log_event()");
|
||||
|
||||
@@ -51,7 +46,7 @@ start slave;
|
||||
--let $slave_param_value=1236
|
||||
--source include/wait_for_slave_param.inc
|
||||
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
--let $slave_field_result_replace= / at [0-9]*/ at XXX/
|
||||
--let $status_items= Last_IO_Errno, Last_IO_Error
|
||||
--source include/show_slave_status.inc
|
||||
|
||||
|
||||
@@ -480,6 +480,12 @@ let $status_var_comparsion= >;
|
||||
--connection master
|
||||
#--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG
|
||||
#eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog';
|
||||
|
||||
# BUG#12403008 RPL_HEARTBEAT_BASIC FAILS SPORADICALLY ON PUSHBUILD
|
||||
# MASTER_HEARTBEAT_PERIOD had the default value (slave_net_timeout/2)
|
||||
# so wait on "Heartbeat event received on master", that only waits for
|
||||
# 1 minute, sometimes timeout before heartbeat arrives.
|
||||
CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
|
||||
--source include/start_slave.inc
|
||||
|
||||
# Insert data on master and on slave and make sure that it replicated for both directions
|
||||
|
||||
@@ -23,8 +23,8 @@ source include/show_slave_status.inc;
|
||||
start slave;
|
||||
let $slave_io_errno= 1236;
|
||||
--let $show_slave_io_error= 1
|
||||
# Mask line numbers, and whether master-bin is preceded by "./" or "."
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
# Mask line numbers
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/
|
||||
source include/wait_for_slave_io_error.inc;
|
||||
source include/stop_slave_sql.inc;
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ connection slave;
|
||||
# 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG
|
||||
--let $slave_io_errno= 1236
|
||||
--let $show_slave_io_error= 1
|
||||
# Mask line numbers, and whether master-bin is preceded by "./" or "."
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
# Mask line numbers
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/
|
||||
--source include/wait_for_slave_io_error.inc
|
||||
|
||||
connection master;
|
||||
|
||||
@@ -126,8 +126,8 @@ connection slave;
|
||||
# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master.
|
||||
--let $slave_io_errno= 1236
|
||||
|
||||
# Mask line numbers, and whether master-bin is preceded by "./" or "."
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ /\.\/*master-bin/master-bin/
|
||||
# Mask line numbers
|
||||
--let $slave_io_error_replace= / at [0-9]*/ at XXX/
|
||||
--source include/wait_for_slave_io_error.inc
|
||||
|
||||
# Remove the bad binlog and clear error status on slave.
|
||||
|
||||
44
mysql-test/suite/rpl/t/rpl_start_stop_slave.test
Normal file
44
mysql-test/suite/rpl/t/rpl_start_stop_slave.test
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
#BUG#11752315 : STOP SLAVE UNABLE TO COMPLETE WHEN SLAVE THREAD IS TRYING
|
||||
# TO RECONNECT TO
|
||||
#
|
||||
# ==== Purpose ====
|
||||
#
|
||||
#Tests that the slave does not go to a sleep for a long duration after the
|
||||
#master is killed and we do a START_SLAVE and STOP_SLAVE.
|
||||
#
|
||||
# ==== Method ====
|
||||
#
|
||||
#This is a new functionality of having an interruptable sleep of the slave.
|
||||
#We find the thread id for the slave thread. On finding the thread ID of the
|
||||
#slave thread we kill the slave thread. A successful kill in less than 60 sec
|
||||
#should serve the purpose of checking the functionality.
|
||||
#
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
connection slave;
|
||||
--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
|
||||
|
||||
set @time_before_kill := (select CURRENT_TIMESTAMP);
|
||||
|
||||
--echo [Time before the query]
|
||||
--echo [Connection ID of the slave I/O thread found]
|
||||
|
||||
--replace_regex /kill [0-9]*/kill <connection_id>/
|
||||
--eval kill $connection_id
|
||||
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
|
||||
--echo [Time after the query]
|
||||
|
||||
if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
|
||||
{
|
||||
--echo # assert : The difference between the timestamps 'time_after_kill' and 'time_before_kill' should be less than 60sec.
|
||||
--die
|
||||
}
|
||||
|
||||
--echo [Killing of the slave IO thread was successful]
|
||||
# End of test
|
||||
--source include/rpl_end.inc
|
||||
@@ -0,0 +1,59 @@
|
||||
# Saving initial value of stored_program_cache in a temporary variable
|
||||
SET @start_value = @@global.stored_program_cache;
|
||||
SELECT @start_value;
|
||||
@start_value
|
||||
256
|
||||
# Display the DEFAULT value of stored_program_cache
|
||||
SET @@global.stored_program_cache = DEFAULT;
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
# Verify default value of variable
|
||||
SELECT @@global.stored_program_cache = 256;
|
||||
@@global.stored_program_cache = 256
|
||||
1
|
||||
# Change the value of stored_program_cache to a valid value
|
||||
SET @@global.stored_program_cache = 512;
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
512
|
||||
# Change the value of stored_program_cache to invalid value
|
||||
SET @@global.stored_program_cache = -1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect stored_program_cache value: '-1'
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
SET @@global.stored_program_cache =100000000000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect stored_program_cache value: '100000000000'
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
524288
|
||||
SET @@global.stored_program_cache = 0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect stored_program_cache value: '0'
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
SET @@global.stored_program_cache = 10000.01;
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
SET @@global.stored_program_cache = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
SET @@global.stored_program_cache= 'test';
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
SET @@global.stored_program_cache = '';
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
# Test if accessing session stored_program_cache gives error
|
||||
SET @@session.stored_program_cache = 0;
|
||||
ERROR HY000: Variable 'stored_program_cache' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
# Check if accessing variable without SCOPE points to same global variable
|
||||
SET @@global.stored_program_cache = 512;
|
||||
SELECT @@stored_program_cache = @@global.stored_program_cache;
|
||||
@@stored_program_cache = @@global.stored_program_cache
|
||||
1
|
||||
# Restore initial value
|
||||
SET @@global.stored_program_cache = @start_value;
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
59
mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
Normal file
59
mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
Normal file
@@ -0,0 +1,59 @@
|
||||
# Variable Name: stored_program_cache
|
||||
# Scope: GLOBAL
|
||||
# Access Type: Dynamic
|
||||
# Data Type: numeric
|
||||
# Default Value: 256
|
||||
# Range: 256-524288
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
--echo # Saving initial value of stored_program_cache in a temporary variable
|
||||
SET @start_value = @@global.stored_program_cache;
|
||||
SELECT @start_value;
|
||||
|
||||
--echo # Display the DEFAULT value of stored_program_cache
|
||||
SET @@global.stored_program_cache = DEFAULT;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
--echo # Verify default value of variable
|
||||
SELECT @@global.stored_program_cache = 256;
|
||||
|
||||
--echo # Change the value of stored_program_cache to a valid value
|
||||
SET @@global.stored_program_cache = 512;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
--echo # Change the value of stored_program_cache to invalid value
|
||||
SET @@global.stored_program_cache = -1;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
SET @@global.stored_program_cache =100000000000;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
SET @@global.stored_program_cache = 0;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache = 10000.01;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache = ON;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache= 'test';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache = '';
|
||||
|
||||
--echo # Test if accessing session stored_program_cache gives error
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.stored_program_cache = 0;
|
||||
|
||||
--echo # Check if accessing variable without SCOPE points to same global variable
|
||||
|
||||
SET @@global.stored_program_cache = 512;
|
||||
SELECT @@stored_program_cache = @@global.stored_program_cache;
|
||||
|
||||
--echo # Restore initial value
|
||||
|
||||
SET @@global.stored_program_cache = @start_value;
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@ -361,4 +361,51 @@ DROP TABLE t1;
|
||||
|
||||
--echo # End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug#13463415 63502: INCORRECT RESULTS OF BIGINT AND DECIMAL COMPARISON
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t_bigint(id BIGINT);
|
||||
INSERT INTO t_bigint VALUES (1), (2);
|
||||
|
||||
SELECT id, id >= 1.1 FROM t_bigint;
|
||||
SELECT id, 1.1 <= id FROM t_bigint;
|
||||
|
||||
SELECT id, id = 1.1 FROM t_bigint;
|
||||
SELECT id, 1.1 = id FROM t_bigint;
|
||||
|
||||
SELECT * from t_bigint WHERE id = 1.1;
|
||||
SELECT * from t_bigint WHERE id = 1.1e0;
|
||||
SELECT * from t_bigint WHERE id = '1.1';
|
||||
SELECT * from t_bigint WHERE id = '1.1e0';
|
||||
|
||||
SELECT * from t_bigint WHERE id IN (1.1, 2.2);
|
||||
SELECT * from t_bigint WHERE id IN (1.1e0, 2.2e0);
|
||||
SELECT * from t_bigint WHERE id IN ('1.1', '2.2');
|
||||
SELECT * from t_bigint WHERE id IN ('1.1e0', '2.2e0');
|
||||
|
||||
SELECT * from t_bigint WHERE id BETWEEN 1.1 AND 1.9;
|
||||
SELECT * from t_bigint WHERE id BETWEEN 1.1e0 AND 1.9e0;
|
||||
SELECT * from t_bigint WHERE id BETWEEN '1.1' AND '1.9';
|
||||
SELECT * from t_bigint WHERE id BETWEEN '1.1e0' AND '1.9e0';
|
||||
|
||||
DROP TABLE t_bigint;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11758543 50756: BIGINT '100' MATCHES 1.001E2
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a BIGINT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# a. These queries correctly return 0 rows:
|
||||
SELECT * FROM t1 WHERE coalesce(a) BETWEEN 0 and 0.9;
|
||||
SELECT * FROM t1 WHERE coalesce(a)=0.9;
|
||||
SELECT * FROM t1 WHERE coalesce(a) in (0.8,0.9);
|
||||
|
||||
# b. These queries mistakenely returned 1 row:
|
||||
SELECT * FROM t1 WHERE a BETWEEN 0 AND 0.9;
|
||||
SELECT * FROM t1 WHERE a=0.9;
|
||||
SELECT * FROM t1 WHERE a IN (0.8,0.9);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -1455,6 +1455,14 @@ SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
|
||||
SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
|
||||
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
|
||||
--echo #
|
||||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci);
|
||||
INSERT INTO t1 VALUES ('a'),('r'),('s'),(_latin1 0xDF),(_latin1 0xF7),('t'),('z');
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
SELECT a, COUNT(*) FROM t1 GROUP BY a;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
@@ -1459,6 +1459,45 @@ SELECT stddev_samp(rpad(1.0,2048,1));
|
||||
SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)));
|
||||
SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc));
|
||||
|
||||
--echo #
|
||||
--echo # Bug#13359121 LARGE NUMBERS, /STRINGS/DTOA.C:662:
|
||||
--echo # BALLOC: ASSERTION `K <= 15' FAILED.
|
||||
--echo # Bug#12985021 SIMPLE QUERY WITH DECIMAL NUMBERS TAKE AN
|
||||
--echo # EXTRAORDINARY LONG TIME TO EXECUTE
|
||||
|
||||
SELECT @tmp_max:= @@global.max_allowed_packet;
|
||||
SET @@global.max_allowed_packet=1024*1024*1024;
|
||||
# switching connection to allow the new max_allowed_packet take effect
|
||||
--connect (newconn, localhost, root,,)
|
||||
|
||||
SELECT @@global.max_allowed_packet;
|
||||
|
||||
do
|
||||
format(rpad('111111111.1',
|
||||
1111111,
|
||||
'999999999999999999999999999999999999999999'),0,'be_BY')
|
||||
;
|
||||
|
||||
DO
|
||||
round(
|
||||
concat( (
|
||||
coalesce( (
|
||||
linefromwkb('2147483648',
|
||||
-b'1111111111111111111111111111111111111111111')),
|
||||
( convert('[.DC2.]',decimal(30,30)) ),
|
||||
bit_count('')
|
||||
) ),
|
||||
( lpad( ( elt('01','}:K5')),
|
||||
sha1('P'),
|
||||
( ( select '-9223372036854775808.1' > all (select '')))
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
--connection default
|
||||
SET @@global.max_allowed_packet:= @tmp_max;
|
||||
--disconnect newconn
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
|
||||
@@ -915,6 +915,67 @@ SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
|
||||
|
||||
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
|
||||
|
||||
--echo #
|
||||
--echo # BUG#13458237 INCONSISTENT HANDLING OF INVALIDE DATES WITH ZERO DAY
|
||||
--echo # SIMILAR TO '2009-10-00'
|
||||
--echo #
|
||||
|
||||
query_vertical SELECT
|
||||
DATE('20091000'),
|
||||
STR_TO_DATE('200910','%Y%m'),
|
||||
LAST_DAY('2009-10-00'),
|
||||
LAST_DAY(DATE('2009-10-00')),
|
||||
LAST_DAY(DATE'2009-10-00'),
|
||||
LAST_DAY(STR_TO_DATE('200910','%Y%m')),
|
||||
WEEK('2009-10-00'),
|
||||
WEEK(DATE('2009-10-00')),
|
||||
WEEK(DATE'2009-10-00'),
|
||||
WEEK(STR_TO_DATE('200910','%Y%m')),
|
||||
WEEKOFYEAR('2009-10-00'),
|
||||
WEEKOFYEAR(DATE('2009-10-00')),
|
||||
WEEKOFYEAR(DATE'2009-10-00'),
|
||||
WEEKOFYEAR(STR_TO_DATE('200910','%Y%m')),
|
||||
DAYOFYEAR('2009-10-00'),
|
||||
DAYOFYEAR(DATE('2009-10-00')),
|
||||
DAYOFYEAR(DATE'2009-10-00'),
|
||||
DAYOFYEAR(STR_TO_DATE('200910','%Y%m')),
|
||||
WEEKDAY('2009-10-00'),
|
||||
WEEKDAY(DATE('2009-10-00')),
|
||||
WEEKDAY(DATE'2009-10-00'),
|
||||
WEEKDAY(STR_TO_DATE('200910','%Y%m')),
|
||||
TO_DAYs('2009-10-00'),
|
||||
TO_DAYs(DATE('2009-10-00')),
|
||||
TO_DAYs(DATE'2009-10-00'),
|
||||
TO_DAYs(STR_TO_DATE('200910','%Y%m'));
|
||||
|
||||
query_vertical SELECT
|
||||
DATE('00000100'),
|
||||
STR_TO_DATE('000001','%Y%m'),
|
||||
LAST_DAY('0000-01-00'),
|
||||
LAST_DAY(DATE('0000-01-00')),
|
||||
LAST_DAY(DATE'0000-01-00'),
|
||||
LAST_DAY(STR_TO_DATE('000001','%Y%m')),
|
||||
WEEK('0000-01-00'),
|
||||
WEEK(DATE('0000-01-00')),
|
||||
WEEK(DATE'0000-01-00'),
|
||||
WEEK(STR_TO_DATE('000001','%Y%m')),
|
||||
WEEKOFYEAR('0000-01-00'),
|
||||
WEEKOFYEAR(DATE('0000-01-00')),
|
||||
WEEKOFYEAR(DATE'0000-01-00'),
|
||||
WEEKOFYEAR(STR_TO_DATE('000001','%Y%m')),
|
||||
DAYOFYEAR('0000-01-00'),
|
||||
DAYOFYEAR(DATE('0000-01-00')),
|
||||
DAYOFYEAR(DATE'0000-01-00'),
|
||||
DAYOFYEAR(STR_TO_DATE('000001','%Y%m')),
|
||||
WEEKDAY('0000-01-00'),
|
||||
WEEKDAY(DATE('0000-01-00')),
|
||||
WEEKDAY(DATE'0000-01-00'),
|
||||
WEEKDAY(STR_TO_DATE('000001','%Y%m')),
|
||||
TO_DAYs('0000-01-00'),
|
||||
TO_DAYs(DATE('0000-01-00')),
|
||||
TO_DAYs(DATE'0000-01-00'),
|
||||
TO_DAYs(STR_TO_DATE('000001','%Y%m'));
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
|
||||
@@ -155,6 +155,74 @@ eval INSERT INTO mysql.plugin VALUES ('wonky', '$DAEMONEXAMPLE');
|
||||
--replace_regex /\.dll/.so/
|
||||
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
||||
|
||||
# MTR will remove this file later, but this might be too late.
|
||||
--error 0,1
|
||||
--remove_file $expect_file
|
||||
--write_file $expect_file
|
||||
wait
|
||||
EOF
|
||||
--shutdown_server 10
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
#
|
||||
# Disable the plugin - to remove winky, wonky entries
|
||||
#
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
|
||||
|
||||
#
|
||||
# Enable the plugin again
|
||||
#
|
||||
--exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
|
||||
|
||||
#
|
||||
# Restart the server
|
||||
#
|
||||
--append_file $expect_file
|
||||
restart
|
||||
EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--echo #
|
||||
--echo # Ensure the plugin is loaded.
|
||||
--echo #
|
||||
--replace_regex /\.dll/.so/
|
||||
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
||||
|
||||
# MTR will remove this file later, but this might be too late.
|
||||
--error 0,1
|
||||
--remove_file $expect_file
|
||||
--write_file $expect_file
|
||||
wait
|
||||
EOF
|
||||
--shutdown_server 10
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
# To test the case where the same plugin is reloaded with a different soname,
|
||||
# we must copy the example daemon to a new location renaming it.
|
||||
|
||||
let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
|
||||
--copy_file $PLUGIN_DIR/$DAEMONEXAMPLE $PLUGIN_DIR/$DAEMON_RELOAD
|
||||
--copy_file include/libdaemon_example.ini $PLUGIN_DIR/libdaemon_example.ini
|
||||
|
||||
# Now reload it and see that it is a different name.
|
||||
--exec $MYSQL_PLUGIN_CMD ENABLE libdaemon_example
|
||||
|
||||
#
|
||||
# Restart the server
|
||||
#
|
||||
--append_file $expect_file
|
||||
restart
|
||||
EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--echo #
|
||||
--echo # Ensure the plugin is replaced.
|
||||
--echo #
|
||||
--replace_regex /\.dll/.so/
|
||||
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
||||
|
||||
--echo #
|
||||
--echo # Disable the plugin...
|
||||
--echo #
|
||||
@@ -170,7 +238,12 @@ EOF
|
||||
#
|
||||
# Disable the plugin
|
||||
#
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE libdaemon_example
|
||||
|
||||
# Remove files for last test case.
|
||||
|
||||
--remove_file $PLUGIN_DIR/$DAEMON_RELOAD
|
||||
--remove_file $DAEMONEXAMPLE_DIR/libdaemon_example.ini
|
||||
|
||||
#
|
||||
# Restart the server
|
||||
@@ -184,7 +257,7 @@ EOF
|
||||
--echo #
|
||||
--echo # Ensure the plugin isn't loaded.
|
||||
--echo #
|
||||
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
|
||||
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
|
||||
|
||||
#
|
||||
# Stop the server for error conditions
|
||||
|
||||
@@ -8,7 +8,7 @@ DROP TABLE IF EXISTS t1;
|
||||
--echo #
|
||||
--echo # Bug#51851: Server with SBR locks mutex twice on LOAD DATA into
|
||||
--echo # partitioned MyISAM table
|
||||
--write_file init_file.txt
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/init_file.txt
|
||||
abcd
|
||||
EOF
|
||||
|
||||
@@ -19,8 +19,9 @@ CREATE TABLE t1
|
||||
INDEX namelocs (name(255))) ENGINE = MyISAM
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
|
||||
LOAD DATA LOCAL INFILE 'init_file.txt'
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/init_file.txt'
|
||||
INTO TABLE t1 (name);
|
||||
|
||||
--remove_file init_file.txt
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/init_file.txt
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -1392,4 +1392,80 @@ SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#13519696 - 62940: SELECT RESULTS VARY WITH VERSION AND
|
||||
--echo # WITH/WITHOUT INDEX RANGE SCAN
|
||||
--echo #
|
||||
|
||||
create table t1 (id int unsigned not null auto_increment primary key);
|
||||
insert into t1 values (null);
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
insert into t1 select null from t1;
|
||||
create table t2 (
|
||||
id int unsigned not null auto_increment,
|
||||
val decimal(5,3) not null,
|
||||
primary key (id,val),
|
||||
unique key (val,id),
|
||||
unique key (id));
|
||||
--disable_warnings
|
||||
insert into t2 select null,id*0.0009 from t1;
|
||||
--enable_warnings
|
||||
|
||||
select count(val) from t2 ignore index (val) where val > 0.1155;
|
||||
select count(val) from t2 force index (val) where val > 0.1155;
|
||||
|
||||
drop table t2, t1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#13453382 - REGRESSION SINCE 5.1.39, RANGE OPTIMIZER WRONG
|
||||
--echo # RESULTS WITH DECIMAL CONVERSION
|
||||
--echo #
|
||||
|
||||
create table t1 (a int,b int,c int,primary key (a,c));
|
||||
insert into t1 values (1,1,2),(1,1,3),(1,1,4);
|
||||
# show that the integer 3 is bigger than the decimal 2.9,
|
||||
# which should also apply to comparing "c" with 2.9
|
||||
# when c is 3.
|
||||
select convert(3, signed integer) > 2.9;
|
||||
select * from t1 force index (primary) where a=1 and c>= 2.9;
|
||||
select * from t1 ignore index (primary) where a=1 and c>= 2.9;
|
||||
select * from t1 force index (primary) where a=1 and c> 2.9;
|
||||
select * from t1 ignore index (primary) where a=1 and c> 2.9;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#13463488 - 63437: CHAR & BETWEEN WITH INDEX RETURNS WRONG
|
||||
--echo # RESULT AFTER MYSQL 5.1.
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(
|
||||
F1 CHAR(5) NOT NULL,
|
||||
F2 CHAR(5) NOT NULL,
|
||||
F3 CHAR(5) NOT NULL,
|
||||
PRIMARY KEY(F1),
|
||||
INDEX IDX_F2(F2)
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
('A','A','A'),('AA','AA','AA'),('AAA','AAA','AAA'),
|
||||
('AAAA','AAAA','AAAA'),('AAAAA','AAAAA','AAAAA');
|
||||
|
||||
SELECT * FROM t1 WHERE F1 = 'A ';
|
||||
SELECT * FROM t1 IGNORE INDEX(PRIMARY) WHERE F1 = 'A ';
|
||||
SELECT * FROM t1 WHERE F1 >= 'A ';
|
||||
SELECT * FROM t1 WHERE F1 > 'A ';
|
||||
SELECT * FROM t1 WHERE F1 BETWEEN 'A ' AND 'AAAAA';
|
||||
SELECT * FROM t1 WHERE F2 BETWEEN 'A ' AND 'AAAAA';
|
||||
SELECT * FROM t1 WHERE F3 BETWEEN 'A ' AND 'AAAAA';
|
||||
SELECT * FROM t1 IGNORE INDEX(PRIMARY) WHERE F1 BETWEEN 'A ' AND
|
||||
'AAAAA';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
--skip-grant-tables
|
||||
$UDF_EXAMPLE_LIB_OPT
|
||||
|
||||
@@ -338,8 +338,8 @@ DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
@@ -359,7 +359,6 @@ let $wait_condition=
|
||||
--echo # Waiting until INSERT ... is blocked
|
||||
--source include/wait_condition.inc
|
||||
DELETE FROM t1;
|
||||
COMMIT;
|
||||
|
||||
--echo # Connection con2
|
||||
--connection con2
|
||||
@@ -368,6 +367,14 @@ COMMIT;
|
||||
--reap
|
||||
--error ER_XA_RBDEADLOCK
|
||||
XA COMMIT 'xid1';
|
||||
|
||||
--echo # Connection default
|
||||
connection default;
|
||||
|
||||
COMMIT;
|
||||
|
||||
--echo # Connection con2
|
||||
connection con2;
|
||||
# This caused the assert to be triggered
|
||||
XA START 'xid1';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user