From 168b2538e348591a35fa1c23c1dcce86aea6a738 Mon Sep 17 00:00:00 2001 From: "holyfoot/hf@mysql.com/hfmain.(none)" <> Date: Sun, 11 Mar 2007 22:30:54 +0400 Subject: [PATCH 1/2] Bug #26527 LOAD DATA INFILE extremely slow with partitioned table mysql_load calls hander::start_bulk_insert(0) to prepare caches for big inserts. As ha_partition didn't allow these caches for underlaying tables, the inserts were much slower --- sql/ha_partition.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index db0d118c2e0..e5b61b29423 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -2865,12 +2865,7 @@ void ha_partition::start_bulk_insert(ha_rows rows) handler **file; DBUG_ENTER("ha_partition::start_bulk_insert"); - if (!rows) - { - /* Avoid allocation big caches in all underlaying handlers */ - DBUG_VOID_RETURN; - } - rows= rows/m_tot_parts + 1; + rows= rows ? rows/m_tot_parts + 1 : 0; file= m_file; do { From ac8559359c01242196c39ff1c18d41ca87bfa31c Mon Sep 17 00:00:00 2001 From: "gluh@mysql.com/eagle.(none)" <> Date: Fri, 5 Oct 2007 12:29:02 +0500 Subject: [PATCH 2/2] test fix(to satisfy WIN) --- mysql-test/r/information_schema.result | 8 ++++---- mysql-test/t/information_schema.test | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 8c1a1e67443..0c6a1855072 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1386,7 +1386,7 @@ f7 datetime NO NULL f8 datetime YES 2006-01-01 00:00:00 drop table t1; End of 5.0 tests. -show fields from information_schema.TABLE_NAMES; -ERROR 42S02: Unknown table 'TABLE_NAMES' in information_schema -show keys from information_schema.TABLE_NAMES; -ERROR 42S02: Unknown table 'TABLE_NAMES' in information_schema +show fields from information_schema.table_names; +ERROR 42S02: Unknown table 'table_names' in information_schema +show keys from information_schema.table_names; +ERROR 42S02: Unknown table 'table_names' in information_schema diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 684deef120e..04ffd30ec62 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1094,7 +1094,7 @@ drop table t1; # Bug#30079 A check for "hidden" I_S tables is flawed # --error 1109 -show fields from information_schema.TABLE_NAMES; +show fields from information_schema.table_names; --error 1109 -show keys from information_schema.TABLE_NAMES; +show keys from information_schema.table_names;