summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-04-15 10:55:27 +0200
committerunknown <knielsen@knielsen-hq.org>2013-04-15 10:55:27 +0200
commit665a31af2b7d0ecd66d5e54ed0544b5db3892732 (patch)
treed19eae18ae9ffff6e7b3d30b16cf7671c511700f /scripts
parent491047a24714be57409e42656057e56f99c65513 (diff)
parente5cbefeb899f6325fc99277c515a91f0843cdcd5 (diff)
downloadmariadb-git-665a31af2b7d0ecd66d5e54ed0544b5db3892732.tar.gz
MDEV-26: Global transaction ID. First alpha release.
Merge of 10.0-mdev26 feature tree into 10.0-base. Global transaction ID is prepended to each event group in the binlog. Slave connect can request to start from GTID position instead of specifying file name/offset of master binlog. This facilitates easy switch to a new master. Slave GTID state is stored in a table mysql.rpl_slave_state, which can be InnoDB to get crash-safe slave state. GTID includes a replication domain ID, allowing to keep track of distinct positions for each of multiple masters.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh3
-rw-r--r--scripts/mysql_system_tables.sql6
2 files changed, 7 insertions, 2 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 241cb84a399..0f6eebf626e 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -416,9 +416,8 @@ mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
mysqld_install_cmd_line()
{
"$mysqld_bootstrap" $defaults "$mysqld_opt" --bootstrap \
- "--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --loose-skip-innodb \
+ "--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 \
--loose-skip-ndbcluster --loose-skip-pbxt $args --max_allowed_packet=8M \
- --default-storage-engine=myisam \
--net_buffer_length=16K
}
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index a55c5f60351..8f8d6356999 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -20,6 +20,12 @@
--
set sql_mode='';
+
+-- We want this to be created with the default storage engine.
+-- This way, if InnoDB is used we get crash safety, and if MyISAM is used
+-- we avoid mixed-engine transactions.
+CREATE TABLE IF NOT EXISTS rpl_slave_state (domain_id INT UNSIGNED NOT NULL, sub_id BIGINT UNSIGNED NOT NULL, server_id INT UNSIGNED NOT NULL, seq_no BIGINT UNSIGNED NOT NULL, PRIMARY KEY (domain_id, sub_id)) comment='Replication slave GTID state';
+
set storage_engine=myisam;
flush tables;