| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
- Changed warning to "'%-.192s.%-.192s' is not of type '%s'" to make the
english a bit more correct
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Documentation of the feature can be found at: http://kb.askmonty.org/en/multi-source-replication/
This code is based on code from Taobao, developed by Plinux
Other things:
- Added new commands: START ALL SLAVES, STOP ALL SLAVES and SHOW FULL SLAVE STATUS
- Almost all usage of 'active_mi' is deleted.
- Added parameter to reset_logs() so that one can specify if new logs should be created.
- Check wildcard match as early as possible for SHOW STATUS. This makes SHOW STATUS like 'xxx' a lot faster and use less mutex
- Made max_relay_log_size depending on master connection.
- Added sys_vars.default_master_connection_basic to fix a failure in sys_vars.all_vars, modified sql_slave_skip_counter_basic to allow session-level settings
- Added commands to mysqladmin: start-all-slaves & stop-all-slaves
- Removed logging of "next log '%s' is currently active | not active"
- Fixed bug in my_vsnprintf() when using positional parameters with length
- Added fn_ext2(), which returns pointer to last '.' in file name
- max_relay_log_size now acts as a normal slave specific variable
- Don't store replication position if innobase_overwrite_relay_log_info is not set
- max_relay_log_size copies it's values from max_binlog_size at startup
BUILD/SETUP.sh:
Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
client/mysqladmin.cc:
Added commands start-all-slaves & stop-all-slaves
client/mysqltest.cc:
Added support for error names starting with 'W'
Added connection_name support to --sync_with_master
cmake/maintainer.cmake:
Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
include/my_sys.h:
Added fn_ext2(), which returns pointer to last '.' in file name
include/mysql/plugin.h:
Added SHOW_SIMPLE_FUNC
include/mysql/plugin_audit.h.pp:
Updated signature file
include/mysql/plugin_auth.h.pp:
Updated signature file
include/mysql/plugin_ftparser.h.pp:
Updated signature file
mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
Updated test
mysql-test/include/setup_fake_relay_log.inc:
There is no orphan relay log files anymore
mysql-test/mysql-test-run.pl:
Added multi_source to test suite
mysql-test/r/flush.result:
Added test for new syntax of flush relay logs (can't repeat relay logs or slave)
mysql-test/r/mysqld--help.result:
Updated result
mysql-test/r/mysqltest.result:
Updated result
mysql-test/r/parser.result:
Updated result
mysql-test/r/signal_code.result:
Updated result after introducing new commands
mysql-test/r/sp-code.result:
Updated result after introducing new commands
mysql-test/suite/multi_source:
Tests for multi-source
mysql-test/suite/multi_source/info_logs-master.opt:
Test with strange file names
mysql-test/suite/multi_source/info_logs.result:
Test of logs
mysql-test/suite/multi_source/info_logs.test:
Test of logs
mysql-test/suite/multi_source/my.cnf:
Setup of multi-master tests
Added log-warnings to get more information to the log files
mysql-test/suite/multi_source/relaylog_events.result:
Test relay log handling
mysql-test/suite/multi_source/relaylog_events.test:
Test relay log handling
mysql-test/suite/multi_source/reset_slave.result:
Test RESET SLAVE
mysql-test/suite/multi_source/reset_slave.test:
Test RESET SLAVE
mysql-test/suite/multi_source/simple.result:
Simple basic test of multi-source functionality
mysql-test/suite/multi_source/simple.test:
Simple basic test of multi-source functionality
mysql-test/suite/multi_source/skip_counter.result:
Testing skip_counter and max_relay_log_size
mysql-test/suite/multi_source/skip_counter.test:
Testing skip_counter and max_relay_log_size
mysql-test/suite/multi_source/syntax.result:
Test of multi-source syntax
mysql-test/suite/multi_source/syntax.test:
Test of multi-source syntax
mysql-test/suite/rpl/r/rpl_deadlock_innodb.result:
New warnings
mysql-test/suite/rpl/r/rpl_filter_dbs_dynamic.result:
Improved error texts
mysql-test/suite/rpl/r/rpl_filter_tables_dynamic.result:
Improved error texts
mysql-test/suite/rpl/r/rpl_filter_wild_tables_dynamic.result:
Improved error texts
mysql-test/suite/rpl/r/rpl_flush_logs.result:
Update results
mysql-test/suite/rpl/r/rpl_heartbeat.result:
Warning was removed
mysql-test/suite/rpl/r/rpl_heartbeat_basic.result:
Warning was removed
mysql-test/suite/rpl/r/rpl_rotate_logs.result:
Updated results because of new error messages
mysql-test/suite/rpl/r/rpl_row_max_relay_size.result:
Updated results
mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result:
Updated results after improved RESET SLAVE (we now use less relay log files)
mysql-test/suite/rpl/r/rpl_skip_replication.result:
New error message
mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result:
Test removed as the old DBUG_SYNC entries doesn't exist anymore
mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result:
Updated results
mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result:
Updated results after improved RESET SLAVE (we now use less relay log files)
mysql-test/suite/rpl/t/rpl_flush_logs.test:
Updated tests as relay log files is created a bit differently than before
mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test:
Test removed as the old DBUG_SYNC entries doesn't exist anymore
mysql-test/suite/sys_vars/r/default_master_connection_basic.result:
New test to test usage of default_master_connection
mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result:
Updated results
mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result:
Updated usage of sql_slave_skip_counter
mysql-test/suite/sys_vars/t/default_master_connection_basic.test:
New test to test usage of default_master_connection
mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test:
Updated results
mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test:
Updated test for multi-source
mysql-test/t/flush.test:
Added test for new syntax of flush relay logs (can't repeat relay logs or slave)
mysql-test/t/parser.test:
Updated test as master_pos_wait() now takes more arguments than before
mysys/mf_fn_ext.c:
Added fn_ext2(), which returns pointer to last '.' in file name
plugin/semisync/semisync_master_plugin.cc:
Use SHOW_SIMPLE_FUNC to optimize SHOW STATUS
sql/event_scheduler.cc:
No reason to initialize slave_thread (it's guaranteed to be zero here)
sql/item_create.cc:
Added connection_name argument to master_pos_wait()
Simplified code
sql/item_func.cc:
Added connection_name argument to master_pos_wait()
sql/item_func.h:
Added connection_name argument to master_pos_wait()
sql/lex.h:
Added SLAVES keyword
sql/log.cc:
Added tag "Master 'connection_name'" to slave errors that has a connection name.
Added parameter to reset_logs() so that one can specify if new logs should be created.
Removed some wrong casts
Changed some constants to defines
sql/log.h:
Added parameter to reset_logs()
Updated comment to reflect new code
sql/log_event.cc:
Updated DBUG_PRINT
sql/mysqld.cc:
Added variable mysqld_server_initialized so that other functions can test if server is fully initialized.
Free all slave data in one place (fewer ifdef's)
Removed not needed call to close_active_mi()
Initialize slaves() later in startup to ensure that everthing is really initialized when slaves start.
Made status variable slave_running multi-source safe
max_relay_log_size copies it's values from max_binlog_size at startup
SHOW_FUNC -> SHOW_SIMPLE_FUNC
sql/mysqld.h:
Added mysqld_server_initialized
Removed max_relay_log_size
sql/rpl_mi.cc:
Store connection name and cmp_connection_name (only used for show full slave status) in Master_info
Added code for Master_info_index, which handles storage of multi-master information
Don't write the empty "" connection_name to multi-master.info file. This is handled by the original code.
Create Master_info_index::index_file_names once at init
More DBUG_PRINT
Give error if Master_info_index::check_duplicate_master_info fails
Added start|stop all slaves
sql/rpl_mi.h:
Added connection_name and Master_info_index
Updated prototypes
sql/rpl_rli.cc:
Added connection_name to relay log files.
If we do a full reset, don't create any new relay log files.
Updated comment to reflect new code
Made max_relay_log_size depending on master connection.
sql/rpl_rli.h:
Fixed type of slave_skip_counter as we now access it directly in sys_vars.cc, so it must be ulong
Made executed_entries and max_relay_log_size depending on master connection.
sql/set_var.cc:
Fixed that one can get variable name also when one uses DEFAULT
sql/set_var.h:
Made option global so that one can check and change min & max values (sorry Sergei)
sql/share/errmsg-utf8.txt:
Added new error messages needed for multi-source
Added multi-source name to error ER_MASTER_INFO and WARN_NO_MASTER_INFO
Improved error message if connection exists
sql/slave.cc:
Moved things a bit around to make it easier to handle error conditions.
Create a global master_info_index and add the "" connection to it
Ensure that new Master_info doesn't fail.
Don't call terminate_slave_threads(active_mi..) on end_slave() as this is now done automaticly when deleting master_info_index.
Delete not needed function close_active_mi(). One can achive same thing by calling end_slave().
Added support for SHOW FULL SLAVE STATUS (show status for all master connections with connection_name as first column)
Removed logging of "next log '%s' is currently active | not active"
Added Slave_received_heartbeats and Slave_heartbeat_period
sql/slave.h:
Added new defines and prototypes
sql/sql_base.cc:
More DBUG_PRINT
sql/sql_class.cc:
Reset thd->connection_name and thd-->default_master_connection
sql/sql_class.h:
Added thd->connection_name and thd-->default_master_connection
Made slave_skip_count and max_relay_log_size depending on master connection. These variables are in THD to make changing them thread safe.
sql/sql_const.h:
Added MAX_CONNECTION_NAME
sql/sql_insert.cc:
thd->slave_thread -> thd->rli_slave
Removed usage of active_mi
sql/sql_lex.cc:
Reset 'lex->verbose' (to simplify some sql_yacc.yy code)
sql/sql_lex.h:
Added connection_name, relay_log_connection_name, SQLCOM_SLAVE_ALL_START and SQLCOM_SLAVE_ALL_STOP
sql/sql_load.cc:
thd->slave_thread -> thd->rli_slave
Removed usage of active_mi
sql/sql_parse.cc:
Added support for connection_name to all SLAVE commands.
- Instead of using active_mi, we now get the current Master_info from master_info_index.
- Create new replication threads with CHANGE MASTER
- Added support for show_all_master_info()-
sql/sql_prepare.cc:
Added SQLCOM_SLAVE_ALL_START and SQLCOM_SLAVE_ALL_STOP
sql/sql_reload.cc:
Made reset/full slave use master_info_index->get_master_info() instead of active_mi.
If one uses 'RESET SLAVE "connection_name" all' the connection is removed from master_info_index.
Fixed issues with FLUSH RELAY LOGS
sql/sql_repl.cc:
sql_slave_skip_counter is moved to thd->variables to make it thread safe and fix some bugs with it
Add connection name to relay log files.
Added connection name to errors.
Added some logging for multi-master if log_warnings > 1
stop_slave():
- Don't check if thd is set. It's guaranteed to always be set.
change_master():
- Check for duplicate connection names in change_master()
- Check for wrong arguments first in file (to simplify error handling)
- Register new connections in master_info_index
******
Added multi-source support to show relaylog events
******
check_duplicate_master_info() now generates an error
Added parameter to reset_logs()
******
Updated calls to create_signed_file_name()
sql/sql_show.cc:
Check wildcard match as early as possible for SHOW STATUS. This makes SHOW STATUS like 'xxx' a lot faster and use less mutex
sql/sql_yacc.yy:
Added optional connection_name to a all relevant master/slave commands
Added multi-source support to show relaylog events
Added new commands START ALL SLAVES, STOP ALL SLAVES and SHOW FULL SLAVE STATUS
sql/strfunc.cc:
my_global.h shoud always be included first.
sql/sys_vars.cc:
Added variable default_master_connection
Made variable sql_slave_skip_counter multi-source safe
Made max_relay_log_size depending on master connection.
Made old code more reusable
sql/sys_vars.h:
Added Sys_var_session_lexstring (needed for default_master_connection)
Added Sys_var_multi_source_uint (needed for sql_slave_skip_counter).
Changed Sys_var_multi_source_uint to ulong to be able to handle max_relay_log_size
Made old code more reusable
storage/example/ha_example.cc:
Use SHOW_SIMPLE_FUNC to optimize SHOW STATUS
storage/sphinx/ha_sphinx.cc:
Use SHOW_SIMPLE_FUNC to optimize SHOW STATUS
storage/xtradb/handler/ha_innodb.cc:
Don't store replication position if innobase_overwrite_relay_log_info is not set
strings/my_vsnprintf.c:
Fixed bug when using positional parameters with length
|
|
|
|
|
|
|
|
|
|
|
| |
* rename all debugging related command-line options
and variables to start from "debug-", and made them all
OFF by default.
* replace "MySQL" with "MariaDB" in error messages
* "Cast ... converted ... integer to it's ... complement"
is now a note, not a warning
* @@query_cache_strip_comments now has a session scope,
not global.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GRADUALLY IF A TRIGGER EXISTS".
This bug manifested itself in two ways:
- Firstly execution of any data-changing statement which
required prelocking (i.e. involved stored function or
trigger) as part of transaction slowed down a bit all
subsequent statements in this transaction. So performance
in transaction which periodically involved such statements
gradually degraded over time.
- Secondly execution of any data-changing statement which
required prelocking as part of transaction prevented
concurrent FLUSH TABLES WITH READ LOCK from proceeding
until the end of transaction instead of end of particular
statement.
The problem was caused by incorrect handling of metadata lock
used in FTWRL implementation for statements requiring prelocked
mode.
Each statement which changes data acquires global IX lock
with STATEMENT duration. This lock is supposed to block
concurrent FTWRL from proceeding until the statement ends.
When entering prelocked mode, durations of all metadata locks
acquired so far were changed to EXPLICIT, to prevent
substatements from releasing these locks. When prelocked mode
was left, durations of metadata locks were changed to
TRANSACTIONAL (with a few exceptions) so they can be properly
released at the end of transaction.
Unfortunately, this meant that the global IX lock blocking
FTWRL with STATEMENT duration was moved to TRANSACTIONAL
duration after execution of statement requiring prelocking.
Since each subsequent statement that required prelocking and
tried to acquire global IX lock with STATEMENT duration got
a new instance of MDL_ticket, which was later moved to
TRANSACTIONAL duration, this led to unwarranted growth of
number of tickets with TRANSACITONAL duration in this
connection's MDL_context. As result searching for other
tickets in it became slow and acquisition of other metadata
locks by this transaction started to hog CPU.
Moreover, this also meant that after execution of statement
requiring prelocking concurrent FTWRL was blocked
until the end of transaction instead of end of statement.
This patch solves this problem by not moving locks to EXPLICIT
duration when thread enters prelocked mode (unless it is a real
LOCK TABLES mode). This step turned out to be not really
necessary as substatements don't try to release metadata locks.
Consequently, the global IX lock blocking FTWRL keeps its
STATEMENT duration and is properly released at the end of
statement and the above issue goes away.
mysql-test/r/flush.result:
Added test for bug #12641342 - "61401: UPDATE PERFORMANCE
DEGRADES GRADUALLY IF A TRIGGER EXISTS".
mysql-test/t/flush.test:
Added test for bug #12641342 - "61401: UPDATE PERFORMANCE
DEGRADES GRADUALLY IF A TRIGGER EXISTS".
sql/mdl.h:
Added comment describing various types of metadata lock
duration.
sql/sql_class.cc:
Since we no longer change duration of metadata locks to EXPLICIT
when entering prelocked mode (unless it is a real LOCK TABLES)
there is no need to restore proper duration of the locks when
leaving prelocked mode.
sql/sql_class.h:
Do not change duration of metadata locks to EXPLICIT when
entering prelocking mode (unless it is a real LOCK TABLES).
This allows to avoid problems with restoring correct duration
when leaving this mode. It is possible to do this as
substatements won't release metadata locks in any case.
sql/sql_parse.cc:
Added assert checking that we won't release metadata locks
when in substatement.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it possible to do safe multi volume snapshots as long as one snapshots the volume with the transaction logs last.
include/mysql_com.h:
Added REFRESH_CHECKPOINT
mysql-test/r/flush.result:
Added test of new FLUSH TABLES syntax + calls to checkpoint_status handler calls
mysql-test/t/flush.test:
Added test of new FLUSH TABLES syntax + calls to checkpoint_status handler calls
sql/handler.cc:
Added code to call checkpoint_state for all handlertons that supports it
sql/handler.h:
Added new checkpoint_state() handlerton call to temporarly disable checkpoints.
sql/lex.h:
Added CHECKPOINT keyword
sql/sql_yacc.yy:
Added support for FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT
storage/maria/ha_maria.cc:
Added handlerton call to disable checkpoints.
storage/maria/ma_checkpoint.c:
Don't do checkpoint if checkpoints are disabled.
storage/maria/ma_static.c:
Added maria_checkpoint_disabled
storage/maria/maria_def.h:
Added maria_checkpoint_disabled
storage/xtradb/handler/ha_innodb.cc:
Added handlerton call to disable checkpoints.
storage/xtradb/include/log0log.h:
Added option to log_checkpoint() to allow one to ignore not critical checkpoints during the time checkpoints are disabled.
storage/xtradb/log/log0log.c:
Added code to allow one to disable checkpoints during a FLUSH TABLES ... DISABLE CHECKPOINT
This was done by adding a new argument to log_checkpoint() which tells us when the checkpoint is called by srv_master_thread (which are safe to ignore)
storage/xtradb/srv/srv0srv.c:
Tell log_checkpoint() that checkpoints from srv_master_thread() are safe to ignore (will just delay recovery time a bit).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
FLUSH TABLES under FLUSH TABLES <list> WITH READ LOCK leads
to assert failure.
This assert was triggered if a statement tried up upgrade a metadata
lock with an active FLUSH TABLE <list> WITH READ LOCK. The assert
checks that the connection already holds a global intention exclusive
metadata lock. However, FLUSH TABLE <list> WITH READ LOCK does not
acquire this lock in order to be compatible with FLUSH TABLES WITH
READ LOCK. Therefore any metadata lock upgrade caused the assert to
be triggered.
This patch fixes the problem by preventing metadata lock upgrade
if the connection has an active FLUSH TABLE <list> WITH READ LOCK.
ER_TABLE_NOT_LOCKED_FOR_WRITE will instead be reported to the client.
Test case added to flush.test.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bug #57006 "Deadlock between HANDLER and FLUSH TABLES WITH READ
LOCK" and bug #54673 "It takes too long to get readlock for
'FLUSH TABLES WITH READ LOCK'".
The first bug manifested itself as a deadlock which occurred
when a connection, which had some table open through HANDLER
statement, tried to update some data through DML statement
while another connection tried to execute FLUSH TABLES WITH
READ LOCK concurrently.
What happened was that FTWRL in the second connection managed
to perform first step of GRL acquisition and thus blocked all
upcoming DML. After that it started to wait for table open
through HANDLER statement to be flushed. When the first connection
tried to execute DML it has started to wait for GRL/the second
connection creating deadlock.
The second bug manifested itself as starvation of FLUSH TABLES
WITH READ LOCK statements in cases when there was a constant
stream of concurrent DML statements (in two or more
connections).
This has happened because requests for protection against GRL
which were acquired by DML statements were ignoring presence of
pending GRL and thus the latter was starved.
This patch solves both these problems by re-implementing GRL
using metadata locks.
Similar to the old implementation acquisition of GRL in new
implementation is two-step. During the first step we block
all concurrent DML and DDL statements by acquiring global S
metadata lock (each DML and DDL statement acquires global IX
lock for its duration). During the second step we block commits
by acquiring global S lock in COMMIT namespace (commit code
acquires global IX lock in this namespace).
Note that unlike in old implementation acquisition of
protection against GRL in DML and DDL is semi-automatic.
We assume that any statement which should be blocked by GRL
will either open and acquires write-lock on tables or acquires
metadata locks on objects it is going to modify. For any such
statement global IX metadata lock is automatically acquired
for its duration.
The first problem is solved because waits for GRL become
visible to deadlock detector in metadata locking subsystem
and thus deadlocks like one in the first bug become impossible.
The second problem is solved because global S locks which
are used for GRL implementation are given preference over
IX locks which are acquired by concurrent DML (and we can
switch to fair scheduling in future if needed).
Important change:
FTWRL/GRL no longer blocks DML and DDL on temporary tables.
Before this patch behavior was not consistent in this respect:
in some cases DML/DDL statements on temporary tables were
blocked while in others they were not. Since the main use cases
for FTWRL are various forms of backups and temporary tables are
not preserved during backups we have opted for consistently
allowing DML/DDL on temporary tables during FTWRL/GRL.
Important change:
This patch changes thread state names which are used when
DML/DDL of FTWRL is waiting for global read lock. It is now
either "Waiting for global read lock" or "Waiting for commit
lock" depending on the stage on which FTWRL is.
Incompatible change:
To solve deadlock in events code which was exposed by this
patch we have to replace LOCK_event_metadata mutex with
metadata locks on events. As result we have to prohibit
DDL on events under LOCK TABLES.
This patch also adds extensive test coverage for interaction
of DML/DDL and FTWRL.
Performance of new and old global read lock implementations
in sysbench tests were compared. There were no significant
difference between new and old implementations.
mysql-test/include/check_ftwrl_compatible.inc:
Added helper script which allows to check that a statement is
compatible with FLUSH TABLES WITH READ LOCK.
mysql-test/include/check_ftwrl_incompatible.inc:
Added helper script which allows to check that a statement is
incompatible with FLUSH TABLES WITH READ LOCK.
mysql-test/include/handler.inc:
Adjusted test case to the fact that now DROP TABLE closes
open HANDLERs for the table to be dropped before checking
if there active FTWRL in this connection.
mysql-test/include/wait_show_condition.inc:
Fixed small error in the timeout message. The correct name
of variable used as parameter for this script is "$condition"
and not "$wait_condition".
mysql-test/r/delayed.result:
Added test coverage for scenario which triggered assert in
metadata locking subsystem.
mysql-test/r/events_2.result:
Updated test results after prohibiting event DDL operations
under LOCK TABLES.
mysql-test/r/flush.result:
Added test coverage for bug #57006 "Deadlock between HANDLER
and FLUSH TABLES WITH READ LOCK".
mysql-test/r/flush_read_lock.result:
Added test coverage for various aspects of FLUSH TABLES WITH
READ LOCK functionality.
mysql-test/r/flush_read_lock_kill.result:
Adjusted test case after replacing custom global read lock
implementation with one based on metadata locks. Use new
debug_sync point. Do not disable concurrent inserts as now
InnoDB we always use InnoDB table.
mysql-test/r/handler_innodb.result:
Adjusted test case to the fact that now DROP TABLE closes
open HANDLERs for the table to be dropped before checking
if there active FTWRL in this connection.
mysql-test/r/handler_myisam.result:
Adjusted test case to the fact that now DROP TABLE closes
open HANDLERs for the table to be dropped before checking
if there active FTWRL in this connection.
mysql-test/r/mdl_sync.result:
Adjusted test case after replacing custom global read lock
implementation with one based on metadata locks. Replaced
usage of GRL-specific debug_sync's with appropriate sync
points in MDL subsystem.
mysql-test/suite/perfschema/r/dml_setup_instruments.result:
Updated test results after removing global
COND_global_read_lock condition variable.
mysql-test/suite/perfschema/r/func_file_io.result:
Ensure that this test doesn't affect subsequent tests.
At the end of its execution enable back P_S instrumentation
which this test disables at some point.
mysql-test/suite/perfschema/r/func_mutex.result:
Ensure that this test doesn't affect subsequent tests.
At the end of its execution enable back P_S instrumentation
which this test disables at some point.
mysql-test/suite/perfschema/r/global_read_lock.result:
Adjusted test case to take into account that new GRL
implementation is based on MDL.
mysql-test/suite/perfschema/r/server_init.result:
Adjusted test case after replacing custom global read
lock implementation with one based on MDL and replacing
LOCK_event_metadata mutex with metadata lock.
mysql-test/suite/perfschema/t/func_file_io.test:
Ensure that this test doesn't affect subsequent tests.
At the end of its execution enable back P_S instrumentation
which this test disables at some point.
mysql-test/suite/perfschema/t/func_mutex.test:
Ensure that this test doesn't affect subsequent tests.
At the end of its execution enable back P_S instrumentation
which this test disables at some point.
mysql-test/suite/perfschema/t/global_read_lock.test:
Adjusted test case to take into account that new GRL
implementation is based on MDL.
mysql-test/suite/perfschema/t/server_init.test:
Adjusted test case after replacing custom global read
lock implementation with one based on MDL and replacing
LOCK_event_metadata mutex with metadata lock.
mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result:
Updated test results after prohibiting event DDL under
LOCK TABLES.
mysql-test/t/delayed.test:
Added test coverage for scenario which triggered assert in
metadata locking subsystem.
mysql-test/t/events_2.test:
Updated test case after prohibiting event DDL operations
under LOCK TABLES.
mysql-test/t/flush.test:
Added test coverage for bug #57006 "Deadlock between HANDLER
and FLUSH TABLES WITH READ LOCK".
mysql-test/t/flush_block_commit.test:
Adjusted test case after changing thread state name which
is used when COMMIT waits for FLUSH TABLES WITH READ LOCK
from "Waiting for release of readlock" to "Waiting for commit
lock".
mysql-test/t/flush_block_commit_notembedded.test:
Adjusted test case after changing thread state name which is
used when DML waits for FLUSH TABLES WITH READ LOCK. Now we
use "Waiting for global read lock" in this case.
mysql-test/t/flush_read_lock.test:
Added test coverage for various aspects of FLUSH TABLES WITH
READ LOCK functionality.
mysql-test/t/flush_read_lock_kill-master.opt:
We no longer need to use make_global_read_lock_block_commit_loop
debug tag in this test. Instead we rely on an appropriate
debug_sync point in MDL code.
mysql-test/t/flush_read_lock_kill.test:
Adjusted test case after replacing custom global read lock
implementation with one based on metadata locks. Use new
debug_sync point. Do not disable concurrent inserts as now
InnoDB we always use InnoDB table.
mysql-test/t/lock_multi.test:
Adjusted test case after changing thread state names which
are used when DML or DDL waits for FLUSH TABLES WITH READ
LOCK to "Waiting for global read lock".
mysql-test/t/mdl_sync.test:
Adjusted test case after replacing custom global read lock
implementation with one based on metadata locks. Replaced
usage of GRL-specific debug_sync's with appropriate sync
points in MDL subsystem. Updated thread state names which
are used when DDL waits for FTWRL.
mysql-test/t/trigger_notembedded.test:
Adjusted test case after changing thread state names which
are used when DML or DDL waits for FLUSH TABLES WITH READ
LOCK to "Waiting for global read lock".
sql/event_data_objects.cc:
Removed Event_queue_element::status/last_executed_changed
members and Event_queue_element::update_timing_fields()
method. We no longer use this class for updating mysql.events
once event is chosen for execution. Accesses to instances of
this class in scheduler thread require protection by
Event_queue::LOCK_event_queue mutex and we try to avoid
updating table while holding this lock.
sql/event_data_objects.h:
Removed Event_queue_element::status/last_executed_changed
members and Event_queue_element::update_timing_fields()
method. We no longer use this class for updating mysql.events
once event is chosen for execution. Accesses to instances of
this class in scheduler thread require protection by
Event_queue::LOCK_event_queue mutex and we try to avoid
updating table while holding this lock.
sql/event_db_repository.cc:
- Changed Event_db_repository methods to not release all
metadata locks once they are done updating mysql.events
table. This allows to keep metadata lock protecting
against GRL and lock protecting particular event around
until corresponding DDL statement is written to the binary
log.
- Removed logic for conditional update of "status" and
"last_executed" fields from update_timing_fields_for_event()
method. In the only case when this method is called now
"last_executed" is always modified and tracking change
of "status" is too much hassle.
sql/event_db_repository.h:
Removed logic for conditional update of "status" and
"last_executed" fields from Event_db_repository::
update_timing_fields_for_event() method.
In the only case when this method is called now "last_executed"
is always modified and tracking change of "status" field is
too much hassle.
sql/event_queue.cc:
Changed event scheduler code not to update mysql.events
table while holding Event_queue::LOCK_event_queue mutex.
Doing so led to a deadlock with a new GRL implementation.
This deadlock didn't occur with old implementation due to
fact that code acquiring protection against GRL ignored
pending GRL requests (which lead to GRL starvation).
One of goals of new implementation is to disallow GRL
starvation and so we have to solve problem with this
deadlock in a different way.
sql/events.cc:
Changed methods of Events class to acquire protection
against GRL while perfoming DDL statement and keep it
until statement is written to the binary log.
Unfortunately this step together with new GRL implementation
exposed deadlock involving Events::LOCK_event_metadata
and GRL. To solve it Events::LOCK_event_metadata mutex was
replaced with a metadata lock on event. As a side-effect
events DDL has to be prohibited under LOCK TABLES even in
cases when mysql.events table was explicitly locked for
write.
sql/events.h:
Replaced Events::LOCK_event_metadata mutex with a metadata
lock on event.
sql/ha_ndbcluster.cc:
Updated code after replacing custom global read lock
implementation with one based on MDL. Since MDL subsystem
should now be able to detect deadlocks involving metadata
locks and GRL there is no need for special handling of
active GRL.
sql/handler.cc:
Replaced custom implementation of global read lock with
one based on metadata locks. Consequently when doing
commit instead of calling method of Global_read_lock
class to acquire protection against GRL we simply acquire
IX in COMMIT namespace.
sql/lock.cc:
Replaced custom implementation of global read lock with
one based on metadata locks. This step allows to expose
wait for GRL to deadlock detector of MDL subsystem and
thus succesfully resolve deadlocks similar to one behind
bug #57006 "Deadlock between HANDLER and FLUSH TABLES
WITH READ LOCK". It also solves problem with GRL starvation
described in bug #54673 "It takes too long to get readlock
for 'FLUSH TABLES WITH READ LOCK'" since metadata locks used
by GRL give preference to FTWRL statement instead of DML
statements (if needed in future this can be changed to
fair scheduling).
Similar to old implementation of acquisition of GRL is
two-step. During the first step we block all concurrent
DML and DDL statements by acquiring global S metadata lock
(each DML and DDL statement acquires global IX lock for
its duration). During the second step we block commits by
acquiring global S lock in COMMIT namespace (commit code
acquires global IX lock in this namespace).
Note that unlike in old implementation acquisition of
protection against GRL in DML and DDL is semi-automatic.
We assume that any statement which should be blocked by GRL
will either open and acquires write-lock on tables or acquires
metadata locks on objects it is going to modify. For any such
statement global IX metadata lock is automatically acquired
for its duration.
To support this change:
- Global_read_lock::lock/unlock_global_read_lock and
make_global_read_lock_block_commit methods were changed
accordingly.
- Global_read_lock::wait_if_global_read_lock() and
start_waiting_global_read_lock() methods were dropped.
It is now responsibility of code acquiring metadata locks
opening tables to acquire protection against GRL by
explicitly taking global IX lock with statement duration.
- Global variables, mutex and condition variable used by
old implementation was removed.
- lock_routine_name() was changed to use statement duration for
its global IX lock. It was also renamed to lock_object_name()
as it now also used to take metadata locks on events.
- Global_read_lock::set_explicit_lock_duration() was added which
allows not to release locks used for GRL when leaving prelocked
mode.
sql/lock.h:
- Renamed lock_routine_name() to lock_object_name() and changed
its signature to allow its usage for events.
- Removed broadcast_refresh() function. It is no longer needed
with new GRL implementation.
sql/log_event.cc:
Release metadata locks with statement duration at the end
of processing legacy event for LOAD DATA. This ensures that
replication thread processing such event properly releases
its protection against global read lock.
sql/mdl.cc:
Changed MDL subsystem to support new MDL-based implementation
of global read lock.
Added COMMIT and EVENTS namespaces for metadata locks. Changed
thread state name for GLOBAL namespace to "Waiting for global
read lock".
Optimized MDL_map::find_or_insert() method to avoid taking
m_mutex mutex when looking up MDL_lock objects for GLOBAL
or COMMIT namespaces. We keep pre-created MDL_lock objects
for these namespaces around and simply return pointers to
these global objects when needed.
Changed MDL_lock/MDL_scoped_lock to properly handle
notification of insert delayed handler threads when FTWRL
takes global S lock.
Introduced concept of lock duration. In addition to locks with
transaction duration which work in the way which is similar to
how locks worked before (i.e. they are released at the end of
transaction), locks with statement and explicit duration were
introduced.
Locks with statement duration are automatically released at the
end of statement. Locks with explicit duration require explicit
release and obsolete concept of transactional sentinel.
* Changed MDL_request and MDL_ticket classes to support notion
of duration.
* Changed MDL_context to keep locks with different duration in
different lists. Changed code handling ticket list to take
this into account.
* Changed methods responsible for releasing locks to take into
account duration of tickets. Particularly public
MDL_context::release_lock() method now only can release
tickets with explicit duration (there is still internal
method which allows to specify duration). To release locks
with statement or transaction duration one have to use
release_statement/transactional_locks() methods.
* Concept of savepoint for MDL subsystem now has to take into
account locks with statement duration. Consequently
MDL_savepoint class was introduced and methods working with
savepoints were updated accordingly.
* Added methods which allow to set duration for one or all
locks in the context.
sql/mdl.h:
Changed MDL subsystem to support new MDL-based implementation
of global read lock.
Added COMMIT and EVENTS namespaces for metadata locks.
Introduced concept of lock duration. In addition to locks with
transaction duration which work in the way which is similar to
how locks worked before (i.e. they are released at the end of
transaction), locks with statement and explicit duration were
introduced.
Locks with statement duration are automatically released at the
end of statement. Locks with explicit duration require explicit
release and obsolete concept of transactional sentinel.
* Changed MDL_request and MDL_ticket classes to support notion
of duration.
* Changed MDL_context to keep locks with different duration in
different lists. Changed code handling ticket list to take
this into account.
* Changed methods responsible for releasing locks to take into
account duration of tickets. Particularly public
MDL_context::release_lock() method now only can release
tickets with explicit duration (there is still internal
method which allows to specify duration). To release locks
with statement or transaction duration one have to use
release_statement/transactional_locks() methods.
* Concept of savepoint for MDL subsystem now has to take into
account locks with statement duration. Consequently
MDL_savepoint class was introduced and methods working with
savepoints were updated accordingly.
* Added methods which allow to set duration for one or all
locks in the context.
sql/mysqld.cc:
Removed global mutex and condition variables which were used
by old implementation of GRL.
Also we no longer need to initialize Events::LOCK_event_metadata
mutex as it was replaced with metadata locks on events.
sql/mysqld.h:
Removed global variable, mutex and condition variables which
were used by old implementation of GRL.
sql/rpl_rli.cc:
When slave thread closes tables which were open for handling
of RBR events ensure that it releases global IX lock which
was acquired as protection against GRL.
sql/sp.cc:
Adjusted code to the new signature of lock_object/routine_name(),
to the fact that one now needs specify duration of lock when
initializing MDL_request and to the fact that savepoints for MDL
subsystem are now represented by MDL_savepoint class.
sql/sp_head.cc:
Ensure that statements in stored procedures release statement
metadata locks and thus release their protectiong against GRL
in proper moment in time.
Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request.
sql/sql_admin.cc:
Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request.
sql/sql_base.cc:
- Implemented support for new approach to acquiring protection
against global read lock. We no longer acquire such protection
explicitly on the basis of statement flags. Instead we always
rely on code which is responsible for acquiring metadata locks
on object to be changed acquiring this protection. This is
achieved by acquiring global IX metadata lock with statement
duration. Code doing this also responsible for checking that
current connection has no active GRL by calling an
Global_read_lock::can_acquire_protection() method.
Changed code in open_table() and lock_table_names()
accordingly.
Note that as result of this change DDL and DML on temporary
tables is always compatible with GRL (before it was
incompatible in some cases and compatible in other cases).
- To speed-up code acquiring protection against GRL introduced
m_has_protection_against_grl member in Open_table_context
class. It indicates that protection was already acquired
sometime during open_tables() execution and new attempts
can be skipped.
- Thanks to new GRL implementation calls to broadcast_refresh()
became unnecessary and were removed.
- Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request and to the fact that
savepoints for MDL subsystem are now represented by
MDL_savepoint class.
sql/sql_base.h:
Adjusted code to the fact that savepoints for MDL subsystem are
now represented by MDL_savepoint class.
Also introduced Open_table_context::m_has_protection_against_grl
member which allows to avoid acquiring protection against GRL
while opening tables if such protection was already acquired.
sql/sql_class.cc:
Changed THD::leave_locked_tables_mode() after transactional
sentinel for metadata locks was obsoleted by introduction of
locks with explicit duration.
sql/sql_class.h:
- Adjusted code to the fact that savepoints for MDL subsystem
are now represented by MDL_savepoint class.
- Changed Global_read_lock class according to changes in
global read lock implementation:
* wait_if_global_read_lock and start_waiting_global_read_lock
are now gone. Instead code needing protection against GRL
has to acquire global IX metadata lock with statement
duration itself. To help it new can_acquire_protection()
was introduced. Also as result of the above change
m_protection_count member is gone too.
* Added m_mdl_blocks_commits_lock member to store metadata
lock blocking commits.
* Adjusted code to the fact that concept of transactional
sentinel was obsoleted by concept of lock duration.
- Removed CF_PROTECT_AGAINST_GRL flag as it is no longer
necessary. New GRL implementation acquires protection
against global read lock automagically when statement
acquires metadata locks on tables or other objects it
is going to change.
sql/sql_db.cc:
Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request.
sql/sql_handler.cc:
Removed call to broadcast_refresh() function. It is no longer
needed with new GRL implementation.
Adjusted code after introducing duration concept for metadata
locks. Particularly to the fact transactional sentinel was
replaced with explicit duration.
sql/sql_handler.h:
Renamed mysql_ha_move_tickets_after_trans_sentinel() to
mysql_ha_set_explicit_lock_duration() after transactional
sentinel was obsoleted by locks with explicit duration.
sql/sql_insert.cc:
Adjusted code handling delaying inserts after switching to
new GRL implementation. Now connection thread initiating
delayed insert has to acquire global IX lock in addition
to metadata lock on table being inserted into. This IX lock
protects against GRL and similarly to SW lock on table being
inserted into has to be passed to handler thread in order to
avoid deadlocks.
sql/sql_lex.cc:
LEX::protect_against_global_read_lock member is no longer
necessary since protection against GRL is automatically
taken by code acquiring metadata locks/opening tables.
sql/sql_lex.h:
LEX::protect_against_global_read_lock member is no longer
necessary since protection against GRL is automatically
taken by code acquiring metadata locks/opening tables.
sql/sql_parse.cc:
- Implemented support for new approach to acquiring protection
against global read lock. We no longer acquire such protection
explicitly on the basis of statement flags. Instead we always
rely on code which is responsible for acquiring metadata locks
on object to be changed acquiring this protection. This is
achieved by acquiring global IX metadata lock with statement
duration. This lock is automatically released at the end of
statement execution.
- Changed implementation of CREATE/DROP PROCEDURE/FUNCTION not
to release metadata locks and thus protection against of GRL
in the middle of statement execution.
- Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request and to the fact that
savepoints for MDL subsystem are now represented by
MDL_savepoint class.
sql/sql_prepare.cc:
Adjusted code to the to the fact that savepoints for MDL
subsystem are now represented by MDL_savepoint class.
sql/sql_rename.cc:
With new GRL implementation there is no need to explicitly
acquire protection against GRL before renaming tables.
This happens automatically in code which acquires metadata
locks on tables being renamed.
sql/sql_show.cc:
Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request and to the fact that
savepoints for MDL subsystem are now represented by
MDL_savepoint class.
sql/sql_table.cc:
- With new GRL implementation there is no need to explicitly
acquire protection against GRL before dropping tables.
This happens automatically in code which acquires metadata
locks on tables being dropped.
- Changed mysql_alter_table() not to release lock on new table
name explicitly and to rely on automatic release of locks
at the end of statement instead. This was necessary since
now MDL_context::release_lock() is supported only for locks
for explicit duration.
sql/sql_trigger.cc:
With new GRL implementation there is no need to explicitly
acquire protection against GRL before changing table triggers.
This happens automatically in code which acquires metadata
locks on tables which triggers are to be changed.
sql/sql_update.cc:
Fix bug exposed by GRL testing. During prepare phase acquire
only S metadata locks instead of SW locks to keep prepare of
multi-UPDATE compatible with concurrent LOCK TABLES WRITE
and global read lock.
sql/sql_view.cc:
With new GRL implementation there is no need to explicitly
acquire protection against GRL before creating view.
This happens automatically in code which acquires metadata
lock on view to be created.
sql/sql_yacc.yy:
LEX::protect_against_global_read_lock member is no longer
necessary since protection against GRL is automatically
taken by code acquiring metadata locks/opening tables.
sql/table.cc:
Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request.
sql/table.h:
Adjusted code to the fact that one now needs specify duration
of lock when initializing MDL_request.
sql/transaction.cc:
Replaced custom implementation of global read lock with
one based on metadata locks. Consequently when doing
commit instead of calling method of Global_read_lock
class to acquire protection against GRL we simply acquire
IX in COMMIT namespace.
Also adjusted code to the fact that MDL savepoint is now
represented by MDL_savepoint class.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
table causes assert failure".
Attempting to use FLUSH TABLE table_list WITH READ LOCK
statement for a MERGE table led to an assertion failure if
one of its children was not present in the list of tables
to be flushed. The problem was not visible in non-debug builds.
The assertion failure was caused by the fact that in such
situations FLUSH TABLES table_list WITH READ LOCK implementation
tried to use (e.g. lock) such child tables without acquiring
metadata lock on them. This happened because when opening tables
we assumed metadata locks on all tables were already acquired
earlier during statement execution and a such assumption was
false for MERGE children.
This patch fixes the problem by ensuring at open_tables() time
that we try to acquire metadata locks on all tables to be opened.
For normal tables such requests are satisfied instantly since
locks are already acquired for them. For MERGE children metadata
locks are acquired in normal fashion.
Note that FLUSH TABLES merge_table WITH READ LOCK will lock for
read both the MERGE table and its children but will flush only
the MERGE table. To flush children one has to mention them in table
list explicitly. This is expected behavior and it is consistent with
usage patterns for this statement (e.g. in mysqlhotcopy script).
mysql-test/r/flush.result:
Added test case for bug #55273 "FLUSH TABLE tm WITH READ LOCK
for Merge table causes assert failure".
mysql-test/t/flush.test:
Added test case for bug #55273 "FLUSH TABLE tm WITH READ LOCK
for Merge table causes assert failure".
sql/sql_base.cc:
Changed lock_table_names() to support newly introduced
MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK flag.
sql/sql_base.h:
Introduced MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK flag for
open_tables() and lock_table_names() which allows to skip
acquiring of global and schema-scope locks when SNW, SNRW or
X metadata locks are acquired.
sql/sql_reload.cc:
Changed "FLUSH TABLES table_list WITH READ LOCK" code not to
cause assert about missing metadata locks when MERGE table is
flushed without one of its underlying tables.
To achieve this we no longer call open_and_lock_tables() with
MYSQL_OPEN_HAS_MDL_LOCK flag so this function automatically
acquires metadata locks on MERGE children if such lock has
not been already acquired at earlier stage. Instead we call
this function with MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK flag to
suppress acquiring of global IX lock in order to keep FLUSH
TABLES table_list WITH READ LOCK compatible with FLUSH TABLE
WITH READ LOCK.
Also changed implementation to use lock_table_names() function
for pre-acquiring of metadata locks instead of custom code.
To implement this change moved setting of open_type member for
table list elements to parser.
sql/sql_yacc.yy:
Now we set acceptable type of table for FLUSH TABLES table_list
WITH READ LOCK at parsing time instead of execution time.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The bug was fixed by the patch for Bug 52044.
Add a test case.
mysql-test/r/flush.result:
Update results (Bug#52117)
mysql-test/t/flush.test:
Add a test case for Bug#52117 "Pending FLUSH TALBES <list> aborts
transactions unnecessarily"
|
| |
| |
| |
| |
| |
| | |
and a comment for the case when a connection
issuing FLUSH TABLES <list> WITH READ LOCK
has an open handler.
|
|\ \
| | |
| | |
| | |
| | | |
Merge his patch for Bug#52044 into 5.5, and apply
review comments.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
TABLES <list> WITH READ LOCK are incompatible".
The problem was that FLUSH TABLES <list> WITH READ LOCK
which was issued when other connection has acquired global
read lock using FLUSH TABLES WITH READ LOCK was blocked
and has to wait until global read lock is released.
This issue stemmed from the fact that FLUSH TABLES <list>
WITH READ LOCK implementation has acquired X metadata locks
on tables to be flushed. Since these locks required acquiring
of global IX lock this statement was incompatible with global
read lock.
This patch addresses problem by using SNW metadata type of
lock for tables to be flushed by FLUSH TABLES <list> WITH
READ LOCK. It is OK to acquire them without global IX lock
as long as we won't try to upgrade those locks. Since SNW
locks allow concurrent statements using same table FLUSH
TABLE <list> WITH READ LOCK now has to wait until old
versions of tables to be flushed go away after acquiring
metadata locks. Since such waiting can lead to deadlock
MDL deadlock detector was extended to take into account
waits for flush and resolve such deadlocks.
As a bonus code in open_tables() which was responsible for
waiting old versions of tables to go away was refactored.
Now when we encounter old version of table in open_table()
we don't back-off and wait for all old version to go away,
but instead wait for this particular table to be flushed.
Such approach supported by deadlock detection should reduce
number of scenarios in which FLUSH TABLES aborts concurrent
multi-statement transactions.
Note that active FLUSH TABLES <list> WITH READ LOCK still
blocks concurrent FLUSH TABLES WITH READ LOCK statement
as the former keeps tables open and thus prevents the
latter statement from doing flush.
mysql-test/include/handler.inc:
Adjusted test case after changing status which is set
when FLUSH TABLES waits for tables to be flushed from
"Flushing tables" to "Waiting for table".
mysql-test/r/flush.result:
Added test which checks that "flush tables <list> with
read lock" is compatible with active "flush tables with
read lock" but not vice-versa. This test also covers
bug #52044 "FLUSH TABLES WITH READ LOCK and FLUSH TABLES
<list> WITH READ LOCK are incompatible".
mysql-test/r/mdl_sync.result:
Added scenarios in which wait for table to be flushed
causes deadlocks to the coverage of MDL deadlock detector.
mysql-test/suite/perfschema/r/dml_setup_instruments.result:
Adjusted test results after removal of COND_refresh
condition variable.
mysql-test/suite/perfschema/r/server_init.result:
Adjusted test and its results after removal of COND_refresh
condition variable.
mysql-test/suite/perfschema/t/server_init.test:
Adjusted test and its results after removal of COND_refresh
condition variable.
mysql-test/t/flush.test:
Added test which checks that "flush tables <list> with
read lock" is compatible with active "flush tables with
read lock" but not vice-versa. This test also covers
bug #52044 "FLUSH TABLES WITH READ LOCK and FLUSH TABLES
<list> WITH READ LOCK are incompatible".
mysql-test/t/kill.test:
Adjusted test case after changing status which is set
when FLUSH TABLES waits for tables to be flushed from
"Flushing tables" to "Waiting for table".
mysql-test/t/lock_multi.test:
Adjusted test case after changing status which is set
when FLUSH TABLES waits for tables to be flushed from
"Flushing tables" to "Waiting for table".
mysql-test/t/mdl_sync.test:
Added scenarios in which wait for table to be flushed
causes deadlocks to the coverage of MDL deadlock detector.
sql/ha_ndbcluster.cc:
Adjusted code after adding one more parameter for
close_cached_tables() call - timeout for waiting for
table to be flushed.
sql/ha_ndbcluster_binlog.cc:
Adjusted code after adding one more parameter for
close_cached_tables() call - timeout for waiting for
table to be flushed.
sql/lock.cc:
Removed COND_refresh condition variable. See comment
for sql_base.cc for details.
sql/mdl.cc:
Now MDL deadlock detector takes into account information
about waits for table flushes when searching for deadlock.
To implement this change:
- Declaration of enum_deadlock_weight and
Deadlock_detection_visitor were moved to mdl.h header
to make them available to the code in table.cc which
implements deadlock detector traversal through edges
of waiters graph representing waiting for flush.
- Since now MDL_context may wait not only for metadata
lock but also for table to be flushed an abstract
Wait_for_edge class was introduced. Its descendants
MDL_ticket and Flush_ticket incapsulate specifics
of inspecting waiters graph when following through
edge representing wait of particular type.
We no longer require global IX metadata lock when acquiring
SNW or SNRW locks. Such locks are needed only when metadata
locks of these types are upgraded to X locks. This allows
to use SNW locks in FLUSH TABLES <list> WITH READ LOCK
implementation and keep the latter compatible with global
read lock.
sql/mdl.h:
Now MDL deadlock detector takes into account information
about waits for table flushes when searching for deadlock.
To implement this change:
- Declaration of enum_deadlock_weight and
Deadlock_detection_visitor were moved to mdl.h header
to make them available to the code in table.cc which
implements deadlock detector traversal through edges
of waiters graph representing waiting for flush.
- Since now MDL_context may wait not only for metadata
lock but also for table to be flushed an abstract
Wait_for_edge class was introduced. Its descendants
MDL_ticket and Flush_ticket incapsulate specifics
of inspecting waiters graph when following through
edge representing wait of particular type.
- Deadlock_detection_visitor now has m_table_shares_visited
member which allows to support recursive locking for
LOCK_open. This is required when deadlock detector
inspects waiters graph which contains several edges
representing waits for flushes or needs to come through
the such edge more than once.
sql/mysqld.cc:
Removed COND_refresh condition variable. See comment
for sql_base.cc for details.
sql/mysqld.h:
Removed COND_refresh condition variable. See comment
for sql_base.cc for details.
sql/sql_base.cc:
Changed approach to how threads are waiting for table
to be flushed. Now thread that wants to wait for old
table to go away subscribes for notification by adding
Flush_ticket to table's share and waits using
MDL_context::m_wait object. Once table gets flushed
(i.e. all tables are closed and table share is ready
to be destroyed) all such waiters are notified
individually.
Thanks to this change MDL deadlock detector can take
such waits into account.
To implement this/as result of this change:
- tdc_wait_for_old_versions() was replaced with
tdc_wait_for_old_version() which waits for individual
old share to go away and which is called by open_table()
after finding out that share is outdated. We don't
need to perform back-off before such waiting thanks
to the fact that deadlock detector now sees such waits.
- As result Open_table_ctx::m_mdl_requests became
unnecessary and was removed. We no longer allocate
copies of MDL_request objects on MEM_ROOT when
MYSQL_OPEN_FORCE_SHARED/SHARED_HIGH_PRIO flags are
in effect.
- close_cached_tables() and tdc_wait_for_old_version()
share code which implements waiting for share to be
flushed - the both use TABLE_SHARE::wait_until_flush()
method. Thanks to this close_cached_tables() supports
timeouts and has extra parameter for this.
- Open_table_context::OT_MDL_CONFLICT enum element was
renamed to OT_CONFLICT as it is now also used in cases
when back-off is required to resolve deadlock caused
by waiting for flush and not metadata lock.
- In cases when we discover that current connection tries
to open tables from different generation we now simply
back-off and restart process of opening tables. To
support this Open_table_context::OT_REOPEN_TABLES enum
element was added.
- COND_refresh condition variable became unnecessary and
was removed.
- mysql_notify_thread_having_shared_lock() no longer wakes
up connections waiting for flush as all such connections
can be waken up by deadlock detector if necessary.
sql/sql_base.h:
- close_cached_tables() now has one more parameter -
timeout for waiting for table to be flushed.
- Open_table_context::OT_MDL_CONFLICT enum element was
renamed to OT_CONFLICT as it is now also used in cases
when back-off is required to resolve deadlock caused
by waiting for flush and not metadata lock.
Added new OT_REOPEN_TABLES enum element to be used in
cases when we need to restart open tables process even
in the middle of transaction.
- Open_table_ctx::m_mdl_requests became unnecessary and
was removed.
sql/sql_class.h:
Added assert ensuring that we won't use LOCK_open mutex
with THD::enter_cond(). Otherwise deadlocks can arise in
MDL deadlock detector.
sql/sql_parse.cc:
Changed FLUSH TABLES <list> WITH READ LOCK to take SNW
metadata locks instead of X locks on tables to be flushed.
Since we no longer require global IX lock to be taken
when SNW locks are taken this makes this statement
compatible with FLUSH TABLES WITH READ LOCK statement.
Since SNW locks allow other connections to have table
opened FLUSH TABLES <list> WITH READ LOCK now has to
wait during open_tables() for old version to go away.
Such waits can lead to deadlocks which will be detected
by MDL deadlock detector which now takes waits for table
to be flushed into account.
Also adjusted code after adding one more parameter for
close_cached_tables() call - timeout for waiting for
table to be flushed.
sql/sql_yacc.yy:
FLUSH TABLES <list> WITH READ LOCK now needs only SNW
metadata locks on tables.
sql/sys_vars.cc:
Adjusted code after adding one more parameter for
close_cached_tables() call - timeout for waiting for
table to be flushed.
sql/table.cc:
Implemented new approach to how threads are waiting for
table to be flushed. Now thread that wants to wait for
old table to go away subscribes for notification by
adding Flush_ticket to table's share and waits using
MDL_context::m_wait object. Once table gets flushed
(i.e. all tables are closed and table share is ready
to be destroyed) all such waiters are notified
individually. This change allows to make such waits
visible inside of MDL deadlock detector.
To do it:
- Added list of waiters/Flush_tickets to TABLE_SHARE
class.
- Changed free_table_share() to postpone freeing of
share memory until last waiter goes away and to
wake up subscribed waiters.
- Added TABLE_SHARE::wait_until_flushed() method which
implements subscription to the list of waiters for
table to be flushed and waiting for this event.
Implemented interface which allows to expose waits for
flushes to MDL deadlock detector:
- Introduced Flush_ticket class a descendant of
Wait_for_edge class.
- Added TABLE_SHARE::find_deadlock() method which allows
deadlock detector to find out what contexts are still
using old version of table in question (i.e. to find
out what contexts are waited for by owner of
Flush_ticket).
sql/table.h:
In order to support new strategy of waiting for table flush
(see comment for table.cc for details) added list of
waiters/Flush_tickets to TABLE_SHARE class.
Implemented interface which allows to expose waits for
flushes to MDL deadlock detector:
- Introduced Flush_ticket class a descendant of
Wait_for_edge class.
- Added TABLE_SHARE::find_deadlock() method which allows
deadlock detector to find out what contexts are still
using old version of table in question (i.e. to find
out what contexts are waited for by owner of
Flush_ticket).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
LOCK kills the server.
Prohibit FLUSH TABLES WITH READ LOCK application to views or
temporary tables.
Fix a subtle bug in the implementation when we actually
did not remove table share objects from the table cache after
acquiring exclusive locks.
mysql-test/r/flush.result:
Update results (Bug#51710)
mysql-test/t/flush.test:
Add a test case for Bug#51710.
sql/sql_parse.cc:
Fix Bug#51710 "FLUSH TABLES <view> WITH READ LOCK
killes the server.
Ensure we don't open views and temporary tables.
Fix a yet another bug in the implementation which
did not actually remove the tables from cache after acquiring
exclusive locks.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extend and implement the grammar that allows to FLUSH WITH READ LOCK
a list of tables, rather than all of them.
Incompatible grammar change:
Previously one could perform FLUSH TABLES, HOSTS, PRIVILEGES in a single
statement.
After this change, FLUSH TABLES must always be alone on the list.
Judging by the test suite, however, the old extended syntax
was never or very rarely used.
The new statement requires RELOAD ACL global privilege and
LOCK_TABLES_ACL | SELECT_ACL on individual tables.
In other words, it's an atomic combination of LOCK TALBES <list> READ
and FLUSH TABLES <list>, and requires respective privileges.
For additional information about the semantics, please
see WL#5000 and the comment for flush_tables_with_read_lock()
function in sql_parse.cc
mysql-test/r/flush.result:
Update test results (WL#5000).
mysql-test/t/flush.test:
Add test coverage for WL#5000.
sql/sql_yacc.yy:
Allow FLUSH TABLES <table_list> WITH READ LOCK.
Disallow FLUSH TABLES <table_list>, flush_options.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
TEMPORARY + HANDLER + LOCK + SP".
Server crashed when one:
1) Opened HANDLER or acquired global read lock
2) Then locked one or several temporary tables with
LOCK TABLES statement (but no base tables).
3) Then issued any statement causing commit (explicit
or implicit).
4) Issued statement which should have closed HANDLER
or released global read lock.
The problem was that when entering LOCK TABLES mode in the
scenario described above we incorrectly set transactional
MDL sentinel to zero. As result during commit all metadata
locks were released (including lock for open HANDLER or
global metadata shared lock). Indeed, attempt to release
metadata lock for the second time which happened during
HANLDER CLOSE or during release of GLR caused crash.
This patch fixes problem by changing MDL_context's
set_trans_sentinel() method to set sentinel to correct
value (it should point to the most recent ticket).
mysql-test/include/handler.inc:
Added test for bug #51136 "Crash in pthread_rwlock_rdlock on
TEMPORARY + HANDLER + LOCK + SP".
mysql-test/r/flush.result:
Updated test results (see flush.test).
mysql-test/r/handler_innodb.result:
Updated test results (see include/handler.inc).
mysql-test/r/handler_myisam.result:
Updated test results (see include/handler.inc).
mysql-test/t/flush.test:
Added additional coverage for bug #51136 "Crash in
pthread_rwlock_rdlock on TEMPORARY + HANDLER + LOCK +
SP".
sql/mdl.h:
When setting new value of transactional sentinel use
pointer to the most recent ticket instead of value
returned by MDL_context::mdl_savepoint().
This allows to handle correctly situation when the new
value of sentinel should be the same as its current value
(MDL_context::mdl_savepoint() returns NULL in this case).
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport of:
------------------------------------------------------------
revno: 2630.4.1
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w
timestamp: Fri 2008-05-23 17:54:03 +0400
message:
WL#3726 "DDL locking for all metadata objects".
After review fixes in progress.
------------------------------------------------------------
This is the first patch in series. It transforms the metadata
locking subsystem to use a dedicated module (mdl.h,cc). No
significant changes in the locking protocol.
The import passes the test suite with the exception of
deprecated/removed 6.0 features, and MERGE tables. The latter
are subject to a fix by WL#4144.
Unfortunately, the original changeset comments got lost in a merge,
thus this import has its own (largely insufficient) comments.
This patch fixes Bug#25144 "replication / binlog with view breaks".
Warning: this patch introduces an incompatible change:
Under LOCK TABLES, it's no longer possible to FLUSH a table that
was not locked for WRITE.
Under LOCK TABLES, it's no longer possible to DROP a table or
VIEW that was not locked for WRITE.
******
Backport of:
------------------------------------------------------------
revno: 2630.4.2
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w
timestamp: Sat 2008-05-24 14:03:45 +0400
message:
WL#3726 "DDL locking for all metadata objects".
After review fixes in progress.
******
Backport of:
------------------------------------------------------------
revno: 2630.4.3
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w
timestamp: Sat 2008-05-24 14:08:51 +0400
message:
WL#3726 "DDL locking for all metadata objects"
Fixed failing Windows builds by adding mdl.cc to the lists
of files needed to build server/libmysqld on Windows.
******
Backport of:
------------------------------------------------------------
revno: 2630.4.4
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w
timestamp: Sat 2008-05-24 21:57:58 +0400
message:
WL#3726 "DDL locking for all metadata objects".
Fix for assert failures in kill.test which occured when one
tried to kill ALTER TABLE statement on merge table while it
was waiting in wait_while_table_is_used() for other connections
to close this table.
These assert failures stemmed from the fact that cleanup code
in this case assumed that temporary table representing new
version of table was open with adding to THD::temporary_tables
list while code which were opening this temporary table wasn't
always fulfilling this.
This patch changes code that opens new version of table to
always do this linking in. It also streamlines cleanup process
for cases when error occurs while we have new version of table
open.
******
WL#3726 "DDL locking for all metadata objects"
Add libmysqld/mdl.cc to .bzrignore.
******
Backport of:
------------------------------------------------------------
revno: 2630.4.6
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w
timestamp: Sun 2008-05-25 00:33:22 +0400
message:
WL#3726 "DDL locking for all metadata objects".
Addition to the fix of assert failures in kill.test caused by
changes for this worklog.
Make sure we close the new table only once.
.bzrignore:
Add libmysqld/mdl.cc
libmysqld/CMakeLists.txt:
Added mdl.cc to the list of files needed for building of libmysqld.
libmysqld/Makefile.am:
Added files implementing new meta-data locking subsystem to the server.
mysql-test/include/handler.inc:
Use separate connection for waiting while threads performing DDL
operations conflicting with open HANDLER tables reach blocked
state. This is required because now we check and close tables open
by HANDLER statements in this connection conflicting with DDL in
another each time open_tables() is called and thus select from I_S
which is used for waiting will unblock DDL operations if issued
from connection with open HANDLERs.
mysql-test/r/create.result:
Adjusted test case after change in implementation of CREATE TABLE
... SELECT. We no longer have special check in open_table() which
catches the case when we select from the table created. Instead we
rely on unique_table() call which happens after opening and
locking all tables.
mysql-test/r/flush.result:
FLUSH TABLES WITH READ LOCK can no longer happen under LOCK
TABLES. Updated test accordingly.
mysql-test/r/flush_table.result:
Under LOCK TABLES we no longer allow to do FLUSH TABLES for tables
locked for read. Updated test accordingly.
mysql-test/r/handler_innodb.result:
Use separate connection for waiting while threads performing DDL
operations conflicting with open HANDLER tables reach blocked
state. This is required because now we check and close tables open
by HANDLER statements in this connection conflicting with DDL in
another each time open_tables() is called and thus select from I_S
which is used for waiting will unblock DDL operations if issued
from connection with open HANDLERs.
mysql-test/r/handler_myisam.result:
Use separate connection for waiting while threads performing DDL
operations conflicting with open HANDLER tables reach blocked
state. This is required because now we check and close tables open
by HANDLER statements in this connection conflicting with DDL in
another each time open_tables() is called and thus select from I_S
which is used for waiting will unblock DDL operations if issued
from connection with open HANDLERs.
mysql-test/r/information_schema.result:
Additional test for WL#3726 "DDL locking for all metadata
objects". Check that we use high-priority metadata lock requests
when filling I_S tables.
Rearrange tests to match 6.0 better (fewer merge conflicts).
mysql-test/r/kill.result:
Added tests checking that DDL and DML statements waiting for
metadata locks can be interrupted by KILL command.
mysql-test/r/lock.result:
One no longer is allowed to do DROP VIEW under LOCK TABLES even if
this view is locked by LOCK TABLES. The problem is that in such
situation write locks on view are not mutually exclusive so
upgrading metadata lock which is required for dropping of view
will lead to deadlock.
mysql-test/r/partition_column_prune.result:
Update results (same results in 6.0), WL#3726
mysql-test/r/partition_pruning.result:
Update results (same results in 6.0), WL#3726
mysql-test/r/ps_ddl.result:
We no longer invalidate prepared CREATE TABLE ... SELECT statement
if target table changes. This is OK since it is not strictly
necessary.
The first change is wrong, is caused by FLUSH TABLE
now flushing all unused tables. This is a regression that
Dmitri fixed in 6.0 in a follow up patch.
mysql-test/r/sp.result:
Under LOCK TABLES we no longer allow accessing views which were
not explicitly locked. To access view we need to obtain metadata
lock on it and doing this under LOCK TABLES may lead to deadlocks.
mysql-test/r/view.result:
One no longer is allowed to do DROP VIEW under LOCK TABLES even if
this view is locked by LOCK TABLES. The problem is that in such
situation even "write locks" on view are not mutually exclusive so
upgrading metadata lock which is required for dropping of view
will lead to deadlock
mysql-test/r/view_grant.result:
ALTER VIEW implementation was changed to open a view only after
checking that user which does alter has appropriate privileges on
it. This means that in case when user's privileges are
insufficient for this we won't check that new view definer is the
same as original one or user performing alter has SUPER privilege.
Adjusted test case accordingly.
mysql-test/r/view_multi.result:
Added test case for bug#25144 "replication / binlog with view
breaks".
mysql-test/suite/rpl/t/disabled.def:
Disable test for deprecated features (they don't work with new MDL).
mysql-test/t/create.test:
Adjusted test case after change in implementation of CREATE TABLE
... SELECT. We no longer have special check in open_table() which
catches the case when we select from the table created. Instead we
rely on unique_table() call which happens after opening and
locking all tables.
mysql-test/t/disabled.def:
Disable merge.test, subject of WL#4144
mysql-test/t/flush.test:
FLUSH TABLES WITH READ LOCK can no longer happen under LOCK
TABLES. Updated test accordingly.
mysql-test/t/flush_table.test:
Under LOCK TABLES we no longer allow to do FLUSH TABLES for tables
locked for read. Updated test accordingly.
mysql-test/t/information_schema.test:
Additional test for WL#3726 "DDL locking for all metadata
objects". Check that we use high-priority metadata lock requests
when filling I_S tables.
Rearrange the results for easier merges with 6.0.
mysql-test/t/kill.test:
Added tests checking that DDL and DML statements waiting for
metadata locks can be interrupted by KILL command.
mysql-test/t/lock.test:
One no longer is allowed to do DROP VIEW under LOCK TABLES even if
this view is locked by LOCK TABLES. The problem is that in such
situation write locks on view are not mutually exclusive so
upgrading metadata lock which is required for dropping of view
will lead to deadlock.
mysql-test/t/lock_multi.test:
Adjusted test case to the changes of status in various places
caused by change in implementation FLUSH TABLES WITH READ LOCK,
which is now takes global metadata lock before flushing tables and
therefore waits on at these places.
mysql-test/t/ps_ddl.test:
We no longer invalidate prepared CREATE TABLE ... SELECT statement
if target table changes. This is OK since it is not strictly
necessary.
The first change is wrong, is caused by FLUSH TABLE
now flushing all unused tables. This is a regression that
Dmitri fixed in 6.0 in a follow up patch.
mysql-test/t/sp.test:
Under LOCK TABLES we no longer allow accessing views which were
not explicitly locked. To access view we need to obtain metadata
lock on it and doing this under LOCK TABLES may lead to deadlocks.
mysql-test/t/trigger_notembedded.test:
Adjusted test case to the changes of status in various places
caused by change in implementation FLUSH TABLES WITH READ LOCK,
which is now takes global metadata lock before flushing tables and
therefore waits on at these places.
mysql-test/t/view.test:
One no longer is allowed to do DROP VIEW under LOCK TABLES even if
this view is locked by LOCK TABLES. The problem is that in such
situation even "write locks" on view are not mutually exclusive so
upgrading metadata lock which is required for dropping of view
will lead to deadlock.
mysql-test/t/view_grant.test:
ALTER VIEW implementation was changed to open a view only after
checking that user which does alter has appropriate privileges on
it. This means that in case when user's privileges are
insufficient for this we won't check that new view definer is the
same as original one or user performing alter has SUPER privilege.
Adjusted test case accordingly.
mysql-test/t/view_multi.test:
Added test case for bug#25144 "replication / binlog with view
breaks".
sql/CMakeLists.txt:
Added mdl.cc to the list of files needed for building of server.
sql/Makefile.am:
Added files implementing new meta-data locking subsystem to the
server.
sql/event_db_repository.cc:
Allocate metadata lock requests objects (MDL_LOCK) on execution
memory root in cases when TABLE_LIST objects is also allocated
there or on stack.
sql/ha_ndbcluster.cc:
Adjusted code to work nicely with new metadata locking subsystem.
close_cached_tables() no longer has wait_for_placeholder argument.
Instead of relying on this parameter and related behavior FLUSH
TABLES WITH READ LOCK now takes global shared metadata lock.
sql/ha_ndbcluster_binlog.cc:
Adjusted code to work with new metadata locking subsystem.
close_cached_tables() no longer has wait_for_placeholder argument.
Instead of relying on this parameter and related behavior FLUSH
TABLES WITH READ LOCK now takes global shared metadata lock.
sql/handler.cc:
update_frm_version():
Directly update TABLE_SHARE::mysql_version member instead of
going through all TABLE instances for this table (old code was a
legacy from pre-table-definition-cache days).
sql/lock.cc:
Use new metadata locking subsystem. Threw away most of functions
related to name locking as now one is supposed to use metadata
locking API instead. In lock_global_read_lock() and
unlock_global_read_lock() in order to avoid problems with global
read lock sneaking in at the moment when we perform FLUSH TABLES
or ALTER TABLE under LOCK TABLES and when tables being reopened
are protected only by metadata locks we also have to take global
shared meta data lock.
sql/log_event.cc:
Adjusted code to work with new metadata locking subsystem. For
tables open by slave thread for applying RBR events allocate
memory for lock request object in the same chunk of memory as
TABLE_LIST objects for them. In order to ensure that we keep these
objects around until tables are open always close tables before
calling Relay_log_info::clear_tables_to_lock(). Use new auxiliary
Relay_log_info::slave_close_thread_tables() method to enforce
this.
sql/log_event_old.cc:
Adjusted code to work with new metadata locking subsystem. Since
for tables open by slave thread for applying RBR events memory for
lock request object is allocated in the same chunk of memory as
TABLE_LIST objects for them we have to ensure that we keep these
objects around until tables are open. To ensure this we always
close tables before calling
Relay_log_info::clear_tables_to_lock(). To enfore this we use
new auxiliary Relay_log_info::slave_close_thread_tables()
method.
sql/mdl.cc:
Implemented new metadata locking subsystem and API described in
WL3726 "DDL locking for all metadata objects".
sql/mdl.h:
Implemented new metadata locking subsystem and API described in
WL3726 "DDL locking for all metadata objects".
sql/mysql_priv.h:
- close_thread_tables()/close_tables_for_reopen() now has one more
argument which indicates that metadata locks should be released
but not removed from the context in order to be used later in
mdl_wait_for_locks() and tdc_wait_for_old_version().
- close_cached_table() routine is no longer public.
- Thread waiting in wait_while_table_is_used() can be now killed
so this function returns boolean to make caller aware of such
situation.
- We no longer have table cache as separate entity instead used
and unused TABLE instances are linked to TABLE_SHARE objects in
table definition cache.
- Now third argument of open_table() is also used for requesting
table repair or auto-discovery of table's new definition. So its
type was changed from bool to enum.
- Added tdc_open_view() function for opening view by getting its
definition from disk (and table cache in future).
- reopen_name_locked_table() no longer needs "link_in" argument as
now we have exclusive metadata locks instead of dummy TABLE
instances when this function is called.
- find_locked_table() now takes head of list of TABLE instances
instead of always scanning through THD::open_tables list. Also
added find_write_locked_table() auxiliary.
- reopen_tables(), close_cached_tables() no longer have
mark_share_as_old and wait_for_placeholder arguments. Instead of
relying on this parameters and related behavior FLUSH TABLES
WITH READ LOCK now takes global shared metadata lock.
- We no longer need drop_locked_tables() and
abort_locked_tables().
- mysql_ha_rm_tables() now always assume that LOCK_open is not
acquired by caller.
- Added notify_thread_having_shared_lock() callback invoked by
metadata locking subsystem when acquiring an exclusive lock, for
each thread that has a conflicting shared metadata lock.
- Introduced expel_table_from_cache() as replacement for
remove_table_from_cache() (the main difference is that this new
function assumes that caller follows metadata locking protocol
and never waits).
- Threw away most of functions related to name locking. One should
use new metadata locking subsystem and API instead.
sql/mysqld.cc:
Got rid of call initializing/deinitializing table cache since now
it is embedded into table definition cache. Added calls for
initializing/ deinitializing metadata locking subsystem.
sql/rpl_rli.cc:
Introduced auxiliary Relay_log_info::slave_close_thread_tables()
method which is used for enforcing that we always close tables
open for RBR before deallocating TABLE_LIST elements and MDL_LOCK
objects for them.
sql/rpl_rli.h:
Introduced auxiliary Relay_log_info::slave_close_thread_tables()
method which is used for enforcing that we always close tables
open for RBR before deallocating TABLE_LIST elements and MDL_LOCK
objects for them.
sql/set_var.cc:
close_cached_tables() no longer has wait_for_placeholder argument.
Instead of relying on this parameter and related behavior FLUSH
TABLES WITH READ LOCK now takes global shared metadata lock.
sql/sp_head.cc:
For tables added to the statement's table list by prelocking
algorithm we allocate these objects either on the same memory as
corresponding table list elements or on THD::locked_tables_root
(if we are building table list for LOCK TABLES).
sql/sql_acl.cc:
Allocate metadata lock requests objects (MDL_LOCK) on execution
memory root in cases when we use stack TABLE_LIST objects to open
tables. Got rid of redundant code by using unlock_locked_tables()
function.
sql/sql_base.cc:
Changed code to use new MDL subsystem. Got rid of separate table
cache. Now used and unused TABLE instances are linked to the
TABLE_SHAREs in table definition cache.
check_unused():
Adjusted code to the fact that we no longer have separate table
cache. Removed dead code.
table_def_free():
Free TABLE instances referenced from TABLE_SHARE objects before
destroying table definition cache.
get_table_share():
Added assert which ensures that noone will be able to access
table (and its share) without acquiring some kind of metadata
lock first.
close_handle_and_leave_table_as_lock():
Adjusted code to the fact that TABLE instances now are linked to
list in TABLE_SHARE.
list_open_tables():
Changed this function to use table definition cache instead of
table cache.
free_cache_entry():
Unlink freed TABLE elements from the list of all TABLE instances
for the table in TABLE_SHARE.
kill_delayed_thread_for_table():
Added auxiliary for killing delayed insert threads for
particular table.
close_cached_tables():
Got rid of wait_for_refresh argument as we now rely on global
shared metadata lock to prevent FLUSH WITH READ LOCK sneaking in
when we are reopening tables. Heavily reworked this function to
use new MDL code and not to rely on separate table cache entity.
close_open_tables():
We no longer have separate table cache.
close_thread_tables():
Release metadata locks after closing all tables. Added skip_mdl
argument which allows us not to remove metadata lock requests
from the context in case when we are going to use this requests
later in mdl_wait_for_locks() and tdc_wait_for_old_versions().
close_thread_table()/close_table_for_reopen():
Since we no longer have separate table cache and all TABLE
instances are linked to TABLE_SHARE objects in table definition
cache we have to link/unlink TABLE object to/from appropriate
lists in the share.
name_lock_locked_table():
Moved redundant code to find_write_locked_table() function and
adjusted code to the fact that wait_while_table_is_used() can
now return with an error if our thread is killed.
reopen_table_entry():
We no longer need "link_in" argument as with MDL we no longer
call this function with dummy TABLE object pre-allocated and
added to the THD::open_tables. Also now we add newly-open TABLE
instance to the list of share's used TABLE instances.
table_cache_insert_placeholder():
Got rid of name-locking legacy.
lock_table_name_if_not_cached():
Moved to sql_table.cc the only place where it is used. It was
also reimplemented using new MDL API.
open_table():
- Reworked this function to use new MDL subsystem.
- Changed code to deal with table definition cache directly
instead of going through separate table cache.
- Now third argument is also used for requesting table repair
or auto-discovery of table's new definition. So its type was
changed from bool to enum.
find_locked_table()/find_write_locked_table():
Accept head of list of TABLE objects as first argument and use
this list instead of always searching in THD::open_tables list.
Also added auxiliary for finding write-locked locked tables.
reopen_table():
Adjusted function to work with new MDL subsystem and to properly
manuipulate with lists of used/unused TABLE instaces in
TABLE_SHARE.
reopen_tables():
Removed mark_share_as_old parameter. Instead of relying on it
and related behavior FLUSH TABLES WITH READ LOCK now takes
global shared metadata lock. Changed code after removing
separate table cache.
drop_locked_tables()/abort_locked_tables():
Got rid of functions which are no longer needed.
unlock_locked_tables():
Moved this function from sql_parse.cc and changed it to release
memory which was used for allocating metadata lock requests for
tables open and locked by LOCK TABLES.
tdc_open_view():
Intoduced function for opening a view by getting its definition
from disk (and table cache in future).
reopen_table_entry():
Introduced function for opening table definitions while holding
exclusive metatadata lock on it.
open_unireg_entry():
Got rid of this function. Most of its functionality is relocated
to open_table() and open_table_fini() functions, and some of it
to reopen_table_entry() and tdc_open_view(). Also code
resposible for auto-repair and auto-discovery of tables was
moved to separate function.
open_table_entry_fini():
Introduced function which contains common actions which finalize
process of TABLE object creation.
auto_repair_table():
Moved code responsible for auto-repair of table being opened
here.
handle_failed_open_table_attempt()
Moved code responsible for handling failing attempt to open
table to one place (retry due to lock conflict/old version,
auto-discovery and repair).
open_tables():
- Flush open HANDLER tables if they have old version of if there
is conflicting metadata lock against them (before this moment
we had this code in open_table()).
- When we open view which should be processed via derived table
on the second execution of prepared statement or stored
routine we still should call open_table() for it in order to
obtain metadata lock on it and prepare its security context.
- In cases when we discover that some special handling of
failure to open table is needed call
handle_failed_open_table_attempt() which handles all such
scenarios.
open_ltable():
Handling of various special scenarios of failure to open a table
was moved to separate handle_failed_open_table_attempt()
function.
remove_db_from_cache():
Removed this function as it is no longer used.
notify_thread_having_shared_lock():
Added callback which is invoked by MDL subsystem when acquiring
an exclusive lock, for each thread that has a conflicting shared
metadata lock.
expel_table_from_cache():
Introduced function for removing unused TABLE instances. Unlike
remove_table_from_cache() it relies on caller following MDL
protocol and having appropriate locks when calling it and thus
does not do any waiting if table is still in use.
tdc_wait_for_old_version():
Added function which allows open_tables() to wait in cases when
we discover that we should back-off due to presence of old
version of table.
abort_and_upgrade_lock():
Use new MDL calls.
mysql_wait_completed_table():
Got rid of unused function.
open_system_tables_for_read/for_update()/performance_schema_table():
Allocate MDL_LOCK objects on execution memory root in cases when
TABLE_LIST objects for corresponding tables is allocated on
stack.
close_performance_schema_table():
Release metadata locks after closing tables.
******
Use I_P_List for free/used tables list in the table share.
sql/sql_binlog.cc:
Use Relay_log_info::slave_close_thread_tables() method to enforce
that we always close tables open for RBR before deallocating
TABLE_LIST elements and MDL_LOCK objects for them.
sql/sql_class.cc:
Added meta-data locking contexts as part of Open_tables_state
context. Also introduced THD::locked_tables_root memory root
which is to be used for allocating MDL_LOCK objects for tables in
LOCK TABLES statement (end of lifetime for such objects is UNLOCK
TABLES so we can't use statement or execution root for them).
sql/sql_class.h:
Added meta-data locking contexts as part of Open_tables_state
context. Also introduced THD::locked_tables_root memory root
which is to be used for allocating MDL_LOCK objects for tables in
LOCK TABLES statement (end of lifetime for such objects is UNLOCK
TABLES so we can't use statement or execution root for them).
Note: handler_mdl_context and locked_tables_root and
mdl_el_root will be removed by subsequent patches.
sql/sql_db.cc:
mysql_rm_db() does not really need to call remove_db_from_cache()
as it drops each table in the database using
mysql_rm_table_part2(), which performs all necessary operations on
table (definition) cache.
sql/sql_delete.cc:
Use the new metadata locking API for TRUNCATE.
sql/sql_handler.cc:
Changed HANDLER implementation to use new metadata locking
subsystem. Note that MDL_LOCK objects for HANDLER tables are
allocated in the same chunk of heap memory as TABLE_LIST object
for those tables.
sql/sql_insert.cc:
mysql_insert():
find_locked_table() now takes head of list of TABLE object as
its argument instead of always scanning through THD::open_tables
list.
handle_delayed_insert():
Allocate metadata lock request object for table open by delayed
insert thread on execution memroot. create_table_from_items():
We no longer allocate dummy TABLE objects for tables being
created if they don't exist. As consequence
reopen_name_locked_table() no longer has link_in argument.
open_table() now has one more argument which is not relevant for
temporary tables.
sql/sql_parse.cc:
- Moved unlock_locked_tables() routine to sql_base.cc and made
available it in other files. Got rid of some redundant code by
using this function.
- Replaced boolean TABLE_LIST::create member with enum
open_table_type member.
- Use special memory root for allocating MDL_LOCK objects for
tables open and locked by LOCK TABLES (these object should live
till UNLOCK TABLES so we can't allocate them on statement nor
execution memory root). Also properly set metadata lock
upgradability attribure for those tables.
- Under LOCK TABLES it is no longer allowed to flush tables which
are not write-locked as this breaks metadata locking protocol
and thus potentially might lead to deadlock.
- Added auxiliary adjust_mdl_locks_upgradability() function.
sql/sql_partition.cc:
Adjusted code to the fact that reopen_tables() no longer has
"mark_share_as_old" argument. Got rid of comments which are no
longer true.
sql/sql_plist.h:
Added I_P_List template class for parametrized intrusive doubly
linked lists and I_P_List_iterator for corresponding iterator.
Unlike for I_List<> list elements of such list can participate in
several lists. Unlike List<> such lists are doubly-linked and
intrusive.
sql/sql_plugin.cc:
Allocate metadata lock requests objects (MDL_LOCK) on execution
memory root in cases when we use stack TABLE_LIST objects to open
tables.
sql/sql_prepare.cc:
Replaced boolean TABLE_LIST::create member with enum
open_table_type member. This allows easily handle situation in
which instead of opening the table we want only to take exclusive
metadata lock on it.
sql/sql_rename.cc:
Use new metadata locking subsystem in implementation of RENAME
TABLE.
sql/sql_servers.cc:
Allocate metadata lock requests objects (MDL_LOCK) on execution
memory root in cases when we use stack TABLE_LIST objects to open
tables. Got rid of redundant code by using unlock_locked_tables()
function.
sql/sql_show.cc:
Acquire shared metadata lock when we are getting information for
I_S table directly from TABLE_SHARE without doing full-blown table
open. We use high priority lock request in this situation in
order to avoid deadlocks.
Also allocate metadata lock requests objects (MDL_LOCK) on
execution memory root in cases when TABLE_LIST objects are also
allocated there
sql/sql_table.cc:
mysql_rm_table():
Removed comment which is no longer relevant.
mysql_rm_table_part2():
Now caller of mysql_ha_rm_tables() should not own LOCK_open.
Adjusted code to use new metadata locking subsystem instead of
name-locks.
lock_table_name_if_not_cached():
Moved this function from sql_base.cc to this file and
reimplemented it using metadata locking API.
mysql_create_table():
Adjusted code to use new MDL API.
wait_while_table_is_used():
Changed function to use new MDL subsystem. Made thread waiting
in it killable (this also led to introduction of return value so
caller can distinguish successful executions from situations
when waiting was aborted).
close_cached_tables():
Thread waiting in this function is killable now. As result it
has return value for distinguishing between succes and failure.
Got rid of redundant boradcast_refresh() call.
prepare_for_repair():
Use MDL subsystem instead of name-locks.
mysql_admin_table():
mysql_ha_rm_tables() now always assumes that caller doesn't own
LOCK_open.
mysql_repair_table():
We should mark all elements of table list as requiring
upgradable metadata locks.
mysql_create_table_like():
Use new MDL subsystem instead of name-locks.
create_temporary_tables():
We don't need to obtain metadata locks when creating temporary
table.
mysql_fast_or_online_alter_table():
Thread waiting in wait_while_table_is_used() is now killable.
mysql_alter_table():
Adjusted code to work with new MDL subsystem and to the fact
that threads waiting in what_while_table_is_used() and
close_cached_table() are now killable.
sql/sql_test.cc:
We no longer have separate table cache. TABLE instances are now
associated with/linked to TABLE_SHARE objects in table definition
cache.
sql/sql_trigger.cc:
Adjusted code to work with new metadata locking subsystem. Also
reopen_tables() no longer has mark_share_as_old argument (Instead
of relying on this parameter and related behavior FLUSH TABLES
WITH READ LOCK now takes global shared metadata lock).
sql/sql_udf.cc:
Allocate metadata lock requests objects (MDL_LOCK) on execution
memory root in cases when we use stack TABLE_LIST objects to open
tables.
sql/sql_update.cc:
Adjusted code to work with new meta-data locking subsystem.
sql/sql_view.cc:
Added proper meta-data locking to implementations of
CREATE/ALTER/DROP VIEW statements. Now we obtain exclusive
meta-data lock on a view before creating/ changing/dropping it.
This ensures that all concurrent statements that use this view
will finish before our statement will proceed and therefore we
will get correct order of statements in the binary log.
Also ensure that TABLE_LIST::mdl_upgradable attribute is properly
propagated for underlying tables of view.
sql/table.cc:
Added auxiliary alloc_mdl_locks() function for allocating metadata
lock request objects for all elements of table list.
sql/table.h:
TABLE_SHARE:
Got rid of unused members. Introduced members for storing lists
of used and unused TABLE objects for this share.
TABLE:
Added members for linking TABLE objects into per-share lists of
used and unused TABLE instances. Added member for holding
pointer to metadata lock for this table.
TABLE_LIST:
Replaced boolean TABLE_LIST::create member with enum
open_table_type member. This allows easily handle situation in
which instead of opening the table we want only to take
exclusive meta-data lock on it (we need this in order to handle
ALTER VIEW and CREATE VIEW statements).
Introduced new mdl_upgradable member for marking elements of
table list for which we need to take upgradable shared metadata
lock instead of plain shared metadata lock. Added pointer for
holding pointer to MDL_LOCK for the table.
Added auxiliary alloc_mdl_locks() function for allocating metadata
lock requests objects for all elements of table list. Added
auxiliary set_all_mdl_upgradable() function for marking all
elements in table list as requiring upgradable metadata locks.
storage/myisammrg/ha_myisammrg.cc:
Allocate MDL_LOCK objects for underlying tables of MERGE table.
To be reworked once Ingo pushes his patch for WL4144.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into mysql.com:/home/hf/work/33334/my51-33334
client/mysqltest.c:
Auto merged
mysql-test/r/flush.result:
SCCS merged
mysql-test/t/flush.test:
SCCS merged
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before breaking the connection we have to check that there's no query
executing at the moment. Otherwise it can lead to crash in embedded server.
client/mysqltest.c:
Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
Wait until the query thread is finished before we break the connection.
Waiting part moved to a separate wait_query_thread_end() function
mysql-test/r/flush.result:
Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
test result
mysql-test/t/flush.test:
Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
test case
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into endora.local:/Users/davi/mysql/mysql-5.1-runtime
sql/sql_parse.cc:
Auto merged
mysql-test/r/flush.result:
SCCS merged
mysql-test/t/flush.test:
SCCS merged
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
FLUSH TABLES WITH READ LOCK fails to properly detect write locked
tables when running under low priority updates.
The problem is that when trying to aspire a global read lock, the
reload_acl_and_cache() function fails to properly check if the thread
has a low priority write lock, which later my cause a server crash or
deadlock.
The solution is to simple check if the thread has any type of the
possible exclusive write locks.
mysql-test/r/flush.result:
Add test case result for Bug#32528
mysql-test/t/flush.test:
Add test case for Bug#32528
sql/sql_parse.cc:
Although it should not matter under LOCK TABLES, use TL_WRITE_ALLOW_WRITE
to emphasize that it should fail in case of any write lock.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The log tables are by nature PERFORMANCE_SCHEMA tables,
which should not be affected by SET GLOBAL READ_ONLY or FLUSH TABLES
WITH READ LOCK.
The implementation of FLUSH TABLES WITH READ LOCK already ignored log tables.
Now with this patch, the implementation of LOCK TABLE also ignore a
global read lock for log tables, which was the missing symmetry.
mysql-test/r/flush.result:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- test result.
mysql-test/t/flush.test:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- test case.
sql/lock.cc:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- logger.is_privileged_thread() used.
sql/log.h:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- LOGGER::is_privileged_thread() introduced that returns TRUE if a given thread
is either a general_log or a slow_log or a privileged thread.
sql/sql_base.cc:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- pass MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK to the mysql_lock_tables() in case of
call from a logger in order not to honor the GLOBAL READ LOCK
and to avoid possible deadlocks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
detects problems with test files
mysql-test/r/csv.result:
Update after add of missing semicolon
mysql-test/r/drop.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_block_commit.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_read_lock_kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/grant2.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/handler.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/innodb_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/lock_multi.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/multi_update.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/mysqltest.result:
Update result
mysql-test/r/query_cache.result:
Update after add of missing semicolon
mysql-test/r/query_cache_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp-threads.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp_notembedded.result:
Update after add of missing semicolon
mysql-test/r/type_blob.result:
Remove extra drop table
mysql-test/t/csv.test:
Add missing semicolon
mysql-test/t/query_cache.test:
Add missing semicolon
mysql-test/t/sp-error.test:
Remove "tab" from end of error declaration
mysql-test/t/sp.test:
Wrong delimiter, used ; instead of |
mysql-test/t/sp_notembedded.test:
Wrong delimiter, used ; instead of |
mysql-test/t/view_grant.test:
An incomplete error name specification was used.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into shellback.(none):/home/msvensson/mysql/same_tools/my50-same_tools
mysql-test/include/ps_query.inc:
Auto merged
mysql-test/r/check.result:
Auto merged
mysql-test/r/connect.result:
Auto merged
mysql-test/r/flush.result:
Auto merged
mysql-test/r/flush_block_commit.result:
Auto merged
mysql-test/r/func_misc.result:
Auto merged
mysql-test/r/lock_multi.result:
Auto merged
mysql-test/r/mix_innodb_myisam_binlog.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/r/rpl000001.result:
Auto merged
mysql-test/r/rpl_error_ignored_table.result:
Auto merged
mysql-test/r/rpl_master_pos_wait.result:
Auto merged
BitKeeper/deleted/.del-rpl000018.test:
Auto merged
BitKeeper/deleted/.del-rpl_heap.test:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/synchronization.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/ps_grant.test:
Auto merged
mysql-test/t/rpl_flush_tables.test:
Auto merged
mysql-test/t/rpl_trunc_temp.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
BitKeeper/deleted/.del-show_msg80.inc:
Delete: mysql-test/include/show_msg80.inc
BitKeeper/deleted/.del-init_file.result:
Delete: mysql-test/r/init_file.result
BitKeeper/deleted/.del-mysql_client_test.result:
Delete: mysql-test/r/mysql_client_test.result
BitKeeper/deleted/.del-show_msg.inc:
Delete: mysql-test/include/show_msg.inc
client/Makefile.am:
Use local file
client/mysqltest.c:
Use backported version of mysqltest
mysql-test/r/mysqltest.result:
Use backported file
mysql-test/t/mysqltest.test:
Use backported version
mysql-test/r/type_blob.result:
Manual merge
mysql-test/t/connect.test:
Used local version
mysql-test/t/init_file.test:
Manual merge
mysql-test/t/mysql_client_test.test:
Manual merge
mysql-test/t/type_blob.test:
Manual merge
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- ie. backport from 5.1
- also update testcase error dected by new version
mysql-test/include/show_msg.inc:
BitKeeper file /home/msvensson/mysql/same_tools/my41-same_tools/mysql-test/include/show_msg.inc
mysql-test/include/show_msg80.inc:
BitKeeper file /home/msvensson/mysql/same_tools/my41-same_tools/mysql-test/include/show_msg80.inc
BitKeeper/deleted/.del-rpl_chain_temp_table.test:
Delete: mysql-test/t/rpl_chain_temp_table.test
BitKeeper/deleted/.del-rpl_chain_temp_table.result:
Delete: mysql-test/r/rpl_chain_temp_table.result
BitKeeper/deleted/.del-rpl_failsafe.result:
Delete: mysql-test/r/rpl_failsafe.result
BitKeeper/deleted/.del-rpl_failsafe.test:
Delete: mysql-test/t/rpl_failsafe.test
BitKeeper/deleted/.del-rpl_heap.test:
Delete: mysql-test/t/rpl_heap.test
BitKeeper/deleted/.del-rpl_heap.result:
Delete: mysql-test/r/rpl_heap.result
BitKeeper/deleted/.del-rpl000018.result:
Delete: mysql-test/r/rpl000018.result
BitKeeper/deleted/.del-rpl000018.test:
Delete: mysql-test/t/rpl000018.test
client/Makefile.am:
Link mysqltest with mysys/my_copy.c
client/mysqltest.c:
Update mysqltest to latest version
mysql-test/include/have_multi_ndb.inc:
Remove old syntax "@filename" in favor of "--require filename"
mysql-test/include/master-slave.inc:
Remove old syntax "@filename" in favor of "--require filename"
mysql-test/include/ps_query.inc:
Remove the comment about no output now when it does.
mysql-test/r/check.result:
Update output from --send
mysql-test/r/connect.result:
Update result file for connect test after backport form 5.1
mysql-test/r/flush.result:
Update output from --send
mysql-test/r/flush_block_commit.result:
Update output from --send
mysql-test/r/func_misc.result:
Update output from --send
mysql-test/r/grant2.result:
Update output from --send
mysql-test/r/handler.result:
Update output from --send
mysql-test/r/kill.result:
Update output from --send
mysql-test/r/lock_multi.result:
Update output from --send
mysql-test/r/mix_innodb_myisam_binlog.result:
Update output from --send
mysql-test/r/mysqltest.result:
Update mysqltest.result after backport
mysql-test/r/ps_2myisam.result:
Update result as the output from query is now printed
mysql-test/r/ps_3innodb.result:
Update result as the output from query is now printed
mysql-test/r/ps_4heap.result:
Update result as the output from query is now printed
mysql-test/r/ps_5merge.result:
Update result as the output from query is now printed
mysql-test/r/ps_6bdb.result:
Update result as the output from query is now printed
mysql-test/r/ps_7ndb.result:
Update result as the output from query is now printed
mysql-test/r/rename.result:
Update output from --send
mysql-test/r/rpl000001.result:
Update output from --send
mysql-test/r/rpl_error_ignored_table.result:
Update output from --send
mysql-test/r/rpl_master_pos_wait.result:
Update output from --send
mysql-test/r/subselect.result:
Update result file after adding missing ;
mysql-test/r/synchronization.result:
Update output from --send
mysql-test/r/type_blob.result:
Update result file after adding missing ;
mysql-test/t/connect.test:
Backport test from 5.1
mysql-test/t/init_file.test:
Update test so something is printed
mysql-test/t/mysql_client_test.test:
Update test so result is sent to file and something is printed
mysql-test/t/mysqltest.test:
Backport latest mysqltest.test file
mysql-test/t/ps.test:
Move the --replace_column statement to just before the statetement it should replace
mysql-test/t/ps_1general.test:
Move the --replace_column statement to just before the statetement it should replace
mysql-test/t/ps_grant.test:
Remove the $DB, no other test uses it
mysql-test/t/rpl_flush_tables.test:
Fetch $SERVER_VERSION from the db server
mysql-test/t/rpl_trunc_temp.test:
Remove the selection of connection master after it's been disconnected already
mysql-test/t/subselect.test:
Add missing ;
mysql-test/t/type_blob.test:
Add missing ;
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replaced COND_refresh with COND_global_read_lock becasue of a bug in NTPL threads when using different mutexes as arguments to pthread_cond_wait()
The original code caused a hang in FLUSH TABLES WITH READ LOCK in some circumstances because pthread_cond_broadcast() was not delivered to other threads.
This fixes:
Bug#16986: Deadlock condition with MyISAM tables
Bug#20048: FLUSH TABLES WITH READ LOCK causes a deadlock
mysql-test/r/flush.result:
Added test case for deadlock with FLUSH TABLES WITH READ LOCK
mysql-test/r/lock_multi.result:
Test for bug in LOCK TABLE + optimize table
mysql-test/t/flush.test:
Added test case for deadlock with FLUSH TABLES WITH READ LOCK
mysql-test/t/lock_multi.test:
Test for bug in LOCK TABLE + optimize table
sql/lock.cc:
Replaced COND_refresh with COND_global_read_lock becasue of a bug in NTPL threads when using different mutexes as arguments to pthread_cond_wait()
The original code caused a hang in FLUSH TABLES WITH READ LOCK in some circumstances because pthread_cond_broadcast() was not delivered to other threads
sql/mysql_priv.h:
Added COND_global_read_lock
sql/mysqld.cc:
Added COND_global_read_lock
sql/sql_base.cc:
More DBUG statements
Added a broadcast in remove_table_from_cache() to release any threads waiting in open
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into mysql.com:/home/mydev/mysql-5.0-5000
mysql-test/r/flush.result:
Auto merged
mysql-test/t/flush.test:
Auto merged
sql/sql_parse.cc:
Auto merged
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added a check before taking a global read lock if
the own thread has a write locked table.
mysql-test/r/flush.result:
Bug#9459 - deadlock with flush with lock, and lock table write
The test result.
mysql-test/t/flush.test:
Bug#9459 - deadlock with flush with lock, and lock table write
The test case.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(otherwise a deadlock when ALTER writes to
binlog holding LOCK_open, it causes binlog rotation,
binlog waits for prepared transactions to commit, and commit
needs LOCK_open to check for global read lock)
mysql-test/r/flush.result:
global read lock code now uses a dedicated mutex
mysql-test/t/flush.test:
global read lock code now uses a dedicated mutex
sql/lock.cc:
global read lock code now uses a dedicated mutex
sql/mysql_priv.h:
global read lock code now uses a dedicated mutex
sql/mysqld.cc:
global read lock code now uses a dedicated mutex
sql/sql_table.cc:
global read lock code now uses a dedicated mutex
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bmove_allign -> bmove_align
Added OLAP function ROLLUP
Split mysql_fix_privilege_tables to a script and a .sql data file
Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects.
Added table_alias_charset, for easier --lower-case-table-name handling
Better SQL_MODE handling (Setting complex options also sets sub options)
New (faster) assembler string functions for x86
BitKeeper/etc/ignore:
added libmysqld/sql_state.c
client/mysql.cc:
Added SQLSTATE to error messages
Added new function put_error() to be able to clean up some old code.
client/mysqltest.c:
Write ERROR SQLSTATE for all errors
dbug/dbug.c:
Portability fixes
include/m_string.h:
Rename bmove_allign as bmove_align
include/mysql.h:
Added SQLSTATE (for embedded version)
include/mysql_com.h:
Send correct SQLSTATE for the error to the client
libmysql/libmysql.c:
Changed default error state to HY000
Applied code cleanup patch
libmysqld/Makefile.am:
Added sql_state.cc
libmysqld/libmysqld.c:
Added sqlstate
mysql-test/r/analyse.result:
Updated results
mysql-test/r/ansi.result:
Updated results
mysql-test/r/auto_increment.result:
Updated results
mysql-test/r/bdb-deadlock.result:
Updated results
mysql-test/r/bdb.result:
Updated results
mysql-test/r/comments.result:
Updated results
mysql-test/r/create.result:
Updated results
mysql-test/r/ctype_collate.result:
Updated results
mysql-test/r/delayed.result:
Updated results
mysql-test/r/delete.result:
Updated results
mysql-test/r/derived.result:
Updated results
mysql-test/r/distinct.result:
Updated results
mysql-test/r/drop.result:
Updated results
mysql-test/r/err000001.result:
Updated results
mysql-test/r/explain.result:
Updated results
mysql-test/r/flush.result:
Updated results
mysql-test/r/fulltext.result:
Updated results
mysql-test/r/func_gconcat.result:
Updated results
mysql-test/r/func_system.result:
Updated results
mysql-test/r/grant_cache.result:
Updated results
mysql-test/r/group_by.result:
Updated results
mysql-test/r/handler.result:
Updated results
mysql-test/r/heap.result:
Updated results
mysql-test/r/heap_btree.result:
Updated results
mysql-test/r/heap_hash.result:
Updated results
mysql-test/r/innodb.result:
Updated results
mysql-test/r/innodb_handler.result:
Updated results
mysql-test/r/insert_select.result:
Updated results
mysql-test/r/insert_update.result:
Updated results
mysql-test/r/join.result:
Updated results
mysql-test/r/join_outer.result:
Updated results
mysql-test/r/key.result:
Updated results
mysql-test/r/lock.result:
Updated results
mysql-test/r/lock_multi.result:
Updated results
mysql-test/r/merge.result:
Updated results
mysql-test/r/multi_update.result:
Updated results
mysql-test/r/myisam.result:
Updated results
mysql-test/r/null.result:
Updated results
mysql-test/r/olap.result:
Updated results
mysql-test/r/order_by.result:
Updated results
mysql-test/r/packet.result:
Updated results
mysql-test/r/query_cache.result:
Updated results
mysql-test/r/row.result:
Updated results
mysql-test/r/rpl000001.result:
Updated results
mysql-test/r/rpl000009.result:
Updated results
mysql-test/r/rpl_empty_master_crash.result:
Updated results
mysql-test/r/rpl_log.result:
Updated results
mysql-test/r/rpl_replicate_do.result:
Updated results
mysql-test/r/rpl_rotate_logs.result:
Updated results
mysql-test/r/select.result:
Updated results
mysql-test/r/select_safe.result:
Updated results
mysql-test/r/show_check.result:
Updated results
mysql-test/r/sql_mode.result:
Updated results
mysql-test/r/subselect.result:
Updated results
mysql-test/r/temp_table.result:
Updated results
mysql-test/r/truncate.result:
Updated results
mysql-test/r/type_blob.result:
Updated results
mysql-test/r/type_decimal.result:
Updated results
mysql-test/r/type_float.result:
Updated results
mysql-test/r/type_ranges.result:
Updated results
mysql-test/r/union.result:
Updated results
mysql-test/r/update.result:
Updated results
mysql-test/r/user_var.result:
Updated results
mysql-test/r/varbinary.result:
Updated results
mysql-test/r/variables.result:
Updated results
mysql-test/t/ansi.test:
Test of sql_mode
mysql-test/t/derived.test:
Updated results
mysql-test/t/func_system.test:
Make this independen of the MySQL server name
mysql-test/t/lowercase_table.test:
Cleanup
mysql-test/t/olap.test:
A lot of new tests
mysql-test/t/sql_mode.test:
More test for sql_mode
mysql-test/t/subselect.test:
Added a few new tests (to find a bug in the item_ref code)
scripts/Makefile.am:
Added mysql_fix_privilege_tables.sql
scripts/mysql_fix_privilege_tables.sh:
Totally new script. This bascily just pipes mysql_fix_privilege_tables.sql through 'mysql' to 'mysqld'
sql/Makefile.am:
Added sql_state.cc
sql/item.cc:
Extended Item_field::eq() to be able to better match GROUP BY fields on the command line.
Needed for ROLLUP
sql/item.h:
Added function to be able to avoid calling current_thd() when doing new Item.
sql/item_sum.cc:
Moved copy_or_same() and some reset() functions from item_sum.h
Needed to be able to access thd->mem_root.
sql/item_sum.h:
Moved some functions to item_sum.cc
Added make_unique() for ROLLUP
sql/item_uniq.h:
Fixed return value
sql/mysql_priv.h:
Updated MODE flags
sql/mysqld.cc:
Added ANSI as it's own mode
Moved charset_info variables here
Cleaned up handler_count handling (for NT)
Added table_alias_charset, for easier --lower-case-table-name handling
sql/net_serv.cc:
New comment
sql/protocol.cc:
Send SQLSTATE to client
sql/set_var.cc:
Better SQL_MODE handling (Setting complex options also sets sub options)
sql/set_var.h:
Better SQL_MODE handling
sql/sql_base.cc:
Make alias depend on --lower-case-table-names
Make find_item_in_list also check database name
sql/sql_cache.cc:
Indentation cleanup
sql/sql_list.h:
Added safety assert
Addes support of alloc without current_thd()
sql/sql_prepare.cc:
Update after prototype change
sql/sql_select.cc:
Added ROLLUP
sql/sql_select.h:
structures for rollup
sql/sql_show.cc:
Easier SQL_MODE handling
sql/sql_string.cc:
Move CHARSET_INFO to mysqld (to be together with all other global variables)
sql/sql_string.h:
Added function to be able to avoid calling current_thd() when doing new Item.
sql/sql_table.cc:
Simpler --lower-case-table-name handling
sql/sql_union.cc:
Update after prototype change
sql/sql_yacc.yy:
ROLLUP
sql/unireg.h:
bmove_allign ->bmove_align
strings/Makefile.am:
Fix to be able to compile str_test.c
strings/ctype.c:
Removed empty lines
strings/str_test.c:
Added test of bmove_align
strings/strings-x86.s:
Faster bmove_align, bmove_upp and strmake
strings/strings.asm:
move_allg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names.
changed store_warning() -> push_warning_print()
BitKeeper/deleted/.del-rpl000016-slave.opt~ef76f85ddcc13b87:
Delete: mysql-test/t/rpl000016-slave.opt
BitKeeper/deleted/.del-sel000001.test~9567c1646058cc:
Delete: mysql-test/t/sel000001.test
BitKeeper/deleted/.del-sel000002.test~9f500639572e18e1:
Delete: mysql-test/t/sel000002.test
BitKeeper/deleted/.del-sel000003.test~63a5512d18cd20a2:
Delete: mysql-test/t/sel000003.test
BitKeeper/deleted/.del-sel000001.result~383913ae4505ec86:
Delete: mysql-test/r/sel000001.result
BitKeeper/deleted/.del-sel000002.result~d1787e6fd5dbc1cc:
Delete: mysql-test/r/sel000002.result
BitKeeper/deleted/.del-sel000003.result~d7b657b1e3a286a7:
Delete: mysql-test/r/sel000003.result
BitKeeper/deleted/.del-sel000031.result~d49aeac63ad7db4d:
Delete: mysql-test/r/sel000031.result
BitKeeper/deleted/.del-sel000031.test~50a19a8e204e99bc:
Delete: mysql-test/t/sel000031.test
BitKeeper/deleted/.del-sel000032.result~6cb30e23cbca9fb0:
Delete: mysql-test/r/sel000032.result
BitKeeper/deleted/.del-sel000032.test~e32da7c3fc4b7ace:
Delete: mysql-test/t/sel000032.test
BitKeeper/deleted/.del-rpl000003.result~68d6ee00beaa011:
Delete: mysql-test/r/rpl000003.result
BitKeeper/deleted/.del-rpl000003.test~b7cfc4c5576fbafd:
Delete: mysql-test/t/rpl000003.test
client/mysql.cc:
Don't yet print information about SQL help
client/mysqltest.c:
Added test options:
--enable_warnings
--disable_warnings
--enable_info
--disable_info
configure.in:
changed version number of shared libraries
mysql-test/include/master-slave.inc:
Don't write warnings on init
mysql-test/r/backup.result:
Updated results
mysql-test/r/bdb.result:
Updated results
mysql-test/r/bigint.result:
Updated results
mysql-test/r/bool.result:
Updated results
mysql-test/r/create.result:
Updated results
mysql-test/r/delete.result:
Updated results
mysql-test/r/derived.result:
Updated results
mysql-test/r/distinct.result:
Updated results
mysql-test/r/drop.result:
Updated results
mysql-test/r/flush.result:
Updated results
mysql-test/r/fulltext.result:
Updated results
mysql-test/r/fulltext_multi.result:
Updated results
mysql-test/r/fulltext_order_by.result:
Updated results
mysql-test/r/func_equal.result:
Updated results
mysql-test/r/func_in.result:
Updated results
mysql-test/r/func_set.result:
Updated results
mysql-test/r/gcc296.result:
Updated results
mysql-test/r/group_by.result:
Updated results
mysql-test/r/innodb-deadlock.result:
Updated results
mysql-test/r/innodb.result:
Updated results
mysql-test/r/innodb_cache.result:
Updated results
mysql-test/r/innodb_handler.result:
Updated results
mysql-test/r/insert.result:
Updated results
mysql-test/r/insert_select.result:
Updated results
mysql-test/r/isam.result:
Updated results
mysql-test/r/join_outer.result:
Updated results
mysql-test/r/key.result:
Updated results
mysql-test/r/merge.result:
Updated results
mysql-test/r/multi_update.result:
Updated results
mysql-test/r/myisam.result:
Updated results
mysql-test/r/null.result:
Updated results
mysql-test/r/null_key.result:
Updated results
mysql-test/r/odbc.result:
Updated results
mysql-test/r/olap.result:
Updated results
mysql-test/r/order_by.result:
Updated results
mysql-test/r/query_cache.result:
Updated results
mysql-test/r/rename.result:
Updated results
mysql-test/r/row.result:
Updated results
mysql-test/r/rpl000001.result:
Updated results
mysql-test/r/rpl000002.result:
Updated results
mysql-test/r/rpl000004.result:
Updated results
mysql-test/r/rpl000005.result:
Updated results
mysql-test/r/rpl000006.result:
Updated results
mysql-test/r/rpl000008.result:
Updated results
mysql-test/r/rpl000009.result:
Updated results
mysql-test/r/rpl000010.result:
Updated results
mysql-test/r/rpl000011.result:
Updated results
mysql-test/r/rpl000012.result:
Updated results
mysql-test/r/rpl000013.result:
Updated results
mysql-test/r/rpl_alter.result:
Updated results
mysql-test/r/rpl_empty_master_crash.result:
Updated results
mysql-test/r/rpl_redirect.result:
Updated results
mysql-test/r/rpl_replicate_do.result:
Updated results
mysql-test/r/rpl_rotate_logs.result:
Updated results
mysql-test/r/rpl_skip_error.result:
Updated results
mysql-test/r/rpl_temporary.result:
Updated results
mysql-test/r/select.result:
Updated results
mysql-test/r/subselect.result:
Updated results
mysql-test/r/temp_table.result:
Updated results
mysql-test/r/type_date.result:
Updated results
mysql-test/r/type_float.result:
Updated results
mysql-test/r/union.result:
Updated results
mysql-test/r/update.result:
Updated results
mysql-test/r/user_var.result:
Updated results
mysql-test/r/varbinary.result:
Updated results
mysql-test/r/variables.result:
Updated results
mysql-test/r/warnings.result:
Updated results
mysql-test/t/alias.test:
Don't write warnings when initializing test
mysql-test/t/alter_table.test:
Don't write warnings when initializing test
mysql-test/t/analyse.test:
Don't write warnings when initializing test
mysql-test/t/auto_increment.test:
Don't write warnings when initializing test
mysql-test/t/backup.test:
Don't write warnings when initializing test
mysql-test/t/bdb-alter-table-1.test:
Don't write warnings when initializing test
mysql-test/t/bdb-crash.test:
Don't write warnings when initializing test
mysql-test/t/bdb-deadlock.test:
Don't write warnings when initializing test
mysql-test/t/bdb.test:
Don't write warnings when initializing test
cleaned up test
mysql-test/t/bdb_cache.test:
Don't write warnings when initializing test
mysql-test/t/bench_count_distinct.test:
Don't write warnings when initializing test
mysql-test/t/bigint.test:
Don't write warnings when initializing test
mysql-test/t/binary.test:
Don't write warnings when initializing test
mysql-test/t/bool.test:
Don't write warnings when initializing test
Changed to use standard table names
mysql-test/t/bulk_replace.test:
Don't write warnings when initializing test
mysql-test/t/case.test:
Don't write warnings when initializing test
mysql-test/t/check.test:
Don't write warnings when initializing test
mysql-test/t/compare.test:
Don't write warnings when initializing test
mysql-test/t/connect.test:
Removed empty line
mysql-test/t/constraints.test:
Don't write warnings when initializing test
mysql-test/t/count_distinct.test:
Don't write warnings when initializing test
mysql-test/t/count_distinct2.test:
Don't write warnings when initializing test
mysql-test/t/create.test:
Don't write warnings when initializing test
Cleaned up test
mysql-test/t/ctype_latin1_de.test:
Don't write warnings when initializing test
mysql-test/t/ctype_many.test:
Don't write warnings when initializing test
mysql-test/t/delayed.test:
Don't write warnings when initializing test
mysql-test/t/delete.test:
Don't write warnings when initializing test
Cleaned up test
mysql-test/t/derived.test:
Don't write warnings when initializing test
Cleaned up test
mysql-test/t/dirty_close.test:
Don't write warnings when initializing test
mysql-test/t/distinct.test:
Don't write warnings when initializing test
Cleaned up test
mysql-test/t/drop.test:
Don't write warnings when initializing test
mysql-test/t/empty_table.test:
Don't write warnings when initializing test
mysql-test/t/err000001.test:
Don't write warnings when initializing test
Cleaned up test
mysql-test/t/explain.test:
Don't write warnings when initializing test
mysql-test/t/flush.test:
Don't write warnings when initializing test
mysql-test/t/foreign_key.test:
Don't write warnings when initializing test
mysql-test/t/fulltext.test:
Don't write warnings when initializing test
mysql-test/t/fulltext_cache.test:
Don't write warnings when initializing test
mysql-test/t/fulltext_distinct.test:
Don't write warnings when initializing test
mysql-test/t/fulltext_left_join.test:
Don't write warnings when initializing test
mysql-test/t/fulltext_multi.test:
Don't write warnings when initializing test
mysql-test/t/fulltext_order_by.test:
Don't write warnings when initializing test
mysql-test/t/fulltext_update.test:
Don't write warnings when initializing test
mysql-test/t/func_concat.test:
Don't write warnings when initializing test
mysql-test/t/func_date_add.test:
Don't write warnings when initializing test
mysql-test/t/func_encrypt.test:
Don't write warnings when initializing test
mysql-test/t/func_equal.test:
Don't write warnings when initializing test
mysql-test/t/func_group.test:
Don't write warnings when initializing test
mysql-test/t/func_if.test:
Don't write warnings when initializing test
mysql-test/t/func_in.test:
Don't write warnings when initializing test
mysql-test/t/func_isnull.test:
Don't write warnings when initializing test
mysql-test/t/func_like.test:
Don't write warnings when initializing test
mysql-test/t/func_regexp.test:
Don't write warnings when initializing test
mysql-test/t/func_set.test:
Don't write warnings when initializing test
Merged test with other tests
mysql-test/t/func_str.test:
Don't write warnings when initializing test
mysql-test/t/func_time.test:
Don't write warnings when initializing test
mysql-test/t/func_timestamp.test:
Don't write warnings when initializing test
mysql-test/t/gcc296.test:
Don't write warnings when initializing test
Cleaned up test
mysql-test/t/grant_cache.test:
Don't write warnings when initializing test
mysql-test/t/group_by.test:
Don't write warnings when initializing test
Cleaned up test
mysql-test/t/handler.test:
Don't write warnings when initializing test
mysql-test/t/having.test:
Don't write warnings when initializing test
mysql-test/t/heap.test:
Don't write warnings when initializing test
mysql-test/t/heap_auto_increment.test:
Don't write warnings when initializing test
mysql-test/t/heap_btree.test:
Don't write warnings when initializing test
mysql-test/t/heap_hash.test:
Don't write warnings when initializing test
mysql-test/t/innodb-deadlock.test:
Don't write warnings when initializing test
mysql-test/t/innodb.test:
Don't write warnings when initializing test
mysql-test/t/innodb_cache.test:
Don't write warnings when initializing test
mysql-test/t/innodb_handler.test:
Don't write warnings when initializing test
mysql-test/t/ins000001.test:
Don't write warnings when initializing test
mysql-test/t/insert.test:
Don't write warnings when initializing test
cleaned up test.
Changed to use standard database and table names
mysql-test/t/insert_select.test:
Don't write warnings when initializing test
Changed to use standard table names
mysql-test/t/insert_update.test:
Don't write warnings when initializing test
mysql-test/t/isam.test:
Don't write warnings when initializing test
cleaned up test
mysql-test/t/join.test:
Don't write warnings when initializing test
mysql-test/t/join_crash.test:
Don't write warnings when initializing test
mysql-test/t/join_outer.test:
Don't write warnings when initializing test
mysql-test/t/key.test:
Don't write warnings when initializing test
mysql-test/t/key_diff.test:
Don't write warnings when initializing test
mysql-test/t/key_primary.test:
Don't write warnings when initializing test
mysql-test/t/keywords.test:
Don't write warnings when initializing test
mysql-test/t/kill.test:
Don't write warnings when initializing test
mysql-test/t/limit.test:
Don't write warnings when initializing test
mysql-test/t/lock.test:
Don't write warnings when initializing test
mysql-test/t/lock_multi.test:
Don't write warnings when initializing test
mysql-test/t/lowercase_table.test:
Don't write warnings when initializing test
mysql-test/t/merge.test:
Don't write warnings when initializing test
cleaned up test
mysql-test/t/multi_update.test:
Don't write warnings when initializing test
mysql-test/t/myisam.test:
Don't write warnings when initializing test
mysql-test/t/null.test:
Don't write warnings when initializing test
mysql-test/t/null_key.test:
Don't write warnings when initializing test
mysql-test/t/odbc.test:
Don't write warnings when initializing test
mysql-test/t/olap.test:
Don't write warnings when initializing test
mysql-test/t/order_by.test:
Don't write warnings when initializing test
mysql-test/t/order_fill_sortbuf.test:
Don't write warnings when initializing test
mysql-test/t/query_cache.test:
Don't write warnings when initializing test
mysql-test/t/raid.test:
Don't write warnings when initializing test
mysql-test/t/range.test:
Don't write warnings when initializing test
mysql-test/t/rename.test:
Don't write warnings when initializing test
mysql-test/t/repair.test:
Don't write warnings when initializing test
mysql-test/t/replace.test:
Don't write warnings when initializing test
mysql-test/t/rollback.test:
Don't write warnings when initializing test
mysql-test/t/row.test:
Don't write warnings when initializing test
mysql-test/t/rpl000001.test:
Don't write warnings when initializing test
mysql-test/t/rpl000002.test:
Don't write warnings when initializing test
mysql-test/t/rpl000004.test:
Don't write warnings when initializing test
mysql-test/t/rpl000005.test:
Don't write warnings when initializing test
mysql-test/t/rpl000006.test:
Don't write warnings when initializing test
mysql-test/t/rpl000008-slave.opt:
Don't write warnings when initializing test
mysql-test/t/rpl000008.test:
Don't write warnings when initializing test
mysql-test/t/rpl000009-slave.opt:
Don't write warnings when initializing test
mysql-test/t/rpl000009.test:
Don't write warnings when initializing test
mysql-test/t/rpl000010.test:
Don't write warnings when initializing test
mysql-test/t/rpl000011.test:
Don't write warnings when initializing test
mysql-test/t/rpl000012.test:
Don't write warnings when initializing test
mysql-test/t/rpl000013.test:
Don't write warnings when initializing test
mysql-test/t/rpl000015.test:
Don't write warnings when initializing test
mysql-test/t/rpl000017.test:
Don't write warnings when initializing test
mysql-test/t/rpl000018.test:
Don't write warnings when initializing test
mysql-test/t/rpl_alter.test:
Don't write warnings when initializing test
mysql-test/t/rpl_empty_master_crash.test:
Don't write warnings when initializing test
mysql-test/t/rpl_redirect.test:
Don't write warnings when initializing test
mysql-test/t/rpl_replicate_do.test:
Don't write warnings when initializing test
mysql-test/t/rpl_rotate_logs.test:
Don't write warnings when initializing test
mysql-test/t/rpl_skip_error.test:
Don't write warnings when initializing test
mysql-test/t/rpl_temporary.test:
Don't write warnings when initializing test
mysql-test/t/sel000033.test:
Don't write warnings when initializing test
mysql-test/t/sel000100.test:
Don't write warnings when initializing test
mysql-test/t/select.test:
Don't write warnings when initializing test
mysql-test/t/select_found.test:
Don't write warnings when initializing test
mysql-test/t/select_safe.test:
Don't write warnings when initializing test
mysql-test/t/show_check.test:
Don't write warnings when initializing test
mysql-test/t/status.test:
Don't write warnings when initializing test
mysql-test/t/subselect.test:
Don't write warnings when initializing test
mysql-test/t/symlink.test:
Don't write warnings when initializing test
mysql-test/t/tablelock.test:
Don't write warnings when initializing test
mysql-test/t/temp_table.test:
Don't write warnings when initializing test
mysql-test/t/truncate.test:
Don't write warnings when initializing test
mysql-test/t/type_blob.test:
Don't write warnings when initializing test
mysql-test/t/type_date.test:
Don't write warnings when initializing test
mysql-test/t/type_datetime.test:
Don't write warnings when initializing test
mysql-test/t/type_decimal.test:
Don't write warnings when initializing test
mysql-test/t/type_enum.test:
Don't write warnings when initializing test
mysql-test/t/type_float.test:
Don't write warnings when initializing test
mysql-test/t/type_ranges.test:
Don't write warnings when initializing test
mysql-test/t/type_set.test:
Don't write warnings when initializing test
mysql-test/t/type_time.test:
Don't write warnings when initializing test
mysql-test/t/type_timestamp.test:
Don't write warnings when initializing test
mysql-test/t/type_uint.test:
Don't write warnings when initializing test
mysql-test/t/type_year.test:
Don't write warnings when initializing test
mysql-test/t/union.test:
Don't write warnings when initializing test
mysql-test/t/update.test:
Don't write warnings when initializing test
mysql-test/t/user_var.test:
Don't write warnings when initializing test
mysql-test/t/varbinary.test:
Don't write warnings when initializing test
mysql-test/t/variables.test:
Don't write warnings when initializing test
mysql-test/t/warnings.test:
Don't write warnings when initializing test
mysys/my_vsnprintf.c:
Safety fix
readline/terminal.c:
Removed compiler warnings
sql/ha_berkeley.cc:
Indentation changes
sql/mysql_priv.h:
Change store_warning -> push_warning_printf
sql/sql_db.cc:
Change store_warning -> push_warning_printf
sql/sql_error.cc:
Change store_warning -> push_warning_printf
sql/sql_table.cc:
Change store_warning -> push_warning_printf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
configure.in:
new configure parameter (now only for embeded server)
include/my_global.h:
now query cache always included in server, because of problrms with test suit
mysql-test/r/flush.result:
removed double testing
mysql-test/t/flush.test:
removed double testing
mysql-test/t/grant_cache.test:
now it is only memo about query cache
mysql-test/t/query_cache.test:
now it is only memo about query cache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change tests to use database 'mysqltest' instead of 'foo'
Add option to not print access denied messages to check_table_access()
Docs/manual.texi:
Updated query cache information.
client/mysqltest.c:
When connection to the database '*NO-ONE*, connect without specify a database.
include/raid.h:
Portability fix
mysql-test/r/drop.result:
Change test to use database 'mysqltest' instead of 'foo'
mysql-test/r/flush.result:
Change test to use database 'mysqltest' instead of 'foo'
mysql-test/r/innodb.result:
Change test to use database 'mysqltest' instead of 'foo'
mysql-test/r/query_cache.result:
Change test to use database 'mysqltest' instead of 'foo'
mysql-test/t/drop.test:
Change test to use database 'mysqltest' instead of 'foo'
mysql-test/t/flush.test:
Change test to use database 'mysqltest' instead of 'foo'
mysql-test/t/innodb.test:
Change test to use database 'mysqltest' instead of 'foo'
mysql-test/t/query_cache.test:
Change test to use database 'mysqltest' instead of 'foo'
sql/mysql_priv.h:
Add option to not print access denied messages
sql/net_pkg.cc:
Fix for query cache
sql/net_serv.cc:
Speed improvment
sql/sql_cache.cc:
Fixed access privilege bug in query cache
sql/sql_cache.h:
Always compiled with integrity check function prototypes.
sql/sql_do.cc:
Removed warning
sql/sql_parse.cc:
Add option to not print access denied messages
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Docs/manual.texi:
Added information about RESET
sql/mysql_priv.h:
Fixed wrong type
sql/sql_base.cc:
Removed wrong info in DBUG output
sql/sql_class.cc:
cleanup
sql/sql_parse.cc:
Fixed wrong type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
added support for quiet
increased line buffer size
client/mysqltest.c
fixed memory leak
added query logging to result file
added error message logging to result file
added enable_query_log/disable_query_log
mysql-test/mysql-test-run.sh
converted tests to use mysqlmanager
Updated test results
BitKeeper/etc/ignore:
added *.reject
client/mysqlmanagerc.c:
added support for quiet
increased line buffer size
client/mysqltest.c:
fixed memory leak
added query logging to result file
added error message logging to result file
added enable_query_log/disable_query_log
mysql-test/mysql-test-run.sh:
converted tests to use mysqlmanager
mysql-test/r/alias.result:
log queries
mysql-test/r/alter_table.result:
log queries
mysql-test/r/analyse.result:
log queries
mysql-test/r/auto_increment.result:
log queries
mysql-test/r/backup.result:
log queries
mysql-test/r/bdb-crash.result:
log queries
mysql-test/r/bench_count_distinct.result:
log queries
mysql-test/r/bigint.result:
log queries
mysql-test/r/binary.result:
log queries
mysql-test/r/bulk_replace.result:
log queries
mysql-test/r/case.result:
log queries
mysql-test/r/check.result:
log queries
mysql-test/r/comments.result:
log queries
mysql-test/r/compare.result:
log queries
mysql-test/r/count_distinct.result:
log queries
mysql-test/r/count_distinct2.result:
log queries
mysql-test/r/create.result:
log queries
mysql-test/r/ctype_latin1_de.result:
log queries
mysql-test/r/delayed.result:
log queries
mysql-test/r/dirty-close.result:
log queries
mysql-test/r/distinct.result:
log queries
mysql-test/r/drop.result:
log queries
mysql-test/r/empty_table.result:
log queries
mysql-test/r/explain.result:
log queries
mysql-test/r/flush.result:
log queries
mysql-test/r/fulltext.result:
log queries
mysql-test/r/fulltext_cache.result:
log queries
mysql-test/r/fulltext_distinct.result:
log queries
mysql-test/r/fulltext_left_join.result:
log queries
mysql-test/r/fulltext_multi.result:
log queries
mysql-test/r/fulltext_order_by.result:
log queries
mysql-test/r/fulltext_update.result:
log queries
mysql-test/r/fulltext_var.result:
log queries
mysql-test/r/func_crypt.result:
log queries
mysql-test/r/func_date_add.result:
log queries
mysql-test/r/func_equal.result:
log queries
mysql-test/r/func_group.result:
log queries
mysql-test/r/func_in.result:
log queries
mysql-test/r/func_like.result:
log queries
mysql-test/r/func_math.result:
log queries
mysql-test/r/func_misc.result:
log queries
mysql-test/r/func_op.result:
log queries
mysql-test/r/func_regexp.result:
log queries
mysql-test/r/func_set.result:
log queries
mysql-test/r/func_str.result:
log queries
mysql-test/r/func_system.result:
log queries
mysql-test/r/func_test.result:
log queries
mysql-test/r/func_time.result:
log queries
mysql-test/r/func_timestamp.result:
log queries
mysql-test/r/group_by.result:
log queries
mysql-test/r/handler.result:
log queries
mysql-test/r/having.result:
log queries
mysql-test/r/heap.result:
log queries
mysql-test/r/identity.result:
log queries
mysql-test/r/ins000001.result:
log queries
mysql-test/r/insert.result:
log queries
mysql-test/r/insert_select.result:
log queries
mysql-test/r/isam.result:
log queries
mysql-test/r/join.result:
log queries
mysql-test/r/join_crash.result:
log queries
mysql-test/r/join_outer.result:
log queries
mysql-test/r/key.result:
log queries
mysql-test/r/key_diff.result:
log queries
mysql-test/r/key_primary.result:
log queries
mysql-test/r/keywords.result:
log queries
mysql-test/r/kill.result:
log queries
mysql-test/r/limit.result:
log queries
mysql-test/r/lock.result:
log queries
mysql-test/r/merge.result:
log queries
mysql-test/r/multi_update.result:
log queries
mysql-test/r/myisam.result:
log queries
mysql-test/r/null.result:
log queries
mysql-test/r/null_key.result:
log queries
mysql-test/r/odbc.result:
log queries
mysql-test/r/openssl_1.result:
log queries
mysql-test/r/openssl_2.result:
log queries
mysql-test/r/order_by.result:
log queries
mysql-test/r/order_fill_sortbuf.result:
log queries
mysql-test/r/raid.result:
log queries
mysql-test/r/range.result:
log queries
mysql-test/r/rename.result:
log queries
mysql-test/r/replace.result:
log queries
mysql-test/r/rollback.result:
log queries
mysql-test/r/rpl000001.result:
log queries
mysql-test/r/rpl000002.result:
log queries
mysql-test/r/rpl000003.result:
log queries
mysql-test/r/rpl000004.result:
log queries
mysql-test/r/rpl000005.result:
log queries
mysql-test/r/rpl000006.result:
log queries
mysql-test/r/rpl000007.result:
log queries
mysql-test/r/rpl000008.result:
log queries
mysql-test/r/rpl000009.result:
log queries
mysql-test/r/rpl000010.result:
log queries
mysql-test/r/rpl000011.result:
log queries
mysql-test/r/rpl000012.result:
log queries
mysql-test/r/rpl000013.result:
log queries
mysql-test/r/rpl000014.result:
log queries
mysql-test/r/rpl000015.result:
log queries
mysql-test/r/rpl000016.result:
log queries
mysql-test/r/rpl000017.result:
log queries
mysql-test/r/rpl000018.result:
log queries
mysql-test/r/rpl_get_lock.result:
log queries
mysql-test/r/rpl_log.result:
log queries
mysql-test/r/rpl_magic.result:
log queries
mysql-test/r/rpl_mystery22.result:
log queries
mysql-test/r/rpl_sporadic_master.result:
log queries
mysql-test/r/sel000001.result:
log queries
mysql-test/r/sel000002.result:
log queries
mysql-test/r/sel000003.result:
log queries
mysql-test/r/sel000031.result:
log queries
mysql-test/r/sel000032.result:
log queries
mysql-test/r/sel000033.result:
log queries
mysql-test/r/sel000100.result:
log queries
mysql-test/r/select.result:
log queries
mysql-test/r/select_found.result:
log queries
mysql-test/r/select_safe.result:
log queries
mysql-test/r/show_check.result:
log queries
mysql-test/r/slave-running.result:
log queries
mysql-test/r/slave-stopped.result:
log queries
mysql-test/r/status.result:
log queries
mysql-test/r/symlink.result:
log queries
mysql-test/r/tablelock.result:
log queries
mysql-test/r/temp_table.result:
log queries
mysql-test/r/truncate.result:
log queries
mysql-test/r/type_blob.result:
log queries
mysql-test/r/type_date.result:
log queries
mysql-test/r/type_datetime.result:
log queries
mysql-test/r/type_decimal.result:
log queries
mysql-test/r/type_enum.result:
log queries
mysql-test/r/type_float.result:
log queries
mysql-test/r/type_ranges.result:
log queries
mysql-test/r/type_time.result:
log queries
mysql-test/r/type_timestamp.result:
log queries
mysql-test/r/type_uint.result:
log queries
mysql-test/r/type_year.result:
log queries
mysql-test/r/union.result:
log queries
mysql-test/r/update.result:
log queries
mysql-test/r/user_var.result:
log queries
mysql-test/r/varbinary.result:
log queries
mysql-test/r/variables.result:
log queries
mysql-test/t/bench_count_distinct.test:
log queries
mysql-test/t/check.test:
log queries
mysql-test/t/count_distinct2.test:
log queries
mysql-test/t/flush.test:
log queries
mysql-test/t/isam.test:
log queries
mysql-test/t/multi_update.test:
log queries
mysql-test/t/myisam.test:
log queries
mysql-test/t/order_fill_sortbuf.test:
log queries
mysql-test/t/rpl000016.test:
log queries
tools/managertest1.nc:
test for def_exec overwrite
tools/mysqlmanager.c:
support def_exec overwrite and queries on running server
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
preserve originating server id in Intvar events to avoid inifinite loops
include/mysqld_error.h:
new error messages
mysql-test/r/drop.result:
updated result
mysql-test/r/flush.result:
updated result
mysql-test/t/drop.test:
test for proper handling of drop/create database when holding
global read lock
mysql-test/t/flush.test:
test to see if other thread would block on drop database if we
are holding global read lock
sql/log.cc:
preserve originating server id in Intvar log event
sql/share/czech/errmsg.txt:
new error messages
sql/share/danish/errmsg.txt:
new error messages
sql/share/dutch/errmsg.txt:
new error messages
sql/share/english/errmsg.txt:
new error messages
sql/share/estonian/errmsg.txt:
new error messages
sql/share/french/errmsg.txt:
new error messages
sql/share/german/errmsg.txt:
new error messages
sql/share/greek/errmsg.txt:
new error messages
sql/share/hungarian/errmsg.txt:
new error messages
sql/share/italian/errmsg.txt:
new error messages
sql/share/japanese/errmsg.txt:
new error messages
sql/share/korean/errmsg.txt:
new error messages
sql/share/norwegian-ny/errmsg.txt:
new error messages
sql/share/norwegian/errmsg.txt:
new error messages
sql/share/polish/errmsg.txt:
new error messages
sql/share/portuguese/errmsg.txt:
new error messages
sql/share/romanian/errmsg.txt:
new error messages
sql/share/russian/errmsg.txt:
new error messages
sql/share/slovak/errmsg.txt:
new error messages
sql/share/spanish/errmsg.txt:
new error messages
sql/share/swedish/errmsg.txt:
new error messages
sql/slave.cc:
fixed typo in comment
sql/sql_db.cc:
global read lock should block drop/create database
|
| |
|
|
added flush test case, but had to comment the fun part out because it
does not work for some reason - will investigate why.
sql/sql_base.cc:
fixed bugs on re-open of temp tables after FLUSH in the middle of open
|