Review fixes
mysql-test/r/partition_range.result:
New test cases
mysql-test/t/partition_hash.test:
New test cases
mysql-test/t/partition_range.test:
New test cases
sql/item.h:
Review fixes
sql/partition_info.cc:
Review fixes
sql/sql_partition.cc:
Review fixes
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
into dator5.(none):/home/pappa/bug18198
mysql-test/r/partition.result:
Auto merged
mysql-test/r/partition_range.result:
Auto merged
mysql-test/t/partition_range.test:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/partition_info.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/partition.test:
manual merge
sql/item.h:
manual merge
sql/item_cmpfunc.h:
manual merge
In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database.
include/mysql/plugin.h:
Optional to pass parameter now to init and deinit functions
sql/ha_ndbcluster.cc:
Cleanup, handlerton is now a pointer.
sql/ha_ndbcluster_binlog.cc:
Cleanup (handlerton is now a pointer)
sql/ha_ndbcluster_binlog.h:
Cleanup (handlerton is now a pointer)
sql/ha_partition.cc:
Cleaned up handlerton change
sql/handler.cc:
Cheanup of handlerton change
sql/item_sum.cc:
Cleanedup of handlerton change
sql/log.cc:
Cleanup of handlerton change
sql/mysql_priv.h:
Reverted patch for variables (what would have happen previously if a have_ would have been called that was dynamically loaded? boom!)
sql/mysqld.cc:
Cleanup of handlerton changes and reverted have variable patch
sql/partition_info.cc:
Cleanup of handlerton (we need to clean this up a bit more).
sql/set_var.cc:
Cleanup related to handlerton changes
sql/sql_cache.cc:
Handlerton changes cleanup
sql/sql_insert.cc:
Handlerton changes cleanup.
sql/sql_partition.cc:
Handlerton cleanup changes
sql/sql_plugin.cc:
Handlerton changes.
init() can now be controlled by a plugin specific startup.
There was also an issue with how we deinited the status variables. It should have been occuring before we shut down the engines.
sql/sql_select.cc:
Handlerton cleanup changes
sql/sql_show.cc:
Handlerton cleanup changes
sql/sql_table.cc:
Handlerton cleanup changes
sql/table.cc:
Cleanup
storage/archive/ha_archive.cc:
Cleanup
storage/archive/ha_archive.h:
Cleanup
storage/blackhole/ha_blackhole.cc:
Cleanup
storage/csv/ha_tina.cc:
Cleanup
storage/example/ha_example.cc:
Cleanup
storage/federated/ha_federated.cc:
Cleanup
storage/heap/ha_heap.cc:
Cleanup
storage/innobase/handler/ha_innodb.cc:
Cleanup
storage/myisam/ha_myisam.cc:
Cleanup
storage/myisammrg/ha_myisammrg.cc:
Cleanup
into dator5.(none):/home/pappa/bug18198
mysql-test/r/partition.result:
Auto merged
mysql-test/t/partition.test:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/partition_info.cc:
manual merge
sql/partition_info.h:
manual merge
sql/sql_table.cc:
manual merge
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
mysql-test/r/partition.result:
Changed test case since no longer supported to use multicharacter collations
in comparisons
mysql-test/t/partition.test:
Changed test case since no longer supported to use multicharacter collations
in comparisons
sql/item.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_cmpfunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_func.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_strfunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_timefunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/item_xmlfunc.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/partition_info.cc:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/partition_info.h:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/sql_partition.cc:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
sql/sql_table.cc:
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
into c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug16002
mysql-test/r/partition.result:
Auto merged
mysql-test/t/partition.test:
Auto merged
sql/partition_info.cc:
manual merge
sql/sql_partition.cc:
manual merge
into c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19801
mysql-test/r/partition.result:
Auto merged
mysql-test/t/partition.test:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/partition_info.cc:
manual merge
into c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19307
mysql-test/r/partition.result:
Auto merged
mysql-test/t/partition.test:
Auto merged
sql/partition_info.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_partition.cc:
Auto merged
mysql-test/r/partition.result:
New test case
mysql-test/t/partition.test:
New test case
sql/partition_info.cc:
Disable CSV engine for partitioned tables
sql/share/errmsg.txt:
Update error message for more flexibility
sql/sql_partition.cc:
Editing fixes
mysql-test/r/partition_range.result:
Changed test cases
mysql-test/t/partition_range.test:
Changed test cases
sql/partition_info.cc:
Changes to resue signed integer code for unsigned integer partition functions
Basic idea is to store value - 0x8000000000000000 in list_array and range_int_array
and also perform this subtraction before applying get_partition_id_range and so
forth.
sql/sql_partition.cc:
Changes to resue signed integer code for unsigned integer partition functions
Basic idea is to store value - 0x8000000000000000 in list_array and range_int_array
and also perform this subtraction before applying get_partition_id_range and so
forth.
mysql-test/r/partition.result:
Added new test cases
mysql-test/r/partition_error.result:
Fixed test case
mysql-test/t/partition.test:
Added new test cases
mysql-test/t/partition_error.test:
Fixed test case
sql/ha_partition.cc:
Review fixes
sql/partition_element.h:
Review fixes
sql/partition_info.cc:
Review fixes
sql/share/errmsg.txt:
Review fixes
sql/sql_partition.cc:
Review fixes
sql/sql_yacc.yy:
Enabled possibility to use (MAXVALUE) as well as MAXVALUE.
Remove compiler warnings
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Fixed regex to get rid of xid= in output
mysql-test/r/mysqlcheck.result:
Drop client_test_db if mysql_client_test fails
mysql-test/t/mysqlcheck.test:
Drop client_test_db if mysql_client_test fails
mysql-test/t/mysqldump.test:
Use --defaults-file instead of --defaults-extra-file to avoid reading my.cnf files
sql/event_scheduler.cc:
Remove compiler warnings
sql/ha_partition.cc:
Don't divide with 0 when checking current auto_increment value
sql/handler.cc:
After merge fix
sql/mysqld.cc:
Remove comiler warning
sql/partition_info.cc:
After merge fix
Fixed memory reference overrun for some wrong partition definitions
sql/sql_base.cc:
After merge fix
Always set *leaves in setup_tables_and_check_access() (assume argument is always given).
sql/sql_select.cc:
Simple optimization
sql/sql_show.cc:
Remove compiler warning
sql/sql_table.cc:
After merge fix
storage/csv/ha_tina.cc:
Ensure table maps are restored properly
storage/ndb/include/ndbapi/Ndb.hpp:
Remove compiler warning
into c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19067
mysql-test/t/partition.test:
Auto merged
sql/partition_info.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/partition.result:
SCCS merged
into c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug18198
sql/item_cmpfunc.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/partition_info.cc:
Auto merged
sql/item.h:
manual merge
sql/share/errmsg.txt:
manual merge
Needed some special handling of the case when no_list_values == 0
mysql-test/r/partition.result:
Added a couple of new test cases
mysql-test/t/partition.test:
Added a couple of new test cases
sql/partition_info.cc:
Rearranged some code to handle case where no_list_values == 0 which
happens when one partition with only one value == NULL.
sql/sql_partition.cc:
Rearranged code to remove compiler warning and also since we
now have handled the case where no_list_values == 0 in a special
case before coming here
Added code for handling the special case where no_list_values == 0
mysql-test/r/partition.result:
New test case
mysql-test/t/partition.test:
New test case
sql/partition_info.cc:
Check for not merge handler in partitioned table
sql/share/errmsg.txt:
New error message
into c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19067
sql/partition_element.h:
Auto merged
sql/partition_info.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Manual merge
into xiphis.org:/home/antony/work2/wl3201.merge
BUILD/SETUP.sh:
Auto merged
libmysqld/Makefile.am:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/partition_info.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/archive/ha_archive.h:
Auto merged
storage/example/ha_example.cc:
Auto merged
Makefile.am:
Merge for WL#3201, some post-merge fixes will be required.
configure.in:
Merge for WL#3201
plugin/Makefile.am:
Merge for WL#3201
storage/innobase/Makefile.am:
Merge for WL#3201
into c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug16002
sql/ha_partition.cc:
Auto merged
sql/partition_info.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/partition.result:
manual merge
mysql-test/t/partition.test:
manual merge
sql/share/errmsg.txt:
manual merge
into c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug18198
sql/item_timefunc.h:
Auto merged
sql/partition_info.cc:
Auto merged
sql/share/errmsg.txt:
manual merge
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
into c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug18962
mysql-test/r/partition_pruning.result:
Auto merged
sql/partition_info.cc:
Auto merged
Changed variable name for improved clarity and debugging possibilities
Fixed bug in not assigning subpart_type
mysql-test/t/partition.test:
Added new test case
sql/partition_info.cc:
Changed variable name for improved clarity and debugging possibilities
Fixed bug in not assigning subpart_type
sql/sql_partition.cc:
Changed variable name for improved clarity and debugging possibilities
Fixed bug in not assigning subpart_type
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
" Configure support for server plugins "
storage/blackhole/ha_blackhole.h:
Rename: sql/ha_blackhole.h -> storage/blackhole/ha_blackhole.h
BitKeeper/deleted/.del-storage.m4~24bf2fffdaa328ad:
Delete: config/ac-macros/storage.m4
BitKeeper/deleted/.del-ha_archive.m4~a07fac7110b39294:
Delete: config/ac-macros/ha_archive.m4
BitKeeper/deleted/.del-ha_blackhole.m4~8ed06eb91f6420ed:
Delete: config/ac-macros/ha_blackhole.m4
BitKeeper/deleted/.del-ha_example.m4~1dfb268163297708:
Delete: config/ac-macros/ha_example.m4
BitKeeper/deleted/.del-ha_federated.m4~7acddd58286acfd6:
Delete: config/ac-macros/ha_federated.m4
BitKeeper/deleted/.del-ha_innodb.m4~6f141fb5b80c1f39:
Delete: config/ac-macros/ha_innodb.m4
BitKeeper/deleted/.del-ha_partition.m4~bc57067550be5f89:
Delete: config/ac-macros/ha_partition.m4
BitKeeper/deleted/.del-ha_tina.m4~f658506ebbc113ca:
Delete: config/ac-macros/ha_tina.m4
BitKeeper/deleted/.del-handlerton.cc.in~377156e7b06067cc:
Delete: sql/handlerton.cc.in
BitKeeper/deleted/.del-handlerton-win.cc~322a7e59507976df:
Delete: sql/handlerton-win.cc
BUILD/SETUP.sh:
WL#3201
Changes in configure arguments
Makefile.am:
WL#3201
changes in build subst names
config/ac-macros/ha_berkeley.m4:
WL#3201
remove unused variable
Makefile is always made
config/ac-macros/ha_ndbcluster.m4:
WL#3201
remove unused variables
Split big macro
configure.in:
WL#3201
out with storage.m4, in with plugins.m4
change how plugins are declared
include makefiles, remove handlerton.cc, add sql_builtin.cc
include/mysql/plugin.h:
WL#3201
support static and dynamic build - MYSQL_DYNAMIC_PLUGIN
libmysqld/Makefile.am:
WL#3201
Storage engine files still left in sql subdir are not conditionally
compiled. Should move them out soon,
plugin/Makefile.am:
WL#3201
update makefile
plugin/fulltext/Makefile.am:
WL#3201
update makefile
plugin/fulltext/plugin_example.c:
WL#3201
change to mysql_declare_plugin macro
sql/Makefile.am:
WL#3201
Storage engine files still left in sql subdir are not conditionally
compiled. Should move them out soon,
sql/ha_berkeley.cc:
WL#3201
make into a plugin
conditionally compile content
sql/ha_federated.cc:
WL#3201
make into a plugin
conditionally compile content
sql/ha_heap.cc:
WL#3201
make into a plugin
sql/ha_innodb.cc:
WL#3201
make into a plugin
conditionally compile content
sql/ha_myisam.cc:
WL#3201
make into a plugin
sql/ha_myisammrg.cc:
WL#3201
make into a plugin
sql/ha_ndbcluster.cc:
WL#3201
make into a plugin
conditionally compile content
sql/ha_ndbcluster_binlog.cc:
WL#3201
make into a plugin
conditionally compile content
sql/ha_partition.cc:
WL#3201
make into a plugin
conditionally compile content
sql/handler.cc:
WL#3201
Simplify how storage engines are found by db_type
(hopefully we can get rid of it soon)
Code cleanup
sql/handler.h:
WL#3201
new DB_TYPE_FIRST_DYNAMIC
new func ha_finalize_handlerton()
remove ha_register_builtin_plugins()
sql/log.cc:
WL#3201
make into a plugin
sql/mysqld.cc:
WL#3201
remove ha_register_builtin_plugins()
alter init order so that storage engines are initialized before first use
sql/partition_info.cc:
WL#3201
conditionally compile content
sql/sql_delete.cc:
WL#3201
conditionally include ha_innodb.h
sql/sql_plugin.cc:
WL#3201
All compiled in plugins are in mysqld_builtins[]
add funcs for plugin finalization
install builtin plugins on initialization
sql/sql_show.cc:
WL#3201
Fix to use plugin_foreach()
sql/sql_yacc.yy:
WL#3201
SHOW FULL PLUGIN
storage/archive/Makefile.am:
WL#3201
setup as plugin makefile
storage/archive/ha_archive.cc:
WL#3201
Convert into a plugin
storage/archive/ha_archive.h:
WL#3201
azlib.h now in local dir
storage/blackhole/ha_blackhole.cc:
WL#3201
convert into a plugin
storage/csv/Makefile.am:
WL#3201
setup as plugin makefile
storage/csv/ha_tina.cc:
WL#3201
remove conditional compilation on MYSQL_PLUGIN
mysql_declare_plugin macro change
storage/example/Makefile.am:
WL#3201
fix as new-style plugin makefile
storage/example/ha_example.cc:
WL#3201
remove conditional compilation on MYSQL_PLUGIN
mysql_declare_plugin macro change
storage/innobase/Makefile.am:
WL#3201
Lets make life easier and reduce innodb into a single library file
config/ac-macros/plugins.m4:
New BitKeeper file ``config/ac-macros/plugins.m4''
sql/sql_builtin.cc.in:
New BitKeeper file ``sql/sql_builtin.cc.in''
storage/blackhole/Makefile.am:
New BitKeeper file ``storage/blackhole/Makefile.am''
Fixed naming procedures for default partitioning and default subpartitioning
mysql-test/r/partition_pruning.result:
Fixed test cases for new naming of default subpartitions
mysql-test/r/partition_range.result:
New test case
mysql-test/t/partition_range.test:
New test case
sql/partition_info.cc:
Fixed naming procedures for default partitioning and default subpartitioning
sql/partition_info.h:
Fixed naming procedures for default partitioning and default subpartitioning
mysql-test/r/partition.result:
Added new test cases
mysql-test/t/partition.test:
Added new test cases
sql/partition_info.cc:
Check partition names that they don't have trailing spaces
sql/share/errmsg.txt:
Added error code for wrong partition names
sql/sql_partition.cc:
New method to add partition name strings, ignore OPTION_SHOW_QUOTE_CREATE
sql/sql_show.cc:
require_quotes had a bug with identifiers that consisted of only digits,
these are allowed identifiers but must be quoted and require_quote didn't
tell this.
sql/sql_yacc.yy:
Partition names should identifers and not ident_or_text
First step
sql/item.h:
Add function to check for partition function whether allowed or not.
In this first step allow only a field on its own.
Further steps will add a lot more possibilities.
sql/partition_info.cc:
Add a check whether the partition function is allowed by walking the
partition function expression.
sql/share/errmsg.txt:
Add a new error code for partition function not allowed
moved several functions from sql_partition to be member functions
sql/partition_info.h:
move these funcs from sql_partition to this class
sql/sql_partition.cc:
move these funcs from sql_partition to this class
sql/sql_table.cc:
calling the member func now instead
added THD::work_part_info member where we now store modified
partition_info structure.
It allows no solve problem when different parts of the part_info get
into different mem_roots
sql/partition_info.cc:
get_clone implementation
sql/partition_info.h:
get_clone() declared
sql/sql_class.h:
THD::work_part_info added
sql/sql_partition.cc:
thd->work_part_info instead of lex->part_info
sql/sql_table.cc:
thd->work_part_info instad of lex->part_info
sql/unireg.cc:
thd->work_part_info instad of lex->part_info
and new binlog format called "mixed" (which is statement-based except if only row-based is correct,
in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release):
SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default;
the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha.
It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE
TEMPORARY TABLE was not binlogged so temp table is not known on slave), or if NDB is enabled (because
NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below).
The added tests test the possibility or impossibility to SET, their effects, and the mixed mode,
including in prepared statements and in stored procedures and functions.
Caveats:
a) The mixed mode will not work for stored functions: in mixed mode, a stored function will
always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()).
b) for the same reason, changing the thread's binlog format inside a stored function is
refused with an error message.
c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask
Dmitri).
Additionally, as the binlog format is now changeable by each user for his session, I remove the implication
which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1
(not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically
set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled
phantom protection).
Plus fixes for compiler warnings.
mysql-test/r/rpl_row_4_bytes.result:
update
mysql-test/t/rpl_row_4_bytes.test:
don't influence next tests
sql/ha_archive.cc:
please pay attention to this structure when you change it...
sql/ha_berkeley.cc:
please pay attention to this structure when you change it...
sql/ha_blackhole.cc:
please pay attention to this structure when you change it...
sql/ha_federated.cc:
please pay attention to this structure when you change it...
sql/ha_heap.cc:
please pay attention to this structure when you change it...
sql/ha_innodb.cc:
please pay attention to this structure when you change it...
sql/ha_myisam.cc:
please pay attention to this structure when you change it...
sql/ha_myisammrg.cc:
please pay attention to this structure when you change it...
sql/ha_ndbcluster_binlog.cc:
no more global 'binlog_row_based'
sql/ha_partition.cc:
please pay attention to this structure when you change it...
sql/handler.cc:
please pay attention to this structure when you change it...
sql/handler.h:
it's good to initialize statically (to get no compiler warning) even if to a null value.
sql/item_func.cc:
UDFs require row-based if this is the "mixed" binlog format.
sql/item_strfunc.cc:
UUID() requires row-based binlogging if this is the "mixed" binlog format
sql/log.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/log.h:
the enum enum_binlog_format moves to log.h from mysqld.cc as we need it in several places.
sql/log_event.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/log_event.h:
this global variable not used anymore
sql/mysql_priv.h:
these global variables not used anymore
sql/mysqld.cc:
simplification in the handling of --binlog-format (but with no user-visible change), thanks to
the new global system variable.
RBR does not anymore turn on --log-bin-trust-function-creators and --innodb-locks-unsafe-for-binlog
as these are global options and RBR is now settable per session.
sql/partition_info.cc:
compiler warnings
sql/set_var.cc:
new class of thread's variable, to handle the binlog_format (like sys_var_thd_enum except
that is_readonly() is overriden for more checks before update).
compiler warnings (ok'd by Serg)
sql/set_var.h:
new class for the thread's binlog_format (see set_var.cc)
sql/share/errmsg.txt:
some messages for when one can't toggle from one binlog format to another
sql/sp_head.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_base.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_class.cc:
When a THD is initialized, we set its current_stmt_binlog_row_based
sql/sql_class.h:
new THD::variables.binlog_format (the value of the session variable set by SET
or inherited from the global value), and THD::current_stmt_binlog_row_based which tells if the
current statement does row-based or statement-based binlogging. Both members are needed
as the 2nd one cannot be derived only from the first one (the statement's type plays a role too),
and the 1st one is needed to reset the 2nd one.
sql/sql_delete.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_insert.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_load.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based.
sql/sql_parse.cc:
when we are done with a statement, we reset the current_stmt_binlog_row_based to the value
derived from THD::variables.binlog_format.
sql/sql_partition.cc:
compiler warning
sql/sql_show.cc:
compiler warning
sql/sql_table.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
tests/mysql_client_test.c:
compiler warning
mysql-test/r/ndb_binlog_basic2.result:
new result
mysql-test/r/rpl_switch_stm_row_mixed.result:
new result
mysql-test/t/ndb_binlog_basic2.test:
new test to verify that if cluster is enabled, can't change binlog format on the fly.
mysql-test/t/rpl_switch_stm_row_mixed.test:
test to see if one can switch between SBR, RBR, and "mixed" mode, and when one cannot,
and test to see if the switching, and the mixed mode, work properly (using UUID() to test,
as using UDFs is not possible in the testsuite for portability reasons).
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