summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2006-04-25 16:41:12 -0700
committerunknown <serg@sergbook.mysql.com>2006-04-25 16:41:12 -0700
commit9dd61750f43940882d1c083e199c5b785369dea4 (patch)
treeff12e8853cb6808709d5dd420335cb8c6aff0dc8 /sql
parentb3a7131896e5deedcc843e8130e1d9da71cacc01 (diff)
downloadmariadb-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.cc2
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;