• Alexander Barkov's avatar
    A cleanup for 84c55a56 (that implemented cursor FOR loops earlier): · f5b60857
    Alexander Barkov authored
      MDEV-10581 sql_mode=ORACLE: Explicit cursor FOR LOOP
      MDEV-12098 sql_mode=ORACLE: Implicit cursor FOR loop
    
    Cleanup changes:
    - Removing sp_lex_cursor::m_cursor_name
    - Adding sp_instr_cursor_copy_struct::m_cursor (the cursor global index)
    - Fixing sp_instr_cursor_copy_struct::print() to access to the cursor
      name using m_ctx and m_cursor (like other cursor related instructions do)
      instead of m_cursor_name.
    
    This change is needed to unify sp_assignment_lex and sp_cursor_lex later,
    to fix this problem easier:
     MDEV-16558 Parenthesized expression does not work as a lower FOR loop bound
    f5b60857
sql_lex.cc 237 KB