Commit cb4da5da authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error

Added indication of truncated string for "s" and "M" formats
parent a1846b7a
......@@ -503,7 +503,7 @@ static void find_tool(char *tool_executable_name, const char *tool_name,
len= (int)(last_fn_libchar - self_name);
my_snprintf(tool_executable_name, FN_REFLEN, "%.*s%c%s",
my_snprintf(tool_executable_name, FN_REFLEN, "%.*b%c%s",
len, self_name, FN_LIBCHAR, tool_name);
}
......
......@@ -588,8 +588,7 @@ static void cleanup_and_exit(int exit_code);
ATTRIBUTE_NORETURN
void really_die(const char *msg);
void report_or_die(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
ATTRIBUTE_NORETURN ATTRIBUTE_FORMAT(printf, 1, 2)
void report_or_die(const char *fmt, ...);
void die(const char *fmt, ...);
static void make_error_message(char *buf, size_t len, const char *fmt, va_list args);
ATTRIBUTE_NORETURN ATTRIBUTE_FORMAT(printf, 1, 2)
......@@ -717,7 +716,7 @@ class LogFile {
DBUG_ASSERT(ds->str);
#ifdef EXTRA_DEBUG
DBUG_PRINT("extra", ("str: %*s", (int) ds->length, ds->str));
DBUG_PRINT("extra", ("str: %*b", (int) ds->length, ds->str));
#endif
if (fwrite(ds->str, 1, ds->length, m_file) != ds->length)
......@@ -1312,7 +1311,7 @@ void check_command_args(struct st_command *command,
/* Check required arg */
if (arg->ds->length == 0 && arg->required)
die("Missing required argument '%s' to command '%.*s'", arg->argname,
die("Missing required argument '%s' to command '%.*b'", arg->argname,
command->first_word_len, command->query);
}
......@@ -1321,7 +1320,7 @@ void check_command_args(struct st_command *command,
while(ptr <= command->end && *ptr != '#')
{
if (*ptr && *ptr != ' ')
die("Extra argument '%s' passed to '%.*s'",
die("Extra argument '%s' passed to '%.*b'",
ptr, command->first_word_len, command->query);
ptr++;
}
......@@ -1341,7 +1340,7 @@ void handle_command_error(struct st_command *command, uint error,
if (command->abort_on_error)
{
report_or_die("command \"%.*s\" failed with error: %u my_errno: %d "
report_or_die("command \"%.*b\" failed with error: %u my_errno: %d "
"errno: %d",
command->first_word_len, command->query, error, my_errno,
sys_errno);
......@@ -1359,7 +1358,7 @@ void handle_command_error(struct st_command *command, uint error,
DBUG_VOID_RETURN;
}
if (command->expected_errors.count > 0)
report_or_die("command \"%.*s\" failed with wrong error: %u "
report_or_die("command \"%.*b\" failed with wrong error: %u "
"my_errno: %d errno: %d",
command->first_word_len, command->query, error, my_errno,
sys_errno);
......@@ -1368,7 +1367,7 @@ void handle_command_error(struct st_command *command, uint error,
command->expected_errors.err[0].code.errnum != 0)
{
/* Error code we wanted was != 0, i.e. not an expected success */
report_or_die("command \"%.*s\" succeeded - should have failed with "
report_or_die("command \"%.*b\" succeeded - should have failed with "
"errno %d...",
command->first_word_len, command->query,
command->expected_errors.err[0].code.errnum);
......@@ -2322,7 +2321,7 @@ static int strip_surrounding(char* str, char c1, char c2)
static void strip_parentheses(struct st_command *command)
{
if (strip_surrounding(command->first_argument, '(', ')'))
die("%.*s - argument list started with '%c' must be ended with '%c'",
die("%.*b - argument list started with '%c' must be ended with '%c'",
command->first_word_len, command->query, '(', ')');
}
......@@ -2978,7 +2977,7 @@ void eval_expr(VAR *v, const char *p, const char **p_end,
/* Make sure there was just a $variable and nothing else */
const char* end= *p_end + 1;
if (end < expected_end && !open_end)
die("Found junk '%.*s' after $variable in expression",
die("Found junk '%.*b' after $variable in expression",
(int)(expected_end - end - 1), end);
DBUG_VOID_RETURN;
......@@ -3472,10 +3471,10 @@ int do_modify_var(struct st_command *command,
const char *p= command->first_argument;
VAR* v;
if (!*p)
die("Missing argument to %.*s", command->first_word_len,
die("Missing argument to %.*b", command->first_word_len,
command->query);
if (*p != '$')
die("The argument to %.*s must be a variable (start with $)",
die("The argument to %.*b must be a variable (start with $)",
command->first_word_len, command->query);
v= var_get(p, &p, 1, 0);
if (! v->is_int)
......@@ -4753,18 +4752,18 @@ void do_sync_with_master2(struct st_command *command, long offset,
information is not initialized, the arguments are
incorrect, or an error has occurred
*/
die("%.*s failed: '%s' returned NULL " \
die("%.*b failed: '%s' returned NULL " \
"indicating slave SQL thread failure",
command->first_word_len, command->query, query_buf);
}
if (result == -1)
die("%.*s failed: '%s' returned -1 " \
die("%.*b failed: '%s' returned -1 " \
"indicating timeout after %d seconds",
command->first_word_len, command->query, query_buf, timeout);
else
die("%.*s failed: '%s' returned unknown result :%d",
die("%.*b failed: '%s' returned unknown result :%d",
command->first_word_len, command->query, query_buf, result);
}
......@@ -4929,17 +4928,17 @@ int do_sleep(struct st_command *command, my_bool real_sleep)
while (my_isspace(charset_info, *p))
p++;
if (!*p)
die("Missing argument to %.*s", command->first_word_len,
die("Missing argument to %.*b", command->first_word_len,
command->query);
sleep_start= p;
/* Check that arg starts with a digit, not handled by my_strtod */
if (!my_isdigit(charset_info, *sleep_start))
die("Invalid argument to %.*s \"%s\"", command->first_word_len,
die("Invalid argument to %.*b \"%s\"", command->first_word_len,
command->query, sleep_start);
sleep_val= my_strtod(sleep_start, &sleep_end, &error);
check_eol_junk_line(sleep_end);
if (error)
die("Invalid argument to %.*s \"%s\"", command->first_word_len,
die("Invalid argument to %.*b \"%s\"", command->first_word_len,
command->query, command->first_argument);
dynstr_free(&ds_sleep);
......@@ -5942,7 +5941,7 @@ void do_connect(struct st_command *command)
csname= strdup(con_options + sizeof("CHARSET=") - 1);
}
else
die("Illegal option to connect: %.*s",
die("Illegal option to connect: %.*b",
(int) (end - con_options), con_options);
/* Process next option */
con_options= end;
......@@ -6269,7 +6268,7 @@ void do_block(enum block_cmd cmd, struct st_command* command)
enum block_op operand= find_operand(curr_ptr);
if (operand == ILLEG_OP)
die("Found junk '%.*s' after $variable in condition",
die("Found junk '%.*b' after $variable in condition",
(int)(expr_end - curr_ptr), curr_ptr);
/* We could silently allow this, but may be confusing */
......@@ -9466,6 +9465,7 @@ int main(int argc, char **argv)
case Q_LET: do_let(command); break;
case Q_EVAL_RESULT:
die("'eval_result' command is deprecated");
break; // never called but keep compiler calm
case Q_EVAL:
case Q_EVALP:
case Q_QUERY_VERTICAL:
......
......@@ -1092,9 +1092,9 @@ drop trigger имя_триггера_в_кодировке_утф8_длиной_
create trigger
очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66
before insert on имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66;
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
create procedure имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
begin
end;
......@@ -1106,7 +1106,7 @@ drop procedure имя_процедуры_в_кодировке_утф8_длин
create procedure очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66()
begin
end;
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
create function имя_функции_в_кодировке_утф8_длиной_больше_чем_49()
returns int
return 0;
......@@ -1118,7 +1118,7 @@ drop function имя_функции_в_кодировке_утф8_длиной_
create function очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66()
returns int
return 0;
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
drop view имя_вью_кодировке_утф8_длиной_больше_чем_42;
drop table имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
set @@character_set_client=@save_character_set_client;
......
......@@ -8,7 +8,7 @@ CHECK TABLE maria050313_utf8_croatian_ci FOR UPGRADE;
Table Op Msg_type Msg_text
test.maria050313_utf8_croatian_ci check error Upgrade required. Please do "REPAIR TABLE `maria050313_utf8_croatian_ci`" or dump/reload to fix it!
SHOW CREATE TABLE maria050313_utf8_croatian_ci;
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.maria050313_utf8_croatian_c` FORCE" or dump/reload to fix it!
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.maria050313_utf8_croatia...` FORCE" or dump/reload to fix it!
REPAIR TABLE maria050313_utf8_croatian_ci;
Table Op Msg_type Msg_text
test.maria050313_utf8_croatian_ci repair status OK
......@@ -45,7 +45,7 @@ CHECK TABLE maria050313_ucs2_croatian_ci_def FOR UPGRADE;
Table Op Msg_type Msg_text
test.maria050313_ucs2_croatian_ci_def check error Upgrade required. Please do "REPAIR TABLE `maria050313_ucs2_croatian_ci_def`" or dump/reload to fix it!
SELECT count(*) FROM maria050313_ucs2_croatian_ci_def;
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.maria050313_ucs2_croatian_c` FORCE" or dump/reload to fix it!
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.maria050313_ucs2_croatia...` FORCE" or dump/reload to fix it!
REPAIR TABLE maria050313_ucs2_croatian_ci_def;
Table Op Msg_type Msg_text
test.maria050313_ucs2_croatian_ci_def repair status OK
......
......@@ -217,7 +217,7 @@ a
2
drop table t1;
select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mx...' at line 1
create table t1 (a int);
insert into t1 values (1),(2),(3);
update (select * from t1) as t1 set a = 5;
......
......@@ -31,13 +31,13 @@ table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28;
ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table'
ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.ta...'
drop table table1, table2, table3, table4, table5, table6,
table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28, table29, table30;
ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table'
ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.ta...'
use test;
drop database mysqltest;
flush tables with read lock;
......
......@@ -1261,7 +1261,7 @@ select id from t1 where column_get(str,4 as char(100)) = repeat("a", 100);
id
5
Warnings:
Warning 1292 Truncated incorrect CHAR(100) value: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
Warning 1292 Truncated incorrect CHAR(100) value: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...'
update t1 set str=column_add(str, 4, repeat("b", 10000)) where id=5;
select id from t1 where column_get(str,4 as char(100000)) = repeat("b", 10000);
id
......
......@@ -172,7 +172,20 @@ UPDATE t1 SET a = 'new'
WHERE COLUMN_CREATE( 1, 'v', 1, 'w' ) IS NULL;
ERROR 22007: Illegal value used as argument of dynamic column function
drop table t1;
set @max_session_mem_used_save= @@max_session_mem_used;
set max_session_mem_used = 50000;
select * from seq_1_to_1000;
set max_session_mem_used = 8192;
select * from seq_1_to_1000;
set max_session_mem_used = @max_session_mem_used_save;
#
# MDEV-20604: Duplicate key value is silently truncated to 64
# characters in print_keydup_error
#
create table t1 (a varchar(100), UNIQUE KEY akey (a));
insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
# The value in the error message should show truncation with "..."
insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
ERROR 23000: Duplicate entry '1234567890123456789012345678901234567890123456789012345678901...' for key 'akey'
drop table t1;
# End of 10.2 tests
......@@ -348,7 +348,7 @@ drop event имя_события_в_кодировке_утф8_длиной_бо
create event
очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66
on schedule every 2 year do select 1;
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long
create event event_35981 on schedule every 6 month on completion preserve
disable
do
......
......@@ -2110,8 +2110,8 @@ avg(export_set( 3, 'y', sha(i))) group_concat(d)
0 2008-10-02
0 2010-12-12
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'y,y,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428ab,3'
Warning 1292 Truncated incorrect DOUBLE value: 'y,y,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b0,d'
Warning 1292 Truncated incorrect DOUBLE value: 'y,y,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428a...'
Warning 1292 Truncated incorrect DOUBLE value: 'y,y,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b...'
drop table t1;
#
# MDEV-4290: crash in st_select_lex::mark_as_dependent
......
......@@ -727,7 +727,7 @@ foo
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '53064635.445796e3130837'
Warning 1292 Truncated incorrect DOUBLE value: '179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,'
Warning 1292 Truncated incorrect DOUBLE value: '179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,0...'
#
# Bug #58137 char(0) column cause:
# my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed
......@@ -939,13 +939,13 @@ STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1))))
NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: '98e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde242'
Warning 1292 Truncated incorrect DOUBLE value: '98e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde...'
Warning 1292 Truncated incorrect DOUBLE value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315'
Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e...'
Warning 1292 Truncated incorrect DOUBLE value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: '7b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b527974-1379790335835635712b4dd517b6'
Warning 1292 Truncated incorrect DOUBLE value: '7b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b527974-1379790335835635712b4dd51...'
Warning 1292 Truncated incorrect DOUBLE value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e1'
Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b...'
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(128));
INSERT INTO t1 VALUES ('1e310');
......
......@@ -815,13 +815,13 @@ select release_lock(repeat('a', 192));
release_lock(repeat('a', 192))
1
select get_lock(repeat('a', 193), 0);
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long
select is_used_lock(repeat('a', 193));
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long
select is_free_lock(repeat('a', 193));
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long
select release_lock(repeat('a', 193));
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long
# --
# -- WL#5787: IPv6-capable INET_ATON and INET_NTOA functions.
......
......@@ -2947,7 +2947,7 @@ Warnings:
Warning 1292 Truncated incorrect INTEGER value: '511993d3c99719e38a6779073019dacd7178ddb9'
Warning 1292 Truncated incorrect DECIMAL value: '[.DC2.]'
Warning 1292 Truncated incorrect INTEGER value: '511993d3c99719e38a6779073019dacd7178ddb9'
Warning 1292 Truncated incorrect DOUBLE value: '0.000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
Warning 1292 Truncated incorrect DOUBLE value: '0.000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...'
connection conn1;
SET @@global.max_allowed_packet:= @tmp_max;
disconnect newconn;
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ grant select on `a%`.* to user1@localhost with grant option;
connect conn1,localhost,user1,,;
connection conn1;
grant file on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.* to 'user'@'%' identified by 'secret';
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...'
connection default;
disconnect conn1;
drop user user1@localhost;
......
......@@ -177,7 +177,7 @@ ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errn
The commands reported in the bug report
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
Too long dbname
ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...'
Too long hostname
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
1
......
......@@ -851,7 +851,7 @@ partition x2 values in (3, 11, 5, 7) tablespace ts2,
partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
ERROR 42000: Partitioning can not be used stand-alone in query near 'partition by list (a)
partitions 3
(partition x1 values in (1,2,9,4) tablespace ' at line 1
(partition x1 values in (1,2,9,4) tablespa...' at line 1
CREATE TABLE t1 (
a int not null,
b int not null,
......@@ -885,7 +885,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
partitions 3
(partition x1 tablespace ts1,
partition x2 tablespace ts2,
part' at line 6
p...' at line 6
CREATE TABLE t1 (
a int not null,
b int not null,
......@@ -965,7 +965,7 @@ partitions 2
(partition x1 values less than (0), partition x2 values less than (2));
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
partitions 2
(partition x1 values less than (0), partition x2 values less than' at line 6
(partition x1 values less than (0), partition x2 values less t...' at line 6
CREATE TABLE t1 (
a int not null,
b int not null,
......@@ -1114,7 +1114,7 @@ subpartition by key (a+b)
partition x2 values less than (2) (subpartition x21, subpartition x22));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '+b)
(partition x1 values less than (1) (subpartition x11, subpartition x12),
par' at line 7
...' at line 7
CREATE TABLE t1 (
a int not null,
b int not null,
......@@ -1284,7 +1284,7 @@ subpartition x22 nodegroup 1)
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
partition x2 values in (3,5,6)
( subpartition x21 nodegroup 0,
subpartition x' at line 11
subpartitio...' at line 11
CREATE TABLE t1 (
a int not null,
b int not null,
......@@ -1319,7 +1319,7 @@ subpartition x22 engine myisam)
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'list (a+b)
( partition x1
( subpartition x11 engine myisam,
subpartition x12 eng' at line 7
subpartition x12 ...' at line 7
CREATE TABLE t1 (
a int not null,
b int not null,
......@@ -1337,7 +1337,7 @@ subpartition x22 engine myisam values in (1))
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'list (a+b)
( partition x1
( subpartition x11 engine myisam values in (0),
subpar' at line 7
sub...' at line 7
CREATE TABLE t1 (
a int not null,
b int not null,
......
......@@ -2347,21 +2347,21 @@ DECLARE céèçà foo CONDITION FOR SQLSTATE '12345';
SIGNAL céèçà SET MYSQL_ERRNO = 1000;
end $$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '©Ã¨Ã§Ã  foo CONDITION FOR SQLSTATE '12345';
SIGNAL céèçà SET ' at line 3
SIGNAL céèçà S...' at line 3
create procedure test_signal()
begin
DECLARE "céèçà" CONDITION FOR SQLSTATE '12345';
SIGNAL "céèçà" SET MYSQL_ERRNO = 1000;
end $$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"céèçà" CONDITION FOR SQLSTATE '12345';
SIGNAL "céèçà" S' at line 3
SIGNAL "céèçà...' at line 3
create procedure test_signal()
begin
DECLARE 'céèçà' CONDITION FOR SQLSTATE '12345';
SIGNAL 'céèçà' SET MYSQL_ERRNO = 1000;
end $$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''céèçà' CONDITION FOR SQLSTATE '12345';
SIGNAL 'céèçà' S' at line 3
SIGNAL 'céèçà...' at line 3
create procedure test_signal()
begin
DECLARE `céèçà` CONDITION FOR SQLSTATE '12345';
......
......@@ -1716,17 +1716,17 @@ DROP TABLE t1;
# WITH OBSCURE QUERY
#
SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long
CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long
SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func();
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...'
CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc();
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...'
SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long
CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long
End of 5.1 tests
#
# Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP
......
......@@ -5302,7 +5302,7 @@ CREATE DEFINER=longer_than_80_45678901234567890123456789012345678901234567890123
BEGIN
SET @a = 1;
END|
ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80)
ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80)
CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY
FUNCTION bug16899_f1() RETURNS INT
BEGIN
......
......@@ -1185,7 +1185,7 @@ CREATE TABLE t1(c INT);
CREATE TABLE t2(c INT);
CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost
TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1;
ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80)
ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80)
CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY
TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW SET @a = 2;
ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
......
......@@ -2954,7 +2954,7 @@ DROP VIEW IF EXISTS v2;
CREATE TABLE t1(a INT, b INT);
CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost
VIEW v1 AS SELECT a FROM t1;
ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80)
ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80)
CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY
VIEW v2 AS SELECT b FROM t1;
ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
......
......@@ -1007,11 +1007,11 @@ Warning 1292 Truncated incorrect INTEGER value: 'string '
Warning 1292 Truncated incorrect INTEGER value: 'string '
DROP PROCEDURE spxml;
select UpdateXML('<a>a</a>',repeat('a b ',1000),'');
ERROR HY000: XPATH syntax error: 'b a b a b a b a b a b a b a b a '
ERROR HY000: XPATH syntax error: 'b a b a b a b a b a b a b a b...'
select ExtractValue('<a>a</a>', '/a[@x=@y0123456789_0123456789_0123456789_0123456789]');
ERROR HY000: XPATH error: comparison of two nodesets is not supported: '=@y0123456789_0123456789_0123456'
ERROR HY000: XPATH error: comparison of two nodesets is not supported: '=@y0123456789_0123456789_0123...'
select ExtractValue('<a>a</a>', '/a[@x=$y0123456789_0123456789_0123456789_0123456789]');
ERROR HY000: Unknown XPATH variable at: '$y0123456789_0123456789_01234567'
ERROR HY000: Unknown XPATH variable at: '$y0123456789_0123456789_01234...'
select updatexml(NULL, 1, 1), updatexml(1, NULL, 1), updatexml(1, 1, NULL);
updatexml(NULL, 1, 1) updatexml(1, NULL, 1) updatexml(1, 1, NULL)
NULL NULL NULL
......@@ -1110,9 +1110,9 @@ NULL
# Bug#57279 updatexml dies with: Assertion failed: str_arg[length] == 0
#
SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1);
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...' value found during parsing
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...' value found during parsing
#
# Bug #44332 my_xml_scan reads behind the end of buffer
#
......
......@@ -488,8 +488,7 @@ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK SQLSTATE '23000';
END;
DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
' at line 5
DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5
CREATE PROCEDURE h1 ()
BEGIN
DECLARE x1 INT DEFAULT 0;
......@@ -522,8 +521,7 @@ SELECT 'end of 1';
end;//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo handler for sqlexception select '1';
select * from tqq;
SELECT 'end of 1';
' at line 3
SELECT 'end of 1...' at line 3
create procedure p1 ()
begin
declare exit handler for sqlexception select 'exit handler 1';
......
......@@ -3569,7 +3569,7 @@ DROP VIEW v1;
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1
FROM test.tb2 my_table WITH CASCADED CHE...' at line 1
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60
......@@ -3598,7 +3598,7 @@ FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1
FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60
......
......@@ -489,8 +489,7 @@ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK SQLSTATE '23000';
END;
DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
' at line 5
DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5
CREATE PROCEDURE h1 ()
BEGIN
DECLARE x1 INT DEFAULT 0;
......@@ -523,8 +522,7 @@ SELECT 'end of 1';
end;//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo handler for sqlexception select '1';
select * from tqq;
SELECT 'end of 1';
' at line 3
SELECT 'end of 1...' at line 3
create procedure p1 ()
begin
declare exit handler for sqlexception select 'exit handler 1';
......
......@@ -3570,7 +3570,7 @@ DROP VIEW v1;
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1
FROM test.tb2 my_table WITH CASCADED CHE...' at line 1
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60
......@@ -3599,7 +3599,7 @@ FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1
FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60
......
......@@ -489,8 +489,7 @@ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK SQLSTATE '23000';
END;
DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1;
' at line 5
DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5
CREATE PROCEDURE h1 ()
BEGIN
DECLARE x1 INT DEFAULT 0;
......@@ -523,8 +522,7 @@ SELECT 'end of 1';
end;//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo handler for sqlexception select '1';
select * from tqq;
SELECT 'end of 1';
' at line 3
SELECT 'end of 1...' at line 3
create procedure p1 ()
begin
declare exit handler for sqlexception select 'exit handler 1';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -700,7 +700,7 @@ ERROR 42000: Incorrect table definition; there can be only one auto column and i
create table t1 (c char(255), primary key(c(90)));
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 'PRIMARY'
ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi...' for key 'PRIMARY'
drop table t1;
CREATE TABLE t1 (a int, key(a)) engine=heap;
insert into t1 values (0);
......
......@@ -198,11 +198,11 @@ t3 CREATE TABLE `t3` (
ALTER TABLE t3 CHANGE
`1234567890123456789012345678901234567890123456789012345678901234`
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾倿偀` INT;
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借' is too long
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借...' is too long
ALTER TABLE t3 CHANGE
`1234567890123456789012345678901234567890123456789012345678901234`
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾倿ä` INT;
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借' is too long
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借...' is too long
ALTER TABLE t3 CHANGE
`1234567890123456789012345678901234567890123456789012345678901234`
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾ä` INT;
......@@ -210,7 +210,7 @@ ALTER TABLE t3 CHANGE
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾Ä`
c3 INT;
ALTER TABLE t3 CHANGE c3 𐌀𐌁𐌂𐌃𐌄𐌅𐌆𐌇𐌈𐌉𐌊𐌋𐌌𐌍𐌎𐌏𐌐𐌑𐌒𐌓𐌔𐌕𐌖𐌗𐌘𐌙𐌚𐌛𐌜 INT;
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\x83'
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\...'
ALTER TABLE t3 CHANGE c3 😲 INT;
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x9F\x98\xB2'
ALTER TABLE t3 RENAME TO t2;
......
......@@ -323,11 +323,11 @@ t3 CREATE TABLE `t3` (
ALTER TABLE t3 CHANGE
`1234567890123456789012345678901234567890123456789012345678901234`
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾倿偀` INT;
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借' is too long
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借...' is too long
ALTER TABLE t3 CHANGE
`1234567890123456789012345678901234567890123456789012345678901234`
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾倿ä` INT;
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借' is too long
ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借...' is too long
ALTER TABLE t3 CHANGE
`1234567890123456789012345678901234567890123456789012345678901234`
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾ä` INT;
......@@ -369,7 +369,7 @@ t3.isl
t1c.ibd
t3.ibd
ALTER TABLE t3 CHANGE c3 𐌀𐌁𐌂𐌃𐌄𐌅𐌆𐌇𐌈𐌉𐌊𐌋𐌌𐌍𐌎𐌏𐌐𐌑𐌒𐌓𐌔𐌕𐌖𐌗𐌘𐌙𐌚𐌛𐌜 INT;
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\x83'
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\...'
ALTER TABLE t3 CHANGE c3 😲 INT;
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x9F\x98\xB2'
ALTER TABLE t3 RENAME TO t2;
......
......@@ -998,7 +998,7 @@ ST_GEOMFROMTEXT(
SELECT 1 FROM t1 WHERE a <> (SELECT ST_GEOMETRYCOLLECTIONFROMWKB(b) FROM t1);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x06\x00\x00\x00\x01\x00\x00\x00\x01\x03\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x06\x00\x00\x00\x01\x00\x00\x00\x01\x03\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\...'
DROP TABLE t1;
#
# Bug #49250 : spatial btree index corruption and crash
......
......@@ -269,7 +269,7 @@ c1 ST_Astext(c2) ST_Astext(c4)
9 POINT(120 120) POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))
UPDATE tab SET c2 = ST_GeomFromText('POINT(4000 4000)')
WHERE MBRIntersects(tab.c4, @g1);
ERROR 23000: Duplicate entry '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00@\xAF@\x' for key 'PRIMARY'
ERROR 23000: Duplicate entry '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00@\xAF...' for key 'PRIMARY'
SELECT c1,ST_Astext(c2),ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1;
c1 ST_Astext(c2) ST_Astext(c4)
7 POINT(60 70) POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010))
......
......@@ -535,7 +535,7 @@ LINESTRING(10 10,20 20,30 30) LINESTRING(10 10,20 20,30 30)
DELETE FROM tab
Where c8=c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))')));
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x07\x00\x00\x00\x02\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF'
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x07\x00\x00\x00\x02\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00...'
#check the data, should 0
SELECT COUNT(*) FROM tab;
COUNT(*)
......
......@@ -994,7 +994,7 @@ ST_GEOMFROMTEXT(
SELECT 1 FROM t1 WHERE a <> (SELECT ST_GEOMETRYCOLLECTIONFROMWKB(b) FROM t1);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x06\x00\x00\x00\x01\x00\x00\x00\x01\x03\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x06\x00\x00\x00\x01\x00\x00\x00\x01\x03\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\...'
DROP TABLE t1;
#
# Bug #49250 : spatial btree index corruption and crash
......
......@@ -1092,7 +1092,7 @@ col_1_varchar = REPEAT("c", 4000)
ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' for key 'PRIMARY'
DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
col_1_varchar = REPEAT("c", 4000)
......@@ -1123,7 +1123,7 @@ ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' for key 'PRIMARY'
DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
col_1_varchar = REPEAT("c", 4000)
......@@ -1387,7 +1387,7 @@ REPEAT("o", 4000));
INSERT INTO worklog5743
VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000));
ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000));
ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' for key 'PRIMARY'
DROP TABLE worklog5743;
set global innodb_large_prefix=0;
Warnings:
......
......@@ -24,5 +24,5 @@ SUBPARTITION BY HASH ( id2 )
SUBPARTITIONS 2 (
PARTITION çççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç VALUES LESS THAN (1000) ENGINE = InnoDB,
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB);
ERROR HY000: The path specified for @0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@ is too long
ERROR HY000: The path specified for @0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@... is too long
drop database mysqltest1;
......@@ -22,12 +22,12 @@ set global server_audit_file_path='server_audit.log';
set global server_audit_output_type=file;
set global server_audit_logging=on;
set global server_audit_incl_users= repeat("'root',", 10000);
ERROR 42000: Variable 'server_audit_incl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','roo'
ERROR 42000: Variable 'server_audit_incl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','...'
show variables like 'server_audit_incl_users';
Variable_name Value
server_audit_incl_users
set global server_audit_excl_users= repeat("'root',", 10000);
ERROR 42000: Variable 'server_audit_excl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','roo'
ERROR 42000: Variable 'server_audit_excl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','...'
show variables like 'server_audit_excl_users';
Variable_name Value
server_audit_excl_users
......
......@@ -15,7 +15,7 @@ GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1-01234'@'localhost' WITH GRANT OPTION;
# Test the max lengths of user and host names
# the user name is too long
GRANT CREATE USER ON *.* TO '012345678901234567890123456789012345678901234567890123456789012345678901234567890'@'fakehost';
ERROR HY000: String '0123456789012345678901234567890123456789012345678901234567890123456789' is too long for user name (should be no longer than 80)
ERROR HY000: String '0123456789012345678901234567890123456789012345678901234567890123456...' is too long for user name (should be no longer than 80)
# the host name is too long
GRANT CREATE USER ON *.* TO 'fakename'@'0123456789012345678901234567890123456789012345678901234567890';
ERROR HY000: String '0123456789012345678901234567890123456789012345678901234567890' is too long for host name (should be no longer than 60)
......
......@@ -24,11 +24,11 @@ set sql_log_bin=1;
connection slave;
include/stop_slave.inc
change master to master_user='rpl33',master_password='0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef!';
ERROR HY000: String '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012345' is too long for MASTER_PASSWORD (should be no longer than 96)
ERROR HY000: String '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012...' is too long for MASTER_PASSWORD (should be no longer than 96)
change master to master_user='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long for MASTER_USER (should be no longer than 128)
ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long for MASTER_USER (should be no longer than 128)
change master to master_host='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc';
ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbb' is too long for MASTER_HOST (should be no longer than 60)
ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb...' is too long for MASTER_HOST (should be no longer than 60)
connection master;
set sql_log_bin=0;
grant replication slave on *.* to rpl16cyr@127.0.0.1 identified by 'воттакойужпарольвоттакойужпарольвоттакойужпароль';
......@@ -50,7 +50,7 @@ set sql_log_bin=1;
connection slave;
include/stop_slave.inc
change master to master_user='rpl17mix',master_password='воттакойужпарольвоттакойужпарольвоттакойужпароль!';
ERROR HY000: String 'воттакойужпарольвоттакойужпарольвот' is too long for MASTER_PASSWORD (should be no longer than 96)
ERROR HY000: String 'воттакойужпарольвоттакойужпарольв...' is too long for MASTER_PASSWORD (should be no longer than 96)
connection master;
set sql_log_bin=0;
drop user rpl32@127.0.0.1, rpl33@127.0.0.1, rpl16cyr@127.0.0.1, rpl17mix@127.0.0.1;
......
......@@ -10,7 +10,7 @@ connection master;
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a;
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
......@@ -19,7 +19,7 @@ t1 CREATE TABLE `t1` (
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a;
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...'
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
......
......@@ -36,7 +36,7 @@ SELECT @@global.innodb_compression_failure_threshold_pct;
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_compression_failure_threshold_pct = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '-1'
Warning 1292 Truncated incorrect innodb_compression_failure_th... value: '-1'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
......@@ -57,7 +57,7 @@ SELECT @@global.innodb_compression_failure_threshold_pct;
0
SET @@global.innodb_compression_failure_threshold_pct = 101;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '101'
Warning 1292 Truncated incorrect innodb_compression_failure_th... value: '101'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
100
......
......@@ -19,13 +19,13 @@ SELECT @@global.innodb_defragment_fill_factor_n_recs;
1
SET @@global.innodb_defragment_fill_factor_n_recs = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_defragment_fill_factor_n_ value: '-1'
Warning 1292 Truncated incorrect innodb_defragment_fill_factor... value: '-1'
SELECT @@global.innodb_defragment_fill_factor_n_recs;
@@global.innodb_defragment_fill_factor_n_recs
1
SET @@global.innodb_defragment_fill_factor_n_recs = 10000;
Warnings:
Warning 1292 Truncated incorrect innodb_defragment_fill_factor_n_ value: '10000'
Warning 1292 Truncated incorrect innodb_defragment_fill_factor... value: '10000'
SELECT @@global.innodb_defragment_fill_factor_n_recs;
@@global.innodb_defragment_fill_factor_n_recs
100
......
......@@ -49,7 +49,7 @@ set global innodb_limit_optimistic_insert_debug='foo';
ERROR 42000: Incorrect argument type to variable 'innodb_limit_optimistic_insert_debug'
set global innodb_limit_optimistic_insert_debug=-2;
Warnings:
Warning 1292 Truncated incorrect innodb_limit_optimistic_insert_d value: '-2'
Warning 1292 Truncated incorrect innodb_limit_optimistic_inser... value: '-2'
set global innodb_limit_optimistic_insert_debug=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_limit_optimistic_insert_debug'
SET @@global.innodb_limit_optimistic_insert_debug = @start_global_value;
......
......@@ -10,13 +10,13 @@ SELECT @@global.innodb_merge_threshold_set_all_debug;
1
set global innodb_merge_threshold_set_all_debug = 51;
Warnings:
Warning 1292 Truncated incorrect innodb_merge_threshold_set_all_d value: '51'
Warning 1292 Truncated incorrect innodb_merge_threshold_set_al... value: '51'
SELECT @@global.innodb_merge_threshold_set_all_debug;
@@global.innodb_merge_threshold_set_all_debug
50
set global innodb_merge_threshold_set_all_debug = 0;
Warnings:
Warning 1292 Truncated incorrect innodb_merge_threshold_set_all_d value: '0'
Warning 1292 Truncated incorrect innodb_merge_threshold_set_al... value: '0'
SELECT @@global.innodb_merge_threshold_set_all_debug;
@@global.innodb_merge_threshold_set_all_debug
1
......
......@@ -36,13 +36,13 @@ SELECT @@global.innodb_purge_rseg_truncate_frequency;
'#--------------------FN_DYNVARS_046_05-------------------------#'
SET @@global.innodb_purge_rseg_truncate_frequency = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '-1'
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1'
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
SET @@global.innodb_purge_rseg_truncate_frequency = -1024;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '-1024'
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1024'
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
......@@ -103,7 +103,7 @@ SELECT @@global.innodb_purge_rseg_truncate_frequency;
1
SET @@global.innodb_purge_rseg_truncate_frequency = FALSE;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '0'
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '0'
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
......
......@@ -45,7 +45,7 @@ select @@global.innodb_stats_persistent_sample_pages;
20
SET global innodb_stats_persistent_sample_pages=0;
Warnings:
Warning 1292 Truncated incorrect innodb_stats_persistent_sample_p value: '0'
Warning 1292 Truncated incorrect innodb_stats_persistent_sampl... value: '0'
SELECT @@global.innodb_stats_persistent_sample_pages;
@@global.innodb_stats_persistent_sample_pages
1
......@@ -71,7 +71,7 @@ SELECT @@global.innodb_stats_persistent_sample_pages;
10
SET global innodb_stats_persistent_sample_pages=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_stats_persistent_sample_p value: '-7'
Warning 1292 Truncated incorrect innodb_stats_persistent_sampl... value: '-7'
SELECT @@global.innodb_stats_persistent_sample_pages;
@@global.innodb_stats_persistent_sample_pages
1
......
......@@ -53,7 +53,7 @@ SET global innodb_stats_transient_sample_pages=' ';
ERROR 42000: Incorrect argument type to variable 'innodb_stats_transient_sample_pages'
SET global innodb_stats_transient_sample_pages=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_stats_transient_sample_pa value: '-7'
Warning 1292 Truncated incorrect innodb_stats_transient_sample... value: '-7'
SELECT @@global.innodb_stats_transient_sample_pages;
@@global.innodb_stats_transient_sample_pages
1
......
......@@ -24,11 +24,11 @@ ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir'
set global innodb_tmpdir=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir'
set global innodb_tmpdir=repeat('a',1000);
ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...'
show warnings;
Level Code Message
Warning 1210 Path length should not exceed 512 bytes
Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...'
SET @@global.innodb_tmpdir = @start_global_value;
SELECT @@global.innodb_tmpdir;
@@global.innodb_tmpdir
......
......@@ -30,7 +30,7 @@ SELECT @@global.optimizer_selectivity_sampling_limit;
100
SET @@global.optimizer_selectivity_sampling_limit = 9;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '9'
Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '9'
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
10
......@@ -56,7 +56,7 @@ SELECT @@global.optimizer_selectivity_sampling_limit;
4294967295
SET @@global.optimizer_selectivity_sampling_limit = 4294967296;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '4294967296'
Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '4294967296'
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
4294967295
......@@ -66,7 +66,7 @@ SELECT @@session.optimizer_selectivity_sampling_limit;
100
SET @@session.optimizer_selectivity_sampling_limit = 9;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '9'
Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '9'
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
10
......@@ -92,7 +92,7 @@ SELECT @@session.optimizer_selectivity_sampling_limit;
4294967295
SET @@session.optimizer_selectivity_sampling_limit = 4294967296;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '4294967296'
Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '4294967296'
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
4294967295
......
......@@ -3,7 +3,7 @@ SET @start_session_value = @@session.optimizer_use_condition_selectivity;
'#--------------------FN_DYNVARS_115_03-------------------------#'
SET @@global.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '0'
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
1
......@@ -29,14 +29,14 @@ SELECT @@global.optimizer_use_condition_selectivity;
5
SET @@global.optimizer_use_condition_selectivity = 6;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '6'
Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '6'
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
5
'#--------------------FN_DYNVARS_115_04-------------------------#'
SET @@session.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '0'
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
1
......@@ -62,7 +62,7 @@ SELECT @@session.optimizer_use_condition_selectivity;
5
SET @@session.optimizer_use_condition_selectivity = 6;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '6'
Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '6'
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
5
......
......@@ -203,6 +203,8 @@ drop table t1;
#
# errors caused by max_session_mem_used
#
set @max_session_mem_used_save= @@max_session_mem_used;
--disable_result_log
set max_session_mem_used = 50000;
--error 0,ER_OPTION_PREVENTS_STATEMENT
......@@ -213,3 +215,22 @@ select * from seq_1_to_1000;
--enable_result_log
# We may not be able to execute any more queries with this connection
# because of too little memory#
set max_session_mem_used = @max_session_mem_used_save;
--echo #
--echo # MDEV-20604: Duplicate key value is silently truncated to 64
--echo # characters in print_keydup_error
--echo #
create table t1 (a varchar(100), UNIQUE KEY akey (a));
insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
--echo # The value in the error message should show truncation with "..."
--error ER_DUP_ENTRY
insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
drop table t1;
--echo # End of 10.2 tests
......@@ -761,7 +761,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
if (cmp_user && take_over_cmp)
{
ADD_ATOMIC(internal_stop_logging, 1);
CLIENT_ERROR(1, "User '%.*s' was removed from the"
CLIENT_ERROR(1, "User '%.*b' was removed from the"
" server_audit_excl_users.",
MYF(ME_JUST_WARNING), (int) cmp_length, users);
ADD_ATOMIC(internal_stop_logging, -1);
......@@ -771,7 +771,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
else if (cmp_user)
{
ADD_ATOMIC(internal_stop_logging, 1);
CLIENT_ERROR(1, "User '%.*s' is in the server_audit_incl_users, "
CLIENT_ERROR(1, "User '%.*b' is in the server_audit_incl_users, "
"so wasn't added.", MYF(ME_JUST_WARNING), (int) cmp_length, users);
ADD_ATOMIC(internal_stop_logging, -1);
remove_user(users);
......
......@@ -30,7 +30,7 @@ c2 c3
123.456000000000000000000000000000 0.000000000000000000000000000001
98765432109876543210987654321098765.432109876543210987654321098765 -123.456000000000000000000000000000
insert into t1 values(6,123.456,0.000000000000000000000000000001);
ERROR 23000: Duplicate entry '123.456000000000000000000000000000-0.000000000000000000000000000' for key 'uk1'
ERROR 23000: Duplicate entry '123.456000000000000000000000000000-0.000000000000000000000000...' for key 'uk1'
delete from t1 where c1 = 1;
insert into t1 values(1,123.456,0.000000000000000000000000000001);
drop table t1;
......@@ -7,7 +7,7 @@ INSERT INTO invalid_values VALUES('\'aaa\'');
INSERT INTO invalid_values VALUES('\'bbb\'');
SET @@global.rocksdb_compaction_readahead_size = -1;
Warnings:
Warning 1292 Truncated incorrect rocksdb_compaction_readahead_siz value: '-1'
Warning 1292 Truncated incorrect rocksdb_compaction_readahead_... value: '-1'
SELECT @@global.rocksdb_compaction_readahead_size;
@@global.rocksdb_compaction_readahead_size
0
......
......@@ -7,7 +7,7 @@ INSERT INTO invalid_values VALUES('\'aaa\'');
INSERT INTO invalid_values VALUES('\'bbb\'');
SET @@session.rocksdb_force_index_records_in_range = -1;
Warnings:
Warning 1292 Truncated incorrect rocksdb_force_index_records_in_r value: '-1'
Warning 1292 Truncated incorrect rocksdb_force_index_records_i... value: '-1'
SELECT @@session.rocksdb_force_index_records_in_range;
@@session.rocksdb_force_index_records_in_range
0
......
......@@ -97,5 +97,5 @@ Warnings:
Warning 1210 RocksDB: rocksdb_rate_limiter_bytes_per_sec cannot be dynamically changed to or from 0. Do a clean shutdown if you want to change it from or to 0.
SET @@global.rocksdb_rate_limiter_bytes_per_sec = -1;
Warnings:
Warning 1292 Truncated incorrect rocksdb_rate_limiter_bytes_per_s value: '-1'
Warning 1292 Truncated incorrect rocksdb_rate_limiter_bytes_pe... value: '-1'
Warning 1210 RocksDB: rocksdb_rate_limiter_bytes_per_sec cannot be dynamically changed to or from 0. Do a clean shutdown if you want to change it from or to 0.
......@@ -153,12 +153,15 @@ static const char *check_longlong(const char *fmt, uint *have_longlong)
*/
static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end,
char *par, size_t par_len, char quote_char)
char *par, size_t par_len, char quote_char,
my_bool cut)
{
char *last[3]= {0,0,0};
uint char_len;
char *start= to;
char *par_end= par + par_len;
size_t buff_length= (size_t) (end - to);
uint index= 0;
if (buff_length <= par_len)
goto err;
......@@ -167,6 +170,11 @@ static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end,
for ( ; par < par_end; par+= char_len)
{
uchar c= *(uchar *) par;
if (cut)
{
last[index]= start;
index= (index + 1) % 3;
}
char_len= my_charlen_fix(cs, par, par_end);
if (char_len == 1 && c == (uchar) quote_char )
{
......@@ -178,9 +186,30 @@ static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end,
goto err;
start= strnmov(start, par, char_len);
}
if (start + 1 >= end)
goto err;
if (cut)
{
uint dots= 0;
start= NULL;
for (; dots < 3; dots++)
{
if (index == 0)
index= 2;
else
index--;
if (!last[index])
break;
start= last[index];
}
if (start == NULL)
goto err; // there was no characters at all
for (; dots; dots--)
*start++= '.';
}
*start++= quote_char;
return start;
......@@ -198,18 +227,45 @@ static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end,
size_t width, char *par, uint print_type)
{
int well_formed_error;
size_t plen, left_len= (size_t) (end - to) + 1;
uint dots= 0;
size_t plen, left_len= (size_t) (end - to) + 1, slen=0;
if (!par)
par = (char*) "(null)";
plen= strnlen(par, width);
plen= slen= strnlen(par, width + 1);
if (plen > width)
plen= width;
if (left_len <= plen)
plen = left_len - 1;
if ((slen > plen))
{
if (plen < 3)
{
dots= (uint) plen;
plen= 0;
}
else
{
dots= 3;
plen-= 3;
}
}
plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error);
if (print_type & ESCAPED_ARG)
to= backtick_string(cs, to, end, par, plen, '`');
{
to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots));
dots= 0;
}
else
to= strnmov(to,par,plen);
if (dots)
{
for (; dots; dots--)
*(to++)= '.';
*(to)= 0;
}
return to;
}
......
......@@ -61,7 +61,7 @@ static void test_many(const char **res, const char *fmt, ...)
int main(void)
{
plan(39);
plan(43);
test1("Constant string",
"Constant string");
......@@ -99,12 +99,28 @@ int main(void)
test1("Width is ignored for strings <x> <y>",
"Width is ignored for strings <%04s> <%5s>", "x", "y");
test1("Precision works for strings <abcde>",
test1("Precision works for strings <ab...>",
"Precision works for strings <%.5s>", "abcdef!");
test1("Flag '`' (backtick) works: `abcd` `op``q` (mysql extension)",
"Flag '`' (backtick) works: %`s %`.4s (mysql extension)",
"abcd", "op`qrst");
test1("Flag '`' (backtick) works: `abcd` `op``q...` (mysql extension)",
"Flag '`' (backtick) works: %`s %`.7s (mysql extension)",
"abcd", "op`qrstuuuuuuuuu");
test1("Flag '`' (backtick) works: `abcd` `.` (mysql extension)",
"Flag '`' (backtick) works: %`s %`.1s (mysql extension)",
"abcd", "op`qrstuuuuuuuuu");
test1("Flag '`' (backtick) works: `abcd` `...` (mysql extension)",
"Flag '`' (backtick) works: %`s %`.3s (mysql extension)",
"abcd", "op`qrstuuuuuuuuu");
test1("Flag '`' (backtick) works: `abcd` `op...` (mysql extension)",
"Flag '`' (backtick) works: %`s %`.5s (mysql extension)",
"abcd", "op`qrstuuuuuuuuu");
test1("Flag '`' (backtick) works: `abcd` `op``...` (mysql extension)",
"Flag '`' (backtick) works: %`s %`.6s (mysql extension)",
"abcd", "op`qrstuuuuuuuuu");
test1("Length modifiers work: 1 * -1 * 2 * 3",
"Length modifiers work: %d * %ld * %lld * %zd", 1, -1L, 2LL, (size_t)3);
......@@ -125,13 +141,13 @@ int main(void)
test1("Asterisk '*' as a width works: < 4>",
"Asterisk '*' as a width works: <%*d>", 5, 4);
test1("Asterisk '*' as a precision works: <qwerty>",
test1("Asterisk '*' as a precision works: <qwe...>",
"Asterisk '*' as a precision works: <%.*s>", 6, "qwertyuiop");
test1("Positional arguments for a width: < 4>",
"Positional arguments for a width: <%1$*2$d>", 4, 5);
test1("Positional arguments for a precision: <qwerty>",
test1("Positional arguments for a precision: <qwe...>",
"Positional arguments for a precision: <%1$.*2$s>", "qwertyuiop", 6);
test1("Positional arguments and a width: <0000ab>",
......@@ -168,14 +184,14 @@ int main(void)
test1("M with positional: 0 \"Internal error/check (Not system error)\"",
"M with positional: %1$M", 0);
test1("M with width: 0 \"Internal error/ch",
test1("M with width: 0 \"Internal error...",
"M with width: %.20M", 0);
test1("M with width positional: 0 \"Internal error/ch",
test1("M with width positional: 0 \"Internal error...",
"M with width positional: %2$.*1$M", 20, 0);
test_w_len("M small buf: 0 \"In",
test_w_len("M small buf: 0 \"..",
19, "M small buf: %M", 0);
test_w_len("M small buf positional: 0 \"In",
test_w_len("M small buf positional: 0 \"..",
30, "M small buf positional: %1$M", 0);
return exit_status();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment