Пример #1
0
    def setup(self):
        """Create a MySQL instance and all Vitess processes."""
        mysql_port = environment.get_port('mysql')
        self.directory = environment.get_test_directory()
        self.mysql_db = environment.mysql_db_class(self.directory, mysql_port,
                                                   self.extra_my_cnf,
                                                   self.snapshot_file)

        self.mysql_db.setup()
        if not self.snapshot_file:
            self.create_databases()
            self.load_schema()
        if self.init_data_options is not None:
            self.rng = random.Random(self.init_data_options.rng_seed)
            self.populate_with_random_data()
        if self.mysql_only:
            return

        vt_processes.start_vt_processes(
            self.directory,
            self.topology,
            self.mysql_db,
            self.schema_dir,
            charset=self.charset,
            web_dir=self.web_dir,
            web_dir2=self.web_dir2,
            mysql_server_bind_address=self.mysql_server_bind_address)
Пример #2
0
  def setup(self):
    """Create a MySQL instance and all Vitess processes."""
    mysql_port = environment.get_port('mysql')
    self.directory = environment.get_test_directory()
    self.mysql_db = environment.mysql_db_class(self.directory, mysql_port)

    self.mysql_db.setup()
    self.create_databases()
    self.load_schema()

    vt_processes.start_vt_processes(self.directory, self.shards, self.mysql_db)
Пример #3
0
    def setup(self):
        """Create a MySQL instance and all Vitess processes."""
        mysql_port = environment.get_port('mysql')
        self.directory = environment.get_test_directory()
        self.mysql_db = environment.mysql_db_class(self.directory, mysql_port)

        self.mysql_db.setup()
        self.create_databases()
        self.load_schema()

        vt_processes.start_vt_processes(self.directory, self.shards,
                                        self.mysql_db)
Пример #4
0
  def setup(self):
    """Create a MySQL instance and all Vitess processes."""
    mysql_port = environment.get_port('mysql')
    self.directory = environment.get_test_directory()
    self.mysql_db = environment.mysql_db_class(self.directory, mysql_port)

    self.mysql_db.setup()
    self.create_databases()
    self.load_schema()
    if self.init_data_options is not None:
      self.rng = random.Random(self.init_data_options.rng_seed)
      self.populate_with_random_data()
    if self.mysql_only:
      return

    vt_processes.start_vt_processes(self.directory, self.topology,
                                    self.mysql_db, self.vschema,
                                    web_dir=self.web_dir)