Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-81

different derived tables has refernce on the sema SELECT_LEX structure

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.2.11
    • Fix Version/s: 5.2.11
    • Component/s: None
    • Labels:
      None

      Description

      (gdb) frame 1
      #1 0x000000000069a948 in execute_sqlcom_select (thd=0x1b51408, all_tables=0x1bd0db0) at sql_parse.cc:5196
      (gdb) p all_tables->alias
      $1 = 0x1bd0d70 "t1"
      (gdb) p all_tables->select_lex
      $2 = (st_select_lex *) 0x1b53c28
      (gdb) p all_tables->next_global->next_global->alias
      $3 = 0x1bd1c28 "t2"
      (gdb) p all_tables->next_global->next_global->select_lex
      $4 = (st_select_lex *) 0x1b53c28
      (gdb) p thd->query()
      $5 = 0x1bcfc70 "select * from (select 1 as a) as t1 join (select * from test.t3) as t2"
      (gdb)

      the test suite is:
      create table t3 (a int);
      select * from (select 1 as a) as t1 join (select * from test.t3) as t2;
      drop table t3;

      Opened bug https://bugs.launchpad.net/maria/+bug/914224 to inform customers.
      This bug blocks fixing https://mariadb.atlassian.net/browse/MDEV-64

      Probably it is problem of parsing derived queries without tables.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              sanja Oleksandr Byelkin added a comment -

              It was my mistake the TABLE_LIST::select_lex shoudle be the same (in is where table is used).

              Show
              sanja Oleksandr Byelkin added a comment - It was my mistake the TABLE_LIST::select_lex shoudle be the same (in is where table is used).

                People

                • Assignee:
                  sanja Oleksandr Byelkin
                  Reporter:
                  sanja Oleksandr Byelkin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 day
                    1d
                    Remaining:
                    Time Spent - 30 minutes Remaining Estimate - 7 hours, 30 minutes
                    7h 30m
                    Logged:
                    Time Spent - 30 minutes Remaining Estimate - 7 hours, 30 minutes
                    30m