summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-18 16:39:21 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-18 16:39:21 +0200
commit61434bf8e89d5d47bcb169804c3224ad645af5aa (patch)
tree3f6f95778c36b31c0a79384484a6bcb6c19d369a /client
parent76c8b9becec0438562882f591529190564a2d82f (diff)
downloadmariadb-git-61434bf8e89d5d47bcb169804c3224ad645af5aa.tar.gz
Change client_flag to unsigned long (16 -> 32 bits) to handle more options.
Don't use new password format if mysql.user has old format tables_priv was not reset on FLUSH PRIVILEGES if tables_priv was empty Portability fixes for Windows client/mysql.cc: Removed compiler warnings. Make quote handling simpler include/config-win.h: Fix for myisam/rt_mbr.c include/mysql.h: Change client_flag to unsigned long to handle more options. libmysql/libmysql.c: Change client_flag to unsigned long to handle more options. libmysqld/libmysqld.c: Change client_flag to unsigned long to handle more options. myisam/rt_mbr.c: Portability fix for Windows mysql-test/r/rpl_loaddata.result: Fix test case sql/item_strfunc.cc: Don't use new password format if mysql.user has old format sql/item_strfunc.h: Don't use new password format if mysql.user has old format sql/mysql_priv.h: Don't use new password format if mysql.user has old format sql/mysqld.cc: Don't use new password format if mysql.user has old format sql/sql_acl.cc: Don't use new password format if mysql.user has old format. tables_priv was not reset on FLUSH PRIVILEGES if tables_priv was empty sql/sql_class.h: Don't use new password format if mysql.user has old format sql/sql_parse.cc: Change client_flag to unsigned long to handle more options. sql/sql_yacc.yy: Don't use new password format if mysql.user has old format strings/ctype-utf8.c: Remove compiler warnings strings/ctype-win1250ch.c: Remove compiler warnings tests/grant.res: Update results
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 58aee617107..567a905ac6e 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2387,14 +2387,12 @@ com_use(String *buffer __attribute__((unused)), char *line)
items in the array to zero first.
*/
-enum quote_type { NO_QUOTE, SQUOTE, DQUOTE, BTICK };
-
char *get_arg(char *line, my_bool get_next_arg)
{
char *ptr;
my_bool quoted= 0, valid_arg= 0;
uint count= 0;
- enum quote_type qtype= NO_QUOTE;
+ char qtype= 0;
ptr= line;
if (get_next_arg)
@@ -2415,10 +2413,9 @@ char *get_arg(char *line, my_bool get_next_arg)
}
while (my_isspace(system_charset_info, *ptr))
ptr++;
- if ((*ptr == '\'' && (qtype= SQUOTE)) ||
- (*ptr == '\"' && (qtype= DQUOTE)) ||
- (*ptr == '`' && (qtype= BTICK)))
+ if (*ptr == '\'' || *ptr == '\"' || *ptr == '`')
{
+ qtype= *ptr;
quoted= 1;
ptr++;
}
@@ -2435,10 +2432,7 @@ char *get_arg(char *line, my_bool get_next_arg)
ptr= line;
ptr+= count;
}
- else if ((!quoted && *ptr == ' ') ||
- (*ptr == '\'' && qtype == SQUOTE) ||
- (*ptr == '\"' && qtype == DQUOTE) ||
- (*ptr == '`' && qtype == BTICK))
+ else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype))
{
*ptr= 0;
break;