Skip to content

Commit 25e481a

Browse files
author
[email protected]/narttu.mysql.fi
committed
Fixed problems detected by pushbuild
1 parent 1f6d91c commit 25e481a

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

mysql-test/t/log_state.test

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ set session long_query_time=1;
3737
select sleep(2);
3838
--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME
3939
select * from mysql.slow_log;
40-
disconnect con1;
4140
connection default;
4241
show global variables
4342
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
@@ -121,3 +120,8 @@ drop table t1;
121120
select * from mysql.general_log;
122121

123122
--enable_ps_protocol
123+
124+
#
125+
# Cleanup (must be done last to avoid delayed 'Quit' message in general log)
126+
#
127+
disconnect con1;

plugin/daemon_example/daemon_example.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#include <mysql/plugin.h>
2020

2121
/*
22-
#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
22+
Disable __attribute__() on non-gcc compilers.
23+
*/
24+
#if !defined(__attribute__) && !defined(__GNUC__)
2325
#define __attribute__(A)
2426
#endif
25-
*/
26-
2727

2828

2929
/*

sql-common/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
682682
mysql->info=0;
683683
mysql->affected_rows= ~(my_ulonglong) 0;
684684
/*
685-
We don't want to clear the protocol buffer on COM_QUIT, beacsue if
685+
We don't want to clear the protocol buffer on COM_QUIT, because if
686686
the previous command was a shutdown command, we may have the
687687
response for the COM_QUIT already in the communication buffer
688688
*/

sql/sql_parse.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,11 @@ int check_user(THD *thd, enum enum_server_command command,
413413
}
414414
}
415415

416-
/* Why logging is performed before all checks've passed? */
416+
/*
417+
Log the command before authentication checks, so that the user can
418+
check the log for the tried login tried and also to detect
419+
break-in attempts.
420+
*/
417421
general_log_print(thd, command,
418422
(thd->main_security_ctx.priv_user ==
419423
thd->main_security_ctx.user ?

0 commit comments

Comments
 (0)