Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.0, 5.5.28a, 5.3.11
    • Fix Version/s: 10.0.2, 5.5.29, 5.3.12
    • Component/s: None
    • Labels:
      None
    • Environment:
      windows, linux

      Description

      How to Repeat:
      ----------------

      
      --source include/have_innodb.inc
      
      drop table if exists `t1`,`t2`;
      create table `t1`(`a` char(1) character set utf8)engine=innodb;
      create table `t2`(`b` char(1) character set utf8)engine=memory;
      select distinct (select 1 from `t2` where `a`) `d2` from `t1`;
      

      Windows Call Stack:
      --------------------

      Version: '10.0.0-MariaDB-log'  socket: ''  port: 3306  Source distribution
      121228  8:08:23 [ERROR] mysqld got exception 0xc0000005 ;
      
      mysqld.exe!create_tmp_table()[sql_select.cc:14866]
      mysqld.exe!JOIN::init_execution()[sql_select.cc:1889]
      mysqld.exe!JOIN::exec_inner()[sql_select.cc:2452]
      mysqld.exe!JOIN::exec()[sql_select.cc:2262]
      mysqld.exe!mysql_select()[sql_select.cc:3192]
      mysqld.exe!handle_select()[sql_select.cc:362]
      mysqld.exe!execute_sqlcom_select()[sql_parse.cc:4937]
      mysqld.exe!mysql_execute_command()[sql_parse.cc:2421]
      mysqld.exe!mysql_parse()[sql_parse.cc:6061]
      mysqld.exe!dispatch_command()[sql_parse.cc:1219]
      mysqld.exe!do_command()[sql_parse.cc:951]
      mysqld.exe!threadpool_process_request()[threadpool_common.cc:225]
      mysqld.exe!io_completion_callback()[threadpool_win.cc:568]
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            The problem appeared in maria/5.3 with this revision:
            revno: 3563
            revision-id: sanja@montyprogram.com-20120825061557-qr5oab5l0w42pczl

            Show
            elenst Elena Stepanova added a comment - The problem appeared in maria/5.3 with this revision: revno: 3563 revision-id: sanja@montyprogram.com-20120825061557-qr5oab5l0w42pczl
            Hide
            sanja Oleksandr Byelkin added a comment -

            get_tmp_table_field returns really result_field in this case select distinct (1 + (select 1 from `t2` where `a`)) `d2` from `t1`;
            but in case of this bug result_field is NULL.

            Show
            sanja Oleksandr Byelkin added a comment - get_tmp_table_field returns really result_field in this case select distinct (1 + (select 1 from `t2` where `a`)) `d2` from `t1`; but in case of this bug result_field is NULL.
            Hide
            sanja Oleksandr Byelkin added a comment -

            temporary table is not created (and so result_field is not filled) becase the subquery is a constant.

            Show
            sanja Oleksandr Byelkin added a comment - temporary table is not created (and so result_field is not filled) becase the subquery is a constant.
            Hide
            sanja Oleksandr Byelkin added a comment -

            other constant excluded from group list earlier.

            Show
            sanja Oleksandr Byelkin added a comment - other constant excluded from group list earlier.
            Hide
            sanja Oleksandr Byelkin added a comment -

            fix commited for review.

            Show
            sanja Oleksandr Byelkin added a comment - fix commited for review.
            Hide
            sanja Oleksandr Byelkin added a comment -

            Pushed to 5.3

            Show
            sanja Oleksandr Byelkin added a comment - Pushed to 5.3

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: