diff --git a/data/bootstrap/mysql-db-dir.tbz b/data/bootstrap/mysql-db-dir.tbz index 9687720c0b..311b1ed7f7 100644 Binary files a/data/bootstrap/mysql-db-dir.tbz and b/data/bootstrap/mysql-db-dir.tbz differ diff --git a/data/bootstrap/mysql-db-dir_10.0.10-MariaDB.tbz b/data/bootstrap/mysql-db-dir_10.0.10-MariaDB.tbz deleted file mode 100644 index 27b91bc389..0000000000 Binary files a/data/bootstrap/mysql-db-dir_10.0.10-MariaDB.tbz and /dev/null differ diff --git a/data/bootstrap/mysql-db-dir_10.0.13-MariaDB.tbz b/data/bootstrap/mysql-db-dir_10.0.13-MariaDB.tbz new file mode 100644 index 0000000000..3baf037335 Binary files /dev/null and b/data/bootstrap/mysql-db-dir_10.0.13-MariaDB.tbz differ diff --git a/data/bootstrap/upgrade.sh b/data/bootstrap/upgrade.sh index a64a8c216d..241b52a5e9 100755 --- a/data/bootstrap/upgrade.sh +++ b/data/bootstrap/upgrade.sh @@ -8,24 +8,25 @@ if [ -z "$VTDATAROOT" ]; then exit 1 fi +mysql_port=33306 tablet_uid=99999 tablet_dir=$VTDATAROOT/vt_0000099999 set -e echo Starting mysqld -mysqlctl -tablet_uid=$tablet_uid init -skip_schema +mysqlctl -tablet_uid=$tablet_uid -mysql_port=$mysql_port init -skip_schema echo Running mysql_upgrade mysql_upgrade --socket=$tablet_dir/mysql.sock --user=vt_dba echo Stopping mysqld -mysqlctl -tablet_uid=$tablet_uid shutdown +mysqlctl -tablet_uid=$tablet_uid -mysql_port=$mysql_port shutdown newfile=mysql-db-dir_$(cat $tablet_dir/data/mysql_upgrade_info).tbz echo Creating new bootstrap file: $newfile -(cd $tablet_dir/data && tar -jcf ../data.tbz *) +(cd $tablet_dir && tar -jcf data.tbz data innodb) mv $tablet_dir/data.tbz ./$newfile echo Removing tablet directory diff --git a/go/vt/mysqlctl/mysqld.go b/go/vt/mysqlctl/mysqld.go index 517a8a69e4..3939e0edb8 100644 --- a/go/vt/mysqlctl/mysqld.go +++ b/go/vt/mysqlctl/mysqld.go @@ -266,7 +266,7 @@ func (mysqld *Mysqld) Init(mysqlWaitTime time.Duration, bootstrapArchive string, // Unpack bootstrap DB files. dbTbzPath := path.Join(root, "data/bootstrap/"+bootstrapArchive) log.Infof("decompress bootstrap db %v", dbTbzPath) - args := []string{"-xj", "-C", mysqld.config.DataDir, "-f", dbTbzPath} + args := []string{"-xj", "-C", mysqld.TabletDir, "-f", dbTbzPath} if _, err = execCmd("tar", args, []string{}, ""); err != nil { log.Errorf("failed unpacking %v: %v", dbTbzPath, err) return err diff --git a/test/mysql_flavor.py b/test/mysql_flavor.py index a408d38ce6..3ee1a9b776 100644 --- a/test/mysql_flavor.py +++ b/test/mysql_flavor.py @@ -62,7 +62,7 @@ class MariaDB(MysqlFlavor): return environment.vttop + "/config/mycnf/master_mariadb.cnf" def bootstrap_archive(self): - return "mysql-db-dir_10.0.10-MariaDB.tbz" + return "mysql-db-dir_10.0.13-MariaDB.tbz" if environment.mysql_flavor == "MariaDB":