1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-36245 review changes

Closes #3874
This commit is contained in:
Alexey Botchkov
2025-03-06 05:27:48 +00:00
committed by Sergei Golubchik
parent 8c6b0d092a
commit fbec528cbb
3 changed files with 13 additions and 2 deletions

View File

@@ -20,6 +20,9 @@ set global server_audit_file_path=null;
set global server_audit_incl_users=null;
set global server_audit_file_path='server_audit.log';
set global server_audit_output_type=file;
set global server_audit_file_path=REPEAT(REPEAT('new_file_name', 50), 50);
Warnings:
Warning 1 server_audit_file_path can't exceed FN_LEN characters.
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','...'

View File

@@ -20,6 +20,10 @@ set global server_audit_file_path=null;
set global server_audit_incl_users=null;
set global server_audit_file_path='server_audit.log';
set global server_audit_output_type=file;
--replace_regex /[1-9][0-9][0-9]+/FN_LEN/
set global server_audit_file_path=REPEAT(REPEAT('new_file_name', 50), 50);
set global server_audit_logging=on;
--error ER_WRONG_VALUE_FOR_VAR

View File

@@ -2839,8 +2839,12 @@ static void update_file_path(MYSQL_THD thd,
if (strlen(new_name) + 4 > FN_REFLEN)
{
error_header();
fprintf(stderr, "server_audit_file_path can't exceed %d characters.\n", FN_REFLEN - 4);
CLIENT_ERROR(1, "server_audit_file_path can't exceed %d characters.\n", MYF(ME_WARNING), FN_REFLEN - 4);
fprintf(stderr,
"server_audit_file_path can't exceed %d characters.\n",
FN_REFLEN - 4);
fprintf(stderr, "Log filename remains unchanged '%s'.\n", file_path);
CLIENT_ERROR(1, "server_audit_file_path can't exceed %d characters.",
MYF(ME_WARNING), FN_REFLEN - 4);
return;
}