Commit 91eac0bd authored by unknown's avatar unknown
Browse files

Fix for bug#15336 Partitions: crash if create table as select

  added HA_EXTRA_WRITE_CACHE case to ha_partition::extra()


mysql-test/r/partition.result:
  Fix for bug#15336 Partitions: crash if create table as select
    test case
mysql-test/t/partition.test:
  Fix for bug#15336 Partitions: crash if create table as select
    test case
parent de264164
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -562,4 +562,6 @@ partition by list (case when s1 > 'cz' then 1 else 2 end)
(partition p1 values in (1),
partition p2 values in (2));
drop table t1;
create table t1 (f1 int) partition by hash (f1) as select 1;
drop table t1;
End of 5.1 tests
+6 −0
Original line number Diff line number Diff line
@@ -723,4 +723,10 @@ partition by list (case when s1 > 'cz' then 1 else 2 end)
 partition p2 values in (2));
drop table t1;

#
# Bug#15336 Partitions: crash if create table as select
#
create table t1 (f1 int) partition by hash (f1) as select 1;
drop table t1;

--echo End of 5.1 tests
+1 −0
Original line number Diff line number Diff line
@@ -4703,6 +4703,7 @@ int ha_partition::extra(enum ha_extra_function operation)
    break;
  }
  case HA_EXTRA_NO_CACHE:
  case HA_EXTRA_WRITE_CACHE:
  {
    m_extra_cache= FALSE;
    m_extra_cache_size= 0;