lib/isolated_server/mysql.rb in isolated_server-0.4.8 vs lib/isolated_server/mysql.rb in isolated_server-0.4.9

- old
+ new

@@ -108,11 +108,11 @@ MASTER_USER='root', MASTER_PASSWORD='', MASTER_LOG_FILE='#{binlog_file}', MASTER_LOG_POS=#{binlog_pos} EOL ) - connection.query("SLAVE START") + connection.query("START SLAVE") connection.query("SET GLOBAL READ_ONLY=1") end def set_rw(rw) ro = rw ? 0 : 1 @@ -127,11 +127,11 @@ if @load_data_path system("cp -a #{@load_data_path.shellescape}/* #{@mysql_data_dir.shellescape}") system("rm -f #{@mysql_data_dir.shellescape}/relay-log.info") else mysqld = locate_executable("mysqld") - `#{mysqld} --version` =~ /^mysqld\s+Ver (5\.\d)\.\d+/ - major_version = $1 + `#{mysqld} --version` =~ /mysqld\s+Ver (5\.\d)\.\d+/ + major_version = $1 || '5.5' mysql_install_db = locate_executable("mysql_install_db") idb_path = File.dirname(mysql_install_db) system("(cd #{idb_path.shellescape}/..; mysql_install_db --datadir=#{@mysql_data_dir.shellescape} --user=`whoami`) >/dev/null 2>&1")