1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Added more descriptive error message of why statement was automaticly dropped

Print information if net_clear() skipped bytes (As this otherwise hides critical timeing bugs)
Added DBUG_ASSERT if we get packets out of order
mysql_change_user() could on error send multiple packets, which caused mysql_client_test to randomly fail


include/errmsg.h:
  Added more descriptive error message of why statement was automaticly dropped
libmysql/client_settings.h:
  Added more descriptive error message of why statement was automaticly dropped
libmysql/errmsg.c:
  Added more descriptive error message of why statement was automaticly dropped
libmysql/libmysql.c:
  Added more descriptive error message of why statement was automaticly dropped
sql-common/client.c:
  Added more descriptive error message of why statement was automaticly dropped
sql/net_serv.cc:
  Print information if net_clear() skipped bytes (As this otherwise hides critical timeing bugs)
  Added DBUG_ASSERT if we get packets out of order
sql/sql_class.cc:
  We need to set killed to NOT_KILLED after cleanup() if we want to continue using THD
  (If not, the connection will be closed after the current stmt)
sql/sql_parse.cc:
  mysql_change_user() could on error send multiple packets, which caused mysql_client_test to randomly fail
tests/mysql_client_test.c:
  More DBUG information
  Better usage of --silent
  Always print 'OK' the same way.
  Disable test_bug17667 if run outside of mysql-test-run
This commit is contained in:
unknown
2007-04-13 01:56:22 +03:00
parent 2671ba0230
commit f3efb3dcfa
9 changed files with 112 additions and 73 deletions

View File

@ -784,7 +784,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
char *save_db;
uint passwd_len= (thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
*passwd++ : strlen(passwd));
uint dummy_errors, save_db_length, db_length, res;
uint dummy_errors, save_db_length, db_length;
int res;
Security_context save_security_ctx= *thd->security_ctx;
USER_CONN *save_user_connect;
@ -831,6 +832,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
/* authentication failure, we shall restore old user */
if (res > 0)
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
else
thd->clear_error(); // Error already sent to client
x_free(thd->security_ctx->user);
*thd->security_ctx= save_security_ctx;
thd->user_connect= save_user_connect;