- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria
Now need to merge with latest xtradb before pushing
sql/ha_partition.cc:
Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
Changed to use opt_stack_trace instead of opt_pstack.
Removed references to pstack
sql/partition_element.h:
Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
Fixed wrong assert
Regression introduced in bug#52455. Problem was that the
fixed function did not set the last used partition variable, resulting
in wrong partition used when storing the position of the newly
retrieved row.
Fixed by setting the last used partition in ha_partition::index_read_idx_map.
Bug#57071: EXTRACT(WEEK from date_col) cannot be allowed as partitioning function
There were functions allowed as partitioning functions
that implicit allowed cast. That could result in unacceptable
behaviour.
Solution was to check that the arguments of date and time functions
have allowed types (field and date/datetime/time depending on function).
mysql-test/r/partition.result:
Updated result
mysql-test/r/partition_error.result:
Updated result
mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc:
disabled test with not allowed arguments.
mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
Updated result
mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
Updated result
mysql-test/t/partition.test:
Fixed typo in bug number and removed non allowed function (bad argument)
mysql-test/t/partition_error.test:
Added tests to verify correct type of argument.
sql/item.h:
Renamed processor since it is no longer only for timezone
sql/item_func.h:
Added help functions for checking date/time/datetime arguments.
sql/item_timefunc.h:
Added processors for argument correctness
sql/sql_partition.cc:
renamed the processor for checking arguments.
Bug#57113: ha_partition::extra(ha_extra_function):
Assertion `m_extra_cache' failed
Fix for bug#55458 included DBUG_ASSERTS causing
debug builds of the server to crash on
another multi-table update.
Removed the asserts since they where wrong.
(updated after testing the patch in 5.5).
mysql-test/r/partition.result:
updated result
mysql-test/t/partition.test:
Added test for bug#57113
sql/ha_partition.cc:
Removed the assert for m_extra_cache when
::extra(HA_PREPARE_FOR_UPDATE) was called.
Problem was that the handler call ::extra(HA_EXTRA_CACHE) was cached
but the ::extra(HA_EXTRA_PREPARE_FOR_UPDATE) was not.
Solution was to also cache the other call and forward it when moving
to a new partition to scan.
mysql-test/r/partition.result:
test result
mysql-test/t/partition.test:
New test from bug report.
sql/ha_partition.cc:
cache the HA_EXTRA_PREPARE_FOR_UPDATE just like HA_EXTRA_CACHE.
sql/ha_partition.h:
Added cache flag for HA_EXTRA_PREPARE_FOR_UPDATE
myisam tables
Queries following TRUNCATE of partitioned MyISAM table
may crash server if myisam_use_mmap is true.
Internally this is MyISAM bug, but limited to partitioned
tables, because MyISAM doesn't use ::delete_all_rows()
method for TRUNCATE, but goes via table recreate instead.
MyISAM didn't properly fall back to non-mmaped I/O after
mmap() failure. Was not repeatable on linux before, likely
because (quote from man mmap):
SUSv3 specifies that mmap() should fail if length is 0.
However, in kernels before 2.6.12, mmap() succeeded in
this case: no mapping was created and the call returned
addr. Since kernel 2.6.12, mmap() fails with the error
EINVAL for this case.
mysql-test/r/partition.result:
A test case for BUG#51868.
mysql-test/t/partition.test:
A test case for BUG#51868.
storage/myisam/mi_delete_all.c:
_mi_unmap_file() is compressed record format specific,
which is read-only. As compressed MyISAM data files are
read-only, we must never use _mi_unmap_file() in
mi_delete_all_rows().
storage/myisam/mi_dynrec.c:
Make myisam mmap code more durable to errors:
- set file_read/file_write handlers if mmap succeeded;
- reset file_read/file_write handlers on unmap.
storage/myisam/mi_extra.c:
Moved file_read/file_write handlers initialization to
mi_dynmap_file().
storage/myisam/myisamdef.h:
Added mi_munmap_file() declaration.
- Marked a couple of tests with --big
- Fixed xtradb/handler/ha_innodb.cc to call explain_filename()
storage/xtradb/handler/ha_innodb.cc:
Call explain_filename() to get proper names for partitioned tables
sql/sql_partition.cc:
Bug#45904 Used list_of_part_fields instead of list_of_subpart_fields to discover if KEY subpartitioning => caused failure when charset=utf8 even for subpartitioning by key, would also allow for subpartitioning by hash with utf8 erroneously
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.
This is a re-commit of Monty's merge to eliminate an extra commit from
MySQL-5.1.42 that was accidentally included in the merge.
This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In
case there are any extra changes done before final MySQL 5.1.41
release, these will need to be merged later before MariaDB 5.1.41
release.
Bug when setting up default partitioning,
used an uninitialized variabe.
mysql-test/r/partition.result:
Bug#48276: can't add column if subpartition exists
Added result
mysql-test/t/partition.test:
Bug#48276: can't add column if subpartition exists
Added test
sql/sql_partition.cc:
Bug#48276: can't add column if subpartition exists
even if is_create_table_ind was set, one tried to set no_subparts
with the unitialized no_parts local variable.
Fixed by rearrange the code to be to only execute
the statements when is_create_table_ind was not set.
ONLY_FULL_GROUP_BY
Problem was that during checking and preparation of the
partitioining function as a side effect in fix_fields
the full_group_by_flag was changed.
Solution was to set it back to its original value after
calling fix_fields.
Updated patch, to also exclude allow_sum_func from being
affected of fix_fields, as requested by reviewer.
mysql-test/r/partition.result:
Bug#46923: select count(*) from partitioned table fails with
ONLY_FULL_GROUP_BY
Updated result file
mysql-test/t/partition.test:
Bug#46923: select count(*) from partitioned table fails with
ONLY_FULL_GROUP_BY
Extended test case to cover this bug
sql/sql_partition.cc:
Bug#46923: select count(*) from partitioned table fails with
ONLY_FULL_GROUP_BY
Resetting full_group_by_flag and allow_sum_func
back to their original values,
not conflicting with the sql_mode 'ONLY_FULL_GROUP_BY'
backport for bug#44059 from mysql-pe to mysql-5.1-bugteam
Using the partition with most rows instead of first partition
to estimate the cardinality of indexes.
mysql-test/r/partition.result:
Bug#44059: Incorrect cardinality of indexes on a partitioned table
Added test result
mysql-test/t/partition.test:
Bug#44059: Incorrect cardinality of indexes on a partitioned table
Added test case
sql/ha_partition.cc:
Bug#44059: Incorrect cardinality of indexes on a partitioned table
Checking which partition that has the most rows, and using that
partition for HA_STATUS_CONST instead of first partition
INSERT ... SELECT ...
Problem was that when bulk insert is used on an empty
table/partition, it disables the indexes for better
performance, but in this specific case it also tries
to read from that partition using an index, which is
not possible since it has been disabled.
Solution was to allow index reads on disabled indexes
if there are no records.
Also reverted the patch for bug#38005, since that was a workaround
in the partitioning engine instead of a fix in myisam.
mysql-test/r/partition.result:
Bug#46639: 1030 (HY000): Got error 124 from storage engine on
INSERT ... SELECT ...
updated result file
mysql-test/t/partition.test:
Bug#46639: 1030 (HY000): Got error 124 from storage engine on
INSERT ... SELECT ...
Added testcase
sql/ha_partition.cc:
Bug#46639: 1030 (HY000): Got error 124 from storage engine on
INSERT ... SELECT ...
reverted the patch for bug#38005, since that was a workaround
around this problem, not needed after fixing it in myisam.
storage/myisam/mi_search.c:
Bug#46639: 1030 (HY000): Got error 124 from storage engine on
INSERT ... SELECT ...
Return HA_ERR_END_OF_FILE instead of HA_ERR_WRONG_INDEX
when there are no rows.
when partition is reoganized.
Problem was that table->timestamp_field_type was not changed
before copying rows between partitions.
fixed by setting it to TIMESTAMP_NO_AUTO_SET as the first thing
in fast_alter_partition_table, so that all if-branches is covered.
column on partitioned table
An assertion 'ASSERT_COULUMN_MARKED_FOR_READ' is failed if the query
is executed with index containing double column on partitioned table.
The problem is that assertion expects all the fields which are read,
to be in the read_set.
In this query only the field 'a' is in the readset as the tables in
the query are joined by the field 'a' and so the assertion fails
expecting other field 'b'.
Since the function cmp() is just comparison of two parameters passed,
the assertion is not required.
Fixed by removing the assertion in the double fields comparision
function and also fixed the index initialization to do ordered
index scan with RW LOCK which ensures all the fields from a key are in
the read_set.
Note: this bug is not reproducible with other datatypes because the
assertion doesn't exist in comparision function for other
datatypes.
mysql-test/r/partition.result:
Testcase for BUG#45816
mysql-test/t/partition.test:
Testcase for BUG#45816
sql/field.cc:
Removed the assertion ASSERT_COLUMN_MARED_FOR_READ in Field_double::cmp()
function
sql/ha_partition.cc:
Fixed index_int() method to make it initialize the read_set properly if
ordered index scan with RW lock is requested.
engine to the partition_csv test. Also remove test case that was
duplicated. Fix connection procedure with the embedded server.
mysql-test/r/partition.result:
Update test case result.
mysql-test/r/partition_csv.result:
Update test case result.
mysql-test/t/partition.test:
Move test cases to the partition_csv test.
mysql-test/t/partition_csv.test:
Move tests from partition.test and remove duplicate.
Tweaky connection procedure to work with embedded.
We disallow the partitioning of a log table. You could however
partition a table first, and then point logging to it. This is
not only against the docs, it also crashes the server.
We catch this case now.
mysql-test/r/partition.result:
results for 40281
mysql-test/t/partition.test:
test for 40281: show that trying to log to partitioned table fails rather
to crash the server
sql/ha_partition.cc:
Signal that we no longer support logging to partitioned tables,
as per the docs.
sql/sql_partition.cc:
Some commands like "USE ..." have no select, yet we may try
to parse partition info after their execution if user set a
partitioned table as log target. This shouldn't lead to a
NULL-deref/crash.
contains ONLY_FULL_GROUP_BY
The partitioning code needs to issue a Item::fix_fields()
on the partitioning expression in order to prepare
it for being evaluated.
It does this by creating a special table and a table list
for the scope of the partitioning expression.
But when checking ONLY_FULL_GROUP_BY the
Item_field::fix_fields() was relying that there always be
cached_table set and was trying to use it to get the
select_lex of the SELECT the field's table is in.
But the cached_table was not set by the partitioning code
that creates the artificial TABLE_LIST used to resolve the
partitioning expression and this resulted in a crash.
Fixed by rectifying the following errors :
1. Item_field::fix_fields() : the code that check for
ONLY_FULL_GROUP_BY relies on having tables with
cacheable_table set. This is mostly true, the only
two exceptions being the partitioning context table
and the trigger context table.
Fixed by taking the current parsing context if no pointer
to the TABLE_LIST instance is present in the cached_table.
2. fix_fields_part_func() :
2a. The code that adds the table being created to the
scope for the partitioning expression is mostly a copy
of the add_table_to_list and friends with one exception :
it was not marking the table as cacheable (something that
normal add_table_to_list is doing). This caused the
problem in the check for ONLY_FULL_GROUP_BY in
Item_field::fix_fields() to appear.
Fixed by setting the correct members to make the table
cacheable.
The ideal structural fix for this is to use a unified
interface for adding a table to a table list
(add_table_to_list?) : noted in a TODO comment
2b. The Item::fix_fields() was called with a NULL destination
pointer. This causes uninitalized memory reads in the
overloaded ::fix_fields() function (namely
Item_field::fix_fields()) as it expects a non-zero pointer
there. Fixed by passing the source pointer similarly to how
it's done in JOIN::prepare().
mysql-test/r/partition.result:
Bug #45807: test case
mysql-test/t/partition.test:
Bug #45807: test case
sql/item.cc:
Bug #45807: fix the ONLY_FULL_GROUP_BY check code to
handle correctly non-cacheable tables.
sql/sql_partition.cc:
Bug #45807: fix the Item::fix_fields() context
initializatio for the partitioning expression in
CREATE TABLE.
Problem: we don't prune a LESS THAN partition if MAXVALUE is given and
given value is equal to a LESS THAN value.
Fix: prune partitions in such cases.
mysql-test/r/partition.result:
Fix for bug#42944: partition not pruned correctly
- test result.
mysql-test/t/partition.test:
Fix for bug#42944: partition not pruned correctly
- test case.
sql/sql_partition.cc:
Fix for bug#42944: partition not pruned correctly
- prune partition if given value is equal to a LESS THAN value
and it's not a "PARTITION ... LESS THAN MAXVALUE" one.
Backport from 6.0
Changed error message to show that it is partitioning
that does not support foreign keys yet.
Changed spelling from British english to American english.
mysql-test/r/partition.result:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Changed spelling from British english to American english.
mysql-test/r/partition_mgm_err.result:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Changed spelling from British english to American english.
mysql-test/t/partition.test:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Added test for verifying error message
sql/share/errmsg.txt:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Changed spelling from British english to American english.
sql/sql_table.cc:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Using a better error message.
Problem was usage of read_range_first with an empty key.
Solution was to not to give a key if it was empty.
mysql-test/r/partition.result:
Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
Updated test result.
mysql-test/t/partition.test:
Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
Added test case
Problem: Many test cases don't clean up after themselves (fail
to drop tables or fail to reset variables). This implies that:
(1) check-testcase in the new mtr that currently lives in
5.1-rpl failed. (2) it may cause unexpected results in
subsequent tests.
Fix: make all tests clean up.
Also: cleaned away unnecessary output in rpl_packet.result
Also: fixed bug where rpl_log called RESET MASTER with a running
slave. This is not supposed to work.
Also: removed unnecessary code from rpl_stm_EE_err2 and made it
verify that an error occurred.
Also: removed unnecessary code from rpl_ndb_ctype_ucs2_def.
mysql-test/extra/rpl_tests/rpl_loaddata.test:
Made test clean up after itself.
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test:
Made test clean up after itself.
Also removed unnecessary save_master_pos.
Also made test verify that an error occurred.
mysql-test/extra/rpl_tests/rpl_truncate_helper.test:
Made test clean up after itself.
mysql-test/include/query_cache.inc:
Made test clean up after itself.
mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
Made test clean up after itself.
mysql-test/suite/rpl/t/rpl_alter_db.test:
Made test clean up after itself.
Easiest to refactor the test a little, to use an auxiliary database instead of mysql:
Then we don't need to read the collation at the start of the test and reset it at the
end of the test. We can just drop the database.
mysql-test/suite/rpl/t/rpl_drop_db.test:
Made test clean up after itself.
mysql-test/suite/rpl/t/rpl_drop_view.test:
Made test clean up after itself.
mysql-test/suite/rpl/t/rpl_events.test:
Made test clean up after itself.
mysql-test/suite/rpl/t/rpl_idempotency.test:
Made test clean up after itself.
mysql-test/suite/rpl/t/rpl_ignore_table.test:
Made test clean up after itself.
The existing cleanup code didn't work, because the --replicate-*
options prevented the "drop table" from being replicated. Moved
"drop table t4" to a statement of its own.
mysql-test/suite/rpl/t/rpl_packet.test:
Made test clean up after itself.
Also replaced SHOW SLAVE STATUS by query_get_value(SHOW SLAVE STATUS...),
since only one column of the result was interesting.
mysql-test/suite/rpl/t/rpl_row_max_relay_size.test:
Made test clean up after itself.
Instead of setting binlog format at the beginning of the test, we just
do 'source include/have_binlog_format_row.inc' like all other tests.
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test:
Made test clean up after itself.
mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test:
Made test clean up after itself.
Also removed unnecessary 'create table; drop table'
Also removed unnecessary use of --command
mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test:
Made test clean up after itself.
mysql-test/t/innodb-autoinc-optimize.test:
Made test clean up after itself.
mysql-test/t/innodb.test:
Made test clean up after itself.
mysql-test/t/log_tables.test:
Made test clean up after itself.
mysql-test/t/mysql_client_test.test:
Made test clean up after itself.
mysql-test/t/partition.test:
Made test clean up after itself.
mysql-test/t/status.test:
Made test clean up after itself.
order by
Problem was that the first index read was unordered,
and the next was ordered, resulting in use of
uninitialized data.
Solution was to use the correct variable to see if
the 'next' call should be ordered or not.
mysql-test/r/partition.result:
Bug#40494: MYSQL server crashes on range access with
partitioning and order by
Added test case for the bug.
mysql-test/t/partition.test:
Bug#40494: MYSQL server crashes on range access with
partitioning and order by
Added test case for the bug.
sql/ha_partition.cc:
Bug#40494: MYSQL server crashes on range access with
partitioning and order by
Used the wrong variable to decide to continue with
ordered or unordered scan.
The partitioning clause is only a very long single line, which is very
hard to interpret for a human. This patch breaks the partitioning
syntax into one line for the partitioning type, and one line per
partition/subpartition.
mysql-test/r/information_schema_part.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_archive.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_datatype.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_mgm.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_mgm_err.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_not_windows.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_range.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/r/partition_symlink.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/ndb/r/ndb_partition_key.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/ndb/r/ndb_partition_range.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/inc/partition_directory.inc:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Changed partitioning clause format for verifying the new output format.
mysql-test/suite/parts/r/ndb_dd_backuprestore.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/part_supported_sql_func_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_2_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_1_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_1_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_2_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter2_2_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter3_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter3_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter4_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_alter4_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_archive.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_blackhole.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_memory.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_bit_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_bit_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_bit_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_char_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_char_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_datetime_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_datetime_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_decimal_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_decimal_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_engine_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_engine_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_engine_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_float_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_float_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_int_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_int_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_int_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_archive.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_memory.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_archive.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_memory.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_archive.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_special_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_special_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_syntax_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/partition_syntax_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/parts/r/rpl_partition.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl/r/rpl_row_basic_8partition.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Updated test result due to the new partitioning clause output format.
mysql-test/t/partition.test:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Added small tests for for the new partitioning clause output format.
mysql-test/t/partition_mgm.test:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Added small tests for for the new partitioning clause output format.
sql/sql_partition.cc:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Changed formatting of the partitioning clause from single line into
multiple indented lines
sql/sql_show.cc:
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
Changed formatting of the partitioning clause from single line into
multiple indented lines
MyISAM blocks index usage for bulk insert into zero-records tables.
See ha_myisam::start_bulk_insert() lines from
...
if (file->state->records == 0 ...
...
That causes problems for partition engine when some partitions have records some not
as the engine uses same access method for all partitions.
Now partition engine doesn't call index_first/index_last
for empty tables.
per-file comments:
mysql-test/r/partition.result
Bug#38005 Partitions: error with insert select.
test result
mysql-test/t/partition.test
Bug#38005 Partitions: error with insert select.
test case
sql/ha_partition.cc
Bug#38005 Partitions: error with insert select.
ha_engine::index_first and
ha_engine::index_last not called for empty tables.
problems are located in the sql_partition.cc where functions calculation
partition_id don't expect error returned from item->val_int().
Fixed by adding checks to these functions.
Note - it tries to fix more problems than just the reported bug.
per-file comments:
modified:
mysql-test/r/partition.result
Bug#38083 Error-causing row inserted into partitioned table despite error
test result
mysql-test/t/partition.test
Bug#38083 Error-causing row inserted into partitioned table despite error
test case
sql/opt_range.cc
Bug#38083 Error-causing row inserted into partitioned table despite error
get_part_id() call fixed
sql/partition_info.h
Bug#38083 Error-causing row inserted into partitioned table despite error
get_subpart_id_func interface changed.
sql/sql_partition.cc
Bug#38083 Error-causing row inserted into partitioned table despite error
various functions calculationg partition_id and subpart_id didn't expect
an error returned from item->val_int(). Error checks added.
sporadic failures due to full disk.
Fix by truncating general_log before altering it.
(if running the full main-test, it can be big).
mysql-test/r/partition.result:
Bug#38120: main.partition fails sporadically
updated result file
mysql-test/t/partition.test:
Bug#38120: main.partition fails sporadically
Truncating general_log before altering it.
(if running the full main-test, it can be big
when altering it).
update accross partitions.
It's not Innodb-specific bug.
ha_partition::update_row() didn't set
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET when
orig_timestamp_type == TIMESTAMP_AUTO_SET_ON_INSERT.
So that a partition sets the timestamp field when a record
is moved to a different partition.
Fixed by doing '= TIMESTAMP_NO_AUTO_SET' unconditionally.
Also ha_partition::write_row() is fixed in same way as now
Field_timestamp::set() is called twice in SET_ON_INSERT case.
(Chad queues this patch on demand by Trudy/Davi.)
mysql-test/r/partition.result:
Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
test result
mysql-test/t/partition.test:
Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
test case
sql/ha_partition.cc:
Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
Do table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET unconditionally
in ha_partition::update_row and ::write_row()
partition is corrupt
The main problem was that ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR
PARTITION took another code path (over mysql_alter_table instead of
mysql_admin_table) which differs in two ways:
1) alter table opens the tables in a different way than admin tables do
resulting in returning with error before it tried the command
2) alter table does not start to send any diagnostic rows to the client
which the lower admin functions continue to use -> resulting in
assertion crash
The fix:
Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION to use
the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE t.
Adding check in mysql_admin_table to setup the partition list for
which partitions that should be used.
Partitioned tables will still not work with
REPAIR TABLE/PARTITION USE_FRM, since that requires moving partitions
to tables, REPAIR TABLE t USE_FRM, and check that the data still
fulfills the partitioning function and then move the table back to
being a partition.
NOTE: I have removed the following functions from the handler
interface:
analyze_partitions, check_partitions, optimize_partitions,
repair_partitions
Since they are not longer needed.
THIS ALTERS THE STORAGE ENGINE API
mysql-test/r/handler_innodb.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/r/innodb.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/r/innodb_mysql.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/r/partition.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/r/trigger-trans.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/suite/ndb/r/ndb_partition_key.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/ndb/t/ndb_partition_key.test:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/parts/inc/partition_alter4.inc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/parts/r/partition_alter4_innodb.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/parts/r/partition_alter4_myisam.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
mysql-test/suite/rpl/r/rpl_failed_optimize.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a note result row.
mysql-test/t/partition.test:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Updated after fixing ANALYZE/CHECK/OPTIMIZE/REPAIR partitioned
tables.
sql/ha_partition.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added a function for returning admin commands result rows
Updated handle_opt_partitions to handle admin commands result rows,
and some error filtering (as mysql_admin_table do).
Removed the functions analyze/check/optimize/repair_partitions
since they have no longer any use.
sql/ha_partition.h:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Removed analyze/check/optimize/repair_partitions since they
are no longer are needed.
sql/handler.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Removed analyze/check/optimize/repair_partitions since they
are no longer are needed.
sql/handler.h:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Removed analyze/check/optimize/repair_partitions since they
are no longer are needed.
sql/mysql_priv.h:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added set_part_state for reuse of code in mysql_admin_table.
(Originally fond in sql/sql_partition.cc:prep_alter_part_table)
sql/protocol.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added one assert and a debug print.
sql/sql_partition.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Refactored code for setting up partition state, set_part_state,
now used in both prep_alter_part_table and
sql_table.cc:mysql_admin_table.
Removed code for handling ANALYZE/CHECK/OPTIMIZE/REPAIR partitions,
since it is now handled by mysql_admin_table.
sql/sql_table.cc:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Added functionality in mysql_admin_table to work with partitioned
tables.
Fixed a possible assertion bug for HA_ADMIN_TRY_ALTER
(If analyze would output a row, it fails since the row was already
started).
sql/sql_yacc.yy:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION
to use the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE
instead of taking the ALTER TABLE path.
Added reset of alter_info for ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE
since it is now used by partitioned tables.
storage/myisam/mi_check.c:
Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt
Changed warning message from "Found X parts Should be: Y parts"
to "Found X key parts. Should be Y", since it could be confusing
with partitioned tables.
returns erroneous results
Used the wrong function when fixing 30480 which lead to
no stop on end_key resulting in duplicate results from index scan
Includes test cases for the duplicates 37327 and 37329,
Duplicate rows and bad performance/High Handler_read_next values
Recommit after merge issues
mysql-test/r/partition.result:
Bug#35931 List partition MyISAM table returns erroneous results
added test results.
mysql-test/t/partition.test:
Bug#35931 List partition MyISAM table returns erroneous results
added test for 35931, 37327 and 37329.
sql/ha_partition.cc:
Bug#35931 List partition MyISAM table returns erroneous results
HA_READ_ORDER is a index_flag, not a table_flag.
Error made in 30480.
Fixed a missed case in the patch for Bug#31931.
Also makes Bug#33722 a duplicate of Bug#31931.
Added tests for better coverage.
Replaced some legacy function calls.
mysql-test/r/partition.result:
Added tests for better coverage
mysql-test/r/partition_datatype.result:
Added tests for better coverage
mysql-test/r/partition_error.result:
Added tests for better coverage
mysql-test/suite/parts/inc/partition_engine.inc:
Bug#31931: Mix of handlers error message
Bug#33722 is fixed within this patch too
mysql-test/suite/parts/r/partition_engine_innodb.result:
Bug#31931: Mix of handlers error message
Bug#33722 is fixed within this patch too
mysql-test/suite/parts/r/partition_engine_myisam.result:
Bug#31931: Mix of handlers error message
Bug#33722 is fixed within this patch too
mysql-test/t/partition.test:
Added tests for better coverage
mysql-test/t/partition_datatype.test:
Added tests for better coverage
mysql-test/t/partition_error.test:
Added tests for Bug#31931
sql/partition_info.cc:
Bug#31931: Mix of handlers error message
Fixed case where given info->db_type not matched
thd->lex->create_info.db_type
And the check for inconsistent subpartition engines-clauses.
sql/sql_partition.cc:
Changed ha_legacy_type to ha_resolve_storage_engine_name
sql/sql_table.cc:
Changed ha_legacy_type to ha_resolve_storage_engine_name