diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index e81a114a4b4..0b6f18a6a00 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1990,12 +1990,13 @@ static COMMANDS *find_command(char *name,char cmd_char) for (uint i= 0; commands[i].name; i++) { if (commands[i].func && - ((name && - !my_strnncoll(charset_info,(uchar*)name,len, - (uchar*)commands[i].name,len) && - !commands[i].name[len] && - (!end || (end && commands[i].takes_params))) || - !name && commands[i].cmd_char == cmd_char)) + (((name && + !my_strnncoll(charset_info, + (uchar*) name, len, + (uchar*) commands[i].name, len) && + !commands[i].name[len] && + (!end || (end && commands[i].takes_params)))) || + (!name && commands[i].cmd_char == cmd_char))) { DBUG_PRINT("exit",("found command: %s", commands[i].name)); DBUG_RETURN(&commands[i]); @@ -2183,16 +2184,18 @@ static bool add_line(String &buffer,char *line,char *in_string, } buffer.length(0); } - else if (!*ml_comment && (!*in_string && (inchar == '#' || - inchar == '-' && pos[1] == '-' && - /* - The third byte is either whitespace or is the - end of the line -- which would occur only - because of the user sending newline -- which is - itself whitespace and should also match. - */ - (my_isspace(charset_info,pos[2]) || - !pos[2])))) + else if (!*ml_comment && + (!*in_string && + (inchar == '#' || + (inchar == '-' && pos[1] == '-' && + /* + The third byte is either whitespace or is the end of + the line -- which would occur only because of the + user sending newline -- which is itself whitespace + and should also match. + */ + (my_isspace(charset_info,pos[2]) || + !pos[2]))))) { // Flush previously accepted characters if (out != line) @@ -3506,7 +3509,7 @@ static void print_warnings() messages. To be safe, skip printing the duplicate only if it is the only warning. */ - if (!cur || num_rows == 1 && error == (uint) strtoul(cur[1], NULL, 10)) + if (!cur || (num_rows == 1 && error == (uint) strtoul(cur[1], NULL, 10))) goto end; /* Print the warnings */ |