removed in MySQL 6.0
CREATE TABLE... TYPE= returns the warning "The syntax
'TYPE=storage_engine' is deprecated and will be removed in
MySQL 6.0. Please use 'ENGINE=storage_engine' instead"
This syntax is deprecated already from version 5.4.4, so
the message has been changed.
In addition, the deprecation macro was changed to reflect
the ServerPT decision not to include version number in the
warning message.
A number of test result files have been changed as a
consequence of the change in the deprecation macro.
Several items said to be deprecated in the 4.1 manual
have never been removed. This worklog adds deprecation
warnings when these items are used, and warns the user
that the items will be removed in MySQL 5.6.
A couple of previously deprecation decision have been
reversed (see single file comments)
client/client_priv.h:
Macro similar to the one in the server (mysql_priv.h)
for printing a deprecation warning message
client/mysql.cc:
no-auto-rehash will not be deprecated
skip-line-numbers will not be deprecated
skip-column-names will not be deprecated
no-pager is deprecated
set-variable is deprecated
no-named-commands is deprecated
client/mysqladmin.cc:
set-variable is deprecated
client/mysqlbinlog.cc:
position is deprecated
client/mysqldump.c:
first-slave is deprecated
no-set-names is deprecated
set-variable is deprecated
mysql-test/r/mysqlbinlog.result:
Adding the [Warning] to the test case, just to show that the
deprecation works.
The test case will be changed in Celosia to use --start-position.
mysys/my_getopt.c:
set-variable (include -O) is deprecated
scripts/mysqld_multi.sh:
Warning for mysqld_multi
sql/mysqld.cc:
default-collation is deprecated
log-bin-trust-routine-creators is deprecated
set-variable is deprecated
default-character-set is deprecated
safe-show-database is deprecated
sql/share/errmsg.txt:
Added version number for sql_log_update deprecation message.
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.
Backport from 6.0 to 5.1.
Only those sync points are included, which are used in debug_sync.test.
The Debug Sync Facility allows to place synchronization points
in the code:
open_tables(...)
DEBUG_SYNC(thd, "after_open_tables");
lock_tables(...)
When activated, a sync point can
- Send a signal and/or
- Wait for a signal
Nomenclature:
- signal: A value of a global variable that persists
until overwritten by a new signal. The global
variable can also be seen as a "signal post"
or "flag mast". Then the signal is what is
attached to the "signal post" or "flag mast".
- send a signal: Assign the value (the signal) to the global
variable ("set a flag") and broadcast a
global condition to wake those waiting for
a signal.
- wait for a signal: Loop over waiting for the global condition until
the global value matches the wait-for signal.
Please find more information in the top comment in debug_sync.cc
or in the worklog entry.
.bzrignore:
WL#4259 - Debug Sync Facility
Added the symbolic link libmysqld/debug_sync.cc.
CMakeLists.txt:
WL#4259 - Debug Sync Facility
Added definition for ENABLED_DEBUG_SYNC.
configure.in:
WL#4259 - Debug Sync Facility
Added definition for ENABLED_DEBUG_SYNC.
include/my_sys.h:
WL#4259 - Debug Sync Facility
Added definition for the DEBUG_SYNC_C macro.
libmysqld/CMakeLists.txt:
WL#4259 - Debug Sync Facility
Added sql/debug_sync.cc.
libmysqld/Makefile.am:
WL#4259 - Debug Sync Facility
Added sql/debug_sync.cc.
mysql-test/include/have_debug_sync.inc:
WL#4259 - Debug Sync Facility
New include file.
mysql-test/mysql-test-run.pl:
WL#4259 - Debug Sync Facility
Added option --debug_sync_timeout.
mysql-test/r/debug_sync.result:
WL#4259 - Debug Sync Facility
New test result.
mysql-test/r/have_debug_sync.require:
WL#4259 - Debug Sync Facility
New require file.
mysql-test/t/debug_sync.test:
WL#4259 - Debug Sync Facility
New test file.
mysys/my_static.c:
WL#4259 - Debug Sync Facility
Added definition for debug_sync_C_callback_ptr.
mysys/thr_lock.c:
WL#4259 - Debug Sync Facility
Added sync point "wait_for_lock".
sql/CMakeLists.txt:
WL#4259 - Debug Sync Facility
Added debug_sync.cc and debug_sync.h.
sql/Makefile.am:
WL#4259 - Debug Sync Facility
Added debug_sync.cc and debug_sync.h.
sql/debug_sync.cc:
WL#4259 - Debug Sync Facility
New source file.
sql/debug_sync.h:
WL#4259 - Debug Sync Facility
New header file.
sql/mysqld.cc:
WL#4259 - Debug Sync Facility
Added opt_debug_sync_timeout.
Added calls to debug_sync_init() and debug_sync_end().
Fixed a purecov comment (unrelated).
sql/set_var.cc:
WL#4259 - Debug Sync Facility
Added server variable "debug_sync".
sql/set_var.h:
WL#4259 - Debug Sync Facility
Added declaration for server variable "debug_sync".
sql/share/errmsg.txt:
WL#4259 - Debug Sync Facility
Added error messages ER_DEBUG_SYNC_TIMEOUT and ER_DEBUG_SYNC_HIT_LIMIT.
sql/sql_base.cc:
WL#4259 - Debug Sync Facility
Added sync points "after_flush_unlock" and "before_lock_tables_takes_lock".
sql/sql_class.cc:
WL#4259 - Debug Sync Facility
Added initialization for debug_sync_control to THD::THD.
Added calls to debug_sync_init_thread() and debug_sync_end_thread().
sql/sql_class.h:
WL#4259 - Debug Sync Facility
Added element debug_sync_control to THD.
storage/myisam/myisamchk.c:
Fixed a typo in an error message string (unrelated).
But there is no Last_IO_Error reported.
On the master, if a binary log event is larger than max_allowed_packet,
ER_MASTER_FATAL_ERROR_READING_BINLOG and the specific reason of this error is
sent to a slave when it requests a dump from the master, thus leading
the I/O thread to stop.
On a slave, the I/O thread stops when receiving a packet larger than max_allowed_packet.
In both cases, however, there was no Last_IO_Error reported.
This patch adds code to report the Last_IO_Error and exact reason before stopping the
I/O thread and also reports the case the out memory pops up while
handling packets from the master.
sql/sql_repl.cc:
The master send the Specific reasons instead of "error reading log entry" to the slave which is requesting a dump.
if an fatal error is returned by read_log_event function.
Invalid (old?) table or database name in logs
Post push patch.
Bug was that a non partitioned table file was not
converted to system_charset, (due to table_name_len was not set).
Also missing DBUG_RETURN.
And Innodb adds quotes after calling the function,
so I added one more mode where explain_filename does not
add quotes. But it still appends the [sub]partition name
as a comment.
Also caught a minor quoting bug, the character '`' was
not quoted in the identifier. (so 'a`b' was quoted as `a`b`
and not `a``b`, this is mulitbyte characters aware.)
sql/mysql_priv.h:
Bug#32430: 'show innodb status' causes errors
Invalid (old?) table or database name in logs
Added an unquoted mode
sql/share/errmsg.txt:
Bug#32430: 'show innodb status' causes errors
Invalid (old?) table or database name in logs
Removed the quoting of identifier, only leaving the translated word.
sql/sql_table.cc:
Bug#32430: 'show innodb status' causes errors
Invalid (old?) table or database name in logs
Fixed quoting of '`'
Added DBUG_RETURN.
Corrected table_name_len.
Added unquoted mode.
when used with --tab
1) New syntax: added CHARACTER SET clause to the
SELECT ... INTO OUTFILE (to complement the same clause in
LOAD DATA INFILE).
mysqldump is updated to use this in --tab mode.
2) ESCAPED BY/ENCLOSED BY field parameters are documented as
accepting CHAR argument, however SELECT .. INTO OUTFILE
silently ignored rests of multisymbol arguments.
For the symmetrical behavior with LOAD DATA INFILE the
server has been modified to fail with the same error:
ERROR 42000: Field separator argument is not what is
expected; check the manual
3) Current LOAD DATA INFILE recognizes field/line separators
"as is" without converting from client charset to data
file charset. So, it is supposed, that input file of
LOAD DATA INFILE consists of data in one charset and
separators in other charset. For the compatibility with
that [buggy] behaviour SELECT INTO OUTFILE implementation
has been saved "as is" too, but the new warning message
has been added:
Non-ASCII separator arguments are not fully supported
This message warns on field/line separators that contain
non-ASCII symbols.
client/mysqldump.c:
mysqldump has been updated to call SELECT ... INTO OUTFILE
statement with a charset from the --default-charset command
line parameter.
mysql-test/r/mysqldump.result:
Added test case for bug #30946.
mysql-test/r/outfile_loaddata.result:
Added test case for bug #30946.
mysql-test/t/mysqldump.test:
Added test case for bug #30946.
mysql-test/t/outfile_loaddata.test:
Added test case for bug #30946.
sql/field.cc:
String conversion code has been moved from check_string_copy_error()
to convert_to_printable() for reuse.
sql/share/errmsg.txt:
New WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED message has been added.
sql/sql_class.cc:
The select_export::prepare() method has been modified to:
1) raise the ER_WRONG_FIELD_TERMINATORS error on multisymbol
ENCLOSED BY/ESCAPED BY field arguments like LOAD DATA INFILE;
2) warn with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
message on non-ASCII field or line separators.
The select_export::send_data() merhod has been modified to
convert item data to output charset (see new SELECT INTO OUTFILE
syntax). By default the BINARY charset is used for backward
compatibility.
sql/sql_class.h:
The select_export::write_cs field added to keep output
charset.
sql/sql_load.cc:
mysql_load has been modified to warn on non-ASCII field or
line separators with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
message.
sql/sql_string.cc:
New global function has been added: convert_to_printable()
(common code has been moved from check_string_copy_error()).
sql/sql_string.h:
New String::is_ascii() method and new global convert_to_printable()
function have been added.
sql/sql_yacc.yy:
New syntax: added CHARACTER SET clause to the
SELECT ... INTO OUTFILE (to complement the same clause in
LOAD DATA INFILE). By default the BINARY charset is used for
backward compatibility.
it returns misleading 'table is full'
Innodb returns a misleading error message "table is full"
when the number of active concurrent transactions is greater
than 1024.
Fixed by adding errorcode "ER_TOO_MANY_CONCURRENT_TRXS" to the
error codes. Innodb should return HA_TOO_MANY_CONCURRENT_TRXS
to mysql which is then mapped to ER_TOO_MANY_CONCURRENT_TRXS
Note: testcase is not written as this was reproducible only by
changing innodb code.
extra/perror.c:
Add error number and message for HA_ERR_TOO_MANY_CONCURRENT_TRXS
include/my_base.h:
Add error number and message for HA_ERR_TOO_MANY_CONCURRENT_TRXS
sql/ha_innodb.cc:
Return HA_ERR_TOO_MANY_CONCURRENT_TRXS to mysql server
sql/handler.cc:
Add error number and message for HA_ERR_TOO_MANY_CONCURRENT_TRXS
sql/share/errmsg.txt:
Add error message for ER_TOO_MANY_CONCURRENT_TRXS
or database name in logs
Problem was that InnoDB used filenam_to_tablename,
which do not handle partitions (due to the '#' in
the filename).
Solution is to add a new function for explaining
what the filename means: explain_filename.
It expands the database, table, partition and subpartition
parts and uses errmsg.txt for localization.
It also converts from my_charset_filename to system_charset_info
(i.e. human readable form for non ascii characters).
http://lists.mysql.com/commits/70370
2773 Mattias Jonsson 2009-03-25
It has three different output styles.
NOTE: This is the server side ONLY part (introducing the explain_filename
function). There will be a patch for InnoDB using this function to solve
the bug.
sql/mysql_priv.h:
Bug#32430:'show innodb status' causes errors Invalid (old?) table
or database name in logs
Added EXPLAIN_FILENAME_MAX_EXTRA_LENGTH, enum_explain_filename_mode
and explain_filename.
sql/share/errmsg.txt:
Bug#32430:'show innodb status' causes errors Invalid (old?) table
or database name in logs
Added localization names for Database, Table, Partition, Subpartition
Temporary and Renamed.
sql/sql_table.cc:
Bug#32430:'show innodb status' causes errors Invalid (old?) table
or database name in logs
Added explain_filename function for giving better information
to the user about a specific table/partitions file.
Added a more detailed error message on calling an ambiguous missing function.
mysql-test/r/ps.result:
Bug #38159: fixed existing tests
mysql-test/r/sp-error.result:
Bug #38159: test case
mysql-test/t/ps.test:
Bug #38159: fixed existing tests
mysql-test/t/sp-error.test:
Bug #38159: test case
sql/item_func.cc:
Bug #38159: generate more detailed error message
sql/share/errmsg.txt:
Bug #38159: add a more detailed error message
sql/sql_derived.cc:
Bug #38159: treat the detailed error message the same way as the
generic one
sql/sql_lex.cc:
Bug #38159:
- detect if the token is ambiguous and print the appropriate error.
- backport is_lex_native_function() from 5.1
sql/sql_lex.h:
Bug #38159: detect if the token is ambiguous and print the appropriate error.
sql/sql_yacc.yy:
Bug #38159: generate more detailed error message
sql/table.cc:
Bug #38159: treat the detailed error message the same way as the
generic one
Change the warning message to 'Statement may not be safe to log in
statement format' to indicate that the decision on whether a
statement is safe or not is heuristic, and we are conservative.
Engine doesn't allow me to.
In case of incompatible changes between old and new table
versions, the mysqlcheck program prints error messages like
this:
error: Table upgrade required. Please do
"REPAIR TABLE `table_name`" to fix it!
However, InnoDB doesn't support REPAIR TABLE query, so the
message is confusing.
Error message text has been changed to:
Table upgrade required. Please do "REPAIR TABLE `table_name`"
or dump/reload to fix it!"
mysql-test/r/repair.result:
Updated test case for bug #42563.
mysql-test/r/varbinary.result:
Updated test case for bug #42563.
sql/share/errmsg.txt:
Bug #42563: Message tells me to repair table though Storage
Engine doesn't allow me to.
The ER_TABLE_NEEDS_UPGRADE error message has been changed to:
Table upgrade required. Please do "REPAIR TABLE ``%-.32s`"
or dump/reload to fix it!"
The problem was that the server was trying to use the unknown
error format string (ER_UNKNOWN_ERROR) to print messages about
comments being too long, but the said format string does not
accept arguments and will always default to "Unknown error".
The solution is to introduce new error messages which are
specific to the error conditions so that server wants to
signal -- this also means that it's possible to translate
those messages.
mysql-test/r/strict.result:
Update test case result.
mysql-test/t/strict.test:
Update test case with new errors.
sql/share/errmsg.txt:
Introduce new errors for long comments.
sql/unireg.cc:
Use new errors.
Backport from 6.0
Changed error message to show that it is partitioning
that does not support foreign keys yet.
Changed spelling from British english to American english.
mysql-test/r/partition.result:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Changed spelling from British english to American english.
mysql-test/r/partition_mgm_err.result:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Changed spelling from British english to American english.
mysql-test/t/partition.test:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Added test for verifying error message
sql/share/errmsg.txt:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Changed spelling from British english to American english.
sql/sql_table.cc:
Bug#36001: Partitions: spelling and using some error messages
Backport from 6.0
Using a better error message.
code backported from 6.0
per-file messages:
include/my_global.h
Remove SC_MAXWIDTH. This is unused and irrelevant nowadays.
include/my_sys.h
Remove errbuf declaration and unused definitions.
mysys/my_error.c
Remove errbuf definition and move and adjust ERRMSGSIZE.
mysys/my_init.c
Declare buffer on the stack and use my_snprintf.
mysys/safemalloc.c
Use size explicitly. It's more than enough for the message at hand.
sql/sql_error.cc
Use size explicitly. It's more than enough for the message at hand.
sql/sql_parse.cc
Declare buffer on the stack. Use my_snprintf as it will result in
less stack space being used than by a system provided sprintf --
this allows us to put the buffer on the stack without causing much
trouble. Also, the use of errbuff here was not thread-safe as the
function can be entered concurrently from multiple threads.
sql/sql_table.cc
Use MYSQL_ERRMSG_SIZE. Extra space is not needed as my_snprintf will
nul terminate strings.
storage/myisam/ha_myisam.cc
Use MYSQL_ERRMSG_SIZE.
sql/share/errmsg.txt
Error message truncation in test "innodb" in embedded mode
filename in the error message can safely take up to 210 symbols.
set but is ignored".
This patch makes @@session.max_allowed_packed and
@@session.net_buffer_length read-only as suggested in the bug
report. The user will have to use SET GLOBAL (and reconnect)
to alter the session values of these variables.
The error string ER_VARIABLE_IS_READONLY is introduced.
Tests are modified accordingly.
sql/set_var.cc:
The class sys_var_thd_ulong_session_readonly is introduced as
a specialization of sys_var_thd_ulong implementing a read-only
session variable. The class overrides check() and
check_default() to achieve the read-only property for the
session part of the variable.
sql/set_var.h:
The class sys_var_thd_ulong_session_readonly is introduced as
a specialization of sys_var_thd_ulong implementing a read-only
session variable. The class overrides check() and
check_default() to achieve the read-only property for the
session part of the variable.
sql/share/errmsg.txt:
New error ER_VARIABLE_IS_READONLY.
The problem was that the server did not robustly handle a
unilateral roll back issued by the Resource Manager (RM)
due to a resource deadlock within the transaction branch.
By not acknowledging the roll back, the server (TM) would
eventually corrupt the XA transaction state and crash.
The solution is to mark the transaction as rollback-only
if the RM indicates that it rolled back its branch of the
transaction.
mysql-test/r/xa.result:
Add test case result for Bug#28323
mysql-test/t/xa.test:
Add test case for Bug#28323
sql/handler.cc:
Reset XID only at the end of the global transaction.
sql/share/errmsg.txt:
Add new error codes.
sql/sql_class.h:
Remember the error reported by the Resource Manager.
sql/sql_parse.cc:
Rollback the transaction if the Resource Manager reported
a error and rolled back its branch of the transaction.
The problem was that the server did not robustly handle a
unilateral roll back issued by the Resource Manager (RM)
due to a resource deadlock within the transaction branch.
By not acknowledging the roll back, the server (TM) would
eventually corrupt the XA transaction state and crash.
The solution is to mark the transaction as rollback-only
if the RM indicates that it rolled back its branch of the
transaction.
mysql-test/r/xa.result:
Add test case result for Bug#28323
mysql-test/t/xa.test:
Add test case for Bug#28323
sql/handler.cc:
Reset XID only at the end of the global transaction.
sql/share/errmsg.txt:
Add new error codes.
sql/sql_class.h:
Remember the error reported by the Resource Manager.
sql/sql_parse.cc:
Rollback the transaction if the Resource Manager reported
a error and rolled back its branch of the transaction.
warnings)
Before this fix, several places in the code would raise a warning with an
error code 0, making it impossible for a stored procedure, a connector,
or a client application to trigger logic to handle the warning.
Also, the warning text was hard coded, and therefore not translated.
With this fix, new errors numbers have been created to represent these
warnings, and the warning text is coded in the errmsg.txt file.
This bugs clarifies a warning message issued when the query cache data
size becomes smaller than the minium allowed size.
mysql-test/r/query_cache.result:
New warning message when a too small value has been set for query cache
size.
sql/set_var.cc:
To avoid poluting the QC API the warning messages are moved into the
QC module.
sql/share/errmsg.txt:
Changed error message so that minimal cache size always is hinted.
sql/sql_cache.cc:
Modified the warning message so that the minimal cache size always is
hinted.
Added interface method Query_cache::get_minimal_size_limit().
sql/sql_cache.h:
Modified the warning message so that the minimal cache size always is
hinted.
Added interface method Query_cache::get_minimal_size_limit().
Problem was an unclear error message since it could suggest that
MyISAM did not support INSERT DELAYED.
Changed the error message to say that DELAYED is not supported by the
table, instead of the table's storage engine.
The confusion is that a partitioned table is in somewhat sense using
the partitioning storage engine, which in turn uses the ordinary
storage engine. By saying that the table does not support DELAYED we
do not give any extra informantion about the storage engine or if it
is partitioned.
mysql-test/r/innodb-replace.result:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/innodb-replace.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/merge.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
mysql-test/t/partition_hash.test:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
sql/share/errmsg.txt:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
added error message for tables not supporting DELAYED
sql/sql_insert.cc:
Bug#31210: INSERT DELAYED crashes server when used on partitioned tables
changed error message
PREPARE", review fixes:
- make the patch follow the specification of WL#4166 and remove
the new error that was originally introduced.
Now the client never gets an error from reprepare, unless it failed.
I.e. even if the statement at hand returns a completely different
result set, this is not considered a server error.
The C API library, that can not handle this situation, was modified to
return a client error.
Added additional test coverage.
include/errmsg.h:
Add a new client side error: now when we automatically
reprepare a statement, the new result set may contain a different
number of columns.
include/mysql_com.h:
Add a new server status to be sent to the client if the
number of columns in the result set is different.
libmysql/errmsg.c:
Add a new error message.
libmysql/libmysql.c:
Make the client library robust against a result set that
contains a different number of columns from prepare time.
Previously that could never happen, and we simply had an assert.
That means in particular that all clients are advised to upgrade
with transition to 5.1, if they are using prepared statements C API.
Make mysql_stmt_store_result() and mysql_stmt_execute() robust against
"broken" statement handles (those that have an error).
sql/sql_parse.cc:
Clear transient server status flags at start of statement more
systematically.
sql/share/errmsg.txt:
Remove an error that is unused and is not part of any public release.
sql/sql_prepare.cc:
Instead of returning an error in case the number of result set columns
has changed, simply update the client in server status.
That will allow modern clients automatically recover from an error.
tests/mysql_client_test.c:
Add additional coverage to the cases when the number of result
set columns changed as a result of reprepare.
Cover conversion and truncation of result set columns.
into bodhi.(none):/opt/local/work/mysql-5.1-27430
Makefile.am:
Auto merged
include/my_global.h:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
sql/item.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
libmysqld/CMakeLists.txt:
Manual merge.
libmysqld/lib_sql.cc:
Manual merge.
mysql-test/t/disabled.def:
Manual merge.
into bodhi.(none):/opt/local/work/mysql-5.1-27430
include/my_global.h:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
storage/myisam/mi_create.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/share/errmsg.txt:
Manual merge.
WL#4165 Prepared statements: validation
WL#4166 Prepared statements: automatic re-prepare
Fixes
Bug#27430 Crash in subquery code when in PS and table DDL changed after PREPARE
Bug#27690 Re-execution of prepared statement after table was replaced with a view crashes
Bug#27420 A combination of PS and view operations cause error + assertion on shutdown
The basic idea of the patch is to keep track of table metadata between
prepared statement prepare and execute. If some table used in the statement
has changed, the prepared statement is re-prepared before execution.
See WL#4165 and WL#4166 contents and comments in the code for details
of the implementation.
include/my_global.h:
Remove 'register' keyword to avoid warnings when swapping large structures
that don't fit into a register. Any modern compiler is capable of placing
a variable in a register when that would benefit performance.
mysql-test/r/ps_1general.result:
Update test results: since now we re-prepare automatically,
more correct results are produced in prepare-ddl-execute scenario.
mysql-test/r/query_cache_merge.result:
Ensure that the table definition cache is large enough for
the test to pass in --ps-protocol
mysql-test/r/trigger.result:
Update test results to reflect automatic statement reprepare.
mysql-test/t/disabled.def:
Enable ps_ddl.test, which now passes.
mysql-test/t/ps_1general.test:
Since now we re-execute prepared statements after DDL successfully,
change the test to produce repeatable results. Remove expectancy of
an error in one place where now we automatically reprepare the prepared
statement.
mysql-test/t/query_cache_merge.test:
Ensure the table definition cache is large enough for the test to pass
in --ps-protocol
mysql-test/t/trigger.test:
Sinc
sql/item.cc:
Implement Item_param "copy" functionality, used at re-prepare of
a prepared statement.
We copy the type of the original parameter, and move the assigned value,
if any. Sic, the value is "moved", since it can be quite big --
e.g. in case we deal with a LONG DATA parameter.
It's essential to move the value from the old parameter since
at the time of re-prepare the client packet with the necessary information
may be not available.
sql/item.h:
Declare a new method used for reprepare.
sql/my_decimal.h:
Implement "swap()" functionality of class my_decimal to be
able to easily swap two decimal values.
sql/mysql_priv.h:
Declare enum_metadata_type.
sql/mysqld.cc:
Implement a status variable for the number of reprepared statements.
sql/sql_base.cc:
Implement metadata version validation.
sql/share/errmsg.txt:
Add two new error messages: ER_NEED_REPREPARE and ER_PS_REBIND.
The first error (theoretically) never reaches the user.
It is issued by the metadata validation framework when a metadata version
has changed between prepare and execute. Later on it's intercepted
and the statement is automatically re-prepared. Only if the error
has occurred repeatedly MAX_REPREPARE_ATTEMTS (3) times do we
return it to the user.
The second error is issued when after re-prepare we discover
that the metadata we sent over to the client using the binary
protocol differs drammatically from the new result set metadata
that the reprepared statement produces (e.g. number of result
set columns is different).
sql/sql_class.cc:
Implement metadata version validation framework.
sql/sql_class.h:
Declarations for metadata version validation framework.
sql/sql_parse.cc:
Mark commands for which we must invalidate and reprepare a prepared
statement when metadata has changed.
sql/sql_prepare.cc:
Implement WL#4165 and WL#4166 (limited support of metadata validation
and re-prepare).
sql/table.h:
Implement metadata validation.
tests/mysql_client_test.c:
Add a test case for WL#4166
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build
sql/item_create.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build
sql/field.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/unireg.h:
Auto merged
mysql-test/r/type_blob.result:
Manual merge.
mysql-test/t/type_blob.test:
Manual merge.
Based on contributed patch from Martin Friebe, CLA from 2007-02-24.
The parser lacked support for field sizes after signed long,
when it should extend to 2**32-1.
Now, we correct that limitation, and also make the error handling
consistent for casts.
---
Fix minor complaints of Marc Alff, for patch against B-g#15776.
---
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my50-bug15776
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my51-bug15776
---
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my51-bug15776
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build
---
testing
mysql-test/r/type_blob.result:
Verify that blobs may be created with the size that is already
documented.
Additionally, test the limits of several other types.
mysql-test/t/type_blob.test:
Verify that blobs may be created with the size that is already
documented.
Additionally, test the limits of several other types.
---
Drop table in case we start from a bad state.
sql/field.cc:
atoi() insufficient to gauge the length of some fields. Change
it to strtoul().
sql/item_create.cc:
atoi() insufficient to gauge the length of some fields. Change
it to strtoul().
If a casted length is too long, raise an error.
sql/share/errmsg.txt:
Change ER_TOO_BIG_FIELDLENGTH so that it can accept sizes larger
than 2**15 -- instead, 2**32.
---
Manual merge.
sql/sql_yacc.yy:
Make lengths take, in addition to NUM, LONG_NUM, ULONGLONG_NUM,
and DECIMAL_NUM.
---
yacc/bison is left-recursive, so FIXME statement is wrong.
---
Manual merge and reformatting.
sql/unireg.h:
Define new constant.
into magare.gmz:/home/kgeorge/mysql/work/merge-build-5.1-bugteam
sql/log.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/share/errmsg.txt:
merged 5.1-main to 5.1-bugteam
The problem was that LOAD DATA code (sql_load.cc) didn't take into
account that there may be items, representing references to other
columns. This is a usual case in views. The crash happened because
Item_direct_view_ref was casted to Item_user_var_as_out_param,
which is not a base class.
The fix is to
1) Handle references properly;
2) Ensure that an item is treated as a user variable only when
it is a user variable indeed;
3) Report an error if LOAD DATA is used to load data into
non-updatable column.
mysql-test/r/loaddata.result:
Update result file.
mysql-test/t/loaddata.test:
Add a test case form Bug#35469: server crash with
LOAD DATA INFILE to a VIEW.
sql/share/errmsg.txt:
Introduce a new error.
sql/sql_load.cc:
Handle reference-items properly.
mysql-test/std_data/bug35649.data:
Add a data file for the test case.