into dator5.(none):/home/pappa/bug18198
mysql-test/r/partition.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/item_func.h:
Auto merged
sql/partition_info.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_partition.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/item_cmpfunc.h:
e
fairly complex bug
mysql-test/r/partition.result:
Merge fix
sql/partition_info.cc:
Moved method from sql_partition.cc to the partition_info class
sql/partition_info.h:
Introduced a number of charset related arrays
Removed some bools that could be checked by checking arrays instead
sql/sql_partition.cc:
Introduced a number of charset related arrays
Removed some bools that could be checked by checking arrays instead
Made method of common complex if-statement
Made that method and check of partition function fields public methods
to enable use from partition_info class.
Moved method to partition_info class
Optimised copy_to_part_field_buffers method to avoid as much as possible
calculations in those. Also avoided double calls when both subpartitioning
and partitioning
Handled review comments
sql/sql_partition.h:
New methods public for use in partition_info class
sql/sql_yacc.yy:
Missed this in previous merge and review fixes
this key does not stop" (5.1 version).
UPDATE statement which WHERE clause used key and which invoked trigger
that modified field in this key worked indefinetely.
This problem occured because in cases when UPDATE statement was
executed in update-on-the-fly mode (in which row is updated right
during evaluation of select for WHERE clause) the new version of
the row became visible to select representing WHERE clause and was
updated again and again.
We already solve this problem for UPDATE statements which does not
invoke triggers by detecting the fact that we are going to update
field in key used for scanning and performing update in two steps,
during the first step we gather information about the rows to be
updated and then doing actual updates. We also do this for
MULTI-UPDATE and in its case we even detect situation when such
fields are updated in triggers (actually we simply assume that
we always update fields used in key if we have before update
trigger).
The fix simply extends this check which is done with help of
check_if_key_used()/QUICK_SELECT_I::check_if_keys_used()
routine/method in such way that it also detects cases when
field used in key is updated in trigger. We do this by
changing check_if_key_used() to take field bitmap instead
field list as argument and passing TABLE::write_set
to it (we also have to add info about fields used in
triggers to this bitmap a bit earlier).
As nice side-effect we have more precise and thus more optimal
perfomance-wise check for the MULTI-UPDATE.
Also check_if_key_used() routine and similar method were renamed
to is_key_used()/is_keys_used() in order to better reflect that
it is simple boolean predicate.
Finally, partition_key_modified() routine now also takes field
bitmap instead of field list as argument.
sql/key.cc:
Now check_if_key_used() takes field bitmap instead of field list as
argument (bitmaps are also used in its implementation).
It is no longer responsible for checking if key uses automatically
updated TIMESTAMP fields, instead callers should properly mark such
fields in field bitmap.
Also renamed this function to is_key_used().
sql/mysql_priv.h:
Renamed check_if_key_used() to is_key_used(), also now this routine
takes field bitmap instead of field list as argument.
sql/opt_range.cc:
QUICK_SELECT_I::check_if_keys_used() method and check_if_key_used()
routine were renamed to is_keys_used()/is_key_used(). Also now they
take bitmap instead of field list as argument.
sql/opt_range.h:
QUICK_SELECT_I::check_if_key_used() method was renamed to is_keys_used().
Now it takes field bitmap instead of field list as argument and no
longer responsible for checking if key uses automatically updated
TIMESTAMP fields. Instead callers should properly mark such fields
in field bitmap.
sql/sql_partition.cc:
partition_key_modified() now takes field bitmap instead of list
as argument.
sql/sql_partition.h:
partition_key_modified() now takes field bitmap as argument
instead of field list.
sql/sql_update.cc:
To detect situation in which trigger modifies part of key which is
going to be used for processing of where clause and thus makes
processing of this update with update-on-the-fly method unsafe
we use check_if_key_used() routine and similar method (which were
renamed to is_key_used()) plus information from TABLE::write_map
bitmap. Note that we have to call TABLE::mark_columns_needed_for_update()
method earlier now to fill this bitmap with information about fields
updated in triggers.
safe_update_on_fly() routine now uses the same approach and no
longer needs list of fields as argument.
mysql-test/r/ndb_partition_key.result:
Manicural changes removed a space from a double-space
mysql-test/r/partition.result:
Manicural changes removed a space from a double-space
Added new test case
mysql-test/r/partition_02myisam.result:
Manicural changes removed a space from a double-space
mysql-test/r/partition_range.result:
Manicural changes removed a space from a double-space
mysql-test/t/partition.test:
New test case
sql/sql_partition.cc:
Removed unnecessary extra spaces
Added show_partition_options set in the same way as when to show table options in SHOW CREATE TABLE
sql/sql_partition.h:
Removed unnecessary extra spaces
Added show_partition_options set in the same way as when to show table options in SHOW CREATE TABLE
sql/sql_show.cc:
Removed unnecessary extra spaces
Added show_partition_options set in the same way as when to show table options in SHOW CREATE TABLE
sql/sql_table.cc:
Removed unnecessary extra spaces
Added show_partition_options set in the same way as when to show table options in SHOW CREATE TABLE
mysql-test/r/partition.result:
New test cases
mysql-test/r/partition_02myisam.result:
ENGINE always specified per partition in show table
mysql-test/t/partition.test:
New test cases
sql/partition_element.h:
New copy constructor for partition_element
sql/partition_info.cc:
Use new copy constructor to ensure default subpartitions inherit partition options from parent
Ensure engine is always set on both partitions and subpartitions
sql/sql_partition.cc:
Removed unneeded bool to generate_partition_syntax
Write partition options also for subpartitioned tables when subpartitioning is by default
Set up defaults for new partitions also in REORGANIZE PARTITION
sql/sql_partition.h:
Removed unneeded parameter to generate_partition_syntax call
sql/sql_show.cc:
Removed unneeded parameter to generate_partition_syntax call
sql/sql_table.cc:
Removed unneeded parameter to generate_partition_syntax call
mysql-test/r/partition.result:
A number of new test cases for unsigned partition functions
mysql-test/r/partition_error.result:
A number of new test cases for unsigned partition functions
mysql-test/r/partition_range.result:
A number of new test cases for unsigned partition functions
mysql-test/t/partition.test:
A number of new test cases for unsigned partition functions
mysql-test/t/partition_error.test:
A number of new test cases for unsigned partition functions
mysql-test/t/partition_range.test:
A number of new test cases for unsigned partition functions
sql/ha_partition.cc:
Error message for no partition found needs to take signed/unsigned into account when printing erroneus value
sql/partition_element.h:
Introduced signed_flag and max_value flag on partition elements
Also list is now a list of a struct rather than simply longlong values
Small rearranges of order
sql/partition_info.cc:
Introduced signed_flag and max_value flag on partition elements
Also list is now a list of a struct rather than simply longlong values
Small rearranges of order
Lots of new code to handle checks of proper definition of table when
partition function is unsigned
sql/partition_info.h:
Mostly rearrangement of code and some addition of a THD object in check_partition_info call
plus a new method for comparing unsigned values
sql/share/errmsg.txt:
Negative values not ok for unsigned partition functions
sql/sql_partition.cc:
Fixed a multi-thread bug (when defining several partitioned tables in parallel)
New code to generate partition syntax that takes into account sign of constants.
Made function fix_fields_part_func more reusable.
Fixed a number of get_partition_id functions for range and list and similar functions
for partition pruning code.
Unfortunately fairly much duplication of code with just small changes.
sql/sql_partition.h:
New function headers
sql/sql_show.cc:
Changed list of values for LIST partitioned tables
Also fixed printing of unsigned values in INFORMATION SCHEMA for partitioned table
sql/sql_table.cc:
Fixed for new interface
sql/sql_yacc.yy:
Moved definition of struct to partition_element.h
Added code to keep track of sign of constants in
RANGE and LIST partitions
sql/table.cc:
Fixed for new interface
* Produce right results for conditions that were transformed to "(partitioning_range) AND
(list_of_subpartitioning_ranges)": make each partition id set iterator auto-reset itself
after it has returned all partition ids in the sequence
* Fix "Range mapping" and "Range mapping" partitioning interval analysis functions to
correctly deal with NULL values.
mysql-test/r/partition_pruning.result:
Testcase for BUG#18558
mysql-test/t/partition_pruning.test:
Testcase for BUG#18558
sql/opt_range.cc:
BUG#18558: Move partition set iterator initialization to sql_partition.cc, comment fixes
sql/partition_info.h:
BUG#18558: Make each partition set iterator auto-reset itself after it has returned all
partition ids in the set it enumerates.
sql/sql_partition.cc:
BUG#18558:
- Make each partition set iterator auto-reset itself after it has returned all
partition ids in the set it enumerates.
- Fix partition interval analysis to correctly handle intervals with one or both
NULL bounds.
sql/sql_partition.h:
BUG#18558:
- Make each partition set iterator auto-reset itself after it has returned all
partition ids in the set it enumerates.
- Rename PARTITION_ITERATOR::has_null_value to ret_null_part
Bug#18070 Partitions: wrong result on WHERE ... IS NULL
removed unnecessary code
added handling of NULL values
mysql-test/r/partition.result:
Bug#18053 Partitions: crash if null
Bug#18070 Partitions: wrong result on WHERE ... IS NULL
test case
mysql-test/t/partition.test:
Bug#18053 Partitions: crash if null
Bug#18070 Partitions: wrong result on WHERE ... IS NULL
test case
sql/opt_range.cc:
Bug#18053 Partitions: crash if null
Bug#18070 Partitions: wrong result on WHERE ... IS NULL
initialisation of part_iter.has_null_value
sql/sql_partition.h:
Bug#18053 Partitions: crash if null
Bug#18070 Partitions: wrong result on WHERE ... IS NULL
added has_null_value
libmysqld/Makefile.am:
changed name to partition_info.cc
mysql-test/r/partition_mgm_err.result:
added drop table for previous test
mysql-test/t/partition_mgm_err.test:
added drop table for previous test
sql/Makefile.am:
reformatted a bit
changed name of partition_info.cpp to partition_info.cc
sql/partition_element.h:
updated copyright date
sql/partition_info.cc:
minor corrections as a result of review
sql/partition_info.h:
updated copyright date
sql/sql_partition.cc:
updated file comment and fixed some spacing
sql/sql_partition.h:
updated copyright date
win/cmakefiles/sql:
changed name to partition_info.cc
Also, moved some of the code out of handler.h and into partition specific files for better
separation.
Also, moved some of the C funcs into partition_info as formal C++ methods
mysql-test/r/partition_mgm_err.result:
result block for test of bug # 15408
mysql-test/t/partition_mgm_err.test:
test for duplicate subpartition names
sql/Makefile.am:
adding sql_partition.h, partition_info.cpp, partition_info.h, and partition_element.h to the makefile
sql/ha_partition.cc:
using the new members of partition_info
sql/ha_partition.h:
using the new members of partition_info
sql/handler.h:
moved this code into sql_partition.h
sql/mysql_priv.h:
including sql_partition.h also now
sql/opt_range.cc:
using the new members of partition_info
sql/sql_partition.cc:
moved some of the functions out and into the partition_info class
using the new members of partition_info
sql/sql_show.cc:
using the new members of partition_info
win/cmakefiles/sql:
added partition_info.cpp to the sql cmake file
sql/partition_element.h:
New BitKeeper file ``sql/partition_element.h''
sql/partition_info.h:
New BitKeeper file ``sql/partition_info.h''
sql/sql_partition.h:
New BitKeeper file ``sql/sql_partition.h''