List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:August 8 2008 11:34am
Subject:bzr commit into mysql-6.0-backup branch (jorgen.loland:2675) Bug#33836
View as plain text  
#At file:///localhome/jl208045/mysql/mysql-6.0-backup-33836/

 2675 Jorgen Loland	2008-08-08
      Bug#33836 - Backup: tables have default character set latin1
            
      Pre-fix: mysql.online_backup* tables have default character 
      set latin1, while other mysql tables have utf8.
            
      Fix: change default character set of online_backup tables to
      utf8.
modified:
  mysql-test/r/backup_progress.result
  mysql-test/t/backup_progress.test
  scripts/mysql_system_tables.sql

per-file comments:
  mysql-test/r/backup_progress.result
    Added test for utf8 character set in mysql.online_backup*
  mysql-test/t/backup_progress.test
    Added test for utf8 character set in mysql.online_backup*
  scripts/mysql_system_tables.sql
    Change create table script for online_backup and online_backup_progress to use default
character set utf8
=== modified file 'mysql-test/r/backup_progress.result'
--- a/mysql-test/r/backup_progress.result	2008-07-09 18:37:42 +0000
+++ b/mysql-test/r/backup_progress.result	2008-08-08 09:34:01 +0000
@@ -1,3 +1,33 @@
+
+Checking character set for backup tables 
+
+SELECT column_name, character_set_name 
+FROM information_schema.columns 
+WHERE table_name LIKE 'online_backup' 
+AND character_set_name LIKE 'utf8' 
+ORDER BY column_name;
+column_name	character_set_name
+backup_file	utf8
+backup_state	utf8
+binlog_file	utf8
+command	utf8
+drivers	utf8
+host_or_server_name	utf8
+operation	utf8
+username	utf8
+user_comment	utf8
+
+SELECT column_name, character_set_name 
+FROM information_schema.columns 
+WHERE table_name LIKE 'online_backup_progress' 
+AND character_set_name LIKE 'utf8' 
+ORDER BY column_name;
+column_name	character_set_name
+notes	utf8
+object	utf8
+
+Now starting real tests
+
 SET DEBUG_SYNC= 'reset';
 DROP DATABASE IF EXISTS backup_progress;
 DROP TABLE IF EXISTS backup_progress.t1_res;

=== modified file 'mysql-test/t/backup_progress.test'
--- a/mysql-test/t/backup_progress.test	2008-06-25 13:39:04 +0000
+++ b/mysql-test/t/backup_progress.test	2008-08-08 09:34:01 +0000
@@ -8,6 +8,30 @@
 --source include/have_innodb.inc
 --source include/not_embedded.inc
 
+# bug#33836 backup tables should have charset utf8
+
+--echo 
+--echo Checking character set for backup tables 
+--echo 
+
+SELECT column_name, character_set_name 
+FROM information_schema.columns 
+WHERE table_name LIKE 'online_backup' 
+  AND character_set_name LIKE 'utf8' 
+ORDER BY column_name;
+
+--echo 
+
+SELECT column_name, character_set_name 
+FROM information_schema.columns 
+WHERE table_name LIKE 'online_backup_progress' 
+  AND character_set_name LIKE 'utf8' 
+ORDER BY column_name;
+
+--echo 
+--echo Now starting real tests
+--echo 
+
 #
 # Preparative cleanup.
 #

=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2008-07-09 18:37:42 +0000
+++ b/scripts/mysql_system_tables.sql	2008-08-08 09:34:01 +0000
@@ -83,10 +83,10 @@ DROP PREPARE stmt;
 CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT
NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT
NULL, definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field
ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND')
default NULL, created TIMESTAMP NOT NULL, modified TIMESTAMP NOT NULL, last_executed
DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status
ENUM('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL default 'ENABLED', on_completion
ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode 
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','N
 OT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default
'', originator int(10) NOT NULL, time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT
'SYSTEM', character_set_client char(32) collate utf8_bin, collation_connection char(32)
collate utf8_bin, db_collation char(32) collate utf8_bin, body_utf8 longblob, PRIMARY KEY
(db, name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
 
 
-CREATE TABLE IF NOT EXISTS online_backup ( backup_id BIGINT UNSIGNED PRIMARY KEY
AUTO_INCREMENT COMMENT 'Surrogate key for (near) duplicate entries', process_id INT
UNSIGNED NOT NULL COMMENT 'The process id that operation ran as', binlog_pos INT UNSIGNED
DEFAULT 0 COMMENT 'The recorded binlog position of backup/restore', binlog_file CHAR(64)
COMMENT 'The recorded binlog filename at time of backup/restore', backup_state
ENUM('complete', 'starting', 'validity point', 'running', 'error', 'cancel') NOT NULL
COMMENT 'Status of current operation', operation ENUM('backup', 'restore') NOT NULL
COMMENT 'Type of operation', error_num INT NOT NULL DEFAULT 0 COMMENT 'The error from
this run 0 == none', num_objects INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of
objects in the backup', total_bytes BIGINT UNSIGNED COMMENT 'The size of the backup
repository in bytes', validity_point_time datetime COMMENT 'The time of the validity
point.', start_time datetime COMMENT 'The date/time o
 f start of operation', stop_time datetime COMMENT 'The date/time of end of operation',
host_or_server_name CHAR (30) COMMENT 'The server name where operation ran', username
CHAR (30) COMMENT 'The user name who ran the operation', backup_file CHAR (100) COMMENT
'The name of the file', user_comment VARCHAR (200) DEFAULT NULL COMMENT 'The comment from
user entered at command line', command VARCHAR (512) COMMENT 'The command used to issue
operation', drivers VARCHAR (100) COMMENT 'The name of the storage engine backup drivers
used in the operation') ENGINE=MYISAM;
+CREATE TABLE IF NOT EXISTS online_backup ( backup_id BIGINT UNSIGNED PRIMARY KEY
AUTO_INCREMENT COMMENT 'Surrogate key for (near) duplicate entries', process_id INT
UNSIGNED NOT NULL COMMENT 'The process id that operation ran as', binlog_pos INT UNSIGNED
DEFAULT 0 COMMENT 'The recorded binlog position of backup/restore', binlog_file CHAR(64)
COMMENT 'The recorded binlog filename at time of backup/restore', backup_state
ENUM('complete', 'starting', 'validity point', 'running', 'error', 'cancel') NOT NULL
COMMENT 'Status of current operation', operation ENUM('backup', 'restore') NOT NULL
COMMENT 'Type of operation', error_num INT NOT NULL DEFAULT 0 COMMENT 'The error from
this run 0 == none', num_objects INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of
objects in the backup', total_bytes BIGINT UNSIGNED COMMENT 'The size of the backup
repository in bytes', validity_point_time datetime COMMENT 'The time of the validity
point.', start_time datetime COMMENT 'The date/time o
 f start of operation', stop_time datetime COMMENT 'The date/time of end of operation',
host_or_server_name CHAR (30) COMMENT 'The server name where operation ran', username
CHAR (30) COMMENT 'The user name who ran the operation', backup_file CHAR (100) COMMENT
'The name of the file', user_comment VARCHAR (200) DEFAULT NULL COMMENT 'The comment from
user entered at command line', command VARCHAR (512) COMMENT 'The command used to issue
operation', drivers VARCHAR (100) COMMENT 'The name of the storage engine backup drivers
used in the operation') ENGINE=MYISAM DEFAULT CHARACTER SET utf8;
 
 
-CREATE TABLE IF NOT EXISTS online_backup_progress ( backup_id BIGINT UNSIGNED NOT NULL
COMMENT 'Key for online_backup table entries', object CHAR (30) NOT NULL COMMENT 'The
object being operated on', start_time datetime COMMENT 'The date/time of start of
operation', stop_time datetime COMMENT 'The date/time of end of operation', total_bytes
BIGINT COMMENT 'The size of the object in bytes', progress BIGINT UNSIGNED COMMENT 'The
number of bytes processed', error_num INT NOT NULL DEFAULT 0 COMMENT 'The error from this
run 0 == none', notes CHAR(100) COMMENT 'Commentary from the backup engine')
ENGINE=MYISAM;
+CREATE TABLE IF NOT EXISTS online_backup_progress ( backup_id BIGINT UNSIGNED NOT NULL
COMMENT 'Key for online_backup table entries', object CHAR (30) NOT NULL COMMENT 'The
object being operated on', start_time datetime COMMENT 'The date/time of start of
operation', stop_time datetime COMMENT 'The date/time of end of operation', total_bytes
BIGINT COMMENT 'The size of the object in bytes', progress BIGINT UNSIGNED COMMENT 'The
number of bytes processed', error_num INT NOT NULL DEFAULT 0 COMMENT 'The error from this
run 0 == none', notes CHAR(100) COMMENT 'Commentary from the backup engine') ENGINE=MYISAM
DEFAULT CHARACTER SET utf8;
 
 
 CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File
VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts INT UNSIGNED NOT NULL,
updates INT UNSIGNED NOT NULL, deletes INT UNSIGNED NOT NULL, schemaops INT UNSIGNED NOT
NULL, orig_server_id INT UNSIGNED NOT NULL, orig_epoch BIGINT UNSIGNED NOT NULL, gci INT
UNSIGNED NOT NULL, PRIMARY KEY(epoch, orig_server_id, orig_epoch)) ENGINE=MYISAM;

Thread
bzr commit into mysql-6.0-backup branch (jorgen.loland:2675) Bug#33836Jorgen Loland8 Aug
  • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2675)Bug#33836Øystein Grøvlen8 Aug