In the 10.1 InnoDB Plugin, a call os_event_free(buf_flush_event) was
misplaced. The event could be triggered by rollback of resurrected
transactions while shutdown was in progress. This bug was caught
by cmake -DWITH_ASAN testing. This call was only present in the
10.1 InnoDB Plugin, not in other versions, or in XtraDB.
That said, the bug affects all InnoDB versions. Shutdown assumes the
cessation of any page-dirtying activity, including the activity of
the background rollback thread. InnoDB only waited for the background
rollback to finish as part of a slow shutdown (innodb_fast_shutdown=0).
The default is a clean shutdown (innodb_fast_shutdown=1). In a scenario
where InnoDB is killed, restarted, and shut down soon enough, the data
files could become corrupted.
logs_empty_and_mark_files_at_shutdown(): Wait for the
rollback to finish, except if innodb_fast_shutdown=2
(crash-like shutdown) was requested.
trx_rollback_or_clean_recovered(): Before choosing the next
recovered transaction to roll back, terminate early if non-slow
shutdown was initiated. Roll back everything on slow shutdown
(innodb_fast_shutdown=0).
srv_innodb_monitor_mutex: Declare as static, because the mutex
is only used within one module.
In 10.2, os_event_destroy() sets the event to a NULL pointer,
while os_event_free() in earlier versions did not do that.
Compatibility links ended up looking like this:
libmysqlclient.so.18 -> /tmp/buildd/mariadb-10.2-10.2.0/debian/tmp/usr/lib/i386-linux-gnu/libmariadb.so.3
This change fixes ln syntax to create links with correct target paths.
Reason : after running sysbench tests (rw,update_no_index), in all cases
the throughout was considerably (approx 15%) better with the patch removed.
Reverted commit info
commit 8dc03bee3ade2edcc53a3a257346f4a0a9f0b44c
Author: Yasufumi Kinoshita <yasufumi.kinoshita@oracle.com>
Date: Wed Nov 20 17:02:24 2013 +0900
Bug #17824101 : WL#7050 CAUSES RW PERFORMANCE REGRESSION AT SOME WINDOWS ENVIRONMENT
* define MYSQL_DYNAMIC_PLUGIN only for server plugins
* don't typedef my_bool in mysql.h if plugin.h has already done it
* fix the include guard in plugin.h
Try harder to show the table's engine.
If the table's engine is not loaded, the table won't open.
But we can still read the engine name from frm as a string.
Make SELECT <columns> FROM I_S.TABLES behave identically independently
from whether <columns> require opening the table in engine or
<columns> can be filled with only opening the frm.
In particular, fill_schema_table_from_frm() should not silently skip
frms with unknown engine, but should fill the I_S.TABLES row
with NULLs just like fill_schema_table_by_open() does.
has_no_default_value() should only fail the insert in the strict mode.
Additionally, don't check for "all fields are given values" twice,
it'll produce duplicate warnings.
In the 10.1 InnoDB Plugin, a call os_event_free(buf_flush_event) was
misplaced. The event could be signalled by rollback of resurrected
transactions while shutdown was in progress. This bug was caught
by cmake -DWITH_ASAN testing. This call was only present in the
10.1 InnoDB Plugin, not in other versions, or in XtraDB.
That said, the bug affects all InnoDB versions. Shutdown assumes the
cessation of any page-dirtying activity, including the activity of
the background rollback thread. InnoDB only waited for the background
rollback to finish as part of a slow shutdown (innodb_fast_shutdown=0).
The default is a clean shutdown (innodb_fast_shutdown=1). In a scenario
where InnoDB is killed, restarted, and shut down soon enough, the data
files could become corrupted.
logs_empty_and_mark_files_at_shutdown(): Wait for the
rollback to finish, except if innodb_fast_shutdown=2
(crash-like shutdown) was requested.
trx_rollback_or_clean_recovered(): Before choosing the next
recovered transaction to roll back, terminate early if non-slow
shutdown was initiated. Roll back everything on slow shutdown
(innodb_fast_shutdown=0).
srv_innodb_monitor_mutex: Declare as static, because the mutex
is only used within one module.
After each call to os_event_free(), ensure that the freed event
is not reachable via global variables, by setting the relevant
variables to NULL.
If openat is present on the system and it tries to open a symlink with
O_NOFOLLOW, we get errno 40.
If openat is not present on the system, we use the alternative open call, with
slightly different logic. IF the symlink doesn't point to a valid file,
we get errno 20. This test uses an invalid symlink on the table t1.MYD.
InnoDB undo logs currently always use the innodb_page_size,
whether they are stored in the system tablespace, in a
dedicated undo tablespace, or in the temporary tablespace.
Remove redundant page_size parameters.
TrxUndoRsegsIterator::set_next(): return bool instead of page_size.
TrxUndoRsegsIterator::m_purge_sys: Remove. There is only one purge_sys.
purge_sys_t: Renamed from trx_purge_t. Define a constructor and
destructor. Allocate rseg_iter, purge_queue inline.
purge_sys->trx: Remove. Use purge_sys->sess->trx instead.
purge_sys->view_active: Remove. Access to purge_sys->view is always
protected by purge_sys->latch.
trx_purge_sys_create(): Replaced by purge_sys_t::purge_sys_t().
trx_purge_sys_close(): Replaced by purge_sys_t::~purge_sys_t().
Remove srv_win_file_flush_method
- Rename srv_unix_file_flush_method to srv_file_flush_method, and
rename constants to remove UNIX from them, i.e SRV_UNIX_FSYNC=>SRV_FSYNC
- Add SRV_ALL_O_DIRECT_FSYNC corresponding to current Windows default
(no buffering for either log or data, flush on both log and data)
- change os_file_open on Windows to behave identically to Unix wrt
O_DIRECT and O_DSYNC settings. map O_DIRECT to FILE_FLAG_NO_BUFFERING and
O_DSYNC to FILE_FLAG_WRITE_THROUGH
- remove various #ifdef _WIN32
InnoDB needs to collect transactions from the persistent data files
in trx_rseg_array_init() before trx_lists_init_at_db_start() is
executed. But there is no need to create purge_sys->purge_queue
separately from purge_sys.
trx_sys_init_at_db_start(): Change the return type to void.
Remove the direct call to trx_rseg_array_init(). It will be called
by trx_lists_init_at_db_start(), which we are calling.
Initialize the purge system read view.
trx_lists_init_at_db_start(): Call trx_purge_sys_create(), which will
invoke trx_rseg_array_init() to read the undo log segments.
trx_purge_sys_create(): Remove the parameters. Do not initialize
the purge system read view, because trx_sys->rw_trx_list has not
been recovered yet. The purge_sys->view will be initialized at
the end of trx_sys_init_at_db_start().
trx_rseg_array_init(): Remove the parameter. Use purge_sys->purge_queue
directly.
innobase_start_or_create_for_mysql(): Remove the local variable
purge_queue. Do not call trx_purge_sys_create(), because it will be
called by trx_sys_init_at_db_start().