Bug#46754: 'rows' field doesn't reflect partition pruning
Update of test results after fixing the above bugs.
(fix in separate commit).
mysql-test/r/partition.result:
Updated test result after fixing bugs 46754 and 53806
mysql-test/r/partition_hash.result:
Updated test result after fixing bugs 46754 and 53806
mysql-test/r/partition_innodb.result:
Updated test result after fixing bugs 46754 and 53806
mysql-test/r/partition_range.result:
Updated test result after fixing bugs 46754 and 53806
mysql-test/suite/parts/r/partition_alter3_innodb.result:
Updated test result after fixing bugs 46754 and 53806
mysql-test/suite/parts/r/partition_alter3_myisam.result:
Updated test result after fixing bugs 46754 and 53806
problem was that ha_partition::records was not implemented, thus
using the default handler::records, which is not correct if the engine
does not support HA_STATS_RECORDS_IS_EXACT.
Solution was to implement ha_partition::records as a wrapper around
the underlying partitions records.
The rows column in explain partitions will now include the total
number of records in the partitioned table.
(recommit after removing out-commented code)
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().
Fixes of after review fixes
mysql-test/r/partition_hash.result:
Fixed test cases
mysql-test/r/partition_range.result:
Fixed test cases
mysql-test/t/partition_range.test:
Fixed test cases
sql/ha_ndbcluster.cc:
Fixed error printout to avoid complex character set code in print_error
sql/ha_partition.cc:
Fixed error printout to avoid complex character set code in print_error
sql/partition_info.cc:
Fixed error printout to avoid complex character set code in print_error
sql/partition_info.h:
Fixed error printout to avoid complex character set code in print_error
sql/sql_partition.cc:
indendentation fix
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.