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

server crash on subselect if WHERE applied to some result field

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.12, 5.5.34, 10.0.6
    • Fix Version/s: 5.5.35, 10.0.7, 5.3.13
    • Component/s: None
    • Labels:
      None
    • Environment:
      gentoo linux x86_64

      Description

      executing query:

      SELECT * FROM 
      ( SELECT 100 a, subsel.b FROM ( SELECT 200 b ) subsel ) tmp
      WHERE tmp.b;

      shows correct result:

      a       b
      100     200

      but server crashed after query:

      SELECT * FROM 
      ( SELECT 100 a, subsel.b FROM ( SELECT 200 b ) subsel ) tmp
      WHERE tmp.a;

      server log:

      Server version: 10.0.6-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467125 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x7fc533f28008
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7fc559b58e48 thread_stack 0x48000
      ??:0(??)[0xa44d1c]
      ??:0(??)[0x6d2f97]
      ??:0(??)[0x7fc559579110]
      ??:0(??)[0x6419a1]
      ??:0(??)[0x6ef7d1]
      ??:0(??)[0x6f2492]
      ??:0(??)[0x6f6035]
      ??:0(??)[0x71d9b5]
      ??:0(??)[0x5e42c6]
      ??:0(??)[0x5e4669]
      ??:0(??)[0x5f77b9]
      ??:0(??)[0x5f9e73]
      ??:0(??)[0x5fc474]
      ??:0(??)[0x5fd187]
      ??:0(??)[0x5af5b6]
      ??:0(??)[0x5b9720]
      ??:0(??)[0x5bc119]
      ??:0(??)[0x5bd7b9]
      ??:0(??)[0x65dc1a]
      ??:0(??)[0x65dc83]
      ??:0(??)[0x86bec7]
      ??:0(??)[0x7fc559571bbe]
      ??:0(??)[0x7fc55804ac9d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fc52d82a020): is an invalid pointer
      Connection ID (thread ID): 2
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=of
      f,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization
      =on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_so
      rt_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_b
      uffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: