diff options
| author | Sergei Golubchik <sergii@pisem.net> | 2011-07-02 22:12:12 +0200 |
|---|---|---|
| committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-02 22:12:12 +0200 |
| commit | b4a0b2c2f862ab0de853dc34e1e56f6159043e45 (patch) | |
| tree | 18a0c25fdc9ac0076da19247666414a46434b85e /sql/sql_parse.cc | |
| parent | 9809f05199aeb0b67991fac41bd86f38730768dc (diff) | |
| download | mariadb-git-b4a0b2c2f862ab0de853dc34e1e56f6159043e45.tar.gz | |
post-merge fixes.
most tests pass.
5.3 merge is next
Diffstat (limited to 'sql/sql_parse.cc')
| -rw-r--r-- | sql/sql_parse.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d12b314001a..400cc2683cd 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -977,7 +977,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd, MYSQL_AUDIT_NOTIFY_CONNECTION_CHANGE_USER(thd); if (rc) { - my_free(thd->security_ctx->user); + /* authentication can fail before or after allocating new username */ + if (thd->security_ctx->user != save_security_ctx.user) + my_free(thd->security_ctx->user); *thd->security_ctx= save_security_ctx; thd->user_connect= save_user_connect; thd->reset_db(save_db, save_db_length); |
