Problem was an unclear error message since it could suggest that
MyISAM did not support INSERT DELAYED.
Changed the error message to say that DELAYED is not supported by the
table, instead of the table's storage engine.
The confusion is that a partitioned table is in somewhat sense using
the partitioning storage engine, which in turn uses the ordinary
storage engine. By saying that the table does not support DELAYED we
do not give any extra informantion about the storage engine or if it
is partitioned.
mysql-test/r/innodb-replace.result:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/innodb-replace.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/merge.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/partition_hash.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
sql/share/errmsg.txt:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
added error message for tables not supporting DELAYED
sql/sql_insert.cc:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
Problem was for LINEAR HASH/KEY. Crashes because of wrong partition id
returned when creating the new altered partitions. (because of wrong
linear hash mask)
Solution: Update the linear hash mask before using it for the new
altered table.
mysql-test/r/partition_hash.result:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
test result
mysql-test/t/partition_hash.test:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentatition fault
test case
sql/ha_partition.cc:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
Updating the linear hash mask before using it.
sql/sql_partition.cc:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
exporting the set_linear_hash_mask function (static -> non static)
sql/sql_partition.h:
Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
exporting the set_linear_hash_mask function (static -> non static)
partitioned table
Post-pushbuild fix
Pushbuild detected a new need for lex initialization in
embedded server.
Fixed test for INSERT DELAYED in partitions_hash.test so that
it works with embedded server.
libmysqld/lib_sql.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
mysql-test/r/partition_hash.result:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Fixed test result for embedded server.
mysql-test/t/partition_hash.test:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Fixed test for embedded server.
partitioned table
Trying INSERT DELAYED on a partitioned table, that has not been
used right before, crashes the server. When a table is used for
select or update, it is kept open for some time. This period I
mean with "right before".
Information about partitioning of a table is stored in form of
a string in the .frm file. Parsing of this string requires a
correctly set up lexical analyzer (lex). The partitioning code
uses a new temporary instance of a lex. But it does still refer
to the previously active lex. The delayd insert thread does not
initialize its lex though...
Added initialization for thd->lex before open table in the delayed
thread and at all other places where it is necessary to call
lex_start() if all tables would be partitioned and need to parse
the .frm file.
mysql-test/r/partition_hash.result:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added test result
mysql-test/t/partition_hash.test:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added test
sql/event_scheduler.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/events.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/ha_ndbcluster_binlog.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/slave.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_acl.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_base.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Asserted that lex is initialized in open_table().
sql/sql_connect.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_insert.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added initialization for thd->lex before open table.
sql/sql_lex.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added 'is_lex_started' to test if lex is initialized.
sql/sql_lex.h:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added 'is_lex_started' to test if lex is initialized.
sql/sql_plugin.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_servers.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_udf.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/table.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Asserted that lex is initialized in open_table_from_share().
sql/tztime.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
into dator6.(none):/home/mikael/mysql_clones/bug18198
mysql-test/t/partition_hash.test:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into kindahl-laptop.dnsalias.net:/home/bk/b23051-mysql-5.1-rpl
BitKeeper/deleted/.del-binlog_row_blackhole.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
storage/blackhole/ha_blackhole.h:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/innobase/handler/ha_innodb.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
mysql-test/t/partition_hash.test:
Manual merge
sql/handler.h:
Manual merge
sql/set_var.cc:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_insert.cc:
Manual merge
sql/sql_parse.cc:
Manual merge
Adding support to allow engines to tell what formats they can handle.
The server will generate an error if it is not possible to log the
statement according to the logging mode in effect.
Adding flags to several storage engines to state what they can handle.
Changes to NDB handler removing code that forces row-based mode and
adding flag saying that NDB can only handle row format.
Adding check that binlog flags are only used for real tables that are
opened for writing.
BitKeeper/deleted/.del-binlog_row_blackhole.result:
Rename: mysql-test/r/binlog_row_blackhole.result -> BitKeeper/deleted/.del-binlog_row_blackhole.result
BitKeeper/deleted/.del-binlog_row_blackhole.test:
Rename: mysql-test/t/binlog_row_blackhole.test -> BitKeeper/deleted/.del-binlog_row_blackhole.test
mysql-test/t/partition_hash.test:
Adding error check for statement that might fail.
sql/ha_ndbcluster.cc:
Removing statements that switch to row-based format.
Adding row capabilities.
sql/handler.h:
Adding handler/table flags to indicate that the engine is row- and/or
statement-logging capable.
Adding typedef for table_flags type.
sql/set_var.cc:
Removing code that prevents changing binlog format when NDB is active.
sql/share/errmsg.txt:
Adding error messages for when row- and/or statement-based logging
formats cannot be used.
sql/sql_base.cc:
Adding business logic in lock_tables() to decide when an error should
be thrown because logging is not possible.
Add logic to switch to row format when that is allowed and needed.
---
Binlog flags should only be checked for real tables that are opened for
writing. Adding code to check that.
storage/archive/ha_archive.h:
Adding row- and statement-logging capabilities to engine.
storage/blackhole/ha_blackhole.h:
Blackhole can handle statement-format only.
storage/csv/ha_tina.h:
Adding row- and statement-logging capabilities to engine.
storage/example/ha_example.h:
For the example engine, we arbitrarily decided that it only can handle
row format.
storage/federated/ha_federated.h:
Adding row- and statement-logging capabilities to engine.
storage/heap/ha_heap.h:
Heap can handle both row- and statement-based logging format.
storage/myisam/ha_myisam.cc:
MyISAM can handle both row- and statement-based logging format.
storage/myisammrg/ha_myisammrg.h:
MyISAM can handle both row- and statement-based logging format.
mysql-test/r/binlog_multi_engine.result:
New BitKeeper file ``mysql-test/r/binlog_multi_engine.result''
mysql-test/t/binlog_multi_engine.test:
New BitKeeper file ``mysql-test/t/binlog_multi_engine.test''
mysql-test/t/partition.test:
Disable warnings around CREATE TABLE ... ENGINE=BLACKHOLE to make this test case work without Blackhole compiled into the server.
mysql-test/t/partition_hash.test:
Disable warnings around CREATE TABLE ... ENGINE=BLACKHOLE to make this test case work without Blackhole compiled into the server.
Review fixes
mysql-test/r/partition_range.result:
New test cases
mysql-test/t/partition_hash.test:
New test cases
mysql-test/t/partition_range.test:
New test cases
sql/item.h:
Review fixes
sql/partition_info.cc:
Review fixes
sql/sql_partition.cc:
Review fixes
Problem was with handling NULL values in ranges
mysql-test/r/partition_hash.result:
New partition pruning test cases
mysql-test/r/partition_list.result:
New partition pruning test cases
mysql-test/r/partition_pruning.result:
New partition pruning test cases
mysql-test/r/partition_range.result:
New partition pruning test cases
mysql-test/t/partition_hash.test:
New partition pruning test cases
mysql-test/t/partition_list.test:
New partition pruning test cases
mysql-test/t/partition_pruning.test:
New partition pruning test cases
mysql-test/t/partition_range.test:
New partition pruning test cases
sql/opt_range.cc:
Added comment
sql/sql_partition.cc:
Partition pruning didn't handle ranges with NULL values in a proper manner
Added test case for bug 18423
mysql-test/r/partition_hash.result:
Added test case for bug 18423
mysql-test/t/partition_hash.test:
Added test case for bug 18423
This bug was fixed through other patches. This test case just shows
that it is fixed.
mysql-test/r/partition_hash.result:
result block for bug #14524
mysql-test/t/partition_hash.test:
test block for bug# 14524
fixed
mysql-test/r/partition_hash.result:
results for newly added test.
mysql-test/t/partition_hash.test:
test case for inserting a value into a hash that would generate a negative value
sql/sql_partition.cc:
fields that generate a negative value would also generate a negative
part_id which doesn't index into the m_file array to well.