Currently there are mechanism to mark a system variable as
deprecated, but they are only used to print warning messages
when a deprecated variable is set.
Leverage the existing mechanisms in order to make the
deprecation information available at the --help output of mysqld by:
* Moving the deprecation information (i.e `deprecation_substitute`
attribute) from the `sys_var` class into the `my_option` struct.
As every `sys_var` contains its own `my_option` struct, the access
to the deprecation information remains available to `sys_var`
objects. `my_getotp` functions, which works directly with
`my_option` structs, gain access to this information while building
the --help output.
* For plugin variables, leverages the `PLUGIN_VAR_DEPRECATED` flag
and set the `deprecation_substitute` attribute accordingly when
building the `my_option` objects.
* Change the `option_cmp` function to use the `deprecation_substitute`
attribute instead of the name when sorting the options. This way
deprecated options and the substitutes will be grouped together.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
avoid contaminating my_getopt with sysvar implementation details.
adjust variable values after my_getopt, like it's done for others.
this fixes --help to show correct values.
This makes it easier to compare different costs and also allows
the optimizer to optimizer different storage engines more reliably.
- Added tests/check_costs.pl, a tool to verify optimizer cost calculations.
- Most engine costs has been found with this program. All steps to
calculate the new costs are documented in Docs/optimizer_costs.txt
- User optimizer_cost variables are given in microseconds (as individual
costs can be very small). Internally they are stored in ms.
- Changed DISK_READ_COST (was DISK_SEEK_BASE_COST) from a hard disk cost
(9 ms) to common SSD cost (400MB/sec).
- Removed cost calculations for hard disks (rotation etc).
- Changed the following handler functions to return IO_AND_CPU_COST.
This makes it easy to apply different cost modifiers in ha_..time()
functions for io and cpu costs.
- scan_time()
- rnd_pos_time() & rnd_pos_call_time()
- keyread_time()
- Enhanched keyread_time() to calculate the full cost of reading of a set
of keys with a given number of ranges and optional number of blocks that
need to be accessed.
- Removed read_time() as keyread_time() + rnd_pos_time() can do the same
thing and more.
- Tuned cost for: heap, myisam, Aria, InnoDB, archive and MyRocks.
Used heap table costs for json_table. The rest are using default engine
costs.
- Added the following new optimizer variables:
- optimizer_disk_read_ratio
- optimizer_disk_read_cost
- optimizer_key_lookup_cost
- optimizer_row_lookup_cost
- optimizer_row_next_find_cost
- optimizer_scan_cost
- Moved all engine specific cost to OPTIMIZER_COSTS structure.
- Changed costs to use 'records_out' instead of 'records_read' when
recalculating costs.
- Split optimizer_costs.h to optimizer_costs.h and optimizer_defaults.h.
This allows one to change costs without having to compile a lot of
files.
- Updated costs for filter lookup.
- Use a better cost estimate in best_extension_by_limited_search()
for the sorting cost.
- Fixed previous issues with 'filtered' explain column as we are now
using 'records_out' (min rows seen for table) to calculate filtering.
This greatly simplifies the filtering code in
JOIN_TAB::save_explain_data().
This change caused a lot of queries to be optimized differently than
before, which exposed different issues in the optimizer that needs to
be fixed. These fixes are in the following commits. To not have to
change the same test case over and over again, the changes in the test
cases are done in a single commit after all the critical change sets
are done.
InnoDB changes:
- Updated InnoDB to not divide big range cost with 2.
- Added cost for InnoDB (innobase_update_optimizer_costs()).
- Don't mark clustered primary key with HA_KEYREAD_ONLY. This will
prevent that the optimizer is trying to use index-only scans on
the clustered key.
- Disabled ha_innobase::scan_time() and ha_innobase::read_time() and
ha_innobase::rnd_pos_time() as the default engine cost functions now
works good for InnoDB.
Other things:
- Added --show-query-costs (\Q) option to mysql.cc to show the query
cost after each query (good when working with query costs).
- Extended my_getopt with GET_ADJUSTED_VALUE which allows one to adjust
the value that user is given. This is used to change cost from
microseconds (user input) to milliseconds (what the server is
internally using).
- Added include/my_tracker.h ; Useful include file to quickly test
costs of a function.
- Use handler::set_table() in all places instead of 'table= arg'.
- Added SHOW_OPTIMIZER_COSTS to sys variables. These are input and
shown in microseconds for the user but stored as milliseconds.
This is to make the numbers easier to read for the user (less
pre-zeros). Implemented in 'Sys_var_optimizer_cost' class.
- In test_quick_select() do not use index scans if 'no_keyread' is set
for the table. This is what we do in other places of the server.
- Added THD parameter to Unique::get_use_cost() and
check_index_intersect_extension() and similar functions to be able
to provide costs to called functions.
- Changed 'records' to 'rows' in optimizer_trace.
- Write more information to optimizer_trace.
- Added INDEX_BLOCK_FILL_FACTOR_MUL (4) and INDEX_BLOCK_FILL_FACTOR_DIV (3)
to calculate usage space of keys in b-trees. (Before we used numeric
constants).
- Removed code that assumed that b-trees has similar costs as binary
trees. Replaced with engine calls that returns the cost.
- Added Bitmap::find_first_bit()
- Added timings to join_cache for ANALYZE table (patch by Sergei Petrunia).
- Added records_init and records_after_filter to POSITION to remember
more of what best_access_patch() calculates.
- table_after_join_selectivity() changed to recalculate 'records_out'
based on the new fields from best_access_patch()
Bug fixes:
- Some queries did not update last_query_cost (was 0). Fixed by moving
setting thd->...last_query_cost in JOIN::optimize().
- Write '0' as number of rows for const tables with a matching row.
Some internals:
- Engine cost are stored in OPTIMIZER_COSTS structure. When a
handlerton is created, we also created a new cost variable for the
handlerton. We also create a new variable if the user changes a
optimizer cost for a not yet loaded handlerton either with command
line arguments or with SET
@@global.engine.optimizer_cost_variable=xx.
- There are 3 global OPTIMIZER_COSTS variables:
default_optimizer_costs The default costs + changes from the
command line without an engine specifier.
heap_optimizer_costs Heap table costs, used for temporary tables
tmp_table_optimizer_costs The cost for the default on disk internal
temporary table (MyISAM or Aria)
- The engine cost for a table is stored in table_share. To speed up
accesses the handler has a pointer to this. The cost is copied
to the table on first access. If one wants to change the cost one
must first update the global engine cost and then do a FLUSH TABLES.
This was done to be able to access the costs for an open table
without any locks.
- When a handlerton is created, the cost are updated the following way:
See sql/keycaches.cc for details:
- Use 'default_optimizer_costs' as a base
- Call hton->update_optimizer_costs() to override with the engines
default costs.
- Override the costs that the user has specified for the engine.
- One handler open, copy the engine cost from handlerton to TABLE_SHARE.
- Call handler::update_optimizer_costs() to allow the engine to update
cost for this particular table.
- There are two costs stored in THD. These are copied to the handler
when the table is used in a query:
- optimizer_where_cost
- optimizer_scan_setup_cost
- Simply code in best_access_path() by storing all cost result in a
structure. (Idea/Suggestion by Igor)
One should not change the program arguments!
This change also reduces warnings from the icc compiler.
Almost all changes are just syntax changes (adding const to
'get_one_option function' declarations).
Other changes:
- Added a few cast of 'argument' from 'const char*' to 'char *'. This
was mainly in calls to 'external' functions we don't have control of.
- Ensure that all reset of 'password command line argument' are similar.
(In almost all cases it was just adding a comment and a cast)
- In mysqlbinlog.cc and mysqld.cc there was a few cases that changed
the command line argument. These places where changed to instead allocate
the option in a MEM_ROOT to avoid changing the argument. Some of this
code was changed to ensure that different programs did parsing the
same way. Added a test case for the changes in mysqlbinlog.cc
- Changed a few variables that took their value from command line options
from 'char *' to 'const char *'.
MDEV-21298: mariabackup doesn't read from the [mariadbd] and [mariadbd-X.Y]
server option groups from configuration files
MDEV-21301: mariabackup doesn't read [mariadb-backup] option group in
configuration file
All three issues require to change the same code, that is why their
fixes are joined in one commit.
The fix is in invoking load_defaults_or_exit() and handle_options() for
backup-specific groups separately from client-server groups to let the last
handle_options() call fail on unknown backup-specific options.
The order of options procesing is the following:
1) Load server groups and process server options, ignore unknown
options
2) Load client groups and process client options, ignore unknown
options
3) Load backup groups and process client-server options, exit on
unknown option
4) Process --mysqld-args command line options, ignore unknown options
New global flag my_handle_options_init_variables was added to have
ability to invoke handle_options() for the same allowed options set
several times without re-initialising previously set option values.
--password value destroying is moved from option processing callback to
mariabackup's handle_options() function to have ability to invoke server's
handle_options() several times for the same possible allowed options
set.
Galera invokes wsrep_sst_mariabackup.sh with mysqld command line
options to configure mariabackup as close to the server as possible.
It is not known what server options are supported by mariabackup when the
script is invoked. That is why new mariabackup option "--mysqld-args" is added,
all unknown options that follow this option will be silently ignored.
wsrep_sst_mariabackup.sh was also changed to:
- use "--mysqld-args" mariabackup option to pass mysqld options,
- remove deprecated innobackupex mode,
- remove unsupported mariabackup options:
--encrypt
--encrypt-key
--rebuild-indexes
--rebuild-threads
it turns out that practically every single user of handle_options()
used the get_one_option callback. Simplify the code,
make it mandatory, adjust unit tests.
almost all my_getopt settings and callbacks are global variables,
directly assignable to configure my_getopt. Only getopt_get_addr
was using a setter function. Get rid of it, make it a global
directly assignable variable like all other settings.
Also make getopt_compare_strings() static.
This fixes MDEV-7742 and MDEV-8305 (Allow user to specify if stored
procedures should be logged in the slow and general log)
New functionality:
- Added new variables log_slow_disable_statements and log_disable_statements
that can be used to disable logging of certain queries to slow and
general log. Currently supported options are 'admin', 'call', 'slave'
and 'sp'.
Defaults are as before. Only 'sp' (stored procedure statements) is
disabled for slow and general_log.
- Slow log to files now includes the following new information:
- When logging stored procedure statements the name of stored
procedure is logged.
- Number of created tmp_tables, tmp_disk_tables and the space used
by temporary tables.
- When logging 'call', the logged status now contains the sum of all
included statements. Before only 'time' was correct.
- Added filsort_priority_queue as an option for log_slow_filter (this
variable existed before, but was not exposed)
- Added support for BIT types in my_getopt()
Mapped some old variables to bitmaps (old variables can still be used)
- Variable 'log_queries_not_using_indexes' is mapped to
log_slow_filter='not_using_index'
- Variable 'log_slow_slave_statements' is mapped to
log_slow_disabled_statements='slave'
- Variable 'log_slow_admin_statements' is mapped to
log_slow_disabled_statements='admin'
- All the above variables are changed to session variables from global
variables
Other things:
- Simplified LOGGER::log_command. We don't need to check for super if
OPTION_LOG_OFF is set as this flag can only be set if one is a super
user.
- Removed some setting of enable_slow_log as it's guaranteed to be set by
mysql_parse()
- mysql_admin_table() now sets thd->enable_slow_log
- Added prepare_logs_for_admin_command() to reset thd->enable_slow_log if
needed.
- Added new functions to store, restore and add slow query status
- Added new functions to store and restore query start time
- Reorganized Sub_statement_state according to types
- Added code in dispatch_command() to ensure that
thd->reset_for_next_command() is always called for a query.
- Added thd->last_sql_command to simplify checking of what was the type
of the last command. Needed when logging to slow log as lex->sql_command
may have changed before slow logging is called.
- Moved QPLAN_TMP_... to where status for tmp tables are updated
- Added new THD variable, affected_rows, to be able to correctly log
number of affected rows to slow log.
USING THE PLUGIN INTERFACE.
ISSUE: No support for floating-point plugin
system variables.
SOLUTION: Allowing plugins to define and expose floating-point
system variables of type double. MYSQL_SYSVAR_DOUBLE
and MYSQL_THDVAR_DOUBLE are added.
ISSUE: Fractional part of the def, min, max values of system
variables are ignored.
SOLUTION: Adding functions that are used to store the raw
representation of a double in the raw bits of unsigned
longlong in a way that the binary representation
remains the same.
In sql_class.cc, 'row_count', of type 'ha_rows', was used as last argument for
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD which is
"Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld".
So 'ha_rows' was used as 'long'.
On SPARC32 Solaris builds, 'long' is 4 bytes and 'ha_rows' is 'longlong' i.e. 8 bytes.
So the printf-like code was reading only the first 4 bytes.
Because the CPU is big-endian, 1LL is 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01
so the first four bytes yield 0. So the warning message had "row 0" instead of
"row 1" in test outfile_loaddata.test:
-Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
+Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 0
All error-messaging functions which internally invoke some printf-life function
are potential candidate for such mistakes.
One apparently easy way to catch such mistakes is to use
ATTRIBUTE_FORMAT (from my_attribute.h).
But this works only when call site has both:
a) the format as a string literal
b) the types of arguments.
So:
func(ER(ER_BLAH), 10);
will silently not be checked, because ER(ER_BLAH) is not known at
compile time (it is known at run-time, and depends on the chosen
language).
And
func("%s", a va_list argument);
has the same problem, as the *real* type of arguments is not
known at this site at compile time (it's known in some caller).
Moreover,
func(ER(ER_BLAH));
though possibly correct (if ER(ER_BLAH) has no '%' markers), will not
compile (gcc says "error: format not a string literal and no format
arguments").
Consequences:
1) ATTRIBUTE_FORMAT is here added only to functions which in practice
take "string literal" formats: "my_error_reporter" and "print_admin_msg".
2) it cannot be added to the other functions: my_error(),
push_warning_printf(), Table_check_intact::report_error(),
general_log_print().
To do a one-time check of functions listed in (2), the following
"static code analysis" has been done:
1) replace
my_error(ER_xxx, arguments for substitution in format)
with the equivalent
my_printf_error(ER_xxx,ER(ER_xxx), arguments for substitution in
format),
so that we have ER(ER_xxx) and the arguments *in the same call site*
2) add ATTRIBUTE_FORMAT to push_warning_printf(),
Table_check_intact::report_error(), general_log_print()
3) replace ER(xxx) with the hard-coded English text found in
errmsg.txt (like: ER(ER_UNKNOWN_ERROR) is replaced with
"Unknown error"), so that a call site has the format as string literal
4) this way, ATTRIBUTE_FORMAT can effectively do its job
5) compile, fix errors detected by ATTRIBUTE_FORMAT
6) revert steps 1-2-3.
The present patch has no compiler error when submitted again to the
static code analysis above.
It cannot catch all problems though: see Field::set_warning(), in
which a call to push_warning_printf() has a variable error
(thus, not replacable by a string literal); I checked set_warning() calls
by hand though.
See also WL 5883 for one proposal to avoid such bugs from appearing
again in the future.
The issues fixed in the patch are:
a) mismatch in types (like 'int' passed to '%ld')
b) more arguments passed than specified in the format.
This patch resolves mismatches by changing the type/number of arguments,
not by changing error messages of sql/share/errmsg.txt. The latter would be wrong,
per the following old rule: errmsg.txt must be as stable as possible; no insertions
or deletions of messages, no changes of type or number of printf-like format specifiers,
are allowed, as long as the change impacts a message already released in a GA version.
If this rule is not followed:
- Connectors, which use error message numbers, will be confused (by insertions/deletions
of messages)
- using errmsg.sys of MySQL 5.1.n with mysqld of MySQL 5.1.(n+1)
could produce wrong messages or crash; such usage can easily happen if
installing 5.1.(n+1) while /etc/my.cnf still has --language=/path/to/5.1.n/xxx;
or if copying mysqld from 5.1.(n+1) into a 5.1.n installation.
When fixing b), I have verified that the superfluous arguments were not used in the format
in the first 5.1 GA (5.1.30 'bteam@astra04-20081114162938-z8mctjp6st27uobm').
Had they been used, then passing them today, even if the message doesn't use them
anymore, would have been necessary, as explained above.
include/my_getopt.h:
this function pointer is used only with "string literal" formats, so we can add
ATTRIBUTE_FORMAT.
mysql-test/collections/default.experimental:
test should pass now
sql/derror.cc:
by having a format as string literal, ATTRIBUTE_FORMAT check becomes effective.
sql/events.cc:
Change justified by the following excerpt from sql/share/errmsg.txt:
ER_EVENT_SAME_NAME
eng "Same old and new event name"
ER_EVENT_SET_VAR_ERROR
eng "Error during starting/stopping of the scheduler. Error code %u"
sql/field.cc:
ER_TOO_BIG_SCALE 42000 S1009
eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu."
ER_TOO_BIG_PRECISION 42000 S1009
eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu."
ER_TOO_BIG_DISPLAYWIDTH 42000 S1009
eng "Display width out of range for column '%-.192s' (max = %lu)"
sql/ha_ndbcluster.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
(sizeof() returns size_t)
sql/ha_ndbcluster_binlog.cc:
Too many arguments for:
ER_GET_ERRMSG
eng "Got error %d '%-.100s' from %s"
Patch by Jonas Oreland.
sql/ha_partition.cc:
print_admin_msg() is used only with a literal as format, so ATTRIBUTE_FORMAT
works.
sql/handler.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
(sizeof() returns size_t)
sql/item_create.cc:
ER_TOO_BIG_SCALE 42000 S1009
eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu."
ER_TOO_BIG_PRECISION 42000 S1009
eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu."
'c_len' and 'c_dec' are char*, passed as %d !! We don't know their value
(as strtoul() failed), but they are likely big, so we use INT_MAX.
'len' is ulong.
sql/item_func.cc:
ER_WARN_DATA_OUT_OF_RANGE 22003
eng "Out of range value for column '%s' at row %ld"
ER_CANT_FIND_UDF
eng "Can't load function '%-.192s'"
sql/item_strfunc.cc:
ER_TOO_BIG_FOR_UNCOMPRESS
eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)"
max_allowed_packet is ulong.
sql/mysql_priv.h:
sql_print_message_func is a function _pointer_.
sql/sp_head.cc:
ER_SP_RECURSION_LIMIT
eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s"
max_sp_recursion_depth is ulong
sql/sql_acl.cc:
ER_PASSWORD_NO_MATCH 42000
eng "Can't find any matching row in the user table"
ER_CANT_CREATE_USER_WITH_GRANT 42000
eng "You are not allowed to create a user with GRANT"
sql/sql_base.cc:
ER_NOT_KEYFILE
eng "Incorrect key file for table '%-.200s'; try to repair it"
ER_TOO_MANY_TABLES
eng "Too many tables; MySQL can only use %d tables in a join"
MAX_TABLES is size_t.
sql/sql_binlog.cc:
ER_UNKNOWN_ERROR
eng "Unknown error"
sql/sql_class.cc:
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"
WARN_DATA_TRUNCATED 01000
eng "Data truncated for column '%s' at row %ld"
sql/sql_connect.cc:
ER_HANDSHAKE_ERROR 08S01
eng "Bad handshake"
ER_BAD_HOST_ERROR 08S01
eng "Can't get hostname for your address"
sql/sql_insert.cc:
ER_WRONG_VALUE_COUNT_ON_ROW 21S01
eng "Column count doesn't match value count at row %ld"
sql/sql_parse.cc:
ER_WARN_HOSTNAME_WONT_WORK
eng "MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work"
ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
eng "Too high level of nesting for select"
ER_UNKNOWN_ERROR
eng "Unknown error"
sql/sql_partition.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_plugin.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_prepare.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
ER_UNKNOWN_STMT_HANDLER
eng "Unknown prepared statement handler (%.*s) given to %s"
length value (for '%.*s') must be 'int', per the doc of printf()
and the code of my_vsnprintf().
sql/sql_show.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_table.cc:
ER_TOO_BIG_FIELDLENGTH 42000 S1009
eng "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead"
sql/table.cc:
ER_NOT_FORM_FILE
eng "Incorrect information in file: '%-.200s'"
ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error."
table->s->mysql_version is ulong.
sql/unireg.cc:
ER_TOO_LONG_TABLE_COMMENT
eng "Comment for table '%-.64s' is too long (max = %lu)"
ER_TOO_LONG_FIELD_COMMENT
eng "Comment for field '%-.64s' is too long (max = %lu)"
ER_TOO_BIG_ROWSIZE 42000
eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs"
Boolean options cause parsing failures when they are given
with prefix loose- and an argument, either in the command
line or in configuration file.
The reason was a faulty logic which forced the parsing
to throw an error when an argument of type NO_ARG was
used together with an argument which has been identified
as a key-value pair. Despite the attribute NO_ARG these
options actually take arguments if they are of type
BOOL.
include/my_getopt.h:
* More comments to help future refactoring
mysys/my_getopt.c:
* removed if-statement which prevented logic for handling boolean types with arguments to be executed.
* Added comments to aid in future refactoring.
strict aliasing violations.
Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.
As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.
The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
client/mysql.cc:
Remove now-unnecessary casts.
Break up large strings.
client/mysql_upgrade.c:
Remove now-unnecessary casts.
client/mysqladmin.cc:
Remove now-unnecessary casts.
Break up large strings.
client/mysqlbinlog.cc:
Remove now-unnecessary casts.
client/mysqlcheck.c:
Remove now-unnecessary casts.
client/mysqldump.c:
Remove now-unnecessary casts.
client/mysqlimport.c:
Remove now-unnecessary casts.
client/mysqlshow.c:
Remove now-unnecessary casts.
client/mysqlslap.c:
Remove now-unnecessary casts.
client/mysqltest.cc:
Remove now-unnecessary casts.
extra/comp_err.c:
Remove now-unnecessary casts.
extra/my_print_defaults.c:
Remove now-unnecessary casts.
Break up large strings.
extra/mysql_waitpid.c:
Remove now-unnecessary casts.
extra/perror.c:
Remove now-unnecessary casts.
extra/resolve_stack_dump.c:
Remove now-unnecessary casts.
extra/resolveip.c:
Remove now-unnecessary casts.
include/my_getopt.h:
Use a void pointer type as the opaque type to avoid problems with type
incompatibility -- GCC issues warnings when the type name is not type
compatible with a operand. As a side bonus, a explicit cast won't be
necessary anymore.
include/sslopt-longopts.h:
Remove now-unnecessary casts.
Break up large strings.
mysys/my_getopt.c:
Update opaque type and introduce a type definition for the
argument to my_getopt_register_get_addr.
server-tools/instance-manager/options.cc:
Remove now-unnecessary casts.
sql/mysqld.cc:
Remove now-unnecessary casts.
Break up large strings.
Update mysql_getopt_value prototype (the old prototype
was different from the definition anyway).
sql/sql_plugin.cc:
The type of a pointer to a function must be compatible with the
pointed-to function type, otherwise the behavior is undefined.
sql/table.cc:
The variable buf pointer to pointer to pointer to constant char
could improperly alias a incompatible type in call to fix_type_
pointers. Since this was actually dead code, it is simply removed.
sql/unireg.cc:
Remove call to get_form_pos. The code creates a new FRM file which
is always truncated and writes the form position as 0. Hence, no
need to retrieve it, we now for sure it is 0.
storage/archive/archive_reader.c:
Remove now-unnecessary casts.
storage/myisam/ft_nlq_search.c:
Read weight directly from the buffer.
storage/myisam/fulltext.h:
Add explanation about the type duality of a key buffer.
Add accessor macro to retrieve a FT float value.
storage/myisam/mi_test1.c:
Remove now-unnecessary casts.
storage/myisam/myisam_ftdump.c:
Read weight directly from the buffer.
storage/myisam/myisamchk.c:
Remove now-unnecessary casts.
storage/myisam/myisamlog.c:
A pointer to char was used to alias a pointer to pointer to
unsigned char, thus violating strict aliasing rules.
storage/myisam/myisampack.c:
Remove now-unnecessary casts.
strings/decimal.c:
Remove aliasing violation, printing the value is enough for
debugging purposes.
tests/mysql_client_test.c:
Remove now-unnecessary casts.
This patch:
- Moves all definitions from the mysql_priv.h file into
header files for the component where the variable is
defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables
Bug#20415 Output of mysqld --help --verbose is incomplete
Bug#25430 variable not found in SELECT @@global.ft_max_word_len;
Bug#32902 plugin variables don't know their names
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#34829 No default value for variable and setting default does not raise error
Bug#34834 ? Is accepted as a valid sql mode
Bug#34878 Few variables have default value according to documentation but error occurs
Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var.
Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status
Bug#40988 log_output_basic.test succeeded though syntactically false.
Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails)
Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#44797 plugins w/o command-line options have no disabling option in --help
Bug#46314 string system variables don't support expressions
Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number
Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
Bug#49417 some complaints about mysqld --help --verbose output
Bug#49540 DEFAULT value of binlog_format isn't the default value
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
Bug#49646 mysql --show-warnings crashes when server dies
CMakeLists.txt:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
client/mysql.cc:
don't crash with --show-warnings when mysqld dies
config/ac-macros/plugins.m4:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
include/my_getopt.h:
comments
include/my_pthread.h:
fix double #define
mysql-test/mysql-test-run.pl:
run sys_vars suite by default
properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0
escape gdb command line arguments
mysql-test/suite/sys_vars/r/rpl_init_slave_func.result:
init_slave+utf8 bug
mysql-test/suite/sys_vars/t/rpl_init_slave_func.test:
init_slave+utf8 bug
mysys/my_getopt.c:
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
mysys/typelib.c:
support for flagset
sql/ha_ndbcluster.cc:
backport from telco tree
sql/item_func.cc:
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
sql/sql_builtin.cc.in:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
sql/sql_plugin.cc:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#32902 plugin variables don't know their names
Bug#44797 plugins w/o command-line options have no disabling option in --help
sql/sys_vars.cc:
all server variables are defined here
storage/myisam/ft_parser.c:
remove unnecessary updates of param->quot
storage/myisam/ha_myisam.cc:
myisam_* variables belong here
strings/my_vsnprintf.c:
%o and %llx
unittest/mysys/my_vsnprintf-t.c:
%o and %llx tests
vio/viosocket.c:
bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
Several functions (mostly in mysqld.cc) directly call
exit() function in case of errors, which is not a desired
behaviour expecially in the embedded-server library.
Fixed by making these functions return error sign instead
of exiting.
per-file comments:
include/my_getopt.h
Bug#39289 libmysqld.a calls exit() upon error
added 'error' retvalue for my_getopt_register_get_addr
libmysqld/lib_sql.cc
Bug#39289 libmysqld.a calls exit() upon error
unireg_clear() function implemented
mysys/default.c
Bug#39289 libmysqld.a calls exit() upon error
error returned instead of exit() call
mysys/mf_tempdir.c
Bug#39289 libmysqld.a calls exit() upon error
free_tmpdir() - fixed so it's not produce crash on uninitialized
tmpdir structure
mysys/my_getopt.c
Bug#39289 libmysqld.a calls exit() upon error
error returned instead of exit() call
sql/mysql_priv.h
Bug#39289 libmysqld.a calls exit() upon error
unireg_abort definition fixed for the embedded server
sql/mysqld.cc
Bug#39289 libmysqld.a calls exit() upon error
various functions fixed
error returned instead of exit() call
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
client/mysqldump.c:
my_bool for C
client/mysqltest.c:
my_bool for C
extra/replace.c:
my_bool for C
include/my_getopt.h:
my_bool for C
include/my_global.h:
Prevent people from using bool in C, it causes real bugs.
include/my_sys.h:
my_bool for C
include/my_time.h:
my_bool for C
include/thr_lock.h:
my_bool for C
libmysql/libmysql.c:
my_bool for C
mysys/charset.c:
my_bool for C
mysys/my_getopt.c:
my_bool for C
mysys/queues.c:
my_bool for C
mysys/thr_lock.c:
my_bool for C
regex/reginit.c:
my_bool for C
sql/set_var.cc:
C functions use my_bool so we must use my_bool too.
sql/sql_plugin.cc:
C functions use my_bool so we must use my_bool too.
This fixes a real observed bug of Maria, because on some Mac OS X,
sizeof(bool) is 1 in C and 4 in C++, so the bool* does wrong.
Removing useless line.
storage/heap/hp_update.c:
my_bool for C
storage/myisam/mi_check.c:
my_bool for C
storage/myisam/mi_dynrec.c:
my_bool for C
storage/myisam/mi_search.c:
my_bool for C
storage/myisam/mi_update.c:
my_bool for C
storage/myisam/mi_write.c:
my_bool for C
storage/myisam/myisamdef.h:
my_bool for C
storage/myisam/myisamlog.c:
my_bool for C
storage/myisam/myisampack.c:
my_bool for C
tests/mysql_client_test.c:
my_bool for C
unittest/mysys/bitmap-t.c:
my_bool for C
vio/viosslfactories.c:
my_bool for C
5.1+ specific fixes (plugins etc.)
include/my_getopt.h:
make both ull and ll global
mysql-test/r/index_merge_myisam.result:
we throw warnings to the client, yea, verily
mysql-test/r/innodb.result:
we throw warnings to the client, yea, verily
mysql-test/r/variables.result:
we throw warnings to the client, yea, verily
mysql-test/t/variables.test:
correct result, is multiple of variable's block_size now
mysys/my_getopt.c:
export getopt_ll_limit_value(), check for integer wrap-around
in it, same as in ull variant. Only print warnings to reporter
when caller didn't ask for diagnostics, otherwise assume caller
will handle any warnings (id est, throw them client-wards)
sql/mysqld.cc:
correct signedness of "concurrent-insert"
sql/sql_plugin.cc:
Throw sys-var out-of-range warnings client-wards for
plugins, too.
into mysql.com:/misc/mysql/31177/51-31177
include/m_string.h:
Auto merged
include/my_getopt.h:
Auto merged
mysql-test/r/delayed.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/key_cache.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/type_bit.result:
Auto merged
mysql-test/r/type_bit_innodb.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/mysql_priv.h:
Auto merged
BitKeeper/deleted/.del-index_merge.result:
Auto merged
sql/set_var.cc:
Auto merged
mysql-test/r/variables.result:
manual merge
client/mysql.cc:
manual merge
client/mysqltest.c:
manual merge
mysql-test/r/subselect.result:
manual merge
mysys/my_getopt.c:
manual merge
sql/mysqld.cc:
manual merge
Default values of variables were not subject to upper/lower bounds
and step, while setting variables was. Bounds and step are also
applied to defaults now; defaults are corrected quietly, values
given by the user are corrected, and a correction-warning is thrown
as needed. Lastly, very large values could wrap around, starting
from 0 again. They are bounded at the maximum value for the
respective data-type now if no lower maximum is specified in the
variable's definition.
client/mysql.cc:
correct maxima in options array
client/mysqltest.c:
adjust minimum for "sleep" option so default value is no longer
out of bounds.
include/m_string.h:
ullstr() - the unsigned brother of llstr()
include/my_getopt.h:
Flag if we bounded the value (that is, correct anything aside from
making value a multiple of block-size)
mysql-test/r/delayed.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/index_merge.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb_mysql.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/key_cache.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/packet.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/ps.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/subselect.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit_innodb.result:
We throw a warning now when we adjust out of range parameters.
mysql-test/r/variables.result:
correct results: bounds and step apply to variables' default values, too
mysql-test/t/variables.test:
correct results: bounds and step apply to variables' default values, too
mysys/my_getopt.c:
- apply bounds/step to default values of variables (based on work by serg)
- print complaints about incorrect values for variables (truncation etc.,
by requestion of consulting)
- if no lower maximum is specified in variable definition, bound unsigned
values at their maximum to prevent wrap-around
- some calls to error_reporter had a \n, some didn't. remove \n from calls,
let reporter-function handle it, so the default reporter behaves like that
in mysqld
sql/mysql_priv.h:
correct RANGE_ALLOC_BLOCK_SIZE (cleared with monty)
sql/mysqld.cc:
correct maxima to correct data-type.
correct minima where higher than default.
correct range-alloc-block-size.
correct inno variables so GET_* corresponds to actual variable's type.
sql/set_var.cc:
When the new value for a variable is out of bounds, we'll send the
client a warning (but not if the value was simply not a multiple of
'blocksize'). sys_var_thd_ulong had this, sys_var_long_ptr_global
didn't; broken out and streamlined to avoid duplication of code.
strings/llstr.c:
ullstr() - the unsigned brother of llstr()
"Disabled plugin is provoking Valgrind error"
If there are any auto-alloced string plug-in options, memory is
allocated during the call for handle_options(). We must free this
memory if we are not installing the plug-in.
include/my_getopt.h:
bug31382
new function: my_cleanup_options()
mysys/my_getopt.c:
bug31382
new function: my_cleanup_options(), fini_one_value()
alter init_variables() to take an extra option.
forward declare init_one_value() and fini_one_value()
sql/sql_plugin.cc:
bug31382
after calling handle_options(), make sure to call my_cleanup_options()
if we are not installing the plug-in.
--long-query-time is now given in seconds with microseconds as decimals
--min_examined_row_limit added for slow query log
long_query_time user variable is now double with 6 decimals
Added functions to get time in microseconds
Added faster time() functions for system that has gethrtime() (Solaris)
We now do less time() calls.
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
set_var.cc and my_getopt() can now handle DOUBLE variables.
All time() calls changed to my_time()
my_time() now does retry's if time() call fails.
Added debug function for stopping in mysql_admin_table() when tables are locked
Some trivial function and struct variable renames to avoid merge errors.
Fixed compiler warnings
Initialization of some time variables on windows moved to my_init()
include/my_getopt.h:
Added support for double arguments
include/my_sys.h:
Fixed wrong type to packfrm()
Added new my_time functions
include/mysql/plugin.h:
Added support for DOUBLE
libmysql/CMakeLists.txt:
Added new time functions
libmysql/Makefile.shared:
Added new time functions
mysql-test/r/variables.result:
Testing of long_query_time
mysql-test/t/variables.test:
Testing of long_query_time
mysys/charset.c:
Fixed compiler warnings
mysys/default_modify.c:
Fixed compiler warnings
mysys/hash.c:
Fixed compiler warnings
mysys/mf_getdate.c:
Use my_time()
mysys/mf_iocache2.c:
Fixed compiler warnings
mysys/mf_pack.c:
Fixed compiler warnings
mysys/mf_path.c:
Fixed compiler warnings
mysys/my_append.c:
Fixed compiler warnings
mysys/my_compress.c:
Fixed compiler warnings
mysys/my_copy.c:
Fixed compiler warnings
mysys/my_gethwaddr.c:
Fixed compiler warnings
mysys/my_getopt.c:
Added support for double arguments
mysys/my_getsystime.c:
Added functions to get time in microseconds.
Added faster time() functions for system that has gethrtime() (Solaris)
Moved windows initialization code to my_init()
mysys/my_init.c:
Added initializing of variables needed for windows time functions
mysys/my_static.c:
Added variables needed for windows time functions
mysys/my_static.h:
Added variables needed for windows time functions
mysys/my_thr_init.c:
Added THR_LOCK_time, used for faster my_time()
mysys/mysys_priv.h:
Added THR_LOCK_time, used for faster my_time()
mysys/thr_alarm.c:
time() -> my_time()
sql/event_data_objects.cc:
end_time() -> set_current_time()
sql/event_queue.cc:
end_time() -> set_current_time()
sql/event_scheduler.cc:
Fixed compiler warnings
sql/field.h:
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
sql/item.h:
Added decimal to Item_float(double)
sql/item_cmpfunc.h:
Added decimal to Item_float(double)
sql/item_timefunc.cc:
time() -> my_time()
sql/item_xmlfunc.cc:
Fixed compiler warning
sql/lock.cc:
lock_time() -> set_time_after_lock()
sql/log.cc:
Timing in slow query log to file is now done in microseconds
Changed some while() loops to for() loops.
Fixed indentation
time() -> my_time()
sql/log.h:
Slow query logging is now done based on microseconds
sql/log_event.cc:
time() -> my_time()
Fixed arguments to new Item_float()
sql/mysql_priv.h:
Fixed compiler warnings
Added opt_log_slow_slave_statements
sql/mysqld.cc:
Added --log_slow_slave_statements and --min_examined_row_limit
--long-query-time now takes a double argument with microsecond resolution
Don't write shutdown message when using --help
Removed not needed \n
Thread create time and connect time is now done in microseconds
time() -> my_time()
Avoid some time() calls
sql/net_serv.cc:
Fixed compiler warnings
sql/parse_file.cc:
time() -> my_time()
sql/set_var.cc:
Added support for DOUBLE variables
Added support for variables that are given in seconds with microsecond resolution
sql/set_var.h:
Added support for variables that are given in seconds with microsecond resolution
sql/slave.cc:
Allow logging of slave queries to slow query log if 'opt_log_slow_slave_statements' is given
time() -> my_time()
sql/sql_cache.h:
Fixed compiler warning()
sql/sql_class.cc:
Initialize new THD variables
sql/sql_class.h:
long_query_time is now in microseconds
Added min_examined_row_limit
Reordered some THD elements for higher efficency
Added timers in microseconds (connect_utime, thr_create_utime, start_utime and utime_after_lock)
Start of query is now recorded both in seconds and in microseconds.
Following renames was made for more clarity and avoid merge problems from earlier versions:
connect_time -> connect_utime
thr_create_time -> thr_create_utime
end_time() -> set_current_time()
lock_time() -> set_time_after_lock()
Added THD::start_utime, which is start of query in microseconds from some arbitary time
Added function THD::current_utime()
Removed safe_time() as retry's are handled in my_time()
sql/sql_connect.cc:
User resources are now using microsecond resolution
sql/sql_insert.cc:
end_time() -> set_current_time()
sql-common/client.c:
time() -> my_time()
sql/sql_parse.cc:
Testing if we should print to slow_query_log() is now done with microsecond precission.
If min_examined_row_limit is given, only log queries to slow query log that has examined more rows than this.
sql/sql_select.cc:
Simplify code now that Item_float() takes decimals as argument
sql/sql_show.cc:
time() -> my_time()
Added support for SYS_DOUBLE
sql/sql_table.cc:
Added debug function for stopping in mysql_admin_table() when tables are locked
sql/structs.h:
intime -> reset_utime
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/comp_err.c:
Auto merged
include/decimal.h:
Auto merged
include/my_getopt.h:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
include/mysql.h:
Auto merged
mysys/array.c:
Auto merged
mysys/hash.c:
Auto merged
mysys/typelib.c:
Auto merged
sql/derror.cc:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/my_decimal.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/rpl_utility.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/structs.h:
Auto merged
sql/table.h:
Auto merged
sql/tztime.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/example/ha_example.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
storage/heap/ha_heap.cc:
Auto merged
storage/innobase/handler/ha_innodb.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
Auto merged
strings/decimal.c:
Auto merged
strings/strtod.c:
Auto merged
include/hash.h:
Manual merge with 5.1 main tree.
mysys/my_getopt.c:
Manual merge with 5.1 main tree.
sql/field.h:
Manual merge with 5.1 main tree.
sql/ha_ndbcluster.cc:
Manual merge with 5.1 main tree.
sql/item_cmpfunc.h:
Manual merge with 5.1 main tree.
sql/item_create.cc:
Manual merge with 5.1 main tree.
sql/item_func.h:
Manual merge with 5.1 main tree.
sql/key.cc:
Manual merge with 5.1 main tree.
sql/lock.cc:
Manual merge with 5.1 main tree.
sql/mysqld.cc:
Manual merge with 5.1 main tree.
sql/set_var.cc:
Manual merge with 5.1 main tree.
sql/set_var.h:
Manual merge with 5.1 main tree.
sql/sql_base.cc:
Manual merge with 5.1 main tree.
sql/sql_handler.cc:
Manual merge with 5.1 main tree.
sql/sql_insert.cc:
Manual merge with 5.1 main tree.
sql/sql_plugin.cc:
Manual merge with 5.1 main tree.
sql/sql_table.cc:
Manual merge with 5.1 main tree.
sql/sql_yacc.yy:
Manual merge with 5.1 main tree.
sql/table.cc:
Manual merge with 5.1 main tree.
storage/innobase/handler/ha_innodb.cc:
Manual merge with 5.1 main tree.
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
Manual merge with 5.1 main tree.
storage/ndb/tools/restore/restore_main.cpp:
Manual merge with 5.1 main tree.