2009-12-22 10:35:56 +01:00
|
|
|
The following options may be given as the first argument:
|
2010-02-24 14:52:27 +01:00
|
|
|
--print-defaults Print the program argument list and exit.
|
|
|
|
--no-defaults Don't read default options from any option file.
|
|
|
|
--defaults-file=# Only read default options from the given file #.
|
|
|
|
--defaults-extra-file=# Read this file after the global files are read.
|
2009-12-22 10:35:56 +01:00
|
|
|
|
2010-01-06 18:57:10 +01:00
|
|
|
--allow-suspicious-udfs
|
|
|
|
Allows use of UDFs consisting of only one symbol xxx()
|
|
|
|
without corresponding xxx_init() or xxx_deinit(). That
|
|
|
|
also means that one can load any function from any
|
|
|
|
library, for example exit() from libc.so
|
|
|
|
-a, --ansi Use ANSI SQL syntax instead of MySQL syntax. This mode
|
|
|
|
will also set transaction isolation level 'serializable'.
|
|
|
|
--auto-increment-increment[=#]
|
|
|
|
Auto-increment columns are incremented by this
|
|
|
|
--auto-increment-offset[=#]
|
|
|
|
Offset added to Auto-increment columns. Used when
|
|
|
|
auto-increment-increment != 1
|
2010-11-05 14:16:27 +01:00
|
|
|
--autocommit Set default value for autocommit (0 or 1)
|
2011-01-14 14:21:46 +01:00
|
|
|
(Defaults to on; use --skip-autocommit to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--automatic-sp-privileges
|
|
|
|
Creating and dropping stored procedures alters ACLs
|
|
|
|
(Defaults to on; use --skip-automatic-sp-privileges to disable.)
|
2015-08-11 18:45:38 +02:00
|
|
|
--back-log=# The number of outstanding connection requests MariaDB can
|
2010-01-06 18:57:10 +01:00
|
|
|
have. This comes into play when the main MySQL thread
|
|
|
|
gets very many connection requests in a very short time
|
2015-08-11 18:45:38 +02:00
|
|
|
(Automatically configured unless set explicitly)
|
2010-01-06 18:57:10 +01:00
|
|
|
-b, --basedir=name Path to installation directory. All paths are usually
|
|
|
|
resolved relative to this
|
|
|
|
--big-tables Allow big result sets by saving all temporary sets on
|
|
|
|
file (Solves most 'table full' errors)
|
|
|
|
--bind-address=name IP address to bind to.
|
2011-11-22 18:04:38 +01:00
|
|
|
--binlog-annotate-row-events
|
2011-10-19 21:45:18 +02:00
|
|
|
Tells the master to annotate RBR events with the
|
|
|
|
statement that caused these events
|
2016-12-19 23:32:45 +01:00
|
|
|
(Defaults to on; use --skip-binlog-annotate-row-events to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--binlog-cache-size=#
|
2010-11-05 18:42:37 +01:00
|
|
|
The size of the transactional cache for updates to
|
|
|
|
transactional engines for the binary log. If you often
|
|
|
|
use transactions containing many statements, you can
|
|
|
|
increase this to get more performance
|
2011-10-19 21:45:18 +02:00
|
|
|
--binlog-checksum=name
|
|
|
|
Type of BINLOG_CHECKSUM_ALG. Include checksum for log
|
2014-06-19 12:02:23 +02:00
|
|
|
events in the binary log. One of: NONE, CRC32
|
2013-07-09 13:15:53 +02:00
|
|
|
--binlog-commit-wait-count=#
|
|
|
|
If non-zero, binlog write will wait at most
|
|
|
|
binlog_commit_wait_usec microseconds for at least this
|
|
|
|
many commits to queue up for group commit to the binlog.
|
|
|
|
This can reduce I/O on the binlog and provide increased
|
|
|
|
opportunity for parallel apply on the slave, but too high
|
|
|
|
a value will decrease commit throughput.
|
|
|
|
--binlog-commit-wait-usec=#
|
|
|
|
Maximum time, in microseconds, to wait for more commits
|
|
|
|
to queue up for binlog group commit. Only takes effect if
|
|
|
|
the value of binlog_commit_wait_count is non-zero.
|
2010-02-06 17:13:42 +01:00
|
|
|
--binlog-direct-non-transactional-updates
|
|
|
|
Causes updates to non-transactional engines using
|
|
|
|
statement format to be written directly to binary log.
|
|
|
|
Before using this option make sure that there are no
|
|
|
|
dependencies between transactional and non-transactional
|
|
|
|
tables such as in the statement INSERT INTO t_myisam
|
|
|
|
SELECT * FROM t_innodb; otherwise, slaves may diverge
|
|
|
|
from the master.
|
2010-01-06 18:57:10 +01:00
|
|
|
--binlog-do-db=name Tells the master it should log updates for the specified
|
|
|
|
database, and exclude all others not explicitly
|
|
|
|
mentioned.
|
|
|
|
--binlog-format=name
|
|
|
|
What form of binary logging the master will use: either
|
|
|
|
ROW for row-based binary logging, STATEMENT for
|
|
|
|
statement-based binary logging, or MIXED. MIXED is
|
|
|
|
statement-based binary logging except for those
|
|
|
|
statements where only row-based is correct: those which
|
|
|
|
involve user-defined functions (i.e. UDFs) or the UUID()
|
|
|
|
function; for those, row-based binary logging is
|
2014-06-19 12:02:23 +02:00
|
|
|
automatically used.
|
2010-01-06 18:57:10 +01:00
|
|
|
--binlog-ignore-db=name
|
|
|
|
Tells the master that updates to the given database
|
2010-02-24 14:52:27 +01:00
|
|
|
should not be logged to the binary log.
|
2011-10-19 21:45:18 +02:00
|
|
|
--binlog-optimize-thread-scheduling
|
|
|
|
Run fast part of group commit in a single thread, to
|
|
|
|
optimize kernel thread scheduling. On by default. Disable
|
|
|
|
to run each transaction in group commit in its own
|
|
|
|
thread, which can be slower at very high concurrency.
|
|
|
|
This option is mostly for testing one algorithm versus
|
|
|
|
the other, and it should not normally be necessary to
|
|
|
|
change it.
|
|
|
|
(Defaults to on; use --skip-binlog-optimize-thread-scheduling to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--binlog-row-event-max-size=#
|
|
|
|
The maximum size of a row-based binary log event in
|
|
|
|
bytes. Rows will be grouped into events smaller than this
|
|
|
|
size if possible. The value has to be a multiple of 256.
|
2015-07-01 15:22:41 +02:00
|
|
|
--binlog-row-image=name
|
|
|
|
Controls whether rows should be logged in 'FULL',
|
|
|
|
'NOBLOB' or 'MINIMAL' formats. 'FULL', means that all
|
|
|
|
columns in the before and after image are logged.
|
|
|
|
'NOBLOB', means that mysqld avoids logging blob columns
|
|
|
|
whenever possible (eg, blob column was not changed or is
|
|
|
|
not part of primary key). 'MINIMAL', means that a PK
|
|
|
|
equivalent (PK columns or full row if there is no PK in
|
|
|
|
the table) is logged in the before image, and only
|
|
|
|
changed columns are logged in the after image. (Default:
|
|
|
|
FULL).
|
2010-11-05 18:42:37 +01:00
|
|
|
--binlog-stmt-cache-size=#
|
|
|
|
The size of the statement cache for updates to
|
|
|
|
non-transactional engines for the binary log. If you
|
|
|
|
often use statements updating a great number of rows, you
|
|
|
|
can increase this to get more performance
|
2010-01-06 18:57:10 +01:00
|
|
|
--bootstrap Used by mysql installation scripts.
|
|
|
|
--bulk-insert-buffer-size=#
|
|
|
|
Size of tree cache used in bulk insert optimisation. Note
|
|
|
|
that this is a limit per thread!
|
|
|
|
--character-set-client-handshake
|
|
|
|
Don't ignore client side character set value sent during
|
|
|
|
handshake.
|
|
|
|
(Defaults to on; use --skip-character-set-client-handshake to disable.)
|
|
|
|
--character-set-filesystem=name
|
|
|
|
Set the filesystem character set.
|
|
|
|
-C, --character-set-server=name
|
|
|
|
Set the default character set.
|
|
|
|
--character-sets-dir=name
|
|
|
|
Directory where character sets are
|
|
|
|
-r, --chroot=name Chroot mysqld daemon during startup.
|
|
|
|
--collation-server=name
|
|
|
|
Set the default collation.
|
|
|
|
--completion-type=name
|
2014-06-19 12:02:23 +02:00
|
|
|
The transaction completion type. One of: NO_CHAIN, CHAIN,
|
2010-01-06 18:57:10 +01:00
|
|
|
RELEASE
|
|
|
|
--concurrent-insert[=name]
|
2014-06-19 12:02:23 +02:00
|
|
|
Use concurrent insert with MyISAM. One of: NEVER, AUTO,
|
|
|
|
ALWAYS
|
2010-02-24 14:52:27 +01:00
|
|
|
--console Write error output on screen; don't remove the console
|
2010-01-06 18:57:10 +01:00
|
|
|
window on windows.
|
|
|
|
--core-file Write core on errors.
|
|
|
|
-h, --datadir=name Path to the database root directory
|
|
|
|
--date-format=name The DATE format (ignored)
|
|
|
|
--datetime-format=name
|
|
|
|
The DATETIME format (ignored)
|
2011-04-25 17:22:25 +02:00
|
|
|
--deadlock-search-depth-long=#
|
|
|
|
Long search depth for the two-step deadlock detection
|
|
|
|
--deadlock-search-depth-short=#
|
|
|
|
Short search depth for the two-step deadlock detection
|
|
|
|
--deadlock-timeout-long=#
|
|
|
|
Long timeout for the two-step deadlock detection (in
|
|
|
|
microseconds)
|
|
|
|
--deadlock-timeout-short=#
|
|
|
|
Short timeout for the two-step deadlock detection (in
|
|
|
|
microseconds)
|
2014-04-23 08:57:25 +02:00
|
|
|
--default-regex-flags=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Default flags for the regex library. Any combination of:
|
|
|
|
DOTALL, DUPNAMES, EXTENDED, EXTRA, MULTILINE, UNGREEDY
|
2010-01-06 18:57:10 +01:00
|
|
|
--default-storage-engine=name
|
|
|
|
The default storage engine for new tables
|
|
|
|
--default-time-zone=name
|
|
|
|
Set the default time zone.
|
2014-06-14 22:15:52 +02:00
|
|
|
--default-tmp-storage-engine=name
|
|
|
|
The default storage engine for user-created temporary
|
|
|
|
tables
|
2010-01-06 18:57:10 +01:00
|
|
|
--default-week-format=#
|
|
|
|
The default week format used by WEEK() functions
|
|
|
|
--delay-key-write[=name]
|
2014-06-19 12:02:23 +02:00
|
|
|
Type of DELAY_KEY_WRITE. One of: OFF, ON, ALL
|
2010-01-06 18:57:10 +01:00
|
|
|
--delayed-insert-limit=#
|
|
|
|
After inserting delayed_insert_limit rows, the INSERT
|
|
|
|
DELAYED handler will check if there are any SELECT
|
|
|
|
statements pending. If so, it allows these to execute
|
|
|
|
before continuing
|
|
|
|
--delayed-insert-timeout=#
|
|
|
|
How long a INSERT DELAYED thread should wait for INSERT
|
|
|
|
statements before terminating
|
|
|
|
--delayed-queue-size=#
|
|
|
|
What size queue (in rows) should be allocated for
|
|
|
|
handling INSERT DELAYED. If the queue becomes full, any
|
|
|
|
client that does INSERT DELAYED will wait until there is
|
|
|
|
room in the queue again
|
|
|
|
--div-precision-increment=#
|
|
|
|
Precision of the result of '/' operator will be increased
|
|
|
|
on that value
|
2015-09-02 09:58:08 +02:00
|
|
|
--encrypt-binlog Encrypt binary logs (including relay logs)
|
2014-12-22 15:53:17 +01:00
|
|
|
--encrypt-tmp-disk-tables
|
2015-05-27 00:18:20 +02:00
|
|
|
Encrypt temporary on-disk tables (created as part of
|
|
|
|
query execution)
|
|
|
|
--encrypt-tmp-files Encrypt temporary files (created for filesort, binary log
|
|
|
|
cache, etc)
|
2015-03-10 07:28:51 +01:00
|
|
|
--enforce-storage-engine=name
|
|
|
|
Force the use of a storage engine for new tables
|
2010-01-06 18:57:10 +01:00
|
|
|
--event-scheduler[=name]
|
|
|
|
Enable the event scheduler. Possible values are ON, OFF,
|
|
|
|
and DISABLED (keep the event scheduler completely
|
|
|
|
deactivated, it cannot be activated run-time)
|
2012-05-17 12:46:05 +02:00
|
|
|
--expensive-subquery-limit=#
|
|
|
|
The maximum number of rows a subquery may examine in
|
|
|
|
order to be executed during optimization and used for
|
|
|
|
constant optimization
|
2010-01-06 18:57:10 +01:00
|
|
|
--expire-logs-days=#
|
|
|
|
If non-zero, binary logs will be purged after
|
|
|
|
expire_logs_days days; possible purges happen at startup
|
|
|
|
and at binary log rotation
|
2015-09-22 12:01:54 +02:00
|
|
|
--explicit-defaults-for-timestamp
|
|
|
|
This option causes CREATE TABLE to create all TIMESTAMP
|
|
|
|
columns as NULL with DEFAULT NULL attribute, Without this
|
|
|
|
option, TIMESTAMP columns are NOT NULL and have implicit
|
|
|
|
DEFAULT clauses. The old behavior is deprecated.
|
2010-01-06 18:57:10 +01:00
|
|
|
--external-locking Use system (external) locking (disabled by default).
|
|
|
|
With this option enabled you can run myisamchk to test
|
|
|
|
(not repair) tables while the MySQL server is running.
|
|
|
|
Disable with --skip-external-locking.
|
2011-04-25 17:22:25 +02:00
|
|
|
--extra-max-connections=#
|
|
|
|
The number of connections on extra-port
|
|
|
|
--extra-port=# Extra port number to use for tcp connections in a
|
|
|
|
one-thread-per-connection manner. 0 means don't use
|
|
|
|
another port
|
[MDEV-10570] Add Flashback support
==== Description ====
Flashback can rollback the instances/databases/tables to an old snapshot.
It's implement on Server-Level by full image format binary logs (--binlog-row-image=FULL), so it supports all engines.
Currently, it’s a feature inside mysqlbinlog tool (with --flashback arguments).
Because the flashback binlog events will store in the memory, you should check if there is enough memory in your machine.
==== New Arguments to mysqlbinlog ====
--flashback (-B)
It will let mysqlbinlog to work on FLASHBACK mode.
==== New Arguments to mysqld ====
--flashback
Setup the server to use flashback. This enables binary log in row mode
and will enable extra logging for DDL's needed by flashback feature
==== Example ====
I have a table "t" in database "test", we can compare the output with "--flashback" and without.
#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -d test -T t --start-datetime="2013-03-27 14:54:00" > /tmp/1.sql
#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -d test -T t --start-datetime="2013-03-27 14:54:00" -B > /tmp/2.sql
Then, importing the output flashback file (/tmp/2.log), it can flashback your database/table to the special time (--start-datetime).
And if you know the exact postion, "--start-postion" is also works, mysqlbinlog will output the flashback logs that can flashback to "--start-postion" position.
==== Implement ====
1. As we know, if binlog_format is ROW (binlog-row-image=FULL in 10.1 and later), all columns value are store in the row event, so we can get the data before mis-operation.
2. Just do following things:
2.1 Change Event Type, INSERT->DELETE, DELETE->INSERT.
For example:
INSERT INTO t VALUES (...) ---> DELETE FROM t WHERE ...
DELETE FROM t ... ---> INSERT INTO t VALUES (...)
2.2 For Update_Event, swapping the SET part and WHERE part.
For example:
UPDATE t SET cols1 = vals1 WHERE cols2 = vals2
--->
UPDATE t SET cols2 = vals2 WHERE cols1 = vals1
2.3 For Multi-Rows Event, reverse the rows sequence, from the last row to the first row.
For example:
DELETE FROM t WHERE id=1; DELETE FROM t WHERE id=2; ...; DELETE FROM t WHERE id=n;
--->
DELETE FROM t WHERE id=n; ...; DELETE FROM t WHERE id=2; DELETE FROM t WHERE id=1;
2.4 Output those events from the last one to the first one which mis-operation happened.
For example:
2017-01-20 14:33:28 +01:00
|
|
|
--flashback Setup the server to use flashback. This enables binary
|
|
|
|
log in row mode and will enable extra logging for DDL's
|
|
|
|
needed by flashback feature
|
2010-01-06 18:57:10 +01:00
|
|
|
--flush Flush MyISAM tables to disk between SQL commands
|
|
|
|
--flush-time=# A dedicated thread is created to flush all tables at the
|
|
|
|
given interval
|
|
|
|
--ft-boolean-syntax=name
|
|
|
|
List of operators for MATCH ... AGAINST ( ... IN BOOLEAN
|
|
|
|
MODE)
|
|
|
|
--ft-max-word-len=# The maximum length of the word to be included in a
|
|
|
|
FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
|
|
|
|
after changing this variable
|
|
|
|
--ft-min-word-len=# The minimum length of the word to be included in a
|
|
|
|
FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
|
|
|
|
after changing this variable
|
|
|
|
--ft-query-expansion-limit=#
|
|
|
|
Number of best matches to use for query expansion
|
|
|
|
--ft-stopword-file=name
|
|
|
|
Use stopwords from this file instead of built-in list
|
2011-12-12 23:58:40 +01:00
|
|
|
--gdb Set up signals usable for debugging. Deprecated, use
|
2010-01-06 18:57:10 +01:00
|
|
|
--general-log Log connections and queries to a table or log file.
|
2011-11-28 17:48:19 +01:00
|
|
|
Defaults logging to a file 'hostname'.log or a table
|
2010-01-06 18:57:10 +01:00
|
|
|
mysql.general_logif --log-output=TABLE is used
|
|
|
|
--general-log-file=name
|
|
|
|
Log connections and queries to given file
|
2015-01-07 12:13:21 +01:00
|
|
|
--getopt-prefix-matching
|
|
|
|
Recognize command-line options by their unambiguos
|
|
|
|
prefixes.
|
|
|
|
(Defaults to on; use --skip-getopt-prefix-matching to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--group-concat-max-len=#
|
2016-12-19 23:32:45 +01:00
|
|
|
The maximum length of the result of function
|
2010-01-06 18:57:10 +01:00
|
|
|
GROUP_CONCAT()
|
2013-03-26 10:35:34 +01:00
|
|
|
--gtid-domain-id=# Used with global transaction ID to identify logically
|
|
|
|
independent replication streams. When events can
|
|
|
|
propagate through multiple parallel paths (for example
|
|
|
|
multiple masters), each independent source server must
|
|
|
|
use a distinct domain_id. For simple tree-shaped
|
|
|
|
replication topologies, it can be left at its default, 0.
|
2014-03-12 00:14:49 +01:00
|
|
|
--gtid-ignore-duplicates
|
|
|
|
When set, different master connections in multi-source
|
|
|
|
replication are allowed to receive and process event
|
|
|
|
groups with the same GTID (when using GTID mode). Only
|
|
|
|
one will be applied, any others will be ignored. Within a
|
|
|
|
given replication domain, just the sequence number will
|
|
|
|
be used to decide whether a given GTID has been already
|
|
|
|
applied; this means it is the responsibility of the user
|
|
|
|
to ensure that GTID sequence numbers are strictly
|
|
|
|
increasing.
|
2013-05-28 13:28:31 +02:00
|
|
|
--gtid-strict-mode Enforce strict seq_no ordering of events in the binary
|
|
|
|
log. Slave stops with an error if it encounters an event
|
|
|
|
that would cause it to generate an out-of-order binlog if
|
|
|
|
executed.
|
2010-01-06 18:57:10 +01:00
|
|
|
-?, --help Display this help and exit.
|
2013-03-26 07:48:29 +01:00
|
|
|
--histogram-size=# Number of bytes used for a histogram. If set to 0, no
|
|
|
|
histograms are created by ANALYZE.
|
2013-03-31 03:57:07 +02:00
|
|
|
--histogram-type=name
|
|
|
|
Specifies type of the histograms created by ANALYZE.
|
|
|
|
Possible values are: SINGLE_PREC_HB - single precision
|
|
|
|
height-balanced, DOUBLE_PREC_HB - double precision
|
|
|
|
height-balanced.
|
2013-07-04 07:38:33 +02:00
|
|
|
--host-cache-size=# How many host names should be cached to avoid resolving.
|
2015-08-11 18:45:38 +02:00
|
|
|
(Automatically configured unless set explicitly)
|
2010-01-06 18:57:10 +01:00
|
|
|
--ignore-builtin-innodb
|
|
|
|
Disable initialization of builtin InnoDB plugin
|
2012-10-18 23:33:06 +02:00
|
|
|
--ignore-db-dirs=name
|
|
|
|
Specifies a directory to add to the ignore list when
|
|
|
|
collecting database names from the datadir. Put a blank
|
|
|
|
argument to reset the list accumulated so far.
|
2010-01-06 18:57:10 +01:00
|
|
|
--init-connect=name Command(s) that are executed for each new connection
|
2011-10-19 21:45:18 +02:00
|
|
|
(unless the user has SUPER privilege)
|
2010-01-06 18:57:10 +01:00
|
|
|
--init-file=name Read SQL commands from this file at startup
|
|
|
|
--init-rpl-role=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Set the replication role. One of: MASTER, SLAVE
|
2010-01-06 18:57:10 +01:00
|
|
|
--init-slave=name Command(s) that are executed by a slave server each time
|
|
|
|
the SQL thread starts
|
|
|
|
--interactive-timeout=#
|
|
|
|
The number of seconds the server waits for activity on an
|
|
|
|
interactive connection before closing it
|
|
|
|
--join-buffer-size=#
|
2011-10-19 21:45:18 +02:00
|
|
|
The size of the buffer that is used for joins
|
|
|
|
--join-buffer-space-limit=#
|
|
|
|
The limit of the space for all join buffers used by a
|
|
|
|
query
|
2011-04-25 17:22:25 +02:00
|
|
|
--join-cache-level=#
|
|
|
|
Controls what join operations can be executed with join
|
|
|
|
buffers. Odd numbers are used for plain join buffers
|
|
|
|
while even numbers are used for linked buffers
|
2010-01-06 18:57:10 +01:00
|
|
|
--keep-files-on-create
|
|
|
|
Don't overwrite stale .MYD and .MYI even if no directory
|
|
|
|
is specified
|
|
|
|
--key-buffer-size=# The size of the buffer used for index blocks for MyISAM
|
|
|
|
tables. Increase this to get better index handling (for
|
|
|
|
all reads and multiple writes) to as much as you can
|
|
|
|
afford
|
|
|
|
--key-cache-age-threshold=#
|
|
|
|
This characterizes the number of hits a hot block has to
|
|
|
|
be untouched until it is considered aged enough to be
|
|
|
|
downgraded to a warm block. This specifies the percentage
|
|
|
|
ratio of that number of hits to the total number of
|
|
|
|
blocks in key cache
|
|
|
|
--key-cache-block-size=#
|
|
|
|
The default size of key cache blocks
|
|
|
|
--key-cache-division-limit=#
|
|
|
|
The minimum percentage of warm blocks in key cache
|
2014-07-19 16:46:08 +02:00
|
|
|
--key-cache-file-hash-size=#
|
|
|
|
Number of hash buckets for open and changed files. If
|
|
|
|
you have a lot of MyISAM files open you should increase
|
|
|
|
this for faster flush of changes. A good value is
|
|
|
|
probably 1/10 of number of possible open MyISAM files.
|
2011-04-25 17:22:25 +02:00
|
|
|
--key-cache-segments=#
|
|
|
|
The number of segments in a key cache
|
2010-01-06 18:57:10 +01:00
|
|
|
-L, --language=name Client error messages in given language. May be given as
|
|
|
|
a full path. Deprecated. Use --lc-messages-dir instead.
|
|
|
|
--large-pages Enable support for large pages
|
|
|
|
--lc-messages=name Set the language used for the error messages.
|
|
|
|
-L, --lc-messages-dir=name
|
|
|
|
Directory where error messages are
|
|
|
|
--lc-time-names=name
|
|
|
|
Set the language used for the month names and the days of
|
|
|
|
the week.
|
|
|
|
--local-infile Enable LOAD DATA LOCAL INFILE
|
|
|
|
(Defaults to on; use --skip-local-infile to disable.)
|
2010-02-16 23:19:47 +01:00
|
|
|
--lock-wait-timeout=#
|
|
|
|
Timeout in seconds to wait for a lock before returning an
|
|
|
|
error.
|
2011-10-19 21:45:18 +02:00
|
|
|
--log-basename=name Basename for all log files and the .pid file. This sets
|
|
|
|
all log file names at once (in 'datadir') and is normally
|
2011-10-28 14:24:02 +02:00
|
|
|
the only option you need for specifying log files. Sets
|
|
|
|
names for --log-bin, --log-bin-index, --relay-log,
|
2011-10-19 21:45:18 +02:00
|
|
|
--relay-log-index, --general-log-file,
|
2011-10-28 14:24:02 +02:00
|
|
|
--log-slow-query-log-file, --log-error-file, and
|
2011-10-19 21:45:18 +02:00
|
|
|
--pid-file
|
|
|
|
--log-bin[=name] Log update queries in binary format. Optional argument
|
|
|
|
should be name for binary log. If not given
|
2011-11-28 17:48:19 +01:00
|
|
|
'datadir'/'log-basename'-bin or 'datadir'/mysql-bin will
|
|
|
|
be used (the later if --log-basename is not specified).
|
|
|
|
We strongly recommend to use either --log-basename or
|
2011-10-19 21:45:18 +02:00
|
|
|
specify a filename to ensure that replication doesn't
|
2011-11-28 17:48:19 +01:00
|
|
|
stop if the real hostname of the computer changes.
|
2016-10-14 12:55:37 +02:00
|
|
|
--log-bin-compress Whether the binary log can be compressed
|
|
|
|
--log-bin-compress-min-len[=#]
|
|
|
|
Minimum length of sql statement(in statement mode) or
|
|
|
|
record(in row mode)that can be compressed.
|
2010-01-06 18:57:10 +01:00
|
|
|
--log-bin-index=name
|
|
|
|
File that holds the names for last binary log files.
|
|
|
|
--log-bin-trust-function-creators
|
|
|
|
If set to FALSE (the default), then when --log-bin is
|
|
|
|
used, creation of a stored function (or trigger) is
|
|
|
|
allowed only to users having the SUPER privilege and only
|
|
|
|
if this stored function (trigger) may not break binary
|
|
|
|
logging. Note that if ALL connections to this server
|
|
|
|
ALWAYS use row-based binary logging, the security issues
|
|
|
|
do not exist and the binary logging cannot break, so you
|
|
|
|
can safely set this to TRUE
|
2011-10-19 21:45:18 +02:00
|
|
|
--log-error[=name] Log errors to file (instead of stdout). If file name is
|
|
|
|
not specified then 'datadir'/'log-basename'.err or the
|
2011-11-28 17:48:19 +01:00
|
|
|
'pid-file' path with extension .err is used
|
2010-01-06 18:57:10 +01:00
|
|
|
--log-isam[=name] Log all MyISAM changes to file.
|
2014-06-19 12:02:23 +02:00
|
|
|
--log-output=name How logs should be written. Any combination of: NONE,
|
|
|
|
FILE, TABLE
|
2010-01-06 18:57:10 +01:00
|
|
|
--log-queries-not-using-indexes
|
|
|
|
Log queries that are executed without benefit of any
|
|
|
|
index to the slow log if it is open
|
|
|
|
--log-short-format Don't log extra information to update and slow-query
|
|
|
|
logs.
|
|
|
|
--log-slave-updates Tells the slave to log the updates from the slave thread
|
|
|
|
to the binary log. You will need to turn it on if you
|
|
|
|
plan to daisy-chain the slaves
|
|
|
|
--log-slow-admin-statements
|
|
|
|
Log slow OPTIMIZE, ANALYZE, ALTER and other
|
|
|
|
administrative statements to the slow log if it is open.
|
2016-12-19 23:32:45 +01:00
|
|
|
(Defaults to on; use --skip-log-slow-admin-statements to disable.)
|
2011-04-25 17:22:25 +02:00
|
|
|
--log-slow-filter=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Log only certain types of queries. Any combination of:
|
|
|
|
admin, filesort, filesort_on_disk, full_join, full_scan,
|
|
|
|
query_cache, query_cache_miss, tmp_table,
|
2011-04-25 17:22:25 +02:00
|
|
|
tmp_table_on_disk
|
|
|
|
--log-slow-rate-limit=#
|
|
|
|
Write to slow log every #th slow query. Set to 1 to log
|
|
|
|
everything. Increase it to reduce the size of the slow or
|
|
|
|
the performance impact of slow logging
|
2010-01-06 18:57:10 +01:00
|
|
|
--log-slow-slave-statements
|
|
|
|
Log slow statements executed by slave thread to the slow
|
|
|
|
log if it is open.
|
2016-12-19 23:32:45 +01:00
|
|
|
(Defaults to on; use --skip-log-slow-slave-statements to disable.)
|
2011-04-25 17:22:25 +02:00
|
|
|
--log-slow-verbosity=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Verbosity level for the slow log. Any combination of:
|
|
|
|
innodb, query_plan, explain
|
2010-01-06 18:57:10 +01:00
|
|
|
--log-tc=name Path to transaction coordinator log (used for
|
|
|
|
transactions that affect more than one storage engine,
|
2010-02-24 14:52:27 +01:00
|
|
|
when binary log is disabled).
|
2010-01-06 18:57:10 +01:00
|
|
|
--log-tc-size=# Size of transaction coordinator log.
|
|
|
|
-W, --log-warnings[=#]
|
2011-11-22 18:04:38 +01:00
|
|
|
Log some not critical warnings to the general log
|
|
|
|
file.Value can be between 0 and 11. Higher values mean
|
|
|
|
more verbosity
|
2010-01-06 18:57:10 +01:00
|
|
|
--long-query-time=# Log all queries that have taken more than long_query_time
|
|
|
|
seconds to execute to file. The argument will be treated
|
|
|
|
as a decimal value with microsecond precision
|
|
|
|
--low-priority-updates
|
|
|
|
INSERT/DELETE/UPDATE has lower priority than selects
|
|
|
|
--lower-case-table-names[=#]
|
|
|
|
If set to 1 table names are stored in lowercase on disk
|
|
|
|
and table names will be case-insensitive. Should be set
|
|
|
|
to 2 if you are using a case insensitive file system
|
|
|
|
--master-info-file=name
|
|
|
|
The location and name of the file that remembers the
|
|
|
|
master and where the I/O replication thread is in the
|
2011-10-19 21:45:18 +02:00
|
|
|
master's binlogs. Defaults to master.info
|
2010-01-06 18:57:10 +01:00
|
|
|
--master-retry-count=#
|
|
|
|
The number of tries the slave will make to connect to the
|
|
|
|
master before giving up.
|
2011-10-19 21:45:18 +02:00
|
|
|
--master-verify-checksum
|
|
|
|
Force checksum verification of logged events in the
|
|
|
|
binary log before sending them to slaves or printing them
|
|
|
|
in the output of SHOW BINLOG EVENTS
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-allowed-packet=#
|
|
|
|
Max packet length to send to or receive from the server
|
|
|
|
--max-binlog-cache-size=#
|
2010-11-05 18:42:37 +01:00
|
|
|
Sets the total size of the transactional cache
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-binlog-size=# Binary log will be rotated automatically when the size
|
Implementation of Multi-source replication (MDEV:253)
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
2012-10-04 00:37:58 +02:00
|
|
|
exceeds this value.
|
2010-11-05 18:42:37 +01:00
|
|
|
--max-binlog-stmt-cache-size=#
|
|
|
|
Sets the total size of the statement cache
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-connect-errors=#
|
|
|
|
If there is more than this number of interrupted
|
|
|
|
connections from a host this host will be blocked from
|
|
|
|
further connections
|
|
|
|
--max-connections=# The number of simultaneous clients allowed
|
|
|
|
--max-delayed-threads=#
|
|
|
|
Don't start more than this number of threads to handle
|
|
|
|
INSERT DELAYED statements. If set to zero INSERT DELAYED
|
|
|
|
will be not used
|
2015-05-05 15:23:47 +02:00
|
|
|
--max-digest-length=#
|
|
|
|
Maximum length considered for digest text.
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-error-count=# Max number of errors/warnings to store for a statement
|
|
|
|
--max-heap-table-size=#
|
|
|
|
Don't allow creation of heap tables bigger than this
|
|
|
|
--max-join-size=# Joins that are probably going to read more than
|
|
|
|
max_join_size records return an error
|
|
|
|
--max-length-for-sort-data=#
|
|
|
|
Max number of bytes in sorted records
|
2011-03-15 13:57:36 +01:00
|
|
|
--max-long-data-size=#
|
|
|
|
The maximum BLOB length to send to server from
|
|
|
|
mysql_send_long_data API. Deprecated option; use
|
|
|
|
max_allowed_packet instead.
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-prepared-stmt-count=#
|
|
|
|
Maximum number of prepared statements in the server
|
2016-08-11 00:51:40 +02:00
|
|
|
--max-recursive-iterations[=#]
|
2016-05-24 20:29:52 +02:00
|
|
|
Maximum number of iterations when executing recursive
|
|
|
|
queries
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-relay-log-size=#
|
Implementation of Multi-source replication (MDEV:253)
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
2012-10-04 00:37:58 +02:00
|
|
|
relay log will be rotated automatically when the size
|
2014-09-03 15:16:43 +02:00
|
|
|
exceeds this value. If 0 at startup, it's set to
|
Implementation of Multi-source replication (MDEV:253)
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
2012-10-04 00:37:58 +02:00
|
|
|
max_binlog_size
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-seeks-for-key=#
|
|
|
|
Limit assumed max number of seeks when looking up rows
|
|
|
|
based on a key
|
2016-12-12 01:01:56 +01:00
|
|
|
--max-session-mem-used=#
|
|
|
|
Amount of memory a single user session is allowed to
|
|
|
|
allocate. This limits the value of the session variable
|
|
|
|
MEM_USED
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-sort-length=# The number of bytes to use when sorting BLOB or TEXT
|
|
|
|
values (only the first max_sort_length bytes of each
|
|
|
|
value are used; the rest are ignored)
|
|
|
|
--max-sp-recursion-depth[=#]
|
|
|
|
Maximum stored procedure recursion depth
|
2014-10-07 10:37:36 +02:00
|
|
|
--max-statement-time=#
|
|
|
|
A SELECT query that have taken more than
|
|
|
|
max_statement_time seconds will be aborted. The argument
|
|
|
|
will be treated as a decimal value with microsecond
|
|
|
|
precision. A value of 0 (default) means no timeout
|
2014-11-29 00:52:48 +01:00
|
|
|
--max-tmp-tables=# Unused, will be removed.
|
2010-01-06 18:57:10 +01:00
|
|
|
--max-user-connections=#
|
|
|
|
The maximum number of active connections for a single
|
|
|
|
user (0 = no limit)
|
|
|
|
--max-write-lock-count=#
|
|
|
|
After this many write locks, allow some read locks to run
|
|
|
|
in between
|
|
|
|
--memlock Lock mysqld in memory.
|
2011-11-15 19:00:14 +01:00
|
|
|
--metadata-locks-cache-size=#
|
2015-02-26 10:11:30 +01:00
|
|
|
Unused
|
2013-07-04 07:38:33 +02:00
|
|
|
--metadata-locks-hash-instances=#
|
2015-02-26 10:12:01 +01:00
|
|
|
Unused
|
2010-01-06 18:57:10 +01:00
|
|
|
--min-examined-row-limit=#
|
|
|
|
Don't write queries to slow log that examine fewer rows
|
|
|
|
than that
|
2011-04-25 17:22:25 +02:00
|
|
|
--mrr-buffer-size=# Size of buffer to use when using MRR with range access
|
2011-07-02 22:12:12 +02:00
|
|
|
--multi-range-count=#
|
|
|
|
Ignored. Use mrr_buffer_size instead
|
2010-01-06 18:57:10 +01:00
|
|
|
--myisam-block-size=#
|
|
|
|
Block size to be used for MyISAM index pages
|
|
|
|
--myisam-data-pointer-size=#
|
|
|
|
Default pointer size to be used for MyISAM tables
|
|
|
|
--myisam-max-sort-file-size=#
|
|
|
|
Don't use the fast sort index method to created index if
|
|
|
|
the temporary file would get bigger than this
|
|
|
|
--myisam-mmap-size=#
|
|
|
|
Restricts the total memory used for memory mapping of
|
|
|
|
MySQL tables
|
|
|
|
--myisam-recover-options[=name]
|
2014-06-19 12:02:23 +02:00
|
|
|
Specifies how corrupted tables should be automatically
|
|
|
|
repaired. Any combination of: DEFAULT, BACKUP, FORCE,
|
|
|
|
QUICK, BACKUP_ALL, OFF
|
2010-01-06 18:57:10 +01:00
|
|
|
--myisam-repair-threads=#
|
|
|
|
If larger than 1, when repairing a MyISAM table all
|
|
|
|
indexes will be created in parallel, with one thread per
|
|
|
|
index. The value of 1 disables parallel repair
|
|
|
|
--myisam-sort-buffer-size=#
|
|
|
|
The buffer that is allocated when sorting the index when
|
|
|
|
doing a REPAIR or when creating indexes with CREATE INDEX
|
|
|
|
or ALTER TABLE
|
|
|
|
--myisam-stats-method=name
|
|
|
|
Specifies how MyISAM index statistics collection code
|
|
|
|
should treat NULLs. Possible values of name are
|
|
|
|
NULLS_UNEQUAL (default behavior for 4.1 and later),
|
|
|
|
NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
|
|
|
|
--myisam-use-mmap Use memory mapping for reading and writing MyISAM tables
|
2014-11-03 18:45:06 +01:00
|
|
|
--mysql56-temporal-format
|
|
|
|
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
|
|
|
|
DATETIME, TIMESTAMP columns.
|
|
|
|
(Defaults to on; use --skip-mysql56-temporal-format to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--net-buffer-length=#
|
|
|
|
Buffer length for TCP/IP and socket communication
|
|
|
|
--net-read-timeout=#
|
|
|
|
Number of seconds to wait for more data from a connection
|
|
|
|
before aborting the read
|
|
|
|
--net-retry-count=# If a read on a communication port is interrupted, retry
|
|
|
|
this many times before giving up
|
|
|
|
--net-write-timeout=#
|
|
|
|
Number of seconds to wait for a block to be written to a
|
|
|
|
connection before aborting the write
|
2014-01-26 21:48:42 +01:00
|
|
|
--old Use compatible behavior from previous MariaDB version.
|
|
|
|
See also --old-mode
|
2010-01-06 18:57:10 +01:00
|
|
|
--old-alter-table Use old, non-optimized alter table
|
2014-01-26 21:48:42 +01:00
|
|
|
--old-mode=name Used to emulate old behavior from earlier MariaDB or
|
2014-06-19 12:02:23 +02:00
|
|
|
MySQL versions. Any combination of:
|
|
|
|
NO_DUP_KEY_WARNINGS_WITH_IGNORE, NO_PROGRESS_INFO,
|
|
|
|
ZERO_DATE_TIME_CAST
|
2010-01-06 18:57:10 +01:00
|
|
|
--old-passwords Use old password encryption method (needed for 4.0 and
|
|
|
|
older clients)
|
|
|
|
--old-style-user-limits
|
2010-02-24 14:52:27 +01:00
|
|
|
Enable old-style user limits (before 5.0.3, user
|
|
|
|
resources were counted per each user+host vs. per
|
|
|
|
account).
|
2010-01-06 18:57:10 +01:00
|
|
|
--open-files-limit=#
|
|
|
|
If this is not 0, then mysqld will use this value to
|
|
|
|
reserve file descriptors to use with setrlimit(). If this
|
|
|
|
value is 0 then mysqld will reserve max_connections*5 or
|
|
|
|
max_connections + table_cache*2 (whichever is larger)
|
|
|
|
number of file descriptors
|
|
|
|
--optimizer-prune-level=#
|
|
|
|
Controls the heuristic(s) applied during query
|
|
|
|
optimization to prune less-promising partial plans from
|
|
|
|
the optimizer search space. Meaning: 0 - do not apply any
|
|
|
|
heuristic, thus perform exhaustive search; 1 - prune
|
|
|
|
plans based on number of retrieved rows
|
|
|
|
--optimizer-search-depth=#
|
|
|
|
Maximum depth of search performed by the query optimizer.
|
|
|
|
Values larger than the number of relations in a query
|
|
|
|
result in better query plans, but take longer to compile
|
|
|
|
a query. Values smaller than the number of tables in a
|
|
|
|
relation result in faster optimization, but may produce
|
|
|
|
very bad query plans. If set to 0, the system will
|
2015-11-19 10:56:30 +01:00
|
|
|
automatically pick a reasonable value
|
2013-04-18 21:22:04 +02:00
|
|
|
--optimizer-selectivity-sampling-limit=#
|
|
|
|
Controls number of record samples to check condition
|
|
|
|
selectivity
|
2010-01-06 18:57:10 +01:00
|
|
|
--optimizer-switch=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Fine-tune the optimizer behavior. Takes a comma-separated
|
|
|
|
list of option=value pairs, where value is on, off, or
|
|
|
|
default, and options are: index_merge, index_merge_union,
|
|
|
|
index_merge_sort_union, index_merge_intersection,
|
|
|
|
index_merge_sort_intersection, engine_condition_pushdown,
|
|
|
|
index_condition_pushdown, derived_merge,
|
|
|
|
derived_with_keys, firstmatch, loosescan, materialization,
|
|
|
|
in_to_exists, semijoin, partial_match_rowid_merge,
|
|
|
|
partial_match_table_scan, subquery_cache, mrr,
|
|
|
|
mrr_cost_based, mrr_sort_keys, outer_join_with_cache,
|
|
|
|
semijoin_with_cache, join_cache_incremental,
|
|
|
|
join_cache_hashed, join_cache_bka,
|
|
|
|
optimize_join_buffer_size, table_elimination,
|
2016-09-02 08:37:27 +02:00
|
|
|
extended_keys, exists_to_in, orderby_uses_equalities,
|
|
|
|
condition_pushdown_for_derived
|
2013-03-11 15:44:24 +01:00
|
|
|
--optimizer-use-condition-selectivity=#
|
|
|
|
Controls selectivity of which conditions the optimizer
|
|
|
|
takes into account to calculate cardinality of a partial
|
|
|
|
join when it searches for the best execution plan
|
|
|
|
Meaning: 1 - use selectivity of index backed range
|
2013-03-26 07:48:29 +01:00
|
|
|
conditions to calculate the cardinality of a partial join
|
2013-03-11 15:44:24 +01:00
|
|
|
if the last joined table is accessed by full table scan
|
2013-03-26 07:48:29 +01:00
|
|
|
or an index scan, 2 - use selectivity of index backed
|
|
|
|
range conditions to calculate the cardinality of a
|
|
|
|
partial join in any case, 3 - additionally always use
|
|
|
|
selectivity of range conditions that are not backed by
|
|
|
|
any index to calculate the cardinality of a partial join,
|
|
|
|
4 - use histograms to calculate selectivity of range
|
|
|
|
conditions that are not backed by any index to calculate
|
2013-04-18 21:22:04 +02:00
|
|
|
the cardinality of a partial join.5 - additionally use
|
|
|
|
selectivity of certain non-range predicates calculated on
|
|
|
|
record samples
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema
|
|
|
|
Enable the performance schema.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-accounts-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented user@host accounts. Use 0
|
|
|
|
to disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-consumer-events-stages-current
|
|
|
|
Default startup value for the events_stages_current
|
|
|
|
consumer.
|
|
|
|
--performance-schema-consumer-events-stages-history
|
|
|
|
Default startup value for the events_stages_history
|
|
|
|
consumer.
|
|
|
|
--performance-schema-consumer-events-stages-history-long
|
|
|
|
Default startup value for the events_stages_history_long
|
|
|
|
consumer.
|
|
|
|
--performance-schema-consumer-events-statements-current
|
|
|
|
Default startup value for the events_statements_current
|
|
|
|
consumer.
|
|
|
|
(Defaults to on; use --skip-performance-schema-consumer-events-statements-current to disable.)
|
|
|
|
--performance-schema-consumer-events-statements-history
|
|
|
|
Default startup value for the events_statements_history
|
|
|
|
consumer.
|
|
|
|
--performance-schema-consumer-events-statements-history-long
|
|
|
|
Default startup value for the
|
|
|
|
events_statements_history_long consumer.
|
|
|
|
--performance-schema-consumer-events-waits-current
|
|
|
|
Default startup value for the events_waits_current
|
|
|
|
consumer.
|
|
|
|
--performance-schema-consumer-events-waits-history
|
|
|
|
Default startup value for the events_waits_history
|
|
|
|
consumer.
|
|
|
|
--performance-schema-consumer-events-waits-history-long
|
|
|
|
Default startup value for the events_waits_history_long
|
|
|
|
consumer.
|
|
|
|
--performance-schema-consumer-global-instrumentation
|
|
|
|
Default startup value for the global_instrumentation
|
|
|
|
consumer.
|
|
|
|
(Defaults to on; use --skip-performance-schema-consumer-global-instrumentation to disable.)
|
|
|
|
--performance-schema-consumer-statements-digest
|
|
|
|
Default startup value for the statements_digest consumer.
|
|
|
|
(Defaults to on; use --skip-performance-schema-consumer-statements-digest to disable.)
|
|
|
|
--performance-schema-consumer-thread-instrumentation
|
|
|
|
Default startup value for the thread_instrumentation
|
|
|
|
consumer.
|
|
|
|
(Defaults to on; use --skip-performance-schema-consumer-thread-instrumentation to disable.)
|
|
|
|
--performance-schema-digests-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Size of the statement digest. Use 0 to disable, -1 for
|
|
|
|
automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-events-stages-history-long-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to
|
|
|
|
disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-events-stages-history-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0
|
|
|
|
to disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-events-statements-history-long-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0
|
|
|
|
to disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-events-statements-history-size=#
|
|
|
|
Number of rows per thread in EVENTS_STATEMENTS_HISTORY.
|
2013-07-04 07:38:33 +02:00
|
|
|
Use 0 to disable, -1 for automated sizing.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-events-waits-history-long-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to
|
|
|
|
disable, -1 for automated sizing.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-events-waits-history-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0
|
|
|
|
to disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-hosts-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented hosts. Use 0 to disable,
|
|
|
|
-1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-instrument[=name]
|
|
|
|
Default startup value for a performance schema
|
|
|
|
instrument.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-max-cond-classes=#
|
|
|
|
Maximum number of condition instruments.
|
|
|
|
--performance-schema-max-cond-instances=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented condition objects. Use 0
|
|
|
|
to disable, -1 for automated sizing.
|
2015-08-03 16:34:59 +02:00
|
|
|
--performance-schema-max-digest-length=#
|
|
|
|
Maximum length considered for digest text, when stored in
|
|
|
|
performance_schema tables.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-max-file-classes=#
|
|
|
|
Maximum number of file instruments.
|
|
|
|
--performance-schema-max-file-handles=#
|
|
|
|
Maximum number of opened instrumented files.
|
|
|
|
--performance-schema-max-file-instances=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented files. Use 0 to disable,
|
|
|
|
-1 for automated sizing.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-max-mutex-classes=#
|
|
|
|
Maximum number of mutex instruments.
|
|
|
|
--performance-schema-max-mutex-instances=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented MUTEX objects. Use 0 to
|
|
|
|
disable, -1 for automated sizing.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-max-rwlock-classes=#
|
|
|
|
Maximum number of rwlock instruments.
|
|
|
|
--performance-schema-max-rwlock-instances=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented RWLOCK objects. Use 0 to
|
|
|
|
disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-max-socket-classes=#
|
|
|
|
Maximum number of socket instruments.
|
|
|
|
--performance-schema-max-socket-instances=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of opened instrumented sockets. Use 0 to
|
|
|
|
disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-max-stage-classes=#
|
|
|
|
Maximum number of stage instruments.
|
|
|
|
--performance-schema-max-statement-classes=#
|
|
|
|
Maximum number of statement instruments.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-max-table-handles=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of opened instrumented tables. Use 0 to
|
|
|
|
disable, -1 for automated sizing.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-max-table-instances=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented tables. Use 0 to disable,
|
|
|
|
-1 for automated sizing.
|
2010-01-14 16:07:27 +01:00
|
|
|
--performance-schema-max-thread-classes=#
|
|
|
|
Maximum number of thread instruments.
|
|
|
|
--performance-schema-max-thread-instances=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented threads. Use 0 to disable,
|
|
|
|
-1 for automated sizing.
|
|
|
|
--performance-schema-session-connect-attrs-size=#
|
|
|
|
Size of session attribute string buffer per thread. Use 0
|
|
|
|
to disable, -1 for automated sizing.
|
2012-08-22 23:32:25 +02:00
|
|
|
--performance-schema-setup-actors-size=#
|
|
|
|
Maximum number of rows in SETUP_ACTORS.
|
|
|
|
--performance-schema-setup-objects-size=#
|
|
|
|
Maximum number of rows in SETUP_OBJECTS.
|
|
|
|
--performance-schema-users-size=#
|
2013-07-04 07:38:33 +02:00
|
|
|
Maximum number of instrumented users. Use 0 to disable,
|
|
|
|
-1 for automated sizing.
|
2010-01-06 18:57:10 +01:00
|
|
|
--pid-file=name Pid file used by safe_mysqld
|
|
|
|
--plugin-dir=name Directory for plugins
|
2011-11-28 17:48:19 +01:00
|
|
|
--plugin-load=name Semicolon-separated list of plugins to load, where each
|
|
|
|
plugin is specified as ether a plugin_name=library_file
|
|
|
|
pair or only a library_file. If the latter case, all
|
|
|
|
plugins from a given library_file will be loaded.
|
2012-12-15 18:24:11 +01:00
|
|
|
--plugin-load-add=name
|
|
|
|
Optional semicolon-separated list of plugins to load.
|
2014-05-13 11:53:30 +02:00
|
|
|
This option adds to the list specified by --plugin-load
|
2012-12-15 18:24:11 +01:00
|
|
|
in an incremental way. It can be specified many times,
|
|
|
|
adding more plugins every time.
|
2011-04-25 17:22:25 +02:00
|
|
|
--plugin-maturity=name
|
2014-06-19 12:02:23 +02:00
|
|
|
The lowest desirable plugin maturity. Plugins less mature
|
|
|
|
than that will not be installed or loaded. One of:
|
|
|
|
unknown, experimental, alpha, beta, gamma, stable
|
2010-01-06 18:57:10 +01:00
|
|
|
-P, --port=# Port number to use for connection or 0 to default to,
|
|
|
|
my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
|
|
|
|
(3306), whatever comes first
|
|
|
|
--port-open-timeout=#
|
|
|
|
Maximum time in seconds to wait for the port to become
|
2010-02-24 14:52:27 +01:00
|
|
|
free. (Default: No wait).
|
2010-01-06 18:57:10 +01:00
|
|
|
--preload-buffer-size=#
|
|
|
|
The size of the buffer that is allocated when preloading
|
|
|
|
indexes
|
|
|
|
--profiling-history-size=#
|
|
|
|
Limit of query profiling memory
|
2011-10-19 21:45:18 +02:00
|
|
|
--progress-report-time=#
|
|
|
|
Seconds between sending progress reports to the client
|
|
|
|
for time-consuming statements. Set to 0 to disable
|
|
|
|
progress reporting.
|
2010-01-06 18:57:10 +01:00
|
|
|
--query-alloc-block-size=#
|
|
|
|
Allocation block size for query parsing and execution
|
|
|
|
--query-cache-limit=#
|
|
|
|
Don't cache results that are bigger than this
|
|
|
|
--query-cache-min-res-unit=#
|
|
|
|
The minimum size for blocks allocated by the query cache
|
|
|
|
--query-cache-size=#
|
|
|
|
The memory allocated to store results from old queries
|
2011-10-19 21:45:18 +02:00
|
|
|
--query-cache-strip-comments
|
|
|
|
Strip all comments from a query before storing it in the
|
|
|
|
query cache
|
2010-01-06 18:57:10 +01:00
|
|
|
--query-cache-type=name
|
|
|
|
OFF = Don't cache or retrieve results. ON = Cache all
|
|
|
|
results except SELECT SQL_NO_CACHE ... queries. DEMAND =
|
|
|
|
Cache only SELECT SQL_CACHE ... queries
|
|
|
|
--query-cache-wlock-invalidate
|
|
|
|
Invalidate queries in query cache on LOCK for write
|
|
|
|
--query-prealloc-size=#
|
|
|
|
Persistent buffer for query parsing and execution
|
|
|
|
--range-alloc-block-size=#
|
|
|
|
Allocation block size for storing ranges during
|
|
|
|
optimization
|
2016-10-11 09:21:20 +02:00
|
|
|
--read-binlog-speed-limit=#
|
|
|
|
Maximum speed(KB/s) to read binlog from master (0 = no
|
|
|
|
limit)
|
2010-01-06 18:57:10 +01:00
|
|
|
--read-buffer-size=#
|
|
|
|
Each thread that does a sequential scan allocates a
|
|
|
|
buffer of this size for each table it scans. If you do
|
|
|
|
many sequential scans, you may want to increase this
|
|
|
|
value
|
|
|
|
--read-only Make all non-temporary tables read-only, with the
|
|
|
|
exception for replication (slave) threads and users with
|
|
|
|
the SUPER privilege
|
|
|
|
--read-rnd-buffer-size=#
|
|
|
|
When reading rows in sorted order after a sort, the rows
|
2010-03-03 20:22:02 +01:00
|
|
|
are read through this buffer to avoid a disk seeks
|
2010-01-06 18:57:10 +01:00
|
|
|
--relay-log=name The location and name to use for relay logs
|
|
|
|
--relay-log-index=name
|
|
|
|
The location and name to use for the file that keeps a
|
|
|
|
list of the last relay logs
|
|
|
|
--relay-log-info-file=name
|
|
|
|
The location and name of the file that remembers where
|
|
|
|
the SQL replication thread is in the relay logs
|
|
|
|
--relay-log-purge if disabled - do not purge relay logs. if enabled - purge
|
|
|
|
them as soon as they are no more needed
|
|
|
|
(Defaults to on; use --skip-relay-log-purge to disable.)
|
|
|
|
--relay-log-recovery
|
|
|
|
Enables automatic relay log recovery right after the
|
|
|
|
database startup, which means that the IO Thread starts
|
|
|
|
re-fetching from the master right after the last
|
|
|
|
transaction processed
|
|
|
|
--relay-log-space-limit=#
|
|
|
|
Maximum space to use for all relay logs
|
2011-11-22 18:04:38 +01:00
|
|
|
--replicate-annotate-row-events
|
2014-05-13 11:53:30 +02:00
|
|
|
Tells the slave to write annotate rows events received
|
2011-10-19 21:45:18 +02:00
|
|
|
from the master to its own binary log. Ignored if
|
|
|
|
log_slave_updates is not set
|
2016-12-19 23:32:45 +01:00
|
|
|
(Defaults to on; use --skip-replicate-annotate-row-events to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--replicate-do-db=name
|
|
|
|
Tells the slave thread to restrict replication to the
|
|
|
|
specified database. To specify more than one database,
|
|
|
|
use the directive multiple times, once for each database.
|
|
|
|
Note that this will only work if you do not use
|
|
|
|
cross-database queries such as UPDATE some_db.some_table
|
|
|
|
SET foo='bar' while having selected a different or no
|
|
|
|
database. If you need cross database updates to work,
|
|
|
|
make sure you have 3.23.28 or later, and use
|
|
|
|
replicate-wild-do-table=db_name.%.
|
|
|
|
--replicate-do-table=name
|
|
|
|
Tells the slave thread to restrict replication to the
|
|
|
|
specified table. To specify more than one table, use the
|
|
|
|
directive multiple times, once for each table. This will
|
|
|
|
work for cross-database updates, in contrast to
|
|
|
|
replicate-do-db.
|
2012-03-01 12:41:49 +01:00
|
|
|
--replicate-events-marked-for-skip=name
|
|
|
|
Whether the slave should replicate events that were
|
|
|
|
created with @@skip_replication=1 on the master. Default
|
|
|
|
REPLICATE (no events are skipped). Other values are
|
|
|
|
FILTER_ON_SLAVE (events will be sent by the master but
|
|
|
|
ignored by the slave) and FILTER_ON_MASTER (events marked
|
|
|
|
with @@skip_replication=1 will be filtered on the master
|
|
|
|
and never be sent to the slave).
|
2010-01-06 18:57:10 +01:00
|
|
|
--replicate-ignore-db=name
|
|
|
|
Tells the slave thread to not replicate to the specified
|
|
|
|
database. To specify more than one database to ignore,
|
|
|
|
use the directive multiple times, once for each database.
|
|
|
|
This option will not work if you use cross database
|
|
|
|
updates. If you need cross database updates to work, make
|
|
|
|
sure you have 3.23.28 or later, and use
|
|
|
|
replicate-wild-ignore-table=db_name.%.
|
|
|
|
--replicate-ignore-table=name
|
|
|
|
Tells the slave thread to not replicate to the specified
|
|
|
|
table. To specify more than one table to ignore, use the
|
|
|
|
directive multiple times, once for each table. This will
|
2010-03-24 16:03:44 +01:00
|
|
|
work for cross-database updates, in contrast to
|
2010-01-06 18:57:10 +01:00
|
|
|
replicate-ignore-db.
|
|
|
|
--replicate-rewrite-db=name
|
|
|
|
Updates to a database with a different name than the
|
|
|
|
original. Example:
|
|
|
|
replicate-rewrite-db=master_db_name->slave_db_name.
|
|
|
|
--replicate-same-server-id
|
|
|
|
In replication, if set to 1, do not skip events having
|
|
|
|
our server id. Default value is 0 (to break infinite
|
|
|
|
loops in circular replication). Can't be set to 1 if
|
|
|
|
--log-slave-updates is used.
|
|
|
|
--replicate-wild-do-table=name
|
|
|
|
Tells the slave thread to restrict replication to the
|
|
|
|
tables that match the specified wildcard pattern. To
|
|
|
|
specify more than one table, use the directive multiple
|
|
|
|
times, once for each table. This will work for
|
|
|
|
cross-database updates. Example:
|
|
|
|
replicate-wild-do-table=foo%.bar% will replicate only
|
|
|
|
updates to tables in all databases that start with foo
|
|
|
|
and whose table names start with bar.
|
|
|
|
--replicate-wild-ignore-table=name
|
|
|
|
Tells the slave thread to not replicate to the tables
|
|
|
|
that match the given wildcard pattern. To specify more
|
|
|
|
than one table to ignore, use the directive multiple
|
|
|
|
times, once for each table. This will work for
|
|
|
|
cross-database updates. Example:
|
|
|
|
replicate-wild-ignore-table=foo%.bar% will not do updates
|
|
|
|
to tables in databases that start with foo and whose
|
|
|
|
table names start with bar.
|
|
|
|
--report-host=name Hostname or IP of the slave to be reported to the master
|
|
|
|
during slave registration. Will appear in the output of
|
|
|
|
SHOW SLAVE HOSTS. Leave unset if you do not want the
|
|
|
|
slave to register itself with the master. Note that it is
|
|
|
|
not sufficient for the master to simply read the IP of
|
|
|
|
the slave off the socket once the slave connects. Due to
|
|
|
|
NAT and other routing issues, that IP may not be valid
|
|
|
|
for connecting to the slave from the master or other
|
|
|
|
hosts
|
|
|
|
--report-password=name
|
|
|
|
The account password of the slave to be reported to the
|
|
|
|
master during slave registration
|
|
|
|
--report-port=# Port for connecting to slave reported to the master
|
|
|
|
during slave registration. Set it only if the slave is
|
|
|
|
listening on a non-default port or if you have a special
|
|
|
|
tunnel from the master or other clients to the slave. If
|
|
|
|
not sure, leave this option unset
|
|
|
|
--report-user=name The account user name of the slave to be reported to the
|
|
|
|
master during slave registration
|
2011-04-25 17:22:25 +02:00
|
|
|
--rowid-merge-buff-size=#
|
|
|
|
The size of the buffers used [NOT] IN evaluation via
|
|
|
|
partial matching
|
2012-05-23 12:27:32 +02:00
|
|
|
--safe-mode Skip some optimize stages (for testing). Deprecated.
|
2010-01-06 18:57:10 +01:00
|
|
|
--safe-user-create Don't allow new user creation by the user who has no
|
|
|
|
write privileges to the mysql.user table.
|
|
|
|
--secure-auth Disallow authentication for accounts that have old
|
|
|
|
(pre-4.1) passwords
|
2015-08-11 18:45:38 +02:00
|
|
|
(Defaults to on; use --skip-secure-auth to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--secure-file-priv=name
|
|
|
|
Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
|
|
|
|
files within specified directory
|
|
|
|
--server-id=# Uniquely identifies the server instance in the community
|
|
|
|
of replication partners
|
2016-04-15 20:40:25 +02:00
|
|
|
--session-track-schema
|
2016-05-30 21:22:50 +02:00
|
|
|
Track changes to the default schema.
|
2016-04-15 20:40:25 +02:00
|
|
|
(Defaults to on; use --skip-session-track-schema to disable.)
|
|
|
|
--session-track-state-change
|
2016-05-30 21:22:50 +02:00
|
|
|
Track changes to the session state.
|
2016-04-15 20:47:45 +02:00
|
|
|
--session-track-system-variables=name
|
2016-08-09 15:49:30 +02:00
|
|
|
Track changes in registered system variables. For
|
|
|
|
compatibility with MySQL defaults this variable should be
|
|
|
|
set to "autocommit, character_set_client,
|
|
|
|
character_set_connection, character_set_results,
|
|
|
|
time_zone"
|
2016-05-30 21:22:50 +02:00
|
|
|
--session-track-transaction-info=name
|
|
|
|
Track changes to the transaction attributes. OFF to
|
|
|
|
disable; STATE to track just transaction state (Is there
|
|
|
|
an active transaction? Does it have any data? etc.);
|
|
|
|
CHARACTERISTICS to track transaction state and report all
|
|
|
|
statements needed to start a transaction withthe same
|
|
|
|
characteristics (isolation level, read only/read
|
|
|
|
write,snapshot - but not any work done / data modified
|
|
|
|
within the transaction).
|
2010-01-06 18:57:10 +01:00
|
|
|
--show-slave-auth-info
|
2010-02-24 14:52:27 +01:00
|
|
|
Show user and password in SHOW SLAVE HOSTS on this
|
|
|
|
master.
|
2015-10-11 11:53:02 +02:00
|
|
|
--silent-startup Don't print [Note] to the error log during startup.
|
2015-08-12 23:03:45 +02:00
|
|
|
--skip-bdb Deprecated option; Exist only for compatibility with old
|
2011-04-25 17:22:25 +02:00
|
|
|
my.cnf files
|
2010-01-06 18:57:10 +01:00
|
|
|
--skip-grant-tables Start without grant tables. This gives all users FULL
|
2010-02-24 14:52:27 +01:00
|
|
|
ACCESS to all tables.
|
2010-01-06 18:57:10 +01:00
|
|
|
--skip-host-cache Don't cache host names.
|
|
|
|
--skip-name-resolve Don't resolve hostnames. All hostnames are IP's or
|
|
|
|
'localhost'.
|
|
|
|
--skip-networking Don't allow connection with TCP/IP
|
|
|
|
--skip-show-database
|
|
|
|
Don't allow 'SHOW DATABASE' commands
|
|
|
|
--skip-slave-start If set, slave is not autostarted.
|
|
|
|
--slave-compressed-protocol
|
|
|
|
Use compression on master/slave protocol
|
2014-02-05 18:01:59 +01:00
|
|
|
--slave-ddl-exec-mode=name
|
2014-03-28 08:31:24 +01:00
|
|
|
How replication events should be executed. Legal values
|
|
|
|
are STRICT and IDEMPOTENT (default). In IDEMPOTENT mode,
|
|
|
|
replication will not stop for DDL operations that are
|
|
|
|
idempotent. This means that CREATE TABLE is treated as
|
|
|
|
CREATE TABLE OR REPLACE and DROP TABLE is treated as DROP
|
|
|
|
TABLE IF EXISTS.
|
MDEV-5657: Parallel replication.
Clean up and improve the parallel implementation code, mainly related to
scheduling of work to threads and handling of stop and errors.
Fix a lot of bugs in various corner cases that could lead to crashes or
corruption.
Fix that a single replication domain could easily grab all worker threads and
stall all other domains; now a configuration variable
--slave-domain-parallel-threads allows to limit the number of
workers.
Allow next event group to start as soon as previous group begins the commit
phase (as opposed to when it ends it); this allows multiple event groups on
the slave to participate in group commit, even when no other opportunities for
parallelism are available.
Various fixes:
- Fix some races in the rpl.rpl_parallel test case.
- Fix an old incorrect assertion in Log_event iocache read.
- Fix repeated malloc/free of wait_for_commit and rpl_group_info objects.
- Simplify wait_for_commit wakeup logic.
- Fix one case in queue_for_group_commit() where killing one thread would
fail to correctly signal the error to the next, causing loss of the
transaction after slave restart.
- Fix leaking of pthreads (and their allocated stack) due to missing
PTHREAD_CREATE_DETACHED attribute.
- Fix how one batch of group-committed transactions wait for the previous
batch before starting to execute themselves. The old code had a very
complex scheduling where the first transaction was handled differently,
with subtle bugs in corner cases. Now each event group is always scheduled
for a new worker (in a round-robin fashion amongst available workers).
Keep a count of how many transactions have started to commit, and wait for
that counter to reach the appropriate value.
- Fix slave stop to wait for all workers to actually complete processing;
before, the wait was for update of last_committed_sub_id, which happens a
bit earlier, and could leave worker threads potentially accessing bits of
the replication state that is no longer valid after slave stop.
- Fix a couple of places where the test suite would kill a thread waiting
inside enter_cond() in connection with debug_sync; debug_sync + kill can
crash in rare cases due to a race with mysys_var_current_mutex in this
case.
- Fix some corner cases where we had enter_cond() but no exit_cond().
- Fix that we could get failure in wait_for_prior_commit() but forget to flag
the error with my_error().
- Fix slave stop (both for normal stop and stop due to error). Now, at stop
we pick a specific safe point (in terms of event groups executed) and make
sure that all event groups before that point are executed to completion,
and that no event group after start executing; this ensures a safe place to
restart replication, even for non-transactional stuff/DDL. In error stop,
make sure that all prior event groups are allowed to execute to completion,
and that any later event groups that have started are rolled back, if
possible. The old code could leave eg. T1 and T3 committed but T2 not, or
it could even leave half a transaction not rolled back in some random
worker, which would cause big problems when that worker was later reused
after slave restart.
- Fix the accounting of amount of events queued for one worker. Before, the
amount was reduced immediately as soon as the events were dequeued (which
happens all at once); this allowed twice the amount of events to be queued
in memory for each single worker, which is not what users would expect.
- Fix that an error set during execution of one event was sometimes not
cleared before executing the next, causing problems with the error
reporting.
- Fix incorrect handling of thd->killed in worker threads.
2014-02-26 15:02:09 +01:00
|
|
|
--slave-domain-parallel-threads=#
|
|
|
|
Maximum number of parallel threads to use on slave for
|
|
|
|
events in a single replication domain. When using
|
|
|
|
multiple domains, this can be used to limit a single
|
|
|
|
domain from grabbing all threads and thus stalling other
|
|
|
|
domains. The default of 0 means to allow a domain to grab
|
|
|
|
as many threads as it wants, up to the value of
|
|
|
|
slave_parallel_threads.
|
2010-01-06 18:57:10 +01:00
|
|
|
--slave-exec-mode=name
|
2014-03-28 08:31:24 +01:00
|
|
|
How replication events should be executed. Legal values
|
|
|
|
are STRICT (default) and IDEMPOTENT. In IDEMPOTENT mode,
|
|
|
|
replication will not stop for operations that are
|
|
|
|
idempotent. For example, in row based replication
|
|
|
|
attempts to delete rows that doesn't exist will be
|
|
|
|
ignored. In STRICT mode, replication will stop on any
|
|
|
|
unexpected difference between the master and the slave
|
2010-01-06 18:57:10 +01:00
|
|
|
--slave-load-tmpdir=name
|
|
|
|
The location where the slave should put its temporary
|
|
|
|
files when replicating a LOAD DATA INFILE command
|
2012-06-12 09:29:56 +02:00
|
|
|
--slave-max-allowed-packet=#
|
|
|
|
The maximum packet length to sent successfully from the
|
|
|
|
master to slave.
|
2010-01-06 18:57:10 +01:00
|
|
|
--slave-net-timeout=#
|
Implementation of Multi-source replication (MDEV:253)
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
2012-10-04 00:37:58 +02:00
|
|
|
Number of seconds to wait for more data from any
|
2010-01-06 18:57:10 +01:00
|
|
|
master/slave connection before aborting the read
|
2013-10-24 12:44:21 +02:00
|
|
|
--slave-parallel-max-queued=#
|
|
|
|
Limit on how much memory SQL threads should use per
|
|
|
|
parallel replication thread when reading ahead in the
|
|
|
|
relay log looking for opportunities for parallel
|
|
|
|
replication. Only used when --slave-parallel-threads > 0.
|
2014-12-05 16:09:48 +01:00
|
|
|
--slave-parallel-mode=name
|
|
|
|
Controls what transactions are applied in parallel when
|
2015-02-06 10:02:02 +01:00
|
|
|
using --slave-parallel-threads. Possible values:
|
|
|
|
"optimistic" tries to apply most transactional DML in
|
|
|
|
parallel, and handles any conflicts with rollback and
|
|
|
|
retry. "conservative" limits parallelism in an effort to
|
|
|
|
avoid any conflicts. "aggressive" tries to maximise the
|
|
|
|
parallelism, possibly at the cost of increased conflict
|
|
|
|
rate. "minimal" only parallelizes the commit steps of
|
|
|
|
transactions. "none" disables parallel apply completely.
|
2013-07-09 13:15:53 +02:00
|
|
|
--slave-parallel-threads=#
|
2014-03-17 09:44:17 +01:00
|
|
|
If non-zero, number of threads to spawn to apply in
|
|
|
|
parallel events on the slave that were group-committed on
|
|
|
|
the master or were logged with GTID in different
|
|
|
|
replication domains. Note that these threads are in
|
|
|
|
addition to the IO and SQL threads, which are always
|
|
|
|
created by a replication slave
|
2016-01-26 15:15:13 +01:00
|
|
|
--slave-parallel-workers=#
|
|
|
|
Alias for slave_parallel_threads
|
2014-07-02 15:18:28 +02:00
|
|
|
--slave-run-triggers-for-rbr=name
|
|
|
|
Modes for how triggers in row-base replication on slave
|
|
|
|
side will be executed. Legal values are NO (default), YES
|
|
|
|
and LOGGING. NO means that trigger for RBR will not be
|
|
|
|
running on slave. YES and LOGGING means that triggers
|
|
|
|
will be running on slave, if there was not triggers
|
|
|
|
running on the master for the statement. LOGGING also
|
|
|
|
means results of that the executed triggers work will be
|
|
|
|
written to the binlog.
|
2010-01-06 18:57:10 +01:00
|
|
|
--slave-skip-errors=name
|
|
|
|
Tells the slave thread to continue replication when a
|
|
|
|
query event returns an error from the provided list
|
2011-10-19 21:45:18 +02:00
|
|
|
--slave-sql-verify-checksum
|
|
|
|
Force checksum verification of replication events after
|
|
|
|
reading them from relay log. Note: Events are always
|
|
|
|
checksum-verified by slave on receiving them from the
|
|
|
|
network before writing them to the relay log
|
|
|
|
(Defaults to on; use --skip-slave-sql-verify-checksum to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
--slave-transaction-retries=#
|
|
|
|
Number of times the slave SQL thread will retry a
|
|
|
|
transaction in case it failed with a deadlock or elapsed
|
|
|
|
lock wait timeout, before giving up and stopping
|
2010-01-18 23:00:48 +01:00
|
|
|
--slave-type-conversions=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Set of slave type conversions that are enabled. If the
|
|
|
|
variable is empty, no conversions are allowed and it is
|
|
|
|
expected that the types match exactly. Any combination
|
|
|
|
of: ALL_LOSSY, ALL_NON_LOSSY
|
2010-01-06 18:57:10 +01:00
|
|
|
--slow-launch-time=#
|
|
|
|
If creating the thread takes longer than this value (in
|
|
|
|
seconds), the Slow_launch_threads counter will be
|
|
|
|
incremented
|
|
|
|
--slow-query-log Log slow queries to a table or log file. Defaults logging
|
2011-11-28 17:48:19 +01:00
|
|
|
to a file 'hostname'-slow.log or a table mysql.slow_log
|
|
|
|
if --log-output=TABLE is used. Must be enabled to
|
|
|
|
activate other slow log options
|
2010-01-06 18:57:10 +01:00
|
|
|
--slow-query-log-file=name
|
|
|
|
Log slow queries to given log file. Defaults logging to
|
2011-11-28 17:48:19 +01:00
|
|
|
'hostname'-slow.log. Must be enabled to activate other
|
|
|
|
slow log options
|
2010-01-06 18:57:10 +01:00
|
|
|
--socket=name Socket file to use for connection
|
|
|
|
--sort-buffer-size=#
|
|
|
|
Each thread that needs to do a sort allocates a buffer of
|
|
|
|
this size
|
2014-06-19 12:02:23 +02:00
|
|
|
--sql-mode=name Sets the sql mode. Any combination of: REAL_AS_FLOAT,
|
|
|
|
PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE,
|
|
|
|
IGNORE_BAD_TABLE_OPTIONS, ONLY_FULL_GROUP_BY,
|
|
|
|
NO_UNSIGNED_SUBTRACTION, NO_DIR_IN_CREATE, POSTGRESQL,
|
|
|
|
ORACLE, MSSQL, DB2, MAXDB, NO_KEY_OPTIONS,
|
|
|
|
NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, MYSQL323, MYSQL40,
|
|
|
|
ANSI, NO_AUTO_VALUE_ON_ZERO, NO_BACKSLASH_ESCAPES,
|
|
|
|
STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE,
|
|
|
|
NO_ZERO_DATE, ALLOW_INVALID_DATES,
|
|
|
|
ERROR_FOR_DIVISION_BY_ZERO, TRADITIONAL,
|
|
|
|
NO_AUTO_CREATE_USER, HIGH_NOT_PRECEDENCE,
|
|
|
|
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
|
2011-10-19 21:45:18 +02:00
|
|
|
--stack-trace Print a symbolic stack trace on failure
|
|
|
|
(Defaults to on; use --skip-stack-trace to disable.)
|
2016-12-19 22:28:19 +01:00
|
|
|
--standard-compliant-cte
|
|
|
|
Allow only CTEs compliant to SQL standard
|
|
|
|
(Defaults to on; use --skip-standard-compliant-cte to disable.)
|
2012-01-25 10:59:30 +01:00
|
|
|
--stored-program-cache=#
|
|
|
|
The soft upper limit for number of cached stored routines
|
|
|
|
for one connection.
|
2014-11-25 18:47:44 +01:00
|
|
|
--strict-password-validation
|
|
|
|
When password validation plugins are enabled, reject
|
|
|
|
passwords that cannot be validated (passwords specified
|
|
|
|
as a hash)
|
|
|
|
(Defaults to on; use --skip-strict-password-validation to disable.)
|
2010-01-06 18:57:10 +01:00
|
|
|
-s, --symbolic-links
|
|
|
|
Enable symbolic link support.
|
|
|
|
--sync-binlog=# Synchronously flush binary log to disk after every #th
|
|
|
|
event. Use 0 (default) to disable synchronous flushing
|
|
|
|
--sync-frm Sync .frm files to disk on creation
|
|
|
|
(Defaults to on; use --skip-sync-frm to disable.)
|
|
|
|
--sync-master-info=#
|
|
|
|
Synchronously flush master info to disk after every #th
|
2015-08-11 18:45:38 +02:00
|
|
|
event. Use 0 to disable synchronous flushing
|
2010-01-06 18:57:10 +01:00
|
|
|
--sync-relay-log=# Synchronously flush relay log to disk after every #th
|
2015-08-11 18:45:38 +02:00
|
|
|
event. Use 0 to disable synchronous flushing
|
2010-01-06 18:57:10 +01:00
|
|
|
--sync-relay-log-info=#
|
|
|
|
Synchronously flush relay log info to disk after every
|
2015-08-11 18:45:38 +02:00
|
|
|
#th transaction. Use 0 to disable synchronous flushing
|
2010-01-06 18:57:10 +01:00
|
|
|
--sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
|
|
|
|
safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
|
|
|
|
value different for different invocations, even within
|
|
|
|
the same statement.
|
|
|
|
--table-cache=# Deprecated; use --table-open-cache instead.
|
|
|
|
--table-definition-cache=#
|
|
|
|
The number of cached table definitions
|
|
|
|
--table-open-cache=#
|
|
|
|
The number of cached open tables
|
2016-06-29 14:33:08 +02:00
|
|
|
--table-open-cache-instances=#
|
2016-09-08 14:01:28 +02:00
|
|
|
Maximum number of table cache instances
|
2010-01-06 18:57:10 +01:00
|
|
|
--tc-heuristic-recover=name
|
2016-05-04 15:23:26 +02:00
|
|
|
Decision to use in heuristic recover process. One of: OFF,
|
2014-06-19 12:02:23 +02:00
|
|
|
COMMIT, ROLLBACK
|
2010-01-06 18:57:10 +01:00
|
|
|
--thread-cache-size=#
|
2016-03-22 22:42:13 +01:00
|
|
|
How many threads we should keep in a cache for reuse.
|
|
|
|
These are freed after 5 minutes of idle time
|
2013-04-07 14:50:01 +02:00
|
|
|
--thread-pool-idle-timeout=#
|
|
|
|
Timeout in seconds for an idle thread in the thread
|
|
|
|
pool.Worker thread will be shut down after timeout
|
|
|
|
--thread-pool-max-threads=#
|
|
|
|
Maximum allowed number of worker threads in the thread
|
|
|
|
pool
|
|
|
|
--thread-pool-oversubscribe=#
|
|
|
|
How many additional active worker threads in a group are
|
|
|
|
allowed.
|
2016-09-21 16:28:42 +02:00
|
|
|
--thread-pool-prio-kickup-timer=#
|
|
|
|
The number of milliseconds before a dequeued low-priority
|
|
|
|
statement is moved to the high-priority queue
|
|
|
|
--thread-pool-priority=name
|
|
|
|
Threadpool priority. High priority connections usually
|
|
|
|
start executing earlier than low priority.If priority set
|
|
|
|
to 'auto', the the actual priority(low or high) is
|
|
|
|
determined based on whether or not connection is inside
|
|
|
|
transaction.
|
2013-04-07 14:50:01 +02:00
|
|
|
--thread-pool-size=#
|
|
|
|
Number of thread groups in the pool. This parameter is
|
|
|
|
roughly equivalent to maximum number of concurrently
|
|
|
|
executing threads (threads in a waiting state do not
|
|
|
|
count as executing).
|
|
|
|
--thread-pool-stall-limit=#
|
|
|
|
Maximum query execution time in milliseconds,before an
|
|
|
|
executing non-yielding thread is considered stalled.If a
|
|
|
|
worker thread is stalled, additional worker thread may be
|
|
|
|
created to handle remaining clients.
|
2010-01-06 18:57:10 +01:00
|
|
|
--thread-stack=# The stack size for each thread
|
|
|
|
--time-format=name The TIME format (ignored)
|
2014-06-19 16:47:41 +02:00
|
|
|
--timed-mutexes Specify whether to time mutexes. Deprecated, has no
|
|
|
|
effect.
|
2010-01-06 18:57:10 +01:00
|
|
|
--tmp-table-size=# If an internal in-memory temporary table exceeds this
|
|
|
|
size, MySQL will automatically convert it to an on-disk
|
2011-04-25 17:22:25 +02:00
|
|
|
MyISAM or Aria table
|
2010-01-06 18:57:10 +01:00
|
|
|
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
|
|
|
|
separated by a colon (:), in this case they are used in a
|
|
|
|
round-robin fashion
|
|
|
|
--transaction-alloc-block-size=#
|
|
|
|
Allocation block size for transactions to be stored in
|
|
|
|
binary log
|
|
|
|
--transaction-isolation=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Default transaction isolation level. One of:
|
|
|
|
READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ,
|
|
|
|
SERIALIZABLE
|
2010-01-06 18:57:10 +01:00
|
|
|
--transaction-prealloc-size=#
|
|
|
|
Persistent buffer for transactions to be stored in binary
|
|
|
|
log
|
2012-08-22 23:32:25 +02:00
|
|
|
--transaction-read-only
|
|
|
|
Default transaction access mode. True if transactions are
|
|
|
|
read-only.
|
2010-01-06 18:57:10 +01:00
|
|
|
--updatable-views-with-limit=name
|
|
|
|
YES = Don't issue an error message (warning only) if a
|
|
|
|
VIEW without presence of a key of the underlying table is
|
|
|
|
used in queries with a LIMIT clause for updating. NO =
|
|
|
|
Prohibit update of a VIEW, which does not contain a key
|
|
|
|
of the underlying table and the query uses a LIMIT clause
|
|
|
|
(usually get from GUI tools)
|
2012-06-03 02:19:01 +02:00
|
|
|
--use-stat-tables=name
|
2014-06-19 12:02:23 +02:00
|
|
|
Specifies how to use system statistics tables. One of:
|
|
|
|
NEVER, COMPLEMENTARY, PREFERABLY
|
2010-01-06 18:57:10 +01:00
|
|
|
-u, --user=name Run mysqld daemon as user.
|
2011-04-25 17:22:25 +02:00
|
|
|
--userstat Enables statistics gathering for USER_STATISTICS,
|
|
|
|
CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
|
|
|
|
tables in the INFORMATION_SCHEMA
|
2010-02-24 14:52:27 +01:00
|
|
|
-v, --verbose Used with --help option for detailed help.
|
2015-11-24 16:55:52 +01:00
|
|
|
-V, --version[=name]
|
|
|
|
Output version information and exit.
|
2010-01-06 18:57:10 +01:00
|
|
|
--wait-timeout=# The number of seconds the server waits for activity on a
|
|
|
|
connection before closing it
|
2009-12-22 10:35:56 +01:00
|
|
|
|
|
|
|
Variables (--variable-name=value)
|
2010-01-06 18:57:10 +01:00
|
|
|
allow-suspicious-udfs FALSE
|
|
|
|
auto-increment-increment 1
|
|
|
|
auto-increment-offset 1
|
2011-01-14 14:21:46 +01:00
|
|
|
autocommit TRUE
|
2010-01-06 18:57:10 +01:00
|
|
|
automatic-sp-privileges TRUE
|
2015-08-11 18:45:38 +02:00
|
|
|
back-log 80
|
2010-01-06 18:57:10 +01:00
|
|
|
big-tables FALSE
|
|
|
|
bind-address (No default value)
|
2016-12-19 23:32:45 +01:00
|
|
|
binlog-annotate-row-events TRUE
|
2010-01-06 18:57:10 +01:00
|
|
|
binlog-cache-size 32768
|
2016-05-16 16:32:45 +02:00
|
|
|
binlog-checksum CRC32
|
2013-07-09 13:15:53 +02:00
|
|
|
binlog-commit-wait-count 0
|
|
|
|
binlog-commit-wait-usec 100000
|
2010-02-06 17:13:42 +01:00
|
|
|
binlog-direct-non-transactional-updates FALSE
|
2016-12-19 23:32:45 +01:00
|
|
|
binlog-format MIXED
|
2011-10-19 21:45:18 +02:00
|
|
|
binlog-optimize-thread-scheduling TRUE
|
2016-12-19 23:32:45 +01:00
|
|
|
binlog-row-event-max-size 8192
|
2015-07-01 15:22:41 +02:00
|
|
|
binlog-row-image FULL
|
2010-11-05 18:42:37 +01:00
|
|
|
binlog-stmt-cache-size 32768
|
2010-01-06 18:57:10 +01:00
|
|
|
bulk-insert-buffer-size 8388608
|
|
|
|
character-set-client-handshake TRUE
|
|
|
|
character-set-filesystem binary
|
|
|
|
character-sets-dir MYSQL_CHARSETSDIR/
|
|
|
|
chroot (No default value)
|
|
|
|
completion-type NO_CHAIN
|
|
|
|
concurrent-insert AUTO
|
|
|
|
console FALSE
|
|
|
|
date-format %Y-%m-%d
|
|
|
|
datetime-format %Y-%m-%d %H:%i:%s
|
2011-04-25 17:22:25 +02:00
|
|
|
deadlock-search-depth-long 15
|
|
|
|
deadlock-search-depth-short 4
|
|
|
|
deadlock-timeout-long 50000000
|
|
|
|
deadlock-timeout-short 10000
|
2014-04-23 08:57:25 +02:00
|
|
|
default-regex-flags
|
2011-04-25 17:22:25 +02:00
|
|
|
default-storage-engine myisam
|
2010-01-06 18:57:10 +01:00
|
|
|
default-time-zone (No default value)
|
2014-06-14 22:15:52 +02:00
|
|
|
default-tmp-storage-engine (No default value)
|
2010-01-06 18:57:10 +01:00
|
|
|
default-week-format 0
|
|
|
|
delay-key-write ON
|
|
|
|
delayed-insert-limit 100
|
|
|
|
delayed-insert-timeout 300
|
|
|
|
delayed-queue-size 1000
|
|
|
|
div-precision-increment 4
|
2015-09-08 15:38:11 +02:00
|
|
|
encrypt-binlog FALSE
|
2014-12-22 15:53:17 +01:00
|
|
|
encrypt-tmp-disk-tables FALSE
|
2015-09-08 15:38:11 +02:00
|
|
|
encrypt-tmp-files FALSE
|
2015-03-10 07:28:51 +01:00
|
|
|
enforce-storage-engine (No default value)
|
2010-01-06 18:57:10 +01:00
|
|
|
event-scheduler OFF
|
2012-05-17 12:46:05 +02:00
|
|
|
expensive-subquery-limit 100
|
2010-01-06 18:57:10 +01:00
|
|
|
expire-logs-days 0
|
2015-09-22 12:01:54 +02:00
|
|
|
explicit-defaults-for-timestamp FALSE
|
2010-01-06 18:57:10 +01:00
|
|
|
external-locking FALSE
|
2011-04-25 17:22:25 +02:00
|
|
|
extra-max-connections 1
|
|
|
|
extra-port 0
|
[MDEV-10570] Add Flashback support
==== Description ====
Flashback can rollback the instances/databases/tables to an old snapshot.
It's implement on Server-Level by full image format binary logs (--binlog-row-image=FULL), so it supports all engines.
Currently, it’s a feature inside mysqlbinlog tool (with --flashback arguments).
Because the flashback binlog events will store in the memory, you should check if there is enough memory in your machine.
==== New Arguments to mysqlbinlog ====
--flashback (-B)
It will let mysqlbinlog to work on FLASHBACK mode.
==== New Arguments to mysqld ====
--flashback
Setup the server to use flashback. This enables binary log in row mode
and will enable extra logging for DDL's needed by flashback feature
==== Example ====
I have a table "t" in database "test", we can compare the output with "--flashback" and without.
#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -d test -T t --start-datetime="2013-03-27 14:54:00" > /tmp/1.sql
#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -d test -T t --start-datetime="2013-03-27 14:54:00" -B > /tmp/2.sql
Then, importing the output flashback file (/tmp/2.log), it can flashback your database/table to the special time (--start-datetime).
And if you know the exact postion, "--start-postion" is also works, mysqlbinlog will output the flashback logs that can flashback to "--start-postion" position.
==== Implement ====
1. As we know, if binlog_format is ROW (binlog-row-image=FULL in 10.1 and later), all columns value are store in the row event, so we can get the data before mis-operation.
2. Just do following things:
2.1 Change Event Type, INSERT->DELETE, DELETE->INSERT.
For example:
INSERT INTO t VALUES (...) ---> DELETE FROM t WHERE ...
DELETE FROM t ... ---> INSERT INTO t VALUES (...)
2.2 For Update_Event, swapping the SET part and WHERE part.
For example:
UPDATE t SET cols1 = vals1 WHERE cols2 = vals2
--->
UPDATE t SET cols2 = vals2 WHERE cols1 = vals1
2.3 For Multi-Rows Event, reverse the rows sequence, from the last row to the first row.
For example:
DELETE FROM t WHERE id=1; DELETE FROM t WHERE id=2; ...; DELETE FROM t WHERE id=n;
--->
DELETE FROM t WHERE id=n; ...; DELETE FROM t WHERE id=2; DELETE FROM t WHERE id=1;
2.4 Output those events from the last one to the first one which mis-operation happened.
For example:
2017-01-20 14:33:28 +01:00
|
|
|
flashback FALSE
|
2010-01-06 18:57:10 +01:00
|
|
|
flush FALSE
|
|
|
|
flush-time 0
|
|
|
|
ft-boolean-syntax + -><()~*:""&|
|
|
|
|
ft-max-word-len 84
|
|
|
|
ft-min-word-len 4
|
|
|
|
ft-query-expansion-limit 20
|
|
|
|
ft-stopword-file (No default value)
|
|
|
|
gdb FALSE
|
|
|
|
general-log FALSE
|
2015-01-07 12:13:21 +01:00
|
|
|
getopt-prefix-matching TRUE
|
2016-12-19 23:32:45 +01:00
|
|
|
group-concat-max-len 1048576
|
2013-03-26 10:35:34 +01:00
|
|
|
gtid-domain-id 0
|
2014-03-12 00:14:49 +01:00
|
|
|
gtid-ignore-duplicates FALSE
|
2013-05-28 13:28:31 +02:00
|
|
|
gtid-strict-mode FALSE
|
2010-01-06 18:57:10 +01:00
|
|
|
help TRUE
|
2013-03-26 07:48:29 +01:00
|
|
|
histogram-size 0
|
2013-03-31 03:57:07 +02:00
|
|
|
histogram-type SINGLE_PREC_HB
|
2015-08-11 18:45:38 +02:00
|
|
|
host-cache-size 279
|
2010-01-06 18:57:10 +01:00
|
|
|
ignore-builtin-innodb FALSE
|
2012-10-18 23:33:06 +02:00
|
|
|
ignore-db-dirs
|
2010-01-06 18:57:10 +01:00
|
|
|
init-connect
|
|
|
|
init-file (No default value)
|
|
|
|
init-rpl-role MASTER
|
|
|
|
init-slave
|
|
|
|
interactive-timeout 28800
|
2015-08-11 18:45:38 +02:00
|
|
|
join-buffer-size 262144
|
2011-10-19 21:45:18 +02:00
|
|
|
join-buffer-space-limit 2097152
|
2012-01-13 15:50:02 +01:00
|
|
|
join-cache-level 2
|
2010-01-06 18:57:10 +01:00
|
|
|
keep-files-on-create FALSE
|
2011-04-25 17:22:25 +02:00
|
|
|
key-buffer-size 134217728
|
2010-01-06 18:57:10 +01:00
|
|
|
key-cache-age-threshold 300
|
|
|
|
key-cache-block-size 1024
|
|
|
|
key-cache-division-limit 100
|
2014-07-19 16:46:08 +02:00
|
|
|
key-cache-file-hash-size 512
|
2011-04-25 17:22:25 +02:00
|
|
|
key-cache-segments 0
|
2010-01-06 18:57:10 +01:00
|
|
|
large-pages FALSE
|
|
|
|
lc-messages en_US
|
|
|
|
lc-messages-dir MYSQL_SHAREDIR/
|
|
|
|
lc-time-names en_US
|
|
|
|
local-infile TRUE
|
2016-12-19 23:32:45 +01:00
|
|
|
lock-wait-timeout 86400
|
2010-01-06 18:57:10 +01:00
|
|
|
log-bin (No default value)
|
2016-10-14 12:55:37 +02:00
|
|
|
log-bin-compress FALSE
|
|
|
|
log-bin-compress-min-len 256
|
2010-01-06 18:57:10 +01:00
|
|
|
log-bin-index (No default value)
|
|
|
|
log-bin-trust-function-creators FALSE
|
|
|
|
log-error
|
|
|
|
log-isam myisam.log
|
|
|
|
log-output FILE
|
|
|
|
log-queries-not-using-indexes FALSE
|
|
|
|
log-short-format FALSE
|
|
|
|
log-slave-updates FALSE
|
2016-12-19 23:32:45 +01:00
|
|
|
log-slow-admin-statements TRUE
|
2011-04-25 17:22:25 +02:00
|
|
|
log-slow-filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
|
|
|
|
log-slow-rate-limit 1
|
2016-12-19 23:32:45 +01:00
|
|
|
log-slow-slave-statements TRUE
|
2011-04-25 17:22:25 +02:00
|
|
|
log-slow-verbosity
|
2010-01-06 18:57:10 +01:00
|
|
|
log-tc tc.log
|
2016-12-19 23:32:45 +01:00
|
|
|
log-warnings 2
|
2010-01-06 18:57:10 +01:00
|
|
|
long-query-time 10
|
|
|
|
low-priority-updates FALSE
|
|
|
|
lower-case-table-names 1
|
|
|
|
master-info-file master.info
|
|
|
|
master-retry-count 86400
|
2011-10-19 21:45:18 +02:00
|
|
|
master-verify-checksum FALSE
|
2016-12-19 23:32:45 +01:00
|
|
|
max-allowed-packet 16777216
|
2010-01-06 18:57:10 +01:00
|
|
|
max-binlog-cache-size 18446744073709547520
|
|
|
|
max-binlog-size 1073741824
|
2010-11-05 18:42:37 +01:00
|
|
|
max-binlog-stmt-cache-size 18446744073709547520
|
2013-07-04 07:38:33 +02:00
|
|
|
max-connect-errors 100
|
2010-01-06 18:57:10 +01:00
|
|
|
max-connections 151
|
|
|
|
max-delayed-threads 20
|
2015-05-05 15:23:47 +02:00
|
|
|
max-digest-length 1024
|
2010-01-06 18:57:10 +01:00
|
|
|
max-error-count 64
|
|
|
|
max-heap-table-size 16777216
|
|
|
|
max-join-size 18446744073709551615
|
|
|
|
max-length-for-sort-data 1024
|
2016-12-19 23:32:45 +01:00
|
|
|
max-long-data-size 16777216
|
2010-01-06 18:57:10 +01:00
|
|
|
max-prepared-stmt-count 16382
|
2016-08-11 00:51:40 +02:00
|
|
|
max-recursive-iterations 18446744073709551615
|
Implementation of Multi-source replication (MDEV:253)
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
2012-10-04 00:37:58 +02:00
|
|
|
max-relay-log-size 1073741824
|
2010-01-06 18:57:10 +01:00
|
|
|
max-seeks-for-key 18446744073709551615
|
2016-12-12 01:01:56 +01:00
|
|
|
max-session-mem-used 9223372036854775807
|
2010-01-06 18:57:10 +01:00
|
|
|
max-sort-length 1024
|
|
|
|
max-sp-recursion-depth 0
|
2014-10-07 10:37:36 +02:00
|
|
|
max-statement-time 0
|
2010-01-06 18:57:10 +01:00
|
|
|
max-tmp-tables 32
|
|
|
|
max-user-connections 0
|
|
|
|
max-write-lock-count 18446744073709551615
|
|
|
|
memlock FALSE
|
2011-11-15 19:00:14 +01:00
|
|
|
metadata-locks-cache-size 1024
|
2013-07-04 07:38:33 +02:00
|
|
|
metadata-locks-hash-instances 8
|
2010-01-06 18:57:10 +01:00
|
|
|
min-examined-row-limit 0
|
2011-04-25 17:22:25 +02:00
|
|
|
mrr-buffer-size 262144
|
2011-07-02 22:12:12 +02:00
|
|
|
multi-range-count 256
|
2010-01-06 18:57:10 +01:00
|
|
|
myisam-block-size 1024
|
|
|
|
myisam-data-pointer-size 6
|
|
|
|
myisam-max-sort-file-size 9223372036853727232
|
|
|
|
myisam-mmap-size 18446744073709551615
|
2016-12-19 23:32:45 +01:00
|
|
|
myisam-recover-options BACKUP,QUICK
|
2010-01-06 18:57:10 +01:00
|
|
|
myisam-repair-threads 1
|
2013-05-10 11:32:34 +02:00
|
|
|
myisam-sort-buffer-size 134216704
|
2014-06-19 12:02:23 +02:00
|
|
|
myisam-stats-method NULLS_UNEQUAL
|
2010-01-06 18:57:10 +01:00
|
|
|
myisam-use-mmap FALSE
|
2014-11-03 18:45:06 +01:00
|
|
|
mysql56-temporal-format TRUE
|
2010-01-06 18:57:10 +01:00
|
|
|
net-buffer-length 16384
|
|
|
|
net-read-timeout 30
|
|
|
|
net-retry-count 10
|
|
|
|
net-write-timeout 60
|
|
|
|
old FALSE
|
|
|
|
old-alter-table FALSE
|
2014-01-26 21:48:42 +01:00
|
|
|
old-mode
|
2010-01-06 18:57:10 +01:00
|
|
|
old-passwords FALSE
|
|
|
|
old-style-user-limits FALSE
|
|
|
|
optimizer-prune-level 1
|
|
|
|
optimizer-search-depth 62
|
2013-04-20 11:24:01 +02:00
|
|
|
optimizer-selectivity-sampling-limit 100
|
2016-09-24 14:27:56 +02:00
|
|
|
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
|
2013-03-11 15:44:24 +01:00
|
|
|
optimizer-use-condition-selectivity 1
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema FALSE
|
|
|
|
performance-schema-accounts-size -1
|
2012-08-22 23:32:25 +02:00
|
|
|
performance-schema-consumer-events-stages-current FALSE
|
|
|
|
performance-schema-consumer-events-stages-history FALSE
|
|
|
|
performance-schema-consumer-events-stages-history-long FALSE
|
|
|
|
performance-schema-consumer-events-statements-current TRUE
|
|
|
|
performance-schema-consumer-events-statements-history FALSE
|
|
|
|
performance-schema-consumer-events-statements-history-long FALSE
|
|
|
|
performance-schema-consumer-events-waits-current FALSE
|
|
|
|
performance-schema-consumer-events-waits-history FALSE
|
|
|
|
performance-schema-consumer-events-waits-history-long FALSE
|
|
|
|
performance-schema-consumer-global-instrumentation TRUE
|
|
|
|
performance-schema-consumer-statements-digest TRUE
|
|
|
|
performance-schema-consumer-thread-instrumentation TRUE
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-digests-size -1
|
|
|
|
performance-schema-events-stages-history-long-size -1
|
|
|
|
performance-schema-events-stages-history-size -1
|
|
|
|
performance-schema-events-statements-history-long-size -1
|
|
|
|
performance-schema-events-statements-history-size -1
|
|
|
|
performance-schema-events-waits-history-long-size -1
|
|
|
|
performance-schema-events-waits-history-size -1
|
|
|
|
performance-schema-hosts-size -1
|
2012-08-22 23:32:25 +02:00
|
|
|
performance-schema-instrument
|
2010-01-14 16:07:27 +01:00
|
|
|
performance-schema-max-cond-classes 80
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-max-cond-instances -1
|
2015-08-03 16:34:59 +02:00
|
|
|
performance-schema-max-digest-length 1024
|
2010-01-14 16:07:27 +01:00
|
|
|
performance-schema-max-file-classes 50
|
|
|
|
performance-schema-max-file-handles 32768
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-max-file-instances -1
|
2010-01-14 16:07:27 +01:00
|
|
|
performance-schema-max-mutex-classes 200
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-max-mutex-instances -1
|
2013-07-25 11:37:30 +02:00
|
|
|
performance-schema-max-rwlock-classes 40
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-max-rwlock-instances -1
|
2012-08-22 23:32:25 +02:00
|
|
|
performance-schema-max-socket-classes 10
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-max-socket-instances -1
|
2012-08-22 23:32:25 +02:00
|
|
|
performance-schema-max-stage-classes 150
|
2016-10-12 18:36:22 +02:00
|
|
|
performance-schema-max-statement-classes 187
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-max-table-handles -1
|
|
|
|
performance-schema-max-table-instances -1
|
2010-01-14 16:07:27 +01:00
|
|
|
performance-schema-max-thread-classes 50
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-max-thread-instances -1
|
|
|
|
performance-schema-session-connect-attrs-size -1
|
2012-08-22 23:32:25 +02:00
|
|
|
performance-schema-setup-actors-size 100
|
|
|
|
performance-schema-setup-objects-size 100
|
2014-06-09 20:00:23 +02:00
|
|
|
performance-schema-users-size -1
|
2011-04-25 17:22:25 +02:00
|
|
|
plugin-maturity unknown
|
2010-01-06 18:57:10 +01:00
|
|
|
port 3306
|
|
|
|
port-open-timeout 0
|
|
|
|
preload-buffer-size 32768
|
|
|
|
profiling-history-size 15
|
2014-02-11 15:56:38 +01:00
|
|
|
progress-report-time 5
|
2014-01-02 10:19:19 +01:00
|
|
|
protocol-version 10
|
2014-08-29 13:09:51 +02:00
|
|
|
query-alloc-block-size 16384
|
2010-01-06 18:57:10 +01:00
|
|
|
query-cache-limit 1048576
|
|
|
|
query-cache-min-res-unit 4096
|
2015-08-11 18:45:38 +02:00
|
|
|
query-cache-size 1048576
|
2011-10-19 21:45:18 +02:00
|
|
|
query-cache-strip-comments FALSE
|
2015-08-11 18:45:38 +02:00
|
|
|
query-cache-type OFF
|
2010-01-06 18:57:10 +01:00
|
|
|
query-cache-wlock-invalidate FALSE
|
2014-08-29 13:09:51 +02:00
|
|
|
query-prealloc-size 24576
|
2010-01-06 18:57:10 +01:00
|
|
|
range-alloc-block-size 4096
|
2016-10-11 09:21:20 +02:00
|
|
|
read-binlog-speed-limit 0
|
2010-01-06 18:57:10 +01:00
|
|
|
read-buffer-size 131072
|
|
|
|
read-only FALSE
|
|
|
|
read-rnd-buffer-size 262144
|
|
|
|
relay-log (No default value)
|
|
|
|
relay-log-index (No default value)
|
|
|
|
relay-log-info-file relay-log.info
|
|
|
|
relay-log-purge TRUE
|
|
|
|
relay-log-recovery FALSE
|
|
|
|
relay-log-space-limit 0
|
2016-12-19 23:32:45 +01:00
|
|
|
replicate-annotate-row-events TRUE
|
2014-06-19 12:02:23 +02:00
|
|
|
replicate-events-marked-for-skip REPLICATE
|
2010-01-06 18:57:10 +01:00
|
|
|
replicate-same-server-id FALSE
|
|
|
|
report-host (No default value)
|
|
|
|
report-password (No default value)
|
2012-02-28 09:32:27 +01:00
|
|
|
report-port 0
|
2010-01-06 18:57:10 +01:00
|
|
|
report-user (No default value)
|
2011-04-25 17:22:25 +02:00
|
|
|
rowid-merge-buff-size 8388608
|
2010-01-06 18:57:10 +01:00
|
|
|
safe-user-create FALSE
|
2015-08-11 18:45:38 +02:00
|
|
|
secure-auth TRUE
|
2010-01-06 18:57:10 +01:00
|
|
|
secure-file-priv (No default value)
|
2016-08-29 19:28:06 +02:00
|
|
|
server-id 1
|
2016-04-15 20:40:25 +02:00
|
|
|
session-track-schema TRUE
|
|
|
|
session-track-state-change FALSE
|
2016-08-09 15:49:30 +02:00
|
|
|
session-track-system-variables
|
2016-05-30 21:22:50 +02:00
|
|
|
session-track-transaction-info OFF
|
2010-01-06 18:57:10 +01:00
|
|
|
show-slave-auth-info FALSE
|
2015-10-11 11:53:02 +02:00
|
|
|
silent-startup FALSE
|
2010-01-06 18:57:10 +01:00
|
|
|
skip-grant-tables TRUE
|
2010-04-11 12:42:05 +02:00
|
|
|
skip-name-resolve FALSE
|
2010-01-06 18:57:10 +01:00
|
|
|
skip-networking FALSE
|
|
|
|
skip-show-database FALSE
|
|
|
|
skip-slave-start FALSE
|
|
|
|
slave-compressed-protocol FALSE
|
2014-02-05 18:01:59 +01:00
|
|
|
slave-ddl-exec-mode IDEMPOTENT
|
MDEV-5657: Parallel replication.
Clean up and improve the parallel implementation code, mainly related to
scheduling of work to threads and handling of stop and errors.
Fix a lot of bugs in various corner cases that could lead to crashes or
corruption.
Fix that a single replication domain could easily grab all worker threads and
stall all other domains; now a configuration variable
--slave-domain-parallel-threads allows to limit the number of
workers.
Allow next event group to start as soon as previous group begins the commit
phase (as opposed to when it ends it); this allows multiple event groups on
the slave to participate in group commit, even when no other opportunities for
parallelism are available.
Various fixes:
- Fix some races in the rpl.rpl_parallel test case.
- Fix an old incorrect assertion in Log_event iocache read.
- Fix repeated malloc/free of wait_for_commit and rpl_group_info objects.
- Simplify wait_for_commit wakeup logic.
- Fix one case in queue_for_group_commit() where killing one thread would
fail to correctly signal the error to the next, causing loss of the
transaction after slave restart.
- Fix leaking of pthreads (and their allocated stack) due to missing
PTHREAD_CREATE_DETACHED attribute.
- Fix how one batch of group-committed transactions wait for the previous
batch before starting to execute themselves. The old code had a very
complex scheduling where the first transaction was handled differently,
with subtle bugs in corner cases. Now each event group is always scheduled
for a new worker (in a round-robin fashion amongst available workers).
Keep a count of how many transactions have started to commit, and wait for
that counter to reach the appropriate value.
- Fix slave stop to wait for all workers to actually complete processing;
before, the wait was for update of last_committed_sub_id, which happens a
bit earlier, and could leave worker threads potentially accessing bits of
the replication state that is no longer valid after slave stop.
- Fix a couple of places where the test suite would kill a thread waiting
inside enter_cond() in connection with debug_sync; debug_sync + kill can
crash in rare cases due to a race with mysys_var_current_mutex in this
case.
- Fix some corner cases where we had enter_cond() but no exit_cond().
- Fix that we could get failure in wait_for_prior_commit() but forget to flag
the error with my_error().
- Fix slave stop (both for normal stop and stop due to error). Now, at stop
we pick a specific safe point (in terms of event groups executed) and make
sure that all event groups before that point are executed to completion,
and that no event group after start executing; this ensures a safe place to
restart replication, even for non-transactional stuff/DDL. In error stop,
make sure that all prior event groups are allowed to execute to completion,
and that any later event groups that have started are rolled back, if
possible. The old code could leave eg. T1 and T3 committed but T2 not, or
it could even leave half a transaction not rolled back in some random
worker, which would cause big problems when that worker was later reused
after slave restart.
- Fix the accounting of amount of events queued for one worker. Before, the
amount was reduced immediately as soon as the events were dequeued (which
happens all at once); this allowed twice the amount of events to be queued
in memory for each single worker, which is not what users would expect.
- Fix that an error set during execution of one event was sometimes not
cleared before executing the next, causing problems with the error
reporting.
- Fix incorrect handling of thd->killed in worker threads.
2014-02-26 15:02:09 +01:00
|
|
|
slave-domain-parallel-threads 0
|
2010-01-06 18:57:10 +01:00
|
|
|
slave-exec-mode STRICT
|
2012-06-12 09:29:56 +02:00
|
|
|
slave-max-allowed-packet 1073741824
|
2016-12-19 23:32:45 +01:00
|
|
|
slave-net-timeout 60
|
2013-10-24 12:44:21 +02:00
|
|
|
slave-parallel-max-queued 131072
|
2015-02-06 10:02:02 +01:00
|
|
|
slave-parallel-mode conservative
|
2013-07-09 13:15:53 +02:00
|
|
|
slave-parallel-threads 0
|
2016-01-26 15:15:13 +01:00
|
|
|
slave-parallel-workers 0
|
2014-07-02 15:18:28 +02:00
|
|
|
slave-run-triggers-for-rbr NO
|
2010-01-06 18:57:10 +01:00
|
|
|
slave-skip-errors (No default value)
|
2011-10-19 21:45:18 +02:00
|
|
|
slave-sql-verify-checksum TRUE
|
2010-01-06 18:57:10 +01:00
|
|
|
slave-transaction-retries 10
|
2010-01-18 23:00:48 +01:00
|
|
|
slave-type-conversions
|
2010-01-06 18:57:10 +01:00
|
|
|
slow-launch-time 2
|
|
|
|
slow-query-log FALSE
|
|
|
|
sort-buffer-size 2097152
|
2015-08-11 18:45:38 +02:00
|
|
|
sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
2011-10-19 21:45:18 +02:00
|
|
|
stack-trace TRUE
|
2016-12-19 22:28:19 +01:00
|
|
|
standard-compliant-cte TRUE
|
2012-01-25 10:59:30 +01:00
|
|
|
stored-program-cache 256
|
2014-11-25 18:47:44 +01:00
|
|
|
strict-password-validation TRUE
|
2010-01-06 18:57:10 +01:00
|
|
|
symbolic-links FALSE
|
2016-12-19 23:32:45 +01:00
|
|
|
sync-binlog 1
|
2011-04-25 17:22:25 +02:00
|
|
|
sync-frm FALSE
|
2015-08-11 18:45:38 +02:00
|
|
|
sync-master-info 10000
|
|
|
|
sync-relay-log 10000
|
|
|
|
sync-relay-log-info 10000
|
2010-01-06 18:57:10 +01:00
|
|
|
sysdate-is-now FALSE
|
2015-09-03 18:06:55 +02:00
|
|
|
table-cache 431
|
2010-01-06 18:57:10 +01:00
|
|
|
table-definition-cache 400
|
2015-09-03 18:06:55 +02:00
|
|
|
table-open-cache 431
|
2016-09-08 14:01:28 +02:00
|
|
|
table-open-cache-instances 8
|
2016-04-16 12:39:20 +02:00
|
|
|
tc-heuristic-recover OFF
|
2016-03-22 22:42:13 +01:00
|
|
|
thread-cache-size 151
|
2013-04-07 14:50:01 +02:00
|
|
|
thread-pool-idle-timeout 60
|
2016-11-04 14:00:11 +01:00
|
|
|
thread-pool-max-threads 65536
|
2013-04-07 14:50:01 +02:00
|
|
|
thread-pool-oversubscribe 3
|
2016-09-21 16:28:42 +02:00
|
|
|
thread-pool-prio-kickup-timer 1000
|
|
|
|
thread-pool-priority auto
|
2013-04-07 14:50:01 +02:00
|
|
|
thread-pool-stall-limit 500
|
2016-07-02 02:26:32 +02:00
|
|
|
thread-stack 297984
|
2010-01-06 18:57:10 +01:00
|
|
|
time-format %H:%i:%s
|
|
|
|
timed-mutexes FALSE
|
|
|
|
tmp-table-size 16777216
|
|
|
|
transaction-alloc-block-size 8192
|
|
|
|
transaction-isolation REPEATABLE-READ
|
|
|
|
transaction-prealloc-size 4096
|
2012-08-22 23:32:25 +02:00
|
|
|
transaction-read-only FALSE
|
2010-01-06 18:57:10 +01:00
|
|
|
updatable-views-with-limit YES
|
2012-06-03 02:19:01 +02:00
|
|
|
use-stat-tables NEVER
|
2011-04-25 17:22:25 +02:00
|
|
|
userstat FALSE
|
2010-01-06 18:57:10 +01:00
|
|
|
verbose TRUE
|
|
|
|
wait-timeout 28800
|
2009-12-22 10:35:56 +01:00
|
|
|
|
|
|
|
To see what values a running MySQL server is using, type
|
|
|
|
'mysqladmin variables' instead of 'mysqld --verbose --help'.
|