mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 09:14:17 +01:00
Fixed wrong arguments to printf and related functions
Other things, mainly to get create_mysqld_error_find_printf_error tool to work: - Added protection to not include mysqld_error.h twice - Include "unireg.h" instead of "mysqld_error.h" in server - Added protection if ER_XX messages are already defined - Removed wrong calls to my_error(ER_OUTOFMEMORY) as my_malloc() and my_alloc will do this automatically - Added missing %s to ER_DUP_QUERY_NAME - Removed old and wrong calls to my_strerror() when using MY_ERROR_ON_RENAME (wrong merge) - Fixed deadlock error message from Galera. Before the extra information given to ER_LOCK_DEADLOCK was missing because ER_LOCK_DEADLOCK doesn't provide any extra information. I kept #ifdef mysqld_error_find_printf_error_used in sql_acl.h to make it easy to do this kind of check again in the future
This commit is contained in:
parent
c584a496d7
commit
5e0b13d173
47 changed files with 91 additions and 101 deletions
|
@ -267,6 +267,7 @@ static int create_header_files(struct errors *error_head)
|
||||||
fprintf(sql_statef, "/* Autogenerated file, please don't edit */\n\n");
|
fprintf(sql_statef, "/* Autogenerated file, please don't edit */\n\n");
|
||||||
fprintf(er_namef, "/* Autogenerated file, please don't edit */\n\n");
|
fprintf(er_namef, "/* Autogenerated file, please don't edit */\n\n");
|
||||||
|
|
||||||
|
fprintf(er_definef, "#ifndef ER_ERROR_FIRST\n");
|
||||||
fprintf(er_definef, "#define ER_ERROR_FIRST %d\n", error_head->d_code);
|
fprintf(er_definef, "#define ER_ERROR_FIRST %d\n", error_head->d_code);
|
||||||
|
|
||||||
current_d_code= error_head->d_code -1;
|
current_d_code= error_head->d_code -1;
|
||||||
|
@ -314,6 +315,7 @@ static int create_header_files(struct errors *error_head)
|
||||||
}
|
}
|
||||||
/* finishing off with mysqld_error.h */
|
/* finishing off with mysqld_error.h */
|
||||||
fprintf(er_definef, "#define ER_ERROR_LAST %d\n", er_last);
|
fprintf(er_definef, "#define ER_ERROR_LAST %d\n", er_last);
|
||||||
|
fprintf(er_definef, "#endif /* ER_ERROR_FIRST */\n");
|
||||||
my_fclose(er_definef, MYF(0));
|
my_fclose(er_definef, MYF(0));
|
||||||
my_fclose(sql_statef, MYF(0));
|
my_fclose(sql_statef, MYF(0));
|
||||||
my_fclose(er_namef, MYF(0));
|
my_fclose(er_namef, MYF(0));
|
||||||
|
|
|
@ -173,8 +173,10 @@ static inline my_bool validate_timestamp_range(const MYSQL_TIME *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Can't include mysqld_error.h, it needs mysys to build, thus hardcode 2 error values here. */
|
/* Can't include mysqld_error.h, it needs mysys to build, thus hardcode 2 error values here. */
|
||||||
|
#ifndef ER_WARN_DATA_OUT_OF_RANGE
|
||||||
#define ER_WARN_DATA_OUT_OF_RANGE 1264
|
#define ER_WARN_DATA_OUT_OF_RANGE 1264
|
||||||
#define ER_WARN_INVALID_TIMESTAMP 1299
|
#define ER_WARN_INVALID_TIMESTAMP 1299
|
||||||
|
#endif
|
||||||
|
|
||||||
my_time_t
|
my_time_t
|
||||||
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, uint *error_code);
|
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, uint *error_code);
|
||||||
|
|
|
@ -705,7 +705,7 @@ ERROR 42S21: Duplicate column name 'f1'
|
||||||
with t as (select * from t2 where c>3),
|
with t as (select * from t2 where c>3),
|
||||||
t as (select a from t1 where a>2)
|
t as (select a from t1 where a>2)
|
||||||
select * from t,t1 where t1.a=t.c;
|
select * from t,t1 where t1.a=t.c;
|
||||||
ERROR HY000: Duplicate query name in WITH clause
|
ERROR HY000: Duplicate query name in WITH clause 't'
|
||||||
with t as (select a from s where a<5),
|
with t as (select a from s where a<5),
|
||||||
s as (select a from t1 where b>='d')
|
s as (select a from t1 where b>='d')
|
||||||
select * from t,s where t.a=s.a;
|
select * from t,s where t.a=s.a;
|
||||||
|
|
|
@ -9,7 +9,7 @@ INSERT INTO t1 VALUES (1,'node_1');
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
INSERT INTO t1 VALUES (2, 'node_2');
|
INSERT INTO t1 VALUES (2, 'node_2');
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
wsrep_local_aborts_increment
|
wsrep_local_aborts_increment
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -10,7 +10,7 @@ SELECT GET_LOCK("foo", 1000);;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
wsrep_local_aborts_increment
|
wsrep_local_aborts_increment
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -6,7 +6,7 @@ SELECT SLEEP(1000);;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
wsrep_local_aborts_increment
|
wsrep_local_aborts_increment
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -38,7 +38,7 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three';
|
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
|
|
|
@ -22,6 +22,6 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
DROP TABLE child;
|
DROP TABLE child;
|
||||||
DROP TABLE parent;
|
DROP TABLE parent;
|
||||||
|
|
|
@ -51,7 +51,7 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
INSERT INTO t1 VALUES (1), (2);
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||||
|
|
|
@ -129,5 +129,5 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -28,7 +28,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
|
||||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
|
|
@ -28,6 +28,6 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
|
|
@ -28,6 +28,6 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
|
|
@ -31,6 +31,6 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
|
|
@ -19,7 +19,7 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
SELECT f1 = 'текст2' FROM t1;
|
SELECT f1 = 'текст2' FROM t1;
|
||||||
f1 = 'текст2'
|
f1 = 'текст2'
|
||||||
1
|
1
|
||||||
|
|
|
@ -27,6 +27,6 @@ COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -24,6 +24,6 @@ COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -9,7 +9,7 @@ connection node_2;
|
||||||
INSERT INTO t1 VALUES (1,1);
|
INSERT INTO t1 VALUES (1,1);
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
@ -22,7 +22,7 @@ connection node_2;
|
||||||
UPDATE t1 SET f2 = 2;
|
UPDATE t1 SET f2 = 2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 3;
|
UPDATE t1 SET f2 = 3;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
@ -33,5 +33,5 @@ connection node_2;
|
||||||
INSERT INTO t1 VALUES (1,2);
|
INSERT INTO t1 VALUES (1,2);
|
||||||
connection node_1;
|
connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -6,7 +6,7 @@ connection node_2;
|
||||||
Killing server ...
|
Killing server ...
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: WSREP replication failed. Check your wsrep connection state and retry the query.
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
disconnect node_2;
|
disconnect node_2;
|
||||||
|
|
|
@ -14,9 +14,9 @@ INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, te
|
||||||
connection node_2;
|
connection node_2;
|
||||||
DROP DATABASE database1;;
|
DROP DATABASE database1;;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
connection node_1a;
|
connection node_1a;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
|
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
|
||||||
|
|
|
@ -8,7 +8,7 @@ connection node_2a;
|
||||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=EXCLUSIVE;
|
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=EXCLUSIVE;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (2, 2);
|
INSERT INTO t1 VALUES (2, 2);
|
||||||
SELECT COUNT(*) = 2 FROM t1;
|
SELECT COUNT(*) = 2 FROM t1;
|
||||||
|
|
|
@ -9,7 +9,7 @@ connection node_1;
|
||||||
TRUNCATE TABLE t1;;
|
TRUNCATE TABLE t1;;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
|
|
|
@ -18,7 +18,7 @@ connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
SELECT f1 = 'текст2' FROM t1;
|
SELECT f1 = 'текст2' FROM t1;
|
||||||
f1 = 'текст2'
|
f1 = 'текст2'
|
||||||
1
|
1
|
||||||
|
@ -35,6 +35,6 @@ connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
COMMIT;
|
COMMIT;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -59,7 +59,7 @@ connection node_1a;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
connection node_1a;
|
connection node_1a;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
f1 node
|
f1 node
|
||||||
|
|
|
@ -20,6 +20,6 @@ connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||||
include/assert_grep.inc [cluster conflict due to high priority abort for threads]
|
include/assert_grep.inc [cluster conflict due to high priority abort for threads]
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
|
@ -9948,7 +9948,7 @@ bool Column_definition::check(THD *thd)
|
||||||
if (decimals >= NOT_FIXED_DEC)
|
if (decimals >= NOT_FIXED_DEC)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
|
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
|
||||||
field_name, static_cast<ulong>(NOT_FIXED_DEC - 1));
|
field_name, static_cast<uint>(NOT_FIXED_DEC - 1));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
my_decimal_trim(&length, &decimals);
|
my_decimal_trim(&length, &decimals);
|
||||||
|
@ -10006,7 +10006,7 @@ bool Column_definition::check(THD *thd)
|
||||||
if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
|
if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
|
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
|
||||||
field_name, static_cast<ulong>(FLOATING_POINT_DECIMALS-1));
|
field_name, static_cast<uint>(FLOATING_POINT_DECIMALS-1));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -10026,7 +10026,7 @@ bool Column_definition::check(THD *thd)
|
||||||
if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
|
if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
|
my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
|
||||||
field_name, static_cast<ulong>(FLOATING_POINT_DECIMALS-1));
|
field_name, static_cast<uint>(FLOATING_POINT_DECIMALS-1));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include "sql_priv.h"
|
#include "sql_priv.h"
|
||||||
#include "mysqld_error.h"
|
|
||||||
|
|
||||||
#ifndef MYSQL_CLIENT
|
#ifndef MYSQL_CLIENT
|
||||||
#include "unireg.h"
|
#include "unireg.h"
|
||||||
|
@ -44,6 +43,8 @@
|
||||||
#include <strfunc.h>
|
#include <strfunc.h>
|
||||||
#include "compat56.h"
|
#include "compat56.h"
|
||||||
#include "wsrep_mysqld.h"
|
#include "wsrep_mysqld.h"
|
||||||
|
#else
|
||||||
|
#include "mysqld_error.h"
|
||||||
#endif /* MYSQL_CLIENT */
|
#endif /* MYSQL_CLIENT */
|
||||||
|
|
||||||
#include <my_bitmap.h>
|
#include <my_bitmap.h>
|
||||||
|
@ -1914,9 +1915,9 @@ err:
|
||||||
#endif
|
#endif
|
||||||
if (event.length() >= OLD_HEADER_LEN)
|
if (event.length() >= OLD_HEADER_LEN)
|
||||||
sql_print_error("Error in Log_event::read_log_event(): '%s',"
|
sql_print_error("Error in Log_event::read_log_event(): '%s',"
|
||||||
" data_len: %lu, event_type: %d", error,
|
" data_len: %lu, event_type: %u", error,
|
||||||
uint4korr(&event[EVENT_LEN_OFFSET]),
|
(ulong) uint4korr(&event[EVENT_LEN_OFFSET]),
|
||||||
(uchar)event[EVENT_TYPE_OFFSET]);
|
(uint) (uchar)event[EVENT_TYPE_OFFSET]);
|
||||||
else
|
else
|
||||||
sql_print_error("Error in Log_event::read_log_event(): '%s'", error);
|
sql_print_error("Error in Log_event::read_log_event(): '%s'", error);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "sql_array.h"
|
#include "sql_array.h"
|
||||||
#include "rpl_rli.h"
|
#include "rpl_rli.h"
|
||||||
#include <lf.h>
|
#include <lf.h>
|
||||||
#include <mysqld_error.h>
|
#include "unireg.h"
|
||||||
#include <mysql/plugin.h>
|
#include <mysql/plugin.h>
|
||||||
#include <mysql/service_thd_wait.h>
|
#include <mysql/service_thd_wait.h>
|
||||||
#include <mysql/psi/mysql_stage.h>
|
#include <mysql/psi/mysql_stage.h>
|
||||||
|
|
|
@ -10241,8 +10241,8 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
|
||||||
ulong count=count_key_part_usage(root,pos->next_key_part);
|
ulong count=count_key_part_usage(root,pos->next_key_part);
|
||||||
if (count > pos->next_key_part->use_count)
|
if (count > pos->next_key_part->use_count)
|
||||||
{
|
{
|
||||||
sql_print_information("Use_count: Wrong count for key at %p, %lu "
|
sql_print_information("Use_count: Wrong count for key at %p: %lu "
|
||||||
"should be %lu", (long unsigned int)pos,
|
"should be %lu", pos,
|
||||||
pos->next_key_part->use_count, count);
|
pos->next_key_part->use_count, count);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -10251,7 +10251,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
|
||||||
}
|
}
|
||||||
if (e_count != elements)
|
if (e_count != elements)
|
||||||
sql_print_warning("Wrong use count: %u (should be %u) for tree at %p",
|
sql_print_warning("Wrong use count: %u (should be %u) for tree at %p",
|
||||||
e_count, elements, (long unsigned int) this);
|
e_count, elements, this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1927,10 +1927,7 @@ slave_connection_state::load(char *slave_request, size_t len)
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (!(rec= (uchar *)my_malloc(sizeof(entry), MYF(MY_WME))))
|
if (!(rec= (uchar *)my_malloc(sizeof(entry), MYF(MY_WME))))
|
||||||
{
|
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*gtid));
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
gtid= &((entry *)rec)->gtid;
|
gtid= &((entry *)rec)->gtid;
|
||||||
if (gtid_parser_helper(&p, end, gtid))
|
if (gtid_parser_helper(&p, end, gtid))
|
||||||
{
|
{
|
||||||
|
@ -2547,10 +2544,7 @@ gtid_waiting::get_entry(uint32 domain_id)
|
||||||
return e;
|
return e;
|
||||||
|
|
||||||
if (!(e= (hash_element *)my_malloc(sizeof(*e), MYF(MY_WME))))
|
if (!(e= (hash_element *)my_malloc(sizeof(*e), MYF(MY_WME))))
|
||||||
{
|
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*e));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
if (init_queue(&e->queue, 8, offsetof(queue_element, wait_seq_no), 0,
|
if (init_queue(&e->queue, 8, offsetof(queue_element, wait_seq_no), 0,
|
||||||
cmp_queue_elem, NULL, 1+offsetof(queue_element, queue_idx), 1))
|
cmp_queue_elem, NULL, 1+offsetof(queue_element, queue_idx), 1))
|
||||||
|
|
|
@ -7570,7 +7570,7 @@ ER_WITH_COL_WRONG_LIST
|
||||||
ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
|
ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
|
||||||
eng "Too many WITH elements in WITH clause"
|
eng "Too many WITH elements in WITH clause"
|
||||||
ER_DUP_QUERY_NAME
|
ER_DUP_QUERY_NAME
|
||||||
eng "Duplicate query name in WITH clause"
|
eng "Duplicate query name in WITH clause '%s'"
|
||||||
ER_RECURSIVE_WITHOUT_ANCHORS
|
ER_RECURSIVE_WITHOUT_ANCHORS
|
||||||
eng "No anchors for recursive WITH element '%s'"
|
eng "No anchors for recursive WITH element '%s'"
|
||||||
ER_UNACCEPTABLE_MUTUAL_RECURSION
|
ER_UNACCEPTABLE_MUTUAL_RECURSION
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include <sql_common.h>
|
#include <sql_common.h>
|
||||||
#include <errmsg.h>
|
#include <errmsg.h>
|
||||||
#include <ssl_compat.h>
|
#include <ssl_compat.h>
|
||||||
#include <mysqld_error.h>
|
#include "unireg.h"
|
||||||
#include <mysys_err.h>
|
#include <mysys_err.h>
|
||||||
#include "rpl_handler.h"
|
#include "rpl_handler.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
@ -1651,7 +1651,7 @@ static bool fix_lex_user(THD *thd, LEX_USER *user)
|
||||||
|
|
||||||
if (user->pwhash.length && user->pwhash.length != check_length)
|
if (user->pwhash.length && user->pwhash.length != check_length)
|
||||||
{
|
{
|
||||||
my_error(ER_PASSWD_LENGTH, MYF(0), check_length);
|
my_error(ER_PASSWD_LENGTH, MYF(0), (int) check_length);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2610,7 +2610,7 @@ static int check_user_can_set_role(const char *user, const char *host,
|
||||||
acl_user= find_user_wild(host, user, ip);
|
acl_user= find_user_wild(host, user, ip);
|
||||||
if (acl_user == NULL)
|
if (acl_user == NULL)
|
||||||
{
|
{
|
||||||
my_error(ER_INVALID_CURRENT_USER, MYF(0), rolename);
|
my_error(ER_INVALID_CURRENT_USER, MYF(0));
|
||||||
result= -1;
|
result= -1;
|
||||||
}
|
}
|
||||||
else if (access)
|
else if (access)
|
||||||
|
@ -8557,10 +8557,7 @@ bool mysql_show_create_user(THD *thd, LEX_USER *lex_user)
|
||||||
strxmov(buff, "CREATE USER for ", username, "@", hostname, NullS);
|
strxmov(buff, "CREATE USER for ", username, "@", hostname, NullS);
|
||||||
Item_string *field = new (thd->mem_root) Item_string_ascii(thd, "", 0);
|
Item_string *field = new (thd->mem_root) Item_string_ascii(thd, "", 0);
|
||||||
if (!field)
|
if (!field)
|
||||||
{
|
DBUG_RETURN(true); // Error given my my_alloc()
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0));
|
|
||||||
DBUG_RETURN(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
field->name= buff;
|
field->name= buff;
|
||||||
field->max_length= sizeof(buff);
|
field->max_length= sizeof(buff);
|
||||||
|
|
|
@ -190,8 +190,12 @@ extern LEX_STRING current_user_and_current_role;
|
||||||
|
|
||||||
static inline int access_denied_error_code(int passwd_used)
|
static inline int access_denied_error_code(int passwd_used)
|
||||||
{
|
{
|
||||||
|
#ifdef mysqld_error_find_printf_error_used
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
return passwd_used == 2 ? ER_ACCESS_DENIED_NO_PASSWORD_ERROR
|
return passwd_used == 2 ? ER_ACCESS_DENIED_NO_PASSWORD_ERROR
|
||||||
: ER_ACCESS_DENIED_ERROR;
|
: ER_ACCESS_DENIED_ERROR;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1089,7 +1089,7 @@ bool login_connection(THD *thd)
|
||||||
/* Updates global user connection stats. */
|
/* Updates global user connection stats. */
|
||||||
if (increment_connection_count(thd, TRUE))
|
if (increment_connection_count(thd, TRUE))
|
||||||
{
|
{
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), 2*sizeof(USER_STATS));
|
my_error(ER_OUTOFMEMORY, MYF(0), (int) (2*sizeof(USER_STATS)));
|
||||||
error= 1;
|
error= 1;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "my_global.h"
|
#include "my_global.h"
|
||||||
#include "my_md5.h"
|
#include "my_md5.h"
|
||||||
#include "mysqld_error.h"
|
#include "unireg.h"
|
||||||
|
|
||||||
#include "sql_string.h"
|
#include "sql_string.h"
|
||||||
#include "sql_class.h"
|
#include "sql_class.h"
|
||||||
|
|
|
@ -1562,7 +1562,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||||
if (thd->wsrep_conflict_state == ABORTED &&
|
if (thd->wsrep_conflict_state == ABORTED &&
|
||||||
command != COM_STMT_CLOSE && command != COM_QUIT)
|
command != COM_STMT_CLOSE && command != COM_QUIT)
|
||||||
{
|
{
|
||||||
my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction");
|
my_message(ER_LOCK_DEADLOCK, "Deadlock: wsrep aborted transaction",
|
||||||
|
MYF(0));
|
||||||
WSREP_DEBUG("Deadlock error for: %s", thd->query());
|
WSREP_DEBUG("Deadlock error for: %s", thd->query());
|
||||||
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
|
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
|
||||||
thd->reset_killed();
|
thd->reset_killed();
|
||||||
|
@ -2285,7 +2286,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||||
|
|
||||||
if (server_command_flags[subcommand] & CF_NO_COM_MULTI)
|
if (server_command_flags[subcommand] & CF_NO_COM_MULTI)
|
||||||
{
|
{
|
||||||
my_error(ER_BAD_COMMAND_IN_MULTI, MYF(0), command_name[subcommand]);
|
my_error(ER_BAD_COMMAND_IN_MULTI, MYF(0),
|
||||||
|
command_name[subcommand].str);
|
||||||
goto com_multi_end;
|
goto com_multi_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7760,7 +7762,8 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
|
||||||
(longlong) thd->thread_id, is_autocommit,
|
(longlong) thd->thread_id, is_autocommit,
|
||||||
thd->wsrep_retry_counter,
|
thd->wsrep_retry_counter,
|
||||||
thd->variables.wsrep_retry_autocommit, thd->query());
|
thd->variables.wsrep_retry_autocommit, thd->query());
|
||||||
my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction");
|
my_message(ER_LOCK_DEADLOCK, "Deadlock: wsrep aborted transaction",
|
||||||
|
MYF(0));
|
||||||
thd->reset_killed();
|
thd->reset_killed();
|
||||||
thd->wsrep_conflict_state= NO_CONFLICT;
|
thd->wsrep_conflict_state= NO_CONFLICT;
|
||||||
if (thd->wsrep_conflict_state != REPLAYING)
|
if (thd->wsrep_conflict_state != REPLAYING)
|
||||||
|
|
|
@ -378,17 +378,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
|
||||||
*/
|
*/
|
||||||
/* call rename table from table to tmp-name */
|
/* call rename table from table to tmp-name */
|
||||||
DBUG_EXECUTE_IF("exchange_partition_fail_3",
|
DBUG_EXECUTE_IF("exchange_partition_fail_3",
|
||||||
my_error(ER_ERROR_ON_RENAME, MYF(0),
|
my_error(ER_ERROR_ON_RENAME, MYF(0), name, tmp_name, 0);
|
||||||
name, tmp_name, 0, "n/a");
|
|
||||||
error_set= TRUE;
|
error_set= TRUE;
|
||||||
goto err_rename;);
|
goto err_rename;);
|
||||||
DBUG_EXECUTE_IF("exchange_partition_abort_3", DBUG_SUICIDE(););
|
DBUG_EXECUTE_IF("exchange_partition_abort_3", DBUG_SUICIDE(););
|
||||||
if (file->ha_rename_table(name, tmp_name))
|
if (file->ha_rename_table(name, tmp_name))
|
||||||
{
|
{
|
||||||
char errbuf[MYSYS_STRERROR_SIZE];
|
my_error(ER_ERROR_ON_RENAME, MYF(0), name, tmp_name, my_errno);
|
||||||
my_strerror(errbuf, sizeof(errbuf), my_errno);
|
|
||||||
my_error(ER_ERROR_ON_RENAME, MYF(0), name, tmp_name,
|
|
||||||
my_errno, errbuf);
|
|
||||||
error_set= TRUE;
|
error_set= TRUE;
|
||||||
goto err_rename;
|
goto err_rename;
|
||||||
}
|
}
|
||||||
|
@ -399,17 +395,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
|
||||||
|
|
||||||
/* call rename table from partition to table */
|
/* call rename table from partition to table */
|
||||||
DBUG_EXECUTE_IF("exchange_partition_fail_5",
|
DBUG_EXECUTE_IF("exchange_partition_fail_5",
|
||||||
my_error(ER_ERROR_ON_RENAME, MYF(0),
|
my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name, 0);
|
||||||
from_name, name, 0, "n/a");
|
|
||||||
error_set= TRUE;
|
error_set= TRUE;
|
||||||
goto err_rename;);
|
goto err_rename;);
|
||||||
DBUG_EXECUTE_IF("exchange_partition_abort_5", DBUG_SUICIDE(););
|
DBUG_EXECUTE_IF("exchange_partition_abort_5", DBUG_SUICIDE(););
|
||||||
if (file->ha_rename_table(from_name, name))
|
if (file->ha_rename_table(from_name, name))
|
||||||
{
|
{
|
||||||
char errbuf[MYSYS_STRERROR_SIZE];
|
my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name, my_errno);
|
||||||
my_strerror(errbuf, sizeof(errbuf), my_errno);
|
|
||||||
my_error(ER_ERROR_ON_RENAME, MYF(0), from_name, name,
|
|
||||||
my_errno, errbuf);
|
|
||||||
error_set= TRUE;
|
error_set= TRUE;
|
||||||
goto err_rename;
|
goto err_rename;
|
||||||
}
|
}
|
||||||
|
@ -420,17 +412,13 @@ static bool exchange_name_with_ddl_log(THD *thd,
|
||||||
|
|
||||||
/* call rename table from tmp-nam to partition */
|
/* call rename table from tmp-nam to partition */
|
||||||
DBUG_EXECUTE_IF("exchange_partition_fail_7",
|
DBUG_EXECUTE_IF("exchange_partition_fail_7",
|
||||||
my_error(ER_ERROR_ON_RENAME, MYF(0),
|
my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name, 0);
|
||||||
tmp_name, from_name, 0, "n/a");
|
|
||||||
error_set= TRUE;
|
error_set= TRUE;
|
||||||
goto err_rename;);
|
goto err_rename;);
|
||||||
DBUG_EXECUTE_IF("exchange_partition_abort_7", DBUG_SUICIDE(););
|
DBUG_EXECUTE_IF("exchange_partition_abort_7", DBUG_SUICIDE(););
|
||||||
if (file->ha_rename_table(tmp_name, from_name))
|
if (file->ha_rename_table(tmp_name, from_name))
|
||||||
{
|
{
|
||||||
char errbuf[MYSYS_STRERROR_SIZE];
|
my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name, my_errno);
|
||||||
my_strerror(errbuf, sizeof(errbuf), my_errno);
|
|
||||||
my_error(ER_ERROR_ON_RENAME, MYF(0), tmp_name, from_name,
|
|
||||||
my_errno, errbuf);
|
|
||||||
error_set= TRUE;
|
error_set= TRUE;
|
||||||
goto err_rename;
|
goto err_rename;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2287,10 +2287,8 @@ static int mysql_test_handler_read(Prepared_statement *stmt,
|
||||||
if (!stmt->is_sql_prepare())
|
if (!stmt->is_sql_prepare())
|
||||||
{
|
{
|
||||||
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd)))
|
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd)))
|
||||||
{
|
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(select_send));
|
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
|
||||||
if (send_prep_stmt(stmt, ha_table->fields.elements) ||
|
if (send_prep_stmt(stmt, ha_table->fields.elements) ||
|
||||||
lex->result->send_result_set_metadata(ha_table->fields, Protocol::SEND_EOF) ||
|
lex->result->send_result_set_metadata(ha_table->fields, Protocol::SEND_EOF) ||
|
||||||
thd->protocol->flush())
|
thd->protocol->flush())
|
||||||
|
|
|
@ -865,7 +865,6 @@ get_binlog_list(MEM_ROOT *memroot)
|
||||||
!(e->name= strmake_root(memroot, fname, length)))
|
!(e->name= strmake_root(memroot, fname, length)))
|
||||||
{
|
{
|
||||||
mysql_bin_log.unlock_index();
|
mysql_bin_log.unlock_index();
|
||||||
my_error(ER_OUTOFMEMORY, MYF(0), length + 1 + sizeof(*e));
|
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
}
|
}
|
||||||
e->next= current_list;
|
e->next= current_list;
|
||||||
|
@ -2979,7 +2978,7 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
|
||||||
{
|
{
|
||||||
/* connection was deleted while we waited for lock_slave_threads */
|
/* connection was deleted while we waited for lock_slave_threads */
|
||||||
mi->unlock_slave_threads();
|
mi->unlock_slave_threads();
|
||||||
my_error(WARN_NO_MASTER_INFO, mi->connection_name.length,
|
my_error(WARN_NO_MASTER_INFO, MYF(0), (int) mi->connection_name.length,
|
||||||
mi->connection_name.str);
|
mi->connection_name.str);
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
|
@ -3237,7 +3236,7 @@ int reset_slave(THD *thd, Master_info* mi)
|
||||||
{
|
{
|
||||||
/* connection was deleted while we waited for lock_slave_threads */
|
/* connection was deleted while we waited for lock_slave_threads */
|
||||||
mi->unlock_slave_threads();
|
mi->unlock_slave_threads();
|
||||||
my_error(WARN_NO_MASTER_INFO, mi->connection_name.length,
|
my_error(WARN_NO_MASTER_INFO, MYF(0), (int) mi->connection_name.length,
|
||||||
mi->connection_name.str);
|
mi->connection_name.str);
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
|
@ -3380,7 +3379,8 @@ static bool get_string_parameter(char *to, const char *from, size_t length,
|
||||||
uint from_numchars= cs->cset->numchars(cs, from, from + from_length);
|
uint from_numchars= cs->cset->numchars(cs, from, from + from_length);
|
||||||
if (from_numchars > length / cs->mbmaxlen)
|
if (from_numchars > length / cs->mbmaxlen)
|
||||||
{
|
{
|
||||||
my_error(ER_WRONG_STRING_LENGTH, MYF(0), from, name, length / cs->mbmaxlen);
|
my_error(ER_WRONG_STRING_LENGTH, MYF(0), from, name,
|
||||||
|
(int) (length / cs->mbmaxlen));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
memcpy(to, from, from_length+1);
|
memcpy(to, from, from_length+1);
|
||||||
|
@ -3449,7 +3449,7 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
|
||||||
{
|
{
|
||||||
/* connection was deleted while we waited for lock_slave_threads */
|
/* connection was deleted while we waited for lock_slave_threads */
|
||||||
mi->unlock_slave_threads();
|
mi->unlock_slave_threads();
|
||||||
my_error(WARN_NO_MASTER_INFO, mi->connection_name.length,
|
my_error(WARN_NO_MASTER_INFO, MYF(0), (int) mi->connection_name.length,
|
||||||
mi->connection_name.str);
|
mi->connection_name.str);
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2949,7 +2949,7 @@ int fill_show_explain(THD *thd, TABLE_LIST *table, COND *cond)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
my_error(ER_NO_SUCH_THREAD, MYF(0), thread_id);
|
my_error(ER_NO_SUCH_THREAD, MYF(0), (ulong) thread_id);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4999,7 +4999,8 @@ int mysql_create_table_no_lock(THD *thd,
|
||||||
// Check if we hit FN_REFLEN bytes along with file extension.
|
// Check if we hit FN_REFLEN bytes along with file extension.
|
||||||
if (length+reg_ext_length > FN_REFLEN)
|
if (length+reg_ext_length > FN_REFLEN)
|
||||||
{
|
{
|
||||||
my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), sizeof(path)-1, path);
|
my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), (int) sizeof(path)-1,
|
||||||
|
path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5263,7 +5264,7 @@ mysql_rename_table(handlerton *base, const char *old_db,
|
||||||
// Check if we hit FN_REFLEN bytes along with file extension.
|
// Check if we hit FN_REFLEN bytes along with file extension.
|
||||||
if (length+reg_ext_length > FN_REFLEN)
|
if (length+reg_ext_length > FN_REFLEN)
|
||||||
{
|
{
|
||||||
my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), sizeof(to)-1, to);
|
my_error(ER_IDENT_CAUSES_TOO_LONG_PATH, MYF(0), (int) sizeof(to)-1, to);
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10348,7 +10349,7 @@ bool check_engine(THD *thd, const char *db_name,
|
||||||
if (no_substitution)
|
if (no_substitution)
|
||||||
{
|
{
|
||||||
const char *engine_name= ha_resolve_storage_engine_name(req_engine);
|
const char *engine_name= ha_resolve_storage_engine_name(req_engine);
|
||||||
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), engine_name, engine_name);
|
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), engine_name);
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
*new_engine= enf_engine;
|
*new_engine= enf_engine;
|
||||||
|
|
|
@ -2335,7 +2335,7 @@ master_def:
|
||||||
if ($3 > MASTER_DELAY_MAX)
|
if ($3 > MASTER_DELAY_MAX)
|
||||||
{
|
{
|
||||||
my_error(ER_MASTER_DELAY_VALUE_OUT_OF_RANGE, MYF(0),
|
my_error(ER_MASTER_DELAY_VALUE_OUT_OF_RANGE, MYF(0),
|
||||||
$3, MASTER_DELAY_MAX);
|
(uint) $3, (uint) MASTER_DELAY_MAX);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Lex->mi.sql_delay = $3;
|
Lex->mi.sql_delay = $3;
|
||||||
|
|
|
@ -1959,7 +1959,7 @@ Sys_var_slave_parallel_mode::global_update(THD *thd, set_var *var)
|
||||||
if (mi->rli.slave_running)
|
if (mi->rli.slave_running)
|
||||||
{
|
{
|
||||||
my_error(ER_SLAVE_MUST_STOP, MYF(0),
|
my_error(ER_SLAVE_MUST_STOP, MYF(0),
|
||||||
mi->connection_name.length, mi->connection_name.str);
|
(int) mi->connection_name.length, mi->connection_name.str);
|
||||||
res= true;
|
res= true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4461,7 +4461,7 @@ bool Sys_var_rpl_filter::global_update(THD *thd, set_var *var)
|
||||||
if (mi->rli.slave_running)
|
if (mi->rli.slave_running)
|
||||||
{
|
{
|
||||||
my_error(ER_SLAVE_MUST_STOP, MYF(0),
|
my_error(ER_SLAVE_MUST_STOP, MYF(0),
|
||||||
mi->connection_name.length,
|
(int) mi->connection_name.length,
|
||||||
mi->connection_name.str);
|
mi->connection_name.str);
|
||||||
result= true;
|
result= true;
|
||||||
}
|
}
|
||||||
|
@ -4664,7 +4664,7 @@ static bool update_slave_skip_counter(sys_var *self, THD *thd, Master_info *mi)
|
||||||
{
|
{
|
||||||
if (mi->rli.slave_running)
|
if (mi->rli.slave_running)
|
||||||
{
|
{
|
||||||
my_error(ER_SLAVE_MUST_STOP, MYF(0), mi->connection_name.length,
|
my_error(ER_SLAVE_MUST_STOP, MYF(0), (int) mi->connection_name.length,
|
||||||
mi->connection_name.str);
|
mi->connection_name.str);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1553,8 +1553,8 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
|
||||||
ret,
|
ret,
|
||||||
(thd->db ? thd->db : "(null)"),
|
(thd->db ? thd->db : "(null)"),
|
||||||
(thd->query()) ? thd->query() : "void");
|
(thd->query()) ? thd->query() : "void");
|
||||||
my_error(ER_LOCK_DEADLOCK, MYF(0), "WSREP replication failed. Check "
|
my_message(ER_LOCK_DEADLOCK, "WSREP replication failed. Check "
|
||||||
"your wsrep connection state and retry the query.");
|
"your wsrep connection state and retry the query.", MYF(0));
|
||||||
wsrep_keys_free(&key_arr);
|
wsrep_keys_free(&key_arr);
|
||||||
rc= -1;
|
rc= -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,7 +348,7 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
|
||||||
|
|
||||||
if (wsrep_init())
|
if (wsrep_init())
|
||||||
{
|
{
|
||||||
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp);
|
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp, my_error, "wsrep_init failed");
|
||||||
rcode = true;
|
rcode = true;
|
||||||
}
|
}
|
||||||
free(tmp);
|
free(tmp);
|
||||||
|
|
|
@ -15052,7 +15052,7 @@ ha_innobase::defragment_table(
|
||||||
"Table %s is encrypted but encryption service or"
|
"Table %s is encrypted but encryption service or"
|
||||||
" used key_id is not available. "
|
" used key_id is not available. "
|
||||||
" Can't continue checking table.",
|
" Can't continue checking table.",
|
||||||
index->table->name);
|
index->table->name.m_name);
|
||||||
|
|
||||||
ret = convert_error_code_to_mysql(err, 0, current_thd);
|
ret = convert_error_code_to_mysql(err, 0, current_thd);
|
||||||
break;
|
break;
|
||||||
|
@ -15272,7 +15272,7 @@ ha_innobase::check(
|
||||||
"Table %s is encrypted but encryption service or"
|
"Table %s is encrypted but encryption service or"
|
||||||
" used key_id is not available. "
|
" used key_id is not available. "
|
||||||
" Can't continue checking table.",
|
" Can't continue checking table.",
|
||||||
index->table->name);
|
index->table->name.m_name);
|
||||||
} else {
|
} else {
|
||||||
push_warning_printf(
|
push_warning_printf(
|
||||||
thd,
|
thd,
|
||||||
|
@ -22970,7 +22970,7 @@ ib_push_frm_error(
|
||||||
"InnoDB: Table %s has a "
|
"InnoDB: Table %s has a "
|
||||||
"primary key in InnoDB data "
|
"primary key in InnoDB data "
|
||||||
"dictionary, but not in "
|
"dictionary, but not in "
|
||||||
"MariaDB!", ib_table->name);
|
"MariaDB!", ib_table->name.m_name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DICT_NO_PK_FRM_HAS:
|
case DICT_NO_PK_FRM_HAS:
|
||||||
|
@ -22983,7 +22983,7 @@ ib_push_frm_error(
|
||||||
"columns, then MariaDB internally treats that "
|
"columns, then MariaDB internally treats that "
|
||||||
"key as the primary key. You can fix this "
|
"key as the primary key. You can fix this "
|
||||||
"error by dump + DROP + CREATE + reimport "
|
"error by dump + DROP + CREATE + reimport "
|
||||||
"of the table.", ib_table->name);
|
"of the table.", ib_table->name.m_name);
|
||||||
|
|
||||||
if (push_warning) {
|
if (push_warning) {
|
||||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||||
|
@ -22992,7 +22992,7 @@ ib_push_frm_error(
|
||||||
"primary key in InnoDB data "
|
"primary key in InnoDB data "
|
||||||
"dictionary, but has one in "
|
"dictionary, but has one in "
|
||||||
"MariaDB!",
|
"MariaDB!",
|
||||||
ib_table->name);
|
ib_table->name.m_name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -23016,7 +23016,7 @@ ib_push_frm_error(
|
||||||
"indexes inside InnoDB, which "
|
"indexes inside InnoDB, which "
|
||||||
"is different from the number of "
|
"is different from the number of "
|
||||||
"indexes %u defined in the MariaDB ",
|
"indexes %u defined in the MariaDB ",
|
||||||
ib_table->name, n_keys,
|
ib_table->name.m_name, n_keys,
|
||||||
table->s->keys);
|
table->s->keys);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -23026,7 +23026,7 @@ ib_push_frm_error(
|
||||||
sql_print_error("InnoDB: Table %s is consistent "
|
sql_print_error("InnoDB: Table %s is consistent "
|
||||||
"on InnoDB data dictionary and MariaDB "
|
"on InnoDB data dictionary and MariaDB "
|
||||||
" FRM file.",
|
" FRM file.",
|
||||||
ib_table->name);
|
ib_table->name.m_name);
|
||||||
ut_error;
|
ut_error;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue