[MDEV-5599] Cold copy is errorneus,... dose not work Created: 2014-02-01  Updated: 2014-02-07  Due: 2014-02-14  Resolved: 2014-02-07

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.8
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Joni-Pekka Kurronen Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Ubuntu 12.4 LTS,
Mixed Aria, tokudb and INNODB databases,...



 Description   

if configured:
/var/lib/mysql
/media/SDD2/tokudb # tokudb files

and then copyed by rsync, "Cold copy, both machines mysql down"

Starting from copy dose not work whit init script and by command line
it start whit error's:

root@mpi1:/media/SDD2/tokudb# /opt/mariadb-10.0.7/bin/mysqld -V
140201 16:54:32 [Warning] option 'table_definition_cache': unsigned value 100 adjusted to 400
/opt/mariadb-10.0.7/bin/mysqld  Ver 10.0.7-MariaDB-log for Linux on x86_64 (Source distribution)
root@mpi1:/media/SDD2/tokudb# /opt/mariadb-10.0.7/bin/mysqld -V
140201 16:54:51 [Warning] option 'table_definition_cache': unsigned value 100 adjusted to 400
/opt/mariadb-10.0.7/bin/mysqld  Ver 10.0.7-MariaDB-log for Linux on x86_64 (Source distribution)
root@mpi1:/media/SDD2/tokudb# /opt/mariadb-10.0.7/bin/mysqld -v
140201 16:54:57 [Warning] option 'table_definition_cache': unsigned value 100 adjusted to 400
2014-02-01 16:54:57 7f3bab756780 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
140201 16:54:57 [Note] InnoDB: The InnoDB memory heap is disabled
140201 16:54:57 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
140201 16:54:57 [Note] InnoDB: Compressed tables use zlib 1.2.3.4
140201 16:54:57 [Note] InnoDB: CPU does not support crc32 instructions
140201 16:54:57 [Note] InnoDB: Initializing buffer pool, size = 8.0M
140201 16:54:57 [Note] InnoDB: Completed initialization of buffer pool
140201 16:54:57 [Note] InnoDB: Highest supported file format is Barracuda.
140201 16:54:57 [Note] InnoDB: 128 rollback segment(s) are active.
140201 16:54:57 [Note] InnoDB: Waiting for purge to start
140201 16:54:57 [Note] InnoDB: 5.6.10 started; log sequence number 7968643824
140201 16:54:57 [Note] CONNECT: connect.ini=/var/lib/mysql/connect.ini
profile file /var/lib/mysql/connect.ini not found
Sat Feb  1 16:54:57 2014 Tokudb recovery starting in env /var/lib/mysql/
Sat Feb  1 16:54:57 2014 Tokudb recovery scanning backward from 58306011
Sat Feb  1 16:54:57 2014 Tokudb recovery bw_end_checkpoint at 58306011 timestamp 1391266438266257 xid 58306007 (bw_newer)
Sat Feb  1 16:54:57 2014 Tokudb recovery bw_begin_checkpoint at 58306007 timestamp 1391266438266247 (bw_between)
Sat Feb  1 16:54:57 2014 Tokudb recovery turning around at begin checkpoint 58306007 time 10
Sat Feb  1 16:54:57 2014 Tokudb recovery starts scanning forward to 58306011 from 58306007 left 4 (fw_between)
Sat Feb  1 16:54:57 2014 Tokudb recovery closing 2 dictionaries
Sat Feb  1 16:54:57 2014 Tokudb recovery making a checkpoint
Sat Feb  1 16:54:57 2014 Tokudb recovery done
140201 16:54:57 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
140201 16:54:57 [Note] Server socket created on IP: '0.0.0.0'.
140201 16:54:57 [Warning] Found an entry in the 'db' table with empty database name; Skipped
140201 16:54:57 [Warning] Found an entry in the 'db' table with empty database name; Skipped
140201 16:54:57 [ERROR] Missing system table mysql.roles_mapping; please run mysql_upgrade to create it
140201 16:54:57 [ERROR] Column count of mysql.events_waits_current is wrong. Expected 19, found 16. Created with MariaDB 50530, now running 100007. Please use mysql_upgrade to fix this error.
140201 16:54:57 [ERROR] Column count of mysql.events_waits_history is wrong. Expected 19, found 16. Created with MariaDB 50530, now running 100007. Please use mysql_upgrade to fix this error.
140201 16:54:57 [ERROR] Column count of mysql.events_waits_history_long is wrong. Expected 19, found 16. Created with MariaDB 50530, now running 100007. Please use mysql_upgrade to fix this error.
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Incorrect definition of table performance_schema.events_waits_summary_by_thread_by_event_name: expected column 'THREAD_ID' at position 0 to have type bigint(20), found type int(11).
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Column count of mysql.file_summary_by_event_name is wrong. Expected 23, found 5. Created with MariaDB 50530, now running 100007. Please use mysql_upgrade to fix this error.
140201 16:54:57 [ERROR] Column count of mysql.file_summary_by_instance is wrong. Expected 25, found 6. Created with MariaDB 50530, now running 100007. Please use mysql_upgrade to fix this error.
140201 16:54:57 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
140201 16:54:57 [ERROR] Incorrect definition of table performance_schema.mutex_instances: expected column 'LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
140201 16:54:57 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
140201 16:54:57 [ERROR] Incorrect definition of table performance_schema.rwlock_instances: expected column 'WRITE_LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
140201 16:54:57 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
140201 16:54:57 [ERROR] Column count of mysql.threads is wrong. Expected 14, found 3. Created with MariaDB 50530, now running 100007. Please use mysql_upgrade to fix this error.
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
140201 16:54:57 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure
140201 16:54:57 [Note] Event Scheduler: Loaded 0 events
140201 16:54:57 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
140201 16:54:58 [Note] /opt/mariadb-10.0.7/bin/mysqld: ready for connections.
Version: '10.0.7-MariaDB-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
140201 16:54:58 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000191' at position 326, relay log '/var/log/mysql/mysql-relay.000002' position: 535
140201 16:54:58 [ERROR] Slave I/O: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist, Internal MariaDB error code: 1146
140201 16:54:58 [ERROR] Slave SQL: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist, Internal MariaDB error code: 1146
140201 16:54:58 [Note] Slave I/O thread: connected to master 'slave_user@192.168.0.40:3306',replication started in log 'mysql-bin.000191' at position 4623
140201 16:54:58 [ERROR] Slave SQL: Error executing row event: 'Table 'wikidb.jpk0_objectcache' doesn't exist', Internal MariaDB error code: 1146
140201 16:54:58 [Warning] Slave: Table 'wikidb.jpk0_objectcache' doesn't exist Error_code: 1146
140201 16:54:58 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000191' position 326



 Comments   
Comment by Elena Stepanova [ 2014-02-01 ]

Did you do as the error messages ask?

Please use mysql_upgrade to fix this error.

Comment by Joni-Pekka Kurronen [ 2014-02-02 ]

i found reason, orginal database to be replicated had slave settingfs.
i sucseed whit cold copy:
stop slave
reset slave
flush readlock
show master status
shutdown

then copy rsync
/var/lib/mysql
/media/SDD2

after that you can
get mysql up both and start
master-slave replication.

Generated at Thu Feb 08 07:05:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.