Changed to use longlong10_to_str() instead of longlong2str() when base is 10 or -10 as former is much faster than later
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
client/mysqltest.cc:
longlong2str() -> longlong10_to_str()
include/m_string.h:
Added extra argument to longlong2str() to make it have same prototype is int2str()
mysys/charset.c:
Fixed compiler warning
mysys/mf_soundex.c:
Fixed compiler warning
mysys/my_getopt.c:
longlong2str() -> longlong10_to_str()
sql/create_options.cc:
Fixed compiler warning
sql/item_strfunc.cc:
Added extra argument to longlong2str
sql/opt_range.cc:
longlong2str() -> longlong10_to_str()
sql/partition_info.cc:
longlong2str() -> longlong10_to_str()
sql/slave.cc:
longlong2str() -> longlong10_to_str()
sql/sql_bitmap.h:
Added extra argument to longlong2str
sql/sql_partition.cc:
Added extra argument to longlong2str
sql/sql_select.cc:
longlong2str() -> longlong10_to_str()
sql/sql_show.cc:
Added extra argument to longlong2str
storage/innodb_plugin/handler/ha_innodb.cc:
Update to new parameters for longlong2str()
storage/maria/ma_dbug.c:
longlong2str() -> longlong10_to_str()
storage/maria/maria_chk.c:
Added extra argument to longlong2str
storage/myisam/mi_dbug.c:
longlong2str() -> longlong10_to_str()
storage/myisam/myisamchk.c:
Added extra argument to longlong2str
storage/xtradb/handler/ha_innodb.cc:
Update to new parameters for longlong2str()
strings/longlong2str.c:
Added extra argument to longlong2str() to make it have same prototype is int2str()
strings/my_vsnprintf.c:
Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit.
Added cast to get rid of compiler warnings
Item_hex_string::Item_hex_string
The status of memory allocation in the Lex_input_stream (called
from the Parser_state constructor) was not checked which led to
a parser crash in case of the out-of-memory error.
The solution is to introduce new init() member function in
Parser_state and Lex_input_stream so that status of memory
allocation can be returned to the caller.
mysql-test/r/error_simulation.result:
Added a test case for bug #42064.
mysql-test/t/error_simulation.test:
Added a test case for bug #42064.
mysys/my_alloc.c:
Added error injection code for the regression test.
mysys/my_malloc.c:
Added error injection code for the regression test.
mysys/safemalloc.c:
Added error injection code for the regression test.
sql/event_data_objects.cc:
Use the new init() member function of Parser_state and check
its return value to handle memory allocation failures.
sql/mysqld.cc:
Added error injection code for the regression test.
sql/sp.cc:
Use the new init() member function of Parser_state and check
its return value to handle memory allocation failures.
sql/sql_lex.cc:
Moved memory allocation from constructor to the separate init()
member function.
Added error injection code for the regression test.
sql/sql_lex.h:
Moved memory allocation from constructor to the separate init()
member function.
sql/sql_parse.cc:
Use the new init() member function of Parser_state and check
its return value to handle memory allocation failures.
sql/sql_partition.cc:
Use the new init() member function of Parser_state and check
its return value to handle memory allocation failures.
sql/sql_prepare.cc:
Use the new init() member function of Parser_state and check
its return value to handle memory allocation failures.
sql/sql_trigger.cc:
Use the new init() member function of Parser_state and check
its return value to handle memory allocation failures.
sql/sql_view.cc:
Use the new init() member function of Parser_state and check
its return value to handle memory allocation failures..
sql/thr_malloc.cc:
Added error injection code for the regression test.
concurrent I_S query
There were two problem:
1) MYSQL_LOCK_IGNORE_FLUSH also ignored name locks
2) there was a race between abort_and_upgrade_locks and
alter_close_tables
(i.e. remove_table_from_cache and
close_data_files_and_morph_locks)
Which allowed the table to be opened with MYSQL_LOCK_IGNORE_FLUSH flag
resulting in renaming a partition that was already in use,
which could cause the table to be unusable.
Solution was to not allow IGNORE_FLUSH to skip waiting for
a named locked table.
And to not release the LOCK_open mutex between the
calls to remove_table_from_cache and
close_data_files_and_morph_locks by merging the functions
abort_and_upgrade_locks and alter_close_tables.
mysql-test/suite/parts/r/partition_debug_sync_innodb.result:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Added test result
mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Added test option
mysql-test/suite/parts/t/partition_debug_sync_innodb.test:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Added test file
sql/authors.h:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Time to be acknowledged :)
sql/ha_partition.cc:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Added DEBUG_SYNC for deterministic testing
sql/mysql_priv.h:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Renamed function since merging alter_close_tables into
abort_and_upgrade_lock.
sql/sql_base.cc:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Changed MYSQL_LOCK_IGNORE_FLUSH to not ignore name locks
(open_placeholder).
Merged alter_close_tables into abort_and_upgrade_locks
(and added _and_close_table to the name)
to not release LOCK_open between remove_table_from_cache
and close_data_files_and_morph_locks.
Added DEBUG_SYNC for deterministic testing.
sql/sql_partition.cc:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Removed alter_close_tables, (merged it into
abort_and_upgrad_lock) so that LOCK_open never is released
between remove_table_from_cache and
close_data_files_and_morph_locks.
sql/sql_show.cc:
Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
concurrent I_S query
Added DEBUG_SYNC for deterministic testing
(regression)
Problem was that partition pruning did not exclude the
last partition if the range was beyond it
(i.e. not using MAXVALUE)
Fix was to not include the last partition if the
partitioning function value was not within the partition
range.
mysql-test/r/partition_innodb.result:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Updated result
mysql-test/r/partition_pruning.result:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Updated result
mysql-test/t/partition_innodb.test:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Added test for pruning in InnoDB, since it does not show
for MyISAM due to 'Impossible WHERE noticed after reading
const tables'.
mysql-test/t/partition_pruning.test:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Added test
sql/sql_partition.cc:
Bug#51830: Incorrect partition pruning on range partition
(regression)
Also increase the partition id if not inside the last partition
(and no MAXVALUE is defined).
Added comments and DBUG_ASSERT.
Bug#46949: memory leak with failed alter table to create partitions based on extract()
Bug#51830: Incorrect partition pruning on range partition (regression)
Fixed valgrind failure in select_describe(), read of uninitialized
Item_subselect::eliminated.
PBXT test file updates to reflect changes done in MySQL.
mysql-test/suite/pbxt/r/partition_error.result:
Result file update following MySQL 5.1.44 changes.
mysql-test/suite/pbxt/r/partition_pruning.result:
Result file update following MySQL 5.1.44 changes.
mysql-test/suite/pbxt/t/partition_error.test:
Test file update following MySQL 5.1.44 changes.
sql/item_subselect.cc:
Fixed valgrind failure in select_describe(), read of uninitialized
Item_subselect::eliminated:
- it turns out we can call select_describe() without having fixed
subquery items for child subselects. These are not the kind of subqueries
that we could eliminate, so the fix is to ensure that
item_subselect->eliminated==FALSE even before fix_fields is called.
Also added code to reset item_subselect->eliminated back to FALSE in
Item::reset() call.
sql/item_subselect.h:
Fixed valgrind failure in select_describe(), read of uninitialized
Item_subselect::eliminated:
- it turns out we can call select_describe() without having fixed
subquery items for child subselects. These are not the kind of subqueries
that we could eliminate, so the fix is to ensure that
item_subselect->eliminated==FALSE even before fix_fields is called.
Also added code to reset item_subselect->eliminated back to FALSE in
Item::reset() call.
sql/sql_partition.cc:
Fix Bug#51830: Revert part of the patch for Bug#49742, which caused the regression.
sql/table.cc:
Fix Bug#46949: memory leak in failed ALTER TABLE with partitioning.
There was no check for foreign keys when altering partitioned
tables.
Added check for FK when altering partitioned tables.
mysql-test/r/partition_innodb.result:
Bug#50104: Partitioned table with just 1 partion works with fk
Updated test result
mysql-test/t/partition_innodb.test:
Bug#50104: Partitioned table with just 1 partion works with fk
Added test for adding FK on partitioned tables (both 1 and 2
partitions)
sql/sql_partition.cc:
Bug#50104: Partitioned table with just 1 partion works with fk
Disabled adding foreign key when altering a partitioned table.
- 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
REORGANIZE PARTITION
There were several problems which lead to this this,
all related to bad error handling.
1) There was several bugs preventing the ddl-log to be used for
cleaning up created files on error.
2) The error handling after the copy partition rows did not close
and unlock the tables, resulting in deletion of partitions
which were in use, which lead InnoDB to put the partition to
drop in a background queue.
sql/ha_partition.cc:
Bug#47343: InnoDB fails to clean-up after lock wait timeout on
REORGANIZE PARTITION
Better error handling, if partition has been created/opened/locked
then make sure it is unlocked and closed before returning error.
The delete of the newly created partition is handled by the ddl-log.
sql/sql_parse.cc:
Bug#47343: InnoDB fails to clean-up after lock wait timeout on
REORGANIZE PARTITION
Fix a bug found when experimenting, thd could really be NULL here,
as mentioned in the function header.
sql/sql_partition.cc:
Bug#47343: InnoDB fails to clean-up after lock wait timeout on
REORGANIZE PARTITION
Used the correct .frm shadow name to put into the ddl-log.
Really use the ddl-log to handle errors.
sql/sql_table.cc:
Bug#47343: InnoDB fails to clean-up after lock wait timeout on
REORGANIZE PARTITION
Fixes of the ddl-log when used as error recovery (no crash).
When executing an entry from memory (not read from disk)
the name_len was not set correctly.
Problem was when calculating the range of partitions for
pruning.
Solution was to get the calculation correct. I also simplified
it a bit for easier understanding.
mysql-test/r/partition_pruning.result:
Bug#49742: Partition Pruning not working correctly for RANGE
Added results.
mysql-test/t/partition_pruning.test:
Bug#49742: Partition Pruning not working correctly for RANGE
Added tests to prevent regressions.
sql/sql_partition.cc:
Bug#49742: Partition Pruning not working correctly for RANGE
Simplified calculation for partition id for ranges.
Easier to get right and understand.
Added comments.
timestamp primary key
Since TIMESTAMP values are adjusted by the current time zone
settings in both numeric and string contexts, using any
expressions involving TIMESTAMP values as a
(sub)partitioning function leads to undeterministic behavior of
partitioned tables. The effect may vary depending on a storage
engine, it can be either incorrect data being retrieved or
stored, or an assertion failure. The root cause of this is the
fact that the calculated partition ID may differ from a
previously calculated ID for the same data due to timezone
adjustments of the partitioning expression value.
Fixed by disabling any expressions involving TIMESTAMP values
to be used in partitioning functions with the follwing two
exceptions:
1. Creating or altering into a partitioned table that violates
the above rule is not allowed, but opening existing such tables
results in a warning rather than an error so that such tables
could be fixed.
2. UNIX_TIMESTAMP() is the only way to get a
timezone-independent value from a TIMESTAMP column, because it
returns the internal representation (a time_t value) of a
TIMESTAMP argument verbatim. So UNIX_TIMESTAMP(timestamp_column)
is allowed and should be used to fix existing tables if one
wants to use TIMESTAMP columns with partitioning.
mysql-test/r/partition_bug18198.result:
Corrected the error.
mysql-test/r/partition_error.result:
Corrected error texts.
Added test cases for bug #42849.
mysql-test/t/partition_bug18198.test:
Corrected error code.
mysql-test/t/partition_error.test:
Corrected error codes.
Added test cases for bug #42849.
sql/item.h:
Added is_timezone_dependent_processor() to Item.
sql/item_func.h:
Added has_timestamp_args() and the implementation of
is_timezone_dependent_processor() for Item_func.
sql/item_timefunc.h:
Added is_timezone_dependent_processor() to
Item_func_unix_timestamp.
sql/share/errmsg.txt:
Renamed ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR to
ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR to better reflect the
meaning. Adjusted the error message.
sql/sql_partition.cc:
Modified fix_fields_part_func() to walk through partitioning
expression tree with is_timezone_dependent_processor() and issue
a warning/error if it depends on the timezone settings.
Changed fix_fields_part_func() to a static function since it is
not used anywhere except sql_partition.cc
sql/sql_partition.h:
Removed the unneeded declaration of fix_fields_part_func()
since it is now a static function.
sql/sql_yacc.yy:
ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR ->
ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR.
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'
Implemented the server infrastructure for the fix:
1. Added a function LEX_STRING *thd_query_string(THD) to return
a LEX_STRING structure instead of char *.
This is the function that must be called in innodb instead of
thd_query()
2. Did some encapsulation in THD : aggregated thd_query and
thd_query_length into a LEX_STRING and made accessor and mutator
methods for easy code updating.
3. Updated the server code to use the new methods where applicable.
* Finished Monty and Jani's merge
* Some InnoDB tests still fail (because it's old xtradb code run against
newer testsuite). They are expected to go after mergning with the latest
xtradb.
sql/opt_range.cc:
Removed duplicate code (if statement must have been duplicated during earlier merge).
sql/sql_partition.cc:
After mergeing bug#46362 and bug#20577, the NULL partition was also searched
when col = const, fixed by checking if = or range.
Problem was that the partition containing NULL values
was pruned away, since '2001-01-01' < '2001-02-00' but
TO_DAYS('2001-02-00') is NULL.
Added the NULL partition for RANGE/LIST partitioning on TO_DAYS()
function to be scanned too.
Also fixed a bug that added ALLOW_INVALID_DATES to sql_mode
(SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST
partitioned table would add it).
mysql-test/include/partition_date_range.inc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added include file to decrease test code duplication
mysql-test/r/partition_pruning.result:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added test results
mysql-test/r/partition_range.result:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Updated test result.
This fix adds the partition containing NULL values to
the list of partitions to be scanned.
mysql-test/t/partition_pruning.test:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added test case
sql/item.h:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added MONOTONIC_*INCREASE_NOT_NULL values to be used by TO_DAYS.
sql/item_timefunc.cc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Calculate the number of days as return value even for invalid dates.
This is so that pruning can be used even for invalid dates.
sql/opt_range.cc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Fixed a bug that added ALLOW_INVALID_DATES to sql_mode
(SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST
partitioned table would add it).
sql/partition_info.h:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Resetting ret_null_part when a single partition is to be used, this
to avoid adding the NULL partition.
sql/sql_partition.cc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Always include the NULL partition if RANGE or LIST.
Use the returned value for the function for pruning, even if
it is marked as NULL, so that even '2000-00-00' can be
used for pruning, even if TO_DAYS('2000-00-00') is NULL.
Changed == to >= in get_next_partition_id_list to avoid
crash if part_iter->part_nums is not correctly setup.
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.
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.
The problem: described in the bug report.
The fix:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
client/mysql.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/ha_ndbcluster.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/ha_ndbcluster_binlog.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/handler.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/log.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/mysqld.cc:
removed unnecessary line
sql/parse_file.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_acl.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_base.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_db.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_delete.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_partition.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_rename.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_show.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_table.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
sql/sql_view.cc:
--increase buffers where it's necessary
(buffers which are used in stxnmov)
--decrease buffer lengths which are used
as argument for strxnmov function
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.
- Added braces around expressions with &&, ||, & and |
- Added empty line before ; for empty while and for loops
- Added () around if with assignments
- Removed const before function returning simple type
Changed BUILD scripts to not build with NDB
BUILD/SETUP.sh:
By default, don't build ndb with --max in Maria tree.
NDB is not kept up to date anyway in 5.1
client/mysql.cc:
Added braces around && to get rid of compiler warnings
sql/event_db_repository.cc:
Added braces around && to get rid of compiler warnings
sql/events.cc:
Added braces around && to get rid of compiler warnings
sql/field.cc:
Added braces around && to get rid of compiler warnings
Fixed for loops
sql/field.h:
Added braces around & to get rid of compiler warnings
sql/field_conv.cc:
Added braces around && to get rid of compiler warnings
Fixed bug when copying between DATETIME fields and strict dates are used
Removed not needeed else
sql/gstream.cc:
Added braces around && to get rid of compiler warnings
sql/ha_ndbcluster.cc:
Added braces around && to get rid of compiler warnings
Added {} to get rid of compiler warnings
sql/handler.cc:
Added braces around && to get rid of compiler warnings
sql/item.cc:
Added braces around && to get rid of compiler warnings
sql/item_cmpfunc.cc:
Added braces around && to get rid of compiler warnings
Removed some not needed space
sql/item_func.cc:
Added braces around && to get rid of compiler warnings
sql/item_strfunc.cc:
Added braces around && to get rid of compiler warnings
sql/item_subselect.cc:
Added braces around && to get rid of compiler warnings
sql/item_sum.cc:
Added braces around && to get rid of compiler warnings
sql/item_timefunc.cc:
Added braces around && to get rid of compiler warnings
sql/item_xmlfunc.cc:
Added empty line before ; for empty while and for loops
sql/log.cc:
Added braces around && to get rid of compiler warnings
sql/log_event.cc:
Added braces around && to get rid of compiler warnings
Removed not needed else
sql/log_event_old.cc:
Added braces around && to get rid of compiler warnings
sql/opt_range.cc:
Added braces around && to get rid of compiler warnings
sql/opt_sum.cc:
Added braces around && to get rid of compiler warnings
sql/set_var.cc:
Added empty line before ; for empty while and for loops
Added () around if with assignments
sql/slave.cc:
Added braces around && to get rid of compiler warnings
Added empty line before ; for empty while and for loops
sql/spatial.h:
Added braces around && to get rid of compiler warnings
sql/sql_acl.cc:
Added braces around && to get rid of compiler warnings
sql/sql_analyse.cc:
Added empty line before ; for empty while and for loops
sql/sql_base.cc:
Added braces around && to get rid of compiler warnings
sql/sql_connect.cc:
Added braces around && to get rid of compiler warnings
sql/sql_db.cc:
Added braces around && to get rid of compiler warnings
sql/sql_delete.cc:
Added braces around && to get rid of compiler warnings
sql/sql_help.cc:
Added empty line before ; for empty while and for loops
sql/sql_insert.cc:
Added braces around && to get rid of compiler warnings
Added () around if with assignments
sql/sql_lex.cc:
Cast char array references to uchar; Fixed wrong array referencing when using characters > ASCII 128 in SQL statments
Added empty line before ; for empty while and for loops
Trivial indent fixes
Added braces around && to get rid of compiler warnings
sql/sql_load.cc:
Added braces around && to get rid of compiler warnings
sql/sql_parse.cc:
Added braces around && to get rid of compiler warnings
sql/sql_partition.cc:
Added braces around && to get rid of compiler warnings
sql/sql_plugin.cc:
Fixed bug in detecing if option variable should be readonly
Added empty line before ; for empty while and for loops
sql/sql_prepare.cc:
Added braces around && to get rid of compiler warnings
sql/sql_select.cc:
Added braces around && to get rid of compiler warnings
Added () around if with assignments
Added empty line before ; for empty while and for loops
sql/sql_show.cc:
Added braces around && to get rid of compiler warnings
sql/sql_table.cc:
Added braces around && to get rid of compiler warnings
sql/sql_trigger.cc:
Added braces around && to get rid of compiler warnings
sql/sql_update.cc:
Added braces around && to get rid of compiler warnings
sql/sql_yacc.yy:
Added braces around && to get rid of compiler warnings
sql/table.cc:
Added braces around && to get rid of compiler warnings
sql/table.h:
Added braces around && to get rid of compiler warnings
sql/time.cc:
Added braces around && to get rid of compiler warnings
sql/tztime.cc:
Added braces around && to get rid of compiler warnings
sql/uniques.cc:
Added braces around && to get rid of compiler warnings
storage/federated/ha_federated.cc:
Fixed bug in testing of variable to ha_info() (Not critical)
storage/heap/ha_heap.cc:
Added braces around && to get rid of compiler warnings
storage/maria/ha_maria.cc:
Fixed bug: Mark that maria_log_dir_path is readonly
Added braces around && to get rid of compiler warnings
storage/ndb/include/ndbapi/NdbEventOperation.hpp:
Removed const before function returning simple type
storage/ndb/include/ndbapi/NdbOperation.hpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/Ndb.cpp:
Added empty line before ; for empty while and for loops
storage/ndb/src/ndbapi/NdbEventOperation.cpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
Added empty line before ; for empty while and for loops
storage/ndb/src/ndbapi/TransporterFacade.hpp:
Added braces around && to get rid of compiler warnings
post push fix, added test found a valgrind warning
sql/sql_partition.cc:
Bug#40972: Partition pruning can lead to crash for bad dates
Fix for valgrind warning
Problem was an errornous date that lead to end partition
was before the start, leading to a crash.
Solution was to check greater or equal instead of only
equal between start and end partition.
NOTE: partitioning pruning handles incorrect dates
differently than index lookup, which can give different
results in a partitioned table versus a non partitioned
table for queries having 'bad' dates in the where clause.
mysql-test/r/partition_pruning.result:
Bug#40972: some sql execution lead the whole databse crashing
Updated result file
mysql-test/t/partition_pruning.test:
Bug#40972: some sql execution lead the whole databse crashing
Added test.
sql/sql_partition.cc:
Bug#40972: some sql execution lead the whole databse crashing
There can be cases where the start/cur partition is greater
than the end partition, so it must not continue, since that
can lead to a crash.