• Mattias Jonsson's avatar
    Bug#56287: mysql5.1.50 crash when using Partition datetime in sub in query · 428f0bde
    Mattias Jonsson authored
    When having a sub query in partitioned innodb one could
    make the partitioning engine to search for a 'index_next_same'
    on a partition that had not been initialized.
    
    Problem was that the subselect function looks at table->status
    which was not set in the partitioning handler when it skipped
    scanning due to no matching partitions found.
    
    Fixed by setting table->status = STATUS_NOT_FOUND when
    there was no partitions to scan. (If there are partitions to
    scan, it will be set in the partitions handler.)
    
    
    mysql-test/r/partition_innodb.result:
      added result
    mysql-test/t/partition_innodb.test:
      added test
    sql/ha_partition.cc:
      set table status to not found, if there ar no partitions to scan.
    428f0bde
partition_innodb.result 15.4 KB