Commit 3d26fc50 authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

fixed IDENTITY crisis

parent a65f2448
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
last_insert_id(345)
345
@@IDENTITY	last_insert_id()
345	345
+2 −0
Original line number Diff line number Diff line
select last_insert_id(345);
select @@IDENTITY,last_insert_id();
+13 −3
Original line number Diff line number Diff line
@@ -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) '@');