diff options
author | unknown <serg@sergbook.mysql.com> | 2006-04-25 16:41:12 -0700 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2006-04-25 16:41:12 -0700 |
commit | 9dd61750f43940882d1c083e199c5b785369dea4 (patch) | |
tree | ff12e8853cb6808709d5dd420335cb8c6aff0dc8 /sql | |
parent | b3a7131896e5deedcc843e8130e1d9da71cacc01 (diff) | |
download | mariadb-git-9dd61750f43940882d1c083e199c5b785369dea4.tar.gz |
small optimization of the previous bugfix
(based on the fact that packet is ALWAYS \0 terminated, see my_net_read)
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 93f696f6d49..8f8eacbb77b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -647,7 +647,7 @@ check_connections(THD *thd) char *db=0; if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB) db=strend(passwd)+1; - if (strend(db ? db : passwd) - (char*)net->read_pos > pkt_len) + if ((db ? db : passwd) - (char*)net->read_pos > pkt_len) { inc_host_errors(&thd->remote.sin_addr); return ER_HANDSHAKE_ERROR; |