#At file:///home/kgeorge/mysql/work/merge-pe/ based on revid:alik@stripped
3607 Georgi Kodinov 2009-09-23 [merge]
automerge
modified:
.bzr-mysql/default.conf
client/mysqltest.cc
mysql-test/collections/default.experimental
mysql-test/include/mtr_warnings.sql
mysql-test/mysql-test-run.pl
sql/ha_partition.cc
sql/ha_partition.h
=== modified file '.bzr-mysql/default.conf'
--- a/.bzr-mysql/default.conf 2009-09-22 18:28:01 +0000
+++ b/.bzr-mysql/default.conf 2009-09-23 08:41:13 +0000
@@ -1,4 +1,4 @@
[MYSQL]
post_commit_to = "commits@stripped"
post_push_to = "commits@stripped"
-tree_name = "mysql-6.0"
+tree_name = "mysql-pe"
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-09-22 18:28:01 +0000
+++ b/client/mysqltest.cc 2009-09-23 08:41:13 +0000
@@ -1535,7 +1535,7 @@ void show_diff(DYNAMIC_STRING* ds,
else
diff_name = 0;
#else
- diff_name = "diff"; // Otherwise always assume it's called diff
+ diff_name = "diff"; /* Otherwise always assume it's called diff */
#endif
if (diff_name)
=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental 2009-09-22 18:28:01 +0000
+++ b/mysql-test/collections/default.experimental 2009-09-23 08:41:13 +0000
@@ -6,8 +6,7 @@ backup.backup_datatypes @darwin
binlog.binlog_tmp_table* # Bug#45578 2009-07-10 alik Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2'
funcs_1.charset_collation_1 # depends on compile-time decisions
-
-main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
+main.plugin_load @solaris # Bug#42144
main.truncate_coverage # Bug#46785 2009-08-18 alik main.truncate_coverage fails sporadically
rpl.rpl_backup_multi* # BUG#45284
@@ -19,11 +18,11 @@ innodb.innodb_information_schema
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
+rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2
rpl_ndb.rpl_ndb_log # Bug#38998
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
main.plugin_load @solaris # Bug#47146
rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31
-
ndb.ndb_restore # Bug#37778 2009-07-30 alik ndb.ndb_restore fails randomly
ndb.ndb_restore_print # Bug#37778 2009-07-30 alik ndb.ndb_restore fails randomly
main.plugin* @solaris # Bug#47146 Linking problem with example plugin when dtrace enabled
=== modified file 'mysql-test/include/mtr_warnings.sql'
--- a/mysql-test/include/mtr_warnings.sql 2009-09-22 18:28:01 +0000
+++ b/mysql-test/include/mtr_warnings.sql 2009-09-23 08:41:13 +0000
@@ -162,7 +162,7 @@ INSERT INTO global_suppressions VALUES
("Slave: Unknown column 'c7' in 't15' Error_code: 1054"),
("Slave: Can't DROP 'c7'.* 1091"),
("Slave: Key column 'c6'.* 1072"),
- ("The slave I.O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."),
+ ("Slave I/O: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."),
(".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"),
/* Test case for Bug#31590 in order_by.test produces the following error */
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2009-09-22 18:28:01 +0000
+++ b/mysql-test/mysql-test-run.pl 2009-09-23 08:41:13 +0000
@@ -1825,7 +1825,7 @@ sub environment_setup {
my $plugin_filename;
if (IS_WINDOWS)
{
- $plugin_filename = "ha_example.dll";
+ $plugin_filename = "ha_example.dll";
}
else
{
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc 2009-09-11 23:07:02 +0000
+++ b/sql/ha_partition.cc 2009-09-23 08:41:13 +0000
@@ -3125,7 +3125,7 @@ int ha_partition::write_row(uchar * buf)
}
m_last_part= part_id;
DBUG_PRINT("info", ("Insert in partition %d", part_id));
- start_part_bulk_insert(part_id);
+ start_part_bulk_insert(thd, part_id);
tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
error= m_file[part_id]->ha_write_row(buf);
@@ -3189,7 +3189,7 @@ int ha_partition::update_row(const uchar
}
m_last_part= new_part_id;
- start_part_bulk_insert(new_part_id);
+ start_part_bulk_insert(thd, new_part_id);
if (new_part_id == old_part_id)
{
DBUG_PRINT("info", ("Update in partition %d", new_part_id));
@@ -3446,17 +3446,63 @@ void ha_partition::start_bulk_insert(ha_
Check if start_bulk_insert has been called for this partition,
if not, call it and mark it called
*/
-void ha_partition::start_part_bulk_insert(uint part_id)
+void ha_partition::start_part_bulk_insert(THD *thd, uint part_id)
{
+ long old_buffer_size;
if (!bitmap_is_set(&m_bulk_insert_started, part_id) &&
bitmap_is_set(&m_bulk_insert_started, m_tot_parts))
{
+ old_buffer_size= thd->variables.read_buff_size;
+ /* Update read_buffer_size for this partition */
+ thd->variables.read_buff_size= estimate_read_buffer_size(old_buffer_size);
m_file[part_id]->ha_start_bulk_insert(guess_bulk_insert_rows());
bitmap_set_bit(&m_bulk_insert_started, part_id);
+ thd->variables.read_buff_size= old_buffer_size;
}
m_bulk_inserted_rows++;
}
+/*
+ Estimate the read buffer size for each partition.
+ SYNOPSIS
+ ha_partition::estimate_read_buffer_size()
+ original_size read buffer size originally set for the server
+ RETURN VALUE
+ estimated buffer size.
+ DESCRIPTION
+ If the estimated number of rows to insert is less than 10 (but not 0)
+ the new buffer size is same as original buffer size.
+ In case of first partition of when partition function is monotonic
+ new buffer size is same as the original buffer size.
+ For rest of the partition total buffer of 10*original_size is divided
+ equally if number of partition is more than 10 other wise each partition
+ will be allowed to use original buffer size.
+*/
+long ha_partition::estimate_read_buffer_size(long original_size)
+{
+ /*
+ If number of rows to insert is less than 10, but not 0,
+ return original buffer size.
+ */
+ if (estimation_rows_to_insert && (estimation_rows_to_insert < 10))
+ return (original_size);
+ /*
+ If first insert/partition and monotonic partition function,
+ allow using buffer size originally set.
+ */
+ if (!m_bulk_inserted_rows &&
+ m_part_func_monotonicity_info != NON_MONOTONIC &&
+ m_tot_parts > 1)
+ return original_size;
+ /*
+ Allow total buffer used in all partition to go up to 10*read_buffer_size.
+ 11*read_buffer_size in case of monotonic partition function.
+ */
+
+ if (m_tot_parts < 10)
+ return original_size;
+ return (original_size * 10 / m_tot_parts);
+}
/*
Try to predict the number of inserts into this partition.
=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h 2009-09-11 23:07:02 +0000
+++ b/sql/ha_partition.h 2009-09-23 08:41:13 +0000
@@ -370,7 +370,8 @@ public:
virtual int end_bulk_insert(bool);
private:
ha_rows guess_bulk_insert_rows();
- void start_part_bulk_insert(uint part_id);
+ void start_part_bulk_insert(THD *thd, uint part_id);
+ long estimate_read_buffer_size(long original_size);
public:
virtual bool is_fatal_error(int error, uint flags)
Attachment: [text/bzr-bundle] bzr/joro@sun.com-20090923084113-1mufkwn7j7890cey.bundle
| Thread |
|---|
| • bzr commit into mysql-pe branch (joro:3607) | Georgi Kodinov | 23 Sep |