mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03: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:
@ -4999,7 +4999,8 @@ int mysql_create_table_no_lock(THD *thd,
|
||||
// Check if we hit FN_REFLEN bytes along with file extension.
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -5263,7 +5264,7 @@ mysql_rename_table(handlerton *base, const char *old_db,
|
||||
// Check if we hit FN_REFLEN bytes along with file extension.
|
||||
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);
|
||||
}
|
||||
|
||||
@ -10348,7 +10349,7 @@ bool check_engine(THD *thd, const char *db_name,
|
||||
if (no_substitution)
|
||||
{
|
||||
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);
|
||||
}
|
||||
*new_engine= enf_engine;
|
||||
|
Reference in New Issue
Block a user