Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export_rpl test.
"""
import os
import mutlib
import replicate
from mysql.utilities.exception import MUTLibError, UtilError
_RPL_MODES = ["master", "slave", "both"]
_LOCKTYPES = ['no-locks', 'lock-all', 'snapshot']
class test(replicate.test):
"""check --rpl parameter for export utility
This test executes a series of export database operations on a single
server using a variety of --rpl and --locking options. It uses the
replicate test as a parent for setup and teardown methods.
"""
server3 = None
s3_serverid = None
def check_prerequisites(self):
# Check MySQL server version - Must be 5.1.0 or higher
if not self.servers.get_server(0).check_version_compat(5, 1, 0):
raise MUTLibError("Test requires server version 5.1.0 or higher")
self.check_gtid_unsafe()
return replicate.test.check_prerequisites(self)
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
"""
replicate_parameters test.
"""
import replicate
from mysql.utilities.exception import MUTLibError, UtilError
class test(replicate.test):
"""check parameters for the replicate utility
This test executes the replicate utility parameters. It uses the
replicate test as a parent for setup and teardown methods.
"""
def check_prerequisites(self):
return replicate.test.check_prerequisites(self)
def setup(self):
return replicate.test.setup(self)
def run(self):
self.mask_global = False # Turn off global masks
self.res_fname = "result.txt"
test_num = 1
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
"""
replicate_innodb test.
"""
import os
import replicate
from mysql.utilities.exception import MUTLibError, UtilError
class test(replicate.test):
"""setup replication
This test attempts to replicate among a master and slave whose
innodb settings are different. It uses the replicate test for
inherited methods.
"""
server5 = None
s5_serverid = None
def check_prerequisites(self):
if self.servers.get_server(0).check_version_compat(5, 5, 0):
raise MUTLibError("Test requires server version 5.1.")
return self.check_num_servers(1)
def setup(self):
self.server0 = self.servers.get_server(0)
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
"""
replicate_errors test.
"""
import socket
import replicate
import mutlib
from mysql.utilities.exception import MUTLibError
class test(replicate.test):
"""check error conditions
This test ensures the known error conditions are tested. It uses the
cloneuser test as a parent for setup and teardown methods.
"""
server3 = None
port3 = None
def check_prerequisites(self):
return replicate.test.check_prerequisites(self)
def setup(self):
self.server3 = None
return replicate.test.setup(self)
def run(self):
def check_prerequisites(self):
return replicate.test.check_prerequisites(self)