Loading mysql-test/r/identity.result 0 → 100644 +4 −0 Original line number Diff line number Diff line last_insert_id(345) 345 @@IDENTITY last_insert_id() 345 345 mysql-test/t/identity.test 0 → 100644 +2 −0 Original line number Diff line number Diff line select last_insert_id(345); select @@IDENTITY,last_insert_id(); sql/sql_lex.cc +13 −3 Original line number Diff line number Diff line Loading @@ -793,9 +793,19 @@ int yylex(void *arg) } break; case STATE_USER_END: // end '@' of user@hostname if (state_map[yyPeek()] != STATE_STRING && state_map[yyPeek()] != STATE_USER_VARIABLE_DELIMITER) lex->next_state=STATE_HOSTNAME; // Mark for next loop switch (state_map[yyPeek()]) { case STATE_STRING: case STATE_USER_VARIABLE_DELIMITER: break; case STATE_USER_END: lex->next_state=STATE_USER_END; yySkip(); break; default: lex->next_state=STATE_HOSTNAME; break; } yylval->lex_str.str=(char*) lex->ptr; yylval->lex_str.length=1; return((int) '@'); Loading Loading
mysql-test/r/identity.result 0 → 100644 +4 −0 Original line number Diff line number Diff line last_insert_id(345) 345 @@IDENTITY last_insert_id() 345 345
mysql-test/t/identity.test 0 → 100644 +2 −0 Original line number Diff line number Diff line select last_insert_id(345); select @@IDENTITY,last_insert_id();
sql/sql_lex.cc +13 −3 Original line number Diff line number Diff line Loading @@ -793,9 +793,19 @@ int yylex(void *arg) } break; case STATE_USER_END: // end '@' of user@hostname if (state_map[yyPeek()] != STATE_STRING && state_map[yyPeek()] != STATE_USER_VARIABLE_DELIMITER) lex->next_state=STATE_HOSTNAME; // Mark for next loop switch (state_map[yyPeek()]) { case STATE_STRING: case STATE_USER_VARIABLE_DELIMITER: break; case STATE_USER_END: lex->next_state=STATE_USER_END; yySkip(); break; default: lex->next_state=STATE_HOSTNAME; break; } yylval->lex_str.str=(char*) lex->ptr; yylval->lex_str.length=1; return((int) '@'); Loading