Commit graph

17 commits

Author SHA1 Message Date
Mattias Jonsson
a8af693b50 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
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
2008-06-03 13:25:41 +02:00
unknown
4c31c41fdc Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
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)
2007-11-20 11:21:00 +01:00
unknown
076f2f732d Bug#31210 - INSERT DELAYED crashes server when used on
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.
2007-11-11 20:38:28 +01:00
unknown
e5b2745efc Bug#31210 - INSERT DELAYED crashes server when used on
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().
2007-11-05 16:25:40 +01:00
unknown
a80b1ba2c9 Merge dator6.(none):/home/mikael/mysql_clones/mysql-5.1-opt
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
2007-07-02 18:08:27 +02:00
unknown
43fb390959 Merge dator6.(none):/home/mikael/mysql_clones/clean-mysql-5.1
into  dator6.(none):/home/mikael/mysql_clones/bug18198


mysql-test/t/partition_hash.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/item.h:
  manual merge
sql/item_cmpfunc.h:
  manual merge
sql/item_func.h:
  manual merge
sql/item_strfunc.h:
  manual merge
sql/item_timefunc.h:
  manual merge
sql/item_xmlfunc.h:
  manual merge
sql/partition_info.cc:
  manual merge
sql/sql_partition.cc:
  manual merge
2007-06-13 16:03:18 +02:00
unknown
7eebcf2f99 BUG#23051 (READ COMMITTED breaks mixed and statement-based replication):
Post-merge fixes.


BitKeeper/deleted/.del-ndb_binlog_basic2.test:
  Delete: mysql-test/t/ndb_binlog_basic2.test
BitKeeper/deleted/.del-ndb_binlog_basic2.result:
  Delete: mysql-test/r/ndb_binlog_basic2.result
mysql-test/r/binlog_innodb.result:
  Result change
mysql-test/r/binlog_multi_engine.result:
  Result change
mysql-test/t/binlog_multi_engine.test:
  Changed error code
mysql-test/t/partition_hash.test:
  Changed error code
sql/sql_class.h:
  Fixes to select_create constructor argument list.
2007-06-13 12:28:35 +02:00
unknown
492ebf924b Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
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
2007-06-12 22:02:46 +02:00
unknown
098e15c164 WL#3303 (RBR: Engine-controlled logging format):
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''
2007-05-28 12:50:29 +02:00
unknown
a22aa8ef42 Two test cases didn't work without Blackhole compiled into the server.
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.
2007-04-26 08:22:05 +02:00
unknown
f66a3c0427 Reapplied patch for bug18198 2007-04-04 16:26:32 +02:00
unknown
417c38db9c BUG#18198: Partition function handling
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
2006-09-30 17:38:15 -04:00
unknown
d3b743ae18 BUG20733: Bug in partition pruning with zerofill field
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
2006-07-20 05:28:16 -04:00
unknown
8a43d4afee BUG#18423: Added test case for this bug that was already fixed (was issue with hash partitions not showing all rows in BETWEEN range
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
2006-04-10 10:44:47 -04:00
unknown
a0b5fe13e0 BUG# 14524 - Partitions: crash if blackhole
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
2006-01-30 10:07:39 -06:00
unknown
e262e74419 Bug# 15968 - Partitions: crash when insert with f1 = -1 into partition by hash(f1)
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.
2006-01-06 18:52:49 -06:00
unknown
cd483c5520 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00