| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
remove obscurity from windows and threadpool APC implementations
Implement a working Windows APC. Fix some other non-working stuff.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To have a guaranteed wakeup with no lost signal, the folowing approaches
are applied on different platforms:
* Linux/FreeBSD:
This applies to any platform with _GNU_SOURCE defined.
1. set a signal mask to ignore the signal (namely, SIGUSR1. It is better
not to interfer with the signals that can be used by OS)
2. call ppoll instead of poll, that applies the signal mask atomically
with polling.
3. hopefully, if the signal is received before the ppoll call
(i.e. masked out) will be still set to pending, so the next ppoll call
(as well as any unmasking) will force it to be handled. We will receive
EINTR and the read will be retried.
* Solaris, other POSIX
There is no ppoll function on Solaris, but it has differently handled
opened files limitation, which allows to freely open new file descriptors
as needed.
Here we will use the self-pipe trick to wake up:
1. A thread-local pipe is created. Its read end will be additionally used
by poll.
2. A signal handler will write to this pipe to wake up from poll.
Linux is not safe for using this method, because its file limits are rather
low, especially the default ones.
Solaris has the per-process restriction rather than per-user:
https://support.oracle.com/knowledge/Sun%20Microsystems/1005979_1.html
> A process can have up to rlim_fd_cur file descriptors and can increase
> the number up to rlim_fd_max.
The latter is 1024 on Solaris 7 by default.
We can't say about other POSIX'es limitations, but it is assumed they have
no ppoll function.
pselect is not assumed because of the silly limitations.
So the only way for them can be self-piping.
* Windows
Self-pipe trick is used as well, but instead of poll, select is used,
and QueueUserAPC is used instead of signals.
Caveats:
* It is possible that the connection will hang on write for long.
The requestor should wait until the write ends, or fail with timeout.
* The connection can hang in other commands for long, for example, on
sleep().
We generally can't assume it is safe to handle the apc during both of these
cases, but maybe some safe zones can be marked. Anyway it is considered to
be out of the scope of this task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically, when we begin waiting on condition, the mutex is unlocked,
so the protection inside ~THD
mysql_mutex_lock(&LOCK_thd_kill);
mysql_mutex_unlock(&LOCK_thd_kill);
doesn't work. The mutex is freely acquired and it is skipped.
Then mysql_mutex_destroy can be called.
Meanwhile, another thread can receive the signal and acquire the mutex
back, which is UB, since it was already destroyed.
In particalar, safe_cond_timedwait tries to update some statistics on mutex
that were freed by safe_mutex_destroy, as well as mp->global, which is
tried to acquire.
|
|
|
|
|
|
| |
In pfs_variable.cc we will have to make an additional step between
enqueue_request and wait_for_completion. These two functions will be called
directly and therefore both should have a public interface
|
| |
|
| |
|
|\ |
|
| |\ |
|
| | |\ |
|
| | | |\ |
|
| | | | |\ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Avoid the loop with getting rid of back and forth jumping.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
ha_innobase::prepare_inplace_alter_table(): If the ALTER TABLE
operation is no-op for InnoDB, do reset m_prebuilt->trx_id
so that ha_innobase::table_version() will always report either 0
or the identifier of the transaction that would commit changes
to the InnoDB data dictionary.
The failure scenario involved a completed DROP INDEX followed by
a no-op ALTER TABLE during which the server was killed.
An effort to create a reproducible test failed.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since commit 0b47c126e31cddda1e94588799599e138400bcf8 (MDEV-13542)
we treat all-zero pages as corrupted ones.
During a stress test, a read-ahead of an all-zero page was triggered
and the page read was completed concurrently with buf_page_create_low().
This caused the assertion to fail, because buf_page_create_low() was
waiting for the page latch.
buf_page_get_low(): Only invoke buf_pool_t::corrupted_evict()
if the block was not already marked as corrupted.
buf_page_create_low(): On page identifier mismatch, retry the
buf_pool.page_hash lookup.
buf_pool_t::corrupted_evict(): Set the state of the block to FREED
so that a concurrent buf_page_get_low() will refuse to load the page.
Wait for the page latch to be vacant before proceeding to remove
the block from buf_pool.page_hash and buf_pool.LRU.
page_id_t::set_corrupted(), page_id_t::is_corrupted(): Accessors
for indicating a corrupted page identifier.
Tested by Matthias Leich
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / / |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate on SET NAMES
These system variables:
@@character_set_client
@@character_set_connection
@@character_set_database
@@character_set_filesystem
@@character_set_results
@@character_set_server
can now be set in numeric format only to IDs of default collations, e.g.:
SET @@character_set_xxx=9; -- OK (latin2_general_ci is default)
SET @@character_set_xxx=2; -- ERROR (latin2_czech_cs is not default)
SET @@character_set_xxx=21; -- ERROR (latin2_hungarian_ci is not default)
Before this change the server accepted IDs of non-default collations
so all three examples above worked without errors,
but this could lead to unexpected behavior in later statements.
|
| | | | | |
| | | | | |
| | | | | | |
Reviewed by: Nayuta Yanagisawa
|
| | | | | |
| | | | | |
| | | | | | |
Reviewed by: Nayuta Yanagisawa
|
|\ \ \ \ \ \
| |/ / / / / |
|
| |\ \ \ \ \
| | |/ / / / |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In commit c4c88307091cb16886562e9e7b77f5fd077d34b5 (MDEV-28111) we disabled
the file system cache on the InnoDB write-ahead log file (ib_logfile0)
by default on Linux.
It turns out that especially with innodb_flush_trx_log_at_commit=2,
writing to the log via the file system cache typically improves throughput,
especially on slow storage or at a small number of concurrent transactions.
For other values of innodb_flush_log_at_trx_commit, direct writes were
observed to be mostly but not always faster. Whether it pays off to
disable the file system cache on the log may depend on the type of storage,
the workload, and the operating system kernel version.
On Linux and Microsoft Windows, we will introduce the settable Boolean
global variable innodb_log_file_buffering that indicates whether the
file system cache on the redo log file is enabled. The default value is
innodb_log_file_buffering=OFF. If the server is started up with
innodb_flush_log_at_trx_commit=2, the value will be changed to
innodb_log_file_buffering=ON.
When a persistent memory interface is being used for the log,
the value cannot be changed from innodb_log_file_buffering=OFF.
On Linux, when the physical block size cannot be determined
to be a power of 2 between 64 and 4096 bytes, the file system cache
cannot be disabled, and innodb_log_file_buffering=ON cannot be changed.
Server log messages will indicate whether the file system cache is
enabled for the redo log:
[Note] InnoDB: Buffered log writes (block size=512 bytes)
[Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
After this change, the startup parameter innodb_flush_method will no
longer control whether O_DIRECT will be set on the redo log on Linux.
On other operating systems that support O_DIRECT, no interface has been
implemented for controlling the file system cache for the redo log.
The innodb_flush_method values O_DIRECT, O_DIRECT_NO_FSYNC, O_DSYNC
will enable O_DIRECT for data files, not the log.
Tested by: Matthias Leich, Axel Schwenke
|
| | |\ \ \ \
| | | |/ / / |
|
| | | |\ \ \
| | | | |/ / |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
trx_purge_free_segment(): Do mark that the block will be modified.
It seems possible that this regression was introduced by the
changes to the page-freeing logic
in commit 4179f93d28035ea2798cb1c16feeaaef87ab4775 (MDEV-18976).
Tested by: Matthias Leich
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- innodb_fts.sync_block doesn't make sense after MDEV-25581's patch
because fts cache syncing is done as a part of insert operation
and it leads to completion of select over insert sometimes.
This test case is not relevant any more
|
| | | |\ \ \
| | | | |/ / |
|
| | | | |\ \
| | | | | |/ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In commit 73fee39ea62037780c59161507e89dd76c10b7a3 (MDEV-27985)
a regression was introduced that would cause bpage=nullptr to
be referenced.
buf_flush_LRU_list_batch(): Always terminate the loop upon
encountering a null pointer.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
assertion: id != 0 on ALTER ... REBUILD PARTITION
During rebuild of partition, the partitioning engine calls
alter_close_table(), which does not unlock and close some table
instances of the target table.
Then, the engine fails to rename partitions because there are table
instances that are still locked.
Closing all the table instance of the target table fixes the bug.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
MariaDB codebase is huge and Lintian has lots of test than
can fire false-positive warnings which leads to situation
where real problems can't be spotted.
Suspend obvious false-positive Lintian warnings and
let Lintian problems that needs some love shine
out.
Suspends in package mariadb-test-data
Supporting BSD family needs to use '/usr/bin/env perl' and not '/usr/bin/perl'
Perl script are for testing and not for production in mariadb-test-data
package:
* incorrect-path-for-interpreter
There is several files with national-encoding which are test file so they
can't be in unicode charset
* national-encoding
Serveral test paths are intentionally repeated:
* repeated-path-segment
Suspends in package mariadb-test
Supporting BSD family needs to use '/usr/bin/env perl' and not '/usr/bin/perl'
Perl script are for testing and not for production in mariadb-test-data
package:
* incorrect-path-for-interpreter
Suspends in package source package
Remade some 'version-substvar-for-external-package' to use
regex.
MGroonga is missing source file 'jquery-ui-1.8.18.custom.js' correct
lintian suspend with regex:
* source-is-missing
There is several files with very long line lenghts. Add suspends
for those that can't be corrected in several places. Most
of them are test result files, SQL test files or intentional
long lines that can't be splitted.
* very-long-line-length-in-source-file
There is several autogenerated C++ files which probably should not
be there but they should not do any harm:
* source-contains-autogenerated-visual-c++-file
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
innodb_drop_database(): Use explicit TO_BINARY casts on
SYS_TABLES.NAME, which for historical reasons uses the wrong collation
latin1_swedish_ci instead of BINARY.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Problem:
========
InnoDB FTS requesting the fts sync of the table once the fts
cache size reaches 1/10 of innodb_ft_cache_size. But fts_sync()
releases cache lock when writing the word. By doing this, InnoDB
insert thread increases the innodb fts cache memory and
SYNC operation will take more time to complete.
Solution:
=========
Remove the fts sync operation(FTS_MSG_SYNC_TABLE) from
the fts optimize background thread. Instead of that,
allow user thread to sync the InnoDB fts cache when
the cache size exceeds 512 kb. User thread holds
cache lock while doing cache syncing, it make sure that
other threads doesn't add the docs into the cache.
Removed FTS_MSG_SYNC_TABLE and its related function
because we do remove the FTS_MSG_SYNC_TABLE message
itself.
Removed fts_sync_index_check() and all related
function because other threads doesn't add while
cache operation going on.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This fixes up commit 3d241eb948855dbe0688a04c8111cc78deac3c1c
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
These had been damaged during some merge which caused --embedded
test to fail
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Compiling hashicorp plugin statically got many InnoDB
encryption test to fail with errors like:
Error: InnoDB: The page [page id: space=5, page number=3] in file './test/t1.ibd' cannot be decrypted.
|
|\ \ \ \ \ \
| |/ / / / / |
|
| |\ \ \ \ \
| | |/ / / / |
|
| | | | | | |
|
| | |\ \ \ \
| | | |/ / / |
|
| | | |\ \ \
| | | | |/ / |
|
| | | | |\ \
| | | | | |/ |
|