Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-01-24 10:04:47+01:00, tomas@stripped +4 -0
change ndb restore attribute promotion flag name
mysql-test/suite/ndb/t/ndb_restore_promotion.test@stripped, 2008-01-24 10:04:45+01:00, tomas@stripped +2 -2
change ndb restore attribute promotion flag name
storage/ndb/tools/restore/consumer_restore.cpp@stripped, 2008-01-24 10:04:45+01:00, tomas@stripped +5 -5
change ndb restore attribute promotion flag name
storage/ndb/tools/restore/consumer_restore.hpp@stripped, 2008-01-24 10:04:45+01:00, tomas@stripped +2 -2
change ndb restore attribute promotion flag name
storage/ndb/tools/restore/restore_main.cpp@stripped, 2008-01-24 10:04:45+01:00, tomas@stripped +8 -8
change ndb restore attribute promotion flag name
diff -Nrup a/mysql-test/suite/ndb/t/ndb_restore_promotion.test b/mysql-test/suite/ndb/t/ndb_restore_promotion.test
--- a/mysql-test/suite/ndb/t/ndb_restore_promotion.test 2007-12-19 14:02:24 +01:00
+++ b/mysql-test/suite/ndb/t/ndb_restore_promotion.test 2008-01-24 10:04:45 +01:00
@@ -216,8 +216,8 @@ select count(*) from t2 natural join t2_
--echo * Restore data with reserving the tail spaces
--echo *************************************************
delete from t2;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -A -R -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -A -R -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -A -P -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -A -P -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
select * from t2;
select length(ch1), length(ch2),length(vch1),length(vch2),length(vch3),
diff -Nrup a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp
--- a/storage/ndb/tools/restore/consumer_restore.cpp 2008-01-14 15:17:59 +01:00
+++ b/storage/ndb/tools/restore/consumer_restore.cpp 2008-01-24 10:04:45 +01:00
@@ -34,7 +34,7 @@ static Uint32 get_part_id(const NdbDicti
extern const char * g_connect_string;
extern BaseString g_options;
-bool BackupRestore::m_reserve_trailing_spaces = false;
+bool BackupRestore::m_preserve_trailing_spaces = false;
const PromotionRules
BackupRestore::m_allowed_promotion_attrs[] = {
@@ -2190,7 +2190,7 @@ BackupRestore::convert_char_varchar(cons
Uint32 len = padding_struct->n_old;
- if (!m_reserve_trailing_spaces)
+ if (!m_preserve_trailing_spaces)
{
while (len > 0 && ((char*)old_data)[len-1] == ' ')
len--;
@@ -2213,7 +2213,7 @@ BackupRestore::convert_char_longvarchar(
Uint32 len = padding_struct->n_old;
- if (!m_reserve_trailing_spaces)
+ if (!m_preserve_trailing_spaces)
{
while (len > 0 && ((char*)old_data)[len-1] == ' ')
len--;
@@ -2238,7 +2238,7 @@ BackupRestore::convert_binary_varbinary(
Uint32 len = padding_struct->n_old;
- if (!m_reserve_trailing_spaces)
+ if (!m_preserve_trailing_spaces)
{
while (len > 0 && ((char*)old_data)[len-1] == 0x00)
len--;
@@ -2262,7 +2262,7 @@ BackupRestore::convert_binary_longvarbin
Uint32 len = padding_struct->n_old;
- if (!m_reserve_trailing_spaces)
+ if (!m_preserve_trailing_spaces)
{
while (len > 0 && ((char*)old_data)[len-1] == 0x00)
len--;
diff -Nrup a/storage/ndb/tools/restore/consumer_restore.hpp b/storage/ndb/tools/restore/consumer_restore.hpp
--- a/storage/ndb/tools/restore/consumer_restore.hpp 2008-01-14 15:17:59 +01:00
+++ b/storage/ndb/tools/restore/consumer_restore.hpp 2008-01-24 10:04:45 +01:00
@@ -72,7 +72,7 @@ public:
m_temp_error = false;
m_no_upgrade = false;
m_promote_attributes = false;
- m_reserve_trailing_spaces = false;
+ m_preserve_trailing_spaces = false;
m_transactions = 0;
m_cache.m_old_table = 0;
}
@@ -165,7 +165,7 @@ public:
bool m_restore_epoch;
bool m_no_upgrade; // for upgrade ArrayType from 5.0 backup file.
bool m_promote_attributes;
- static bool m_reserve_trailing_spaces;
+ static bool m_preserve_trailing_spaces;
Uint32 m_n_tablespace;
Uint32 m_n_logfilegroup;
diff -Nrup a/storage/ndb/tools/restore/restore_main.cpp b/storage/ndb/tools/restore/restore_main.cpp
--- a/storage/ndb/tools/restore/restore_main.cpp 2008-01-14 15:17:59 +01:00
+++ b/storage/ndb/tools/restore/restore_main.cpp 2008-01-24 10:04:45 +01:00
@@ -73,7 +73,7 @@ static int _print_log = 0;
static int _restore_data = 0;
static int _restore_meta = 0;
static int _no_restore_disk = 0;
-static bool _reserve_trailing_spaces = false;
+static bool _preserve_trailing_spaces = false;
BaseString g_options("ndb_restore");
const char *load_default_groups[]= { "mysql_cluster","ndb_restore",0 };
@@ -129,9 +129,9 @@ static struct my_option my_long_options[
"Allow attributes to be promoted when restoring data from backup",
(uchar**) &ga_promote_attributes, (uchar**) &ga_promote_attributes, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
- { "reserve-trailing-spaces", 'R',
- "Allow to reserve the tailing spaces (including paddings) When char->varchar or binary->varbinary is promoted",
- (uchar**) &_reserve_trailing_spaces, (uchar**)_reserve_trailing_spaces , 0,
+ { "preserve-trailing-spaces", 'P',
+ "Allow to preserve the tailing spaces (including paddings) When char->varchar or binary->varbinary is promoted",
+ (uchar**) &_preserve_trailing_spaces, (uchar**)_preserve_trailing_spaces , 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "no-restore-disk-objects", 'd',
"Dont restore disk objects (tablespace/logfilegroups etc)",
@@ -492,9 +492,9 @@ o verify nodegroup mapping
restore->m_promote_attributes = true;
}
- if (_reserve_trailing_spaces)
+ if (_preserve_trailing_spaces)
{
- restore->m_reserve_trailing_spaces = true;
+ restore->m_preserve_trailing_spaces = true;
}
if (ga_restore_epoch)
@@ -716,8 +716,8 @@ main(int argc, char** argv)
g_options.appfmt(" -u");
if (ga_promote_attributes)
g_options.appfmt(" -A");
- if (_reserve_trailing_spaces)
- g_options.appfmt(" -R");
+ if (_preserve_trailing_spaces)
+ g_options.appfmt(" -P");
if (ga_skip_table_check)
g_options.appfmt(" -s");
if (_restore_data)
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2845) | tomas | 24 Jan |