Commit 971268dc authored by Alexander Barkov's avatar Alexander Barkov

Fixing tabs to spaces in sql_lex.cc and sql_lex.h (and coding style slightly)

parent 1b8749f7
......@@ -1167,9 +1167,9 @@ static inline uint int_token(const char *str,uint length)
{
if (length == long_len)
{
cmp= signed_long_str+1;
smaller=NUM; // If <= signed_long_str
bigger=LONG_NUM; // If >= signed_long_str
cmp= signed_long_str + 1;
smaller= NUM; // If <= signed_long_str
bigger= LONG_NUM; // If >= signed_long_str
}
else if (length < signed_longlong_len)
return LONG_NUM;
......@@ -1177,8 +1177,8 @@ static inline uint int_token(const char *str,uint length)
return DECIMAL_NUM;
else
{
cmp=signed_longlong_str+1;
smaller=LONG_NUM; // If <= signed_longlong_str
cmp= signed_longlong_str + 1;
smaller= LONG_NUM; // If <= signed_longlong_str
bigger=DECIMAL_NUM;
}
}
......@@ -1381,7 +1381,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
const uchar *const state_map= cs->state_map;
const uchar *const ident_map= cs->ident_map;
lip->yylval=yylval; // The global state
lip->yylval= yylval; // The global state
lip->start_token();
state=lip->next_state;
......@@ -1408,8 +1408,8 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
case MY_LEX_ESCAPE:
if (!lip->eof() && lip->yyGet() == 'N')
{ // Allow \N as shortcut for NULL
yylval->lex_str.str=(char*) "\\N";
yylval->lex_str.length=2;
yylval->lex_str.str= (char*) "\\N";
yylval->lex_str.length= 2;
return NULL_SYM;
}
/* Fall through */
......@@ -1562,8 +1562,8 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
if (my_isdigit(cs,lip->yyPeek())) // Number must have digit after sign
{
lip->yySkip();
while (my_isdigit(cs,lip->yyGet())) ;
yylval->lex_str=get_token(lip, 0, lip->yyLength());
while (my_isdigit(cs, lip->yyGet())) ;
yylval->lex_str= get_token(lip, 0, lip->yyLength());
return(FLOAT_NUM);
}
}
......@@ -1596,7 +1596,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
c = lip->yyGet();
if (c == '-' || c == '+')
c = lip->yyGet(); // Skip sign
if (!my_isdigit(cs,c))
if (!my_isdigit(cs, c))
{ // No digit after sign
state= MY_LEX_CHAR;
break;
......@@ -1669,11 +1669,11 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
case MY_LEX_BOOL:
if (c != lip->yyPeek())
{
state=MY_LEX_CHAR;
state= MY_LEX_CHAR;
break;
}
lip->yySkip();
tokval = find_keyword(lip,2,0); // Is a bool operator
tokval= find_keyword(lip, 2, 0); // Is a bool operator
lip->next_state= MY_LEX_START; // Allow signed numbers
return(tokval);
......@@ -1704,14 +1704,14 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
}
case MY_LEX_COMMENT: // Comment
lex->select_lex.options|= OPTION_FOUND_COMMENT;
while ((c = lip->yyGet()) != '\n' && c) ;
while ((c= lip->yyGet()) != '\n' && c) ;
lip->yyUnget(); // Safety against eof
state = MY_LEX_START; // Try again
state= MY_LEX_START; // Try again
break;
case MY_LEX_LONG_COMMENT: /* Long C comment? */
case MY_LEX_LONG_COMMENT: // Long C comment?
if (lip->yyPeek() != '*')
{
state=MY_LEX_CHAR; // Probable division
state= MY_LEX_CHAR; // Probable division
break;
}
lex->select_lex.options|= OPTION_FOUND_COMMENT;
......@@ -1782,7 +1782,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
thd->wsrep_consistency_check= CONSISTENCY_CHECK_DECLARED;
lip->yySkipn(5);
lip->set_echo(TRUE);
state=MY_LEX_START;
state= MY_LEX_START;
break; /* Do not treat contents as a comment. */
}
#endif /* WITH_WSREP */
......@@ -1851,12 +1851,12 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
state=MY_LEX_START;
}
else
state=MY_LEX_CHAR; // Return '*'
state= MY_LEX_CHAR; // Return '*'
break;
case MY_LEX_SET_VAR: // Check if ':='
if (lip->yyPeek() != '=')
{
state=MY_LEX_CHAR; // Return ':'
state= MY_LEX_CHAR; // Return ':'
break;
}
lip->yySkip();
......@@ -1905,10 +1905,10 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
case MY_LEX_STRING_OR_DELIMITER:
break;
case MY_LEX_USER_END:
lip->next_state=MY_LEX_SYSTEM_VAR;
lip->next_state= MY_LEX_SYSTEM_VAR;
break;
default:
lip->next_state=MY_LEX_HOSTNAME;
lip->next_state= MY_LEX_HOSTNAME;
break;
}
yylval->lex_str.str=(char*) lip->get_ptr();
......@@ -1916,7 +1916,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
return((int) '@');
case MY_LEX_HOSTNAME: // end '@' of user@hostname
for (c=lip->yyGet() ;
my_isalnum(cs,c) || c == '.' || c == '_' || c == '$';
my_isalnum(cs, c) || c == '.' || c == '_' || c == '$';
c= lip->yyGet()) ;
yylval->lex_str=get_token(lip, 0, lip->yyLength());
return(LEX_HOSTNAME);
......
......@@ -2914,7 +2914,7 @@ struct LEX: public Query_tables_list
*/
bool parse_vcol_expr;
enum SSL_type ssl_type; /* defined in violite.h */
enum SSL_type ssl_type; // defined in violite.h
enum enum_duplicates duplicates;
enum enum_tx_isolation tx_isolation;
enum enum_ha_read_modes ha_read_mode;
......@@ -2975,7 +2975,7 @@ struct LEX: public Query_tables_list
List<Item> prepared_stmt_params;
sp_head *sphead;
sp_name *spname;
bool sp_lex_in_use; /* Keep track on lex usage in SPs for error handling */
bool sp_lex_in_use; // Keep track on lex usage in SPs for error handling
bool all_privileges;
bool proxy_priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment