18 #include <NDBT_ReturnCodes.h>
19 #include "consumer_restore.hpp"
20 #include <kernel/ndb_limits.h>
24 #include <Properties.hpp>
25 #include <NdbTypesUtil.hpp>
27 #include <ndb_internal.hpp>
28 #include <ndb_logevent.h>
29 #include "../src/ndbapi/NdbDictionaryImpl.hpp"
31 #define NDB_ANYVALUE_FOR_NOLOGGING 0x8000007f
33 extern FilteredNdbOut err;
34 extern FilteredNdbOut info;
35 extern FilteredNdbOut debug;
42 extern unsigned int opt_no_binlog;
43 extern bool ga_skip_broken_objects;
47 bool BackupRestore::m_preserve_trailing_spaces =
false;
54 BackupRestore::convert_bitset(
const void *source,
58 if (!source || !target)
62 const unsigned char *
const s = (
const unsigned char *)source;
66 if (t->n_new >= t->n_old)
69 memset(t->new_row, 0, t->n_new);
71 memcpy(t->new_row, s, t->n_old);
75 memset(t->new_row, 0xFF, t->n_new);
82 template<
typename S,
typename T >
84 BackupRestore::convert_array(
const void * source,
88 if (!source || !target)
92 const unsigned char *
const s = (
const unsigned char *)source;
94 const Uint32 s_prefix_length = S::lengthPrefixSize();
95 const Uint32 t_prefix_length = T::lengthPrefixSize();
98 Uint32 length = (S::isFixedSized() ? t->n_old : S::readLengthPrefix(s));
99 const Uint32 max_length = t->n_new - t_prefix_length;
100 if (S::isFixedSized() && !m_preserve_trailing_spaces) {
101 const char s_padding_char = (S::isBinary() ? 0x00 :
' ');
103 while (length > 0 && s[length - 1] == s_padding_char) {
107 if (length <= max_length) {
115 if (!T::isFixedSized()) {
116 T::writeLengthPrefix(t->new_row, length);
120 memcpy(t->new_row + t_prefix_length, s + s_prefix_length, length);
123 if (T::isFixedSized()) {
124 const char t_padding_char = (T::isBinary() ? 0x00 :
' ');
125 const Uint32 l = max_length - length;
126 memset(t->new_row + t_prefix_length + length, t_padding_char, l);
132 template<
typename S,
typename T >
134 BackupRestore::convert_integral(
const void * source,
138 if (!source || !target)
142 typename S::DomainT s;
143 S::load(&s, (
char *)source);
180 typename T::DomainT t;
184 assert(S::lowest() <= 0 && T::lowest() <= 0 && s <= 0);
185 const typename S::SignedT s_l_s = S::asSigned(S::lowest());
186 const typename T::SignedT t_l_s = T::asSigned(T::lowest());
187 const typename S::SignedT s_s = S::asSigned(s);
193 t =
static_cast< typename T::DomainT
>(s);
200 assert(S::highest() > 0 && T::highest() > 0 && s > 0);
201 const typename S::UnsignedT s_h_u = S::asUnsigned(S::highest());
202 const typename T::UnsignedT t_h_u = T::asUnsigned(T::highest());
203 const typename S::UnsignedT s_u = S::asUnsigned(s);
209 t =
static_cast< typename T::DomainT
>(s);
214 T::store((
char *)target, &t);
224 BackupRestore::m_allowed_promotion_attrs[] = {
231 convert_array< Hchar, Hchar >},
233 convert_array< Hchar, Hvarchar >},
235 convert_array< Hchar, Hlongvarchar >},
237 convert_array< Hvarchar, Hchar >},
239 convert_array< Hvarchar, Hvarchar >},
241 convert_array< Hvarchar, Hlongvarchar >},
243 convert_array< Hlongvarchar, Hchar >},
245 convert_array< Hlongvarchar, Hvarchar >},
247 convert_array< Hlongvarchar, Hlongvarchar >},
251 convert_array< Hbinary, Hbinary >},
253 convert_array< Hbinary, Hvarbinary >},
255 convert_array< Hbinary, Hlongvarbinary >},
257 convert_array< Hvarbinary, Hbinary >},
259 convert_array< Hvarbinary, Hvarbinary >},
261 convert_array< Hvarbinary, Hlongvarbinary >},
263 convert_array< Hlongvarbinary, Hbinary >},
265 convert_array< Hlongvarbinary, Hvarbinary >},
267 convert_array< Hlongvarbinary, Hlongvarbinary >},
271 convert_integral< Hint8, Hint16>},
273 convert_integral< Hint8, Hint24>},
275 convert_integral< Hint8, Hint32>},
277 convert_integral< Hint8, Hint64>},
279 convert_integral< Hint16, Hint24>},
281 convert_integral< Hint16, Hint32>},
283 convert_integral< Hint16, Hint64>},
285 convert_integral< Hint24, Hint32>},
287 convert_integral< Hint24, Hint64>},
289 convert_integral< Hint32, Hint64>},
291 convert_integral< Huint8, Huint16>},
293 convert_integral< Huint8, Huint24>},
295 convert_integral< Huint8, Huint32>},
297 convert_integral< Huint8, Huint64>},
299 convert_integral< Huint16, Huint24>},
301 convert_integral< Huint16, Huint32>},
303 convert_integral< Huint16, Huint64>},
305 convert_integral< Huint24, Huint32>},
307 convert_integral< Huint24, Huint64>},
309 convert_integral< Huint32, Huint64>},
313 convert_integral< Hint16, Hint8>},
315 convert_integral< Hint24, Hint8>},
317 convert_integral< Hint24, Hint16>},
319 convert_integral< Hint32, Hint8>},
321 convert_integral< Hint32, Hint16>},
323 convert_integral< Hint32, Hint24>},
325 convert_integral< Hint64, Hint8>},
327 convert_integral< Hint64, Hint16>},
329 convert_integral< Hint64, Hint24>},
331 convert_integral< Hint64, Hint32>},
333 convert_integral< Huint16, Huint8>},
335 convert_integral< Huint24, Huint8>},
337 convert_integral< Huint24, Huint16>},
339 convert_integral< Huint32, Huint8>},
341 convert_integral< Huint32, Huint16>},
343 convert_integral< Huint32, Huint24>},
345 convert_integral< Huint64, Huint8>},
347 convert_integral< Huint64, Huint16>},
349 convert_integral< Huint64, Huint24>},
351 convert_integral< Huint64, Huint32>},
355 convert_integral< Hint8, Huint8>},
357 convert_integral< Hint16, Huint16>},
359 convert_integral< Hint24, Huint24>},
361 convert_integral< Hint32, Huint32>},
363 convert_integral< Hint64, Huint64>},
365 convert_integral< Huint8, Hint8>},
367 convert_integral< Huint16, Hint16>},
369 convert_integral< Huint24, Hint24>},
371 convert_integral< Huint32, Hint32>},
373 convert_integral< Huint64, Hint64>},
377 convert_integral< Hint8, Huint16>},
379 convert_integral< Hint8, Huint24>},
381 convert_integral< Hint8, Huint32>},
383 convert_integral< Hint8, Huint64>},
385 convert_integral< Hint16, Huint24>},
387 convert_integral< Hint16, Huint32>},
389 convert_integral< Hint16, Huint64>},
391 convert_integral< Hint24, Huint32>},
393 convert_integral< Hint24, Huint64>},
395 convert_integral< Hint32, Huint64>},
397 convert_integral< Huint8, Hint16>},
399 convert_integral< Huint8, Hint24>},
401 convert_integral< Huint8, Hint32>},
403 convert_integral< Huint8, Hint64>},
405 convert_integral< Huint16, Hint24>},
407 convert_integral< Huint16, Hint32>},
409 convert_integral< Huint16, Hint64>},
411 convert_integral< Huint24, Hint32>},
413 convert_integral< Huint24, Hint64>},
415 convert_integral< Huint32, Hint64>},
419 convert_integral< Hint16, Huint8>},
421 convert_integral< Hint24, Huint8>},
423 convert_integral< Hint24, Huint16>},
425 convert_integral< Hint32, Huint8>},
427 convert_integral< Hint32, Huint16>},
429 convert_integral< Hint32, Huint24>},
431 convert_integral< Hint64, Huint8>},
433 convert_integral< Hint64, Huint16>},
435 convert_integral< Hint64, Huint24>},
437 convert_integral< Hint64, Huint32>},
439 convert_integral< Huint16, Hint8>},
441 convert_integral< Huint24, Hint8>},
443 convert_integral< Huint24, Hint16>},
445 convert_integral< Huint32, Hint8>},
447 convert_integral< Huint32, Hint16>},
449 convert_integral< Huint32, Hint24>},
451 convert_integral< Huint64, Hint8>},
453 convert_integral< Huint64, Hint16>},
455 convert_integral< Huint64, Hint24>},
457 convert_integral< Huint64, Hint32>},
463 BackupRestore::init(Uint32 tableChangesMask)
467 if (!m_restore && !m_restore_meta && !m_restore_epoch &&
468 !m_rebuild_indexes && !m_disable_indexes)
471 m_tableChangesMask = tableChangesMask;
474 if (m_cluster_connection == NULL)
476 err <<
"Failed to create cluster connection!!" << endl;
480 if(m_cluster_connection->
connect(12, 5, 1) != 0)
485 m_ndb =
new Ndb(m_cluster_connection);
493 err <<
"Failed to connect to ndb!!" << endl;
496 info <<
"Connected to ndb!!" << endl;
502 err <<
"Failed to allocate callback structs" << endl;
506 m_free_callback= m_callback;
507 for (Uint32
i= 0;
i < m_parallelism;
i++) {
508 m_callback[
i].restore=
this;
509 m_callback[
i].connection= 0;
511 m_callback[
i-1].next= &(m_callback[
i]);
513 m_callback[m_parallelism-1].next = 0;
518 void BackupRestore::release()
528 delete [] m_callback;
532 if (m_cluster_connection)
534 delete m_cluster_connection;
535 m_cluster_connection= 0;
539 BackupRestore::~BackupRestore()
546 match_blob(
const char *
name){
549 if((cnt = sscanf(name,
"%[^/]/%[^/]/NDB$BLOB_%d_%d", buf, buf, &id1, &id2)) == 4){
562 dissect_table_name(
const char * qualified_table_name,
568 if (tmp.split(split,
"/") != 3) {
569 err <<
"Invalid table name format `" << qualified_table_name
574 schema_name = split[1];
575 table_name = split[2];
584 check_rewrite_database(
BaseString & db_name) {
585 const char * new_db_name;
586 if (g_rewrite_databases.get(db_name.
c_str(), &new_db_name))
587 db_name.
assign(new_db_name);
592 if(m_cache.m_old_table == tab)
593 return m_cache.m_new_table;
594 m_cache.m_old_table = tab;
597 char db[256], schema[256];
598 if (strcmp(tab->
getName(),
"SYSTAB_0") == 0 ||
599 strcmp(tab->
getName(),
"sys/def/SYSTAB_0") == 0) {
603 m_cache.m_new_table = tab;
605 else if((cnt = sscanf(tab->
getName(),
"%[^/]/%[^/]/NDB$BLOB_%d_%d",
606 db, schema, &id1, &id2)) == 4){
618 assert(m_cache.m_new_table);
619 return m_cache.m_new_table;
623 BackupRestore::finalize_table(
const TableS &
table){
625 if (!m_restore && !m_restore_meta)
627 if (!table.have_auto_inc())
630 Uint64 max_val= table.get_max_auto_val();
633 Uint64 auto_val = ~(Uint64)0;
634 int r= m_ndb->readAutoIncrementValue(get_table(table.m_dictTable), auto_val);
637 NdbSleep_MilliSleep(50);
645 max_val+1 > auto_val || auto_val == ~(Uint64)0)
647 r= m_ndb->setAutoIncrementValue(get_table(table.m_dictTable),
652 NdbSleep_MilliSleep(50);
662 BackupRestore::rebuild_indexes(
const TableS& table)
664 const char *tablename = table.getTableName();
668 if (m_index_per_table.size() <=
id)
672 if (!dissect_table_name(tablename, db_name, schema_name, table_name)) {
675 check_rewrite_database(db_name);
682 for(
size_t i = 0;
i<indexes.size();
i++)
685 const char *
const idx_name = idx->
getName();
686 const char *
const tab_name = idx->
getTable();
687 Uint64 start = NdbTick_CurrentMillisecond();
688 info <<
"Rebuilding index `" << idx_name <<
"` on table `"
689 << tab_name <<
"` ..." << flush;
690 if ((dict->
getIndex(idx_name, tab_name) == NULL)
693 info <<
"FAIL!" << endl;
694 err <<
"Rebuilding index `" << idx_name <<
"` on table `"
695 << tab_name <<
"` failed: ";
700 Uint64 stop = NdbTick_CurrentMillisecond();
701 info <<
"OK (" << ((stop - start)/1000) <<
"s)" <<endl;
711 Uint32 no_parts = table->getFragmentDataLen() >> 1;
714 if (node_groups[0] != 0)
716 for (i = 1; i < no_parts; i++)
718 if (node_groups[i] != NDB_UNDEF_NODEGROUP)
726 static Uint32 get_no_fragments(Uint64 max_rows, Uint32 no_nodes)
729 Uint32 acc_row_size = 27;
730 Uint32 acc_fragment_size = 512*1024*1024;
731 Uint32 no_parts= Uint32((max_rows*acc_row_size)/acc_fragment_size + 1);
732 Uint32 reported_parts = no_nodes;
733 while (reported_parts < no_parts && ++i < 4 &&
734 (reported_parts + no_parts) < MAX_NDB_PARTITIONS)
735 reported_parts+= no_nodes;
736 if (reported_parts < no_parts)
738 err <<
"Table will be restored but will not be able to handle the maximum";
739 err <<
" amount of rows as requested" << endl;
741 return reported_parts;
748 Uint32 node_group[MAX_NDB_PARTITIONS];
752 for (i = 1; i < no_parts; i++)
754 node_group[
i] = NDB_UNDEF_NODEGROUP;
759 Uint32 BackupRestore::map_ng(Uint32 ng)
763 if (ng == NDB_UNDEF_NODEGROUP ||
764 ng_map[ng].map_array[0] == NDB_UNDEF_NODEGROUP)
771 Uint32 curr_inx = ng_map[ng].curr_index;
772 Uint32 new_curr_inx = curr_inx + 1;
774 assert(ng < MAX_NDB_PARTITIONS);
775 assert(curr_inx < MAX_MAPS_PER_NODE_GROUP);
776 assert(new_curr_inx < MAX_MAPS_PER_NODE_GROUP);
778 if (new_curr_inx >= MAX_MAPS_PER_NODE_GROUP)
780 else if (ng_map[ng].map_array[new_curr_inx] == NDB_UNDEF_NODEGROUP)
782 new_ng = ng_map[ng].map_array[curr_inx];
783 ng_map[ng].curr_index = new_curr_inx;
789 bool BackupRestore::map_nodegroups(Uint32 *ng_array, Uint32 no_parts)
793 DBUG_ENTER(
"map_nodegroups");
795 assert(no_parts < MAX_NDB_PARTITIONS);
796 for (i = 0; i < no_parts; i++)
799 ng = map_ng(ng_array[i]);
800 if (ng != ng_array[i])
808 static void copy_byte(
const char **data,
char **new_data, uint *len)
817 bool BackupRestore::search_replace(
char *search_str,
char **new_data,
818 const char **data,
const char *end_data,
821 uint search_str_len = strlen(search_str);
823 bool in_delimiters = FALSE;
824 bool escape_char = FALSE;
825 char start_delimiter = 0;
826 DBUG_ENTER(
"search_replace");
831 copy_byte(data, new_data, new_data_len);
836 else if (in_delimiters)
838 if (c == start_delimiter)
839 in_delimiters = FALSE;
841 else if (c ==
'\'' || c ==
'\"')
843 in_delimiters = TRUE;
850 else if (c == search_str[inx])
853 if (inx == search_str_len)
857 while (*data != end_data)
862 number = (10 * number) + (**data);
863 if (number > MAX_NDB_NODES)
874 uint
temp = map_ng(number);
879 digits[no_digits] = temp % 10;
883 for (no_digits--; no_digits >= 0; no_digits--)
885 **new_data = digits[no_digits];
899 }
while (*data < end_data);
903 bool BackupRestore::map_in_frm(
char *new_data,
const char *data,
904 uint data_len, uint *new_data_len)
906 const char *end_data= data + data_len;
907 const char *end_part_data;
908 const char *part_data;
910 uint start_key_definition_len = uint2korr(data + 6);
911 uint key_definition_len = uint4korr(data + 47);
913 DBUG_ENTER(
"map_in_frm");
915 if (data_len < 4096)
goto error;
916 extra_ptr = (
char*)data + start_key_definition_len + key_definition_len;
917 if ((
int)data_len < ((extra_ptr - data) + 2))
goto error;
918 extra_ptr = extra_ptr + 2 + uint2korr(extra_ptr);
919 if ((
int)data_len < ((extra_ptr - data) + 2))
goto error;
920 extra_ptr = extra_ptr + 2 + uint2korr(extra_ptr);
921 if ((
int)data_len < ((extra_ptr - data) + 4))
goto error;
922 part_info_len = uint4korr(extra_ptr);
923 part_data = extra_ptr + 4;
924 if ((
int)data_len < ((part_data + part_info_len) - data))
goto error;
928 copy_byte(&data, &new_data, new_data_len);
929 }
while (data < part_data);
930 end_part_data = part_data + part_info_len;
933 if (search_replace((
char*)
" NODEGROUP = ", &new_data, &data,
934 end_part_data, new_data_len))
936 }
while (data != end_part_data);
939 copy_byte(&data, &new_data, new_data_len);
940 }
while (data < end_data);
949 uchar *pack_data, *data, *new_pack_data;
952 size_t data_len, new_pack_len;
953 uint no_parts, extra_growth;
954 DBUG_ENTER(
"translate_frm");
963 extra_growth = no_parts * 4;
964 if (unpackfrm(&data, &data_len, pack_data))
968 if ((new_data = (
char*) malloc(data_len + extra_growth)))
972 if (map_in_frm(new_data, (
const char*)data, data_len, &new_data_len))
977 if (packfrm((uchar*) new_data, new_data_len,
978 &new_pack_data, &new_pack_len))
983 table->
setFrm(new_pack_data, (Uint32)new_pack_len);
987 #include <signaldata/DictTabInfo.hpp>
990 BackupRestore::object(Uint32
type,
const void * ptr)
1001 Uint32
id = old.getObjectId();
1003 if (!m_no_restore_disk)
1006 old.setDefaultLogfileGroup(* lg);
1007 info <<
"Creating tablespace: " << old.getName() <<
"..." << flush;
1008 int ret = dict->createTablespace(old);
1012 info <<
"FAILED" << endl;
1013 err <<
"Create tablespace failed: " << old.getName() <<
": " << errobj << endl;
1016 info <<
"done" << endl;
1025 m_tablespaces.set(currptr,
id, null);
1026 debug <<
"Retreived tablespace: " << currptr->getName()
1027 <<
" oldid: " <<
id <<
" newid: " << currptr->
getObjectId()
1028 <<
" " << (
void*)currptr << endl;
1033 err <<
"Failed to retrieve tablespace \"" << old.getName() <<
"\": "
1043 Uint32
id = old.getObjectId();
1045 if (!m_no_restore_disk)
1047 info <<
"Creating logfile group: " << old.getName() <<
"..." << flush;
1048 int ret = dict->createLogfileGroup(old);
1052 info <<
"FAILED" << endl;
1053 err <<
"Create logfile group failed: " << old.getName() <<
": " << errobj << endl;
1056 info <<
"done" << endl;
1066 m_logfilegroups.set(currptr,
id, null);
1067 debug <<
"Retreived logfile group: " << currptr->getName()
1068 <<
" oldid: " <<
id <<
" newid: " << currptr->
getObjectId()
1069 <<
" " << (
void*)currptr << endl;
1074 err <<
"Failed to retrieve logfile group \"" << old.getName() <<
"\": "
1082 if (!m_no_restore_disk)
1086 old.getTablespaceId(&objid);
1088 debug <<
"Connecting datafile " << old.getPath()
1089 <<
" to tablespace: oldid: " << objid.getObjectId()
1091 old.setTablespace(* ts);
1092 info <<
"Creating datafile \"" << old.getPath() <<
"\"..." << flush;
1093 if (dict->createDatafile(old))
1096 info <<
"FAILED" << endl;
1097 err <<
"Create datafile failed: " << old.getPath() <<
": " << errobj << endl;
1100 info <<
"done" << endl;
1108 if (!m_no_restore_disk)
1112 old.getLogfileGroupId(&objid);
1114 debug <<
"Connecting undofile " << old.getPath()
1115 <<
" to logfile group: oldid: " << objid.getObjectId()
1117 <<
" " << (
void*)lg << endl;
1118 old.setLogfileGroup(* lg);
1119 info <<
"Creating undofile \"" << old.getPath() <<
"\"..." << flush;
1120 if (dict->createUndofile(old))
1123 info <<
"FAILED" << endl;
1124 err <<
"Create undofile failed: " << old.getPath() <<
": " << errobj << endl;
1127 info <<
"done" << endl;
1133 case DictTabInfo::HashMap:
1137 Uint32
id = old.getObjectId();
1144 info <<
"Created hashmap: " << old.getName() << endl;
1150 if (errobj.
code != 721)
1152 err <<
"Could not create hashmap \"" << old.getName() <<
"\": "
1160 if (dict->
getHashMap(curr, old.getName()) == 0)
1165 m_hashmaps.set(currptr,
id, null);
1166 debug <<
"Retreived hashmap: " << currptr->getName()
1167 <<
" oldid: " <<
id <<
" newid: " << currptr->
getObjectId()
1168 <<
" " << (
void*)currptr << endl;
1173 err <<
"Failed to retrieve hashmap \"" << old.getName() <<
"\": "
1180 err <<
"Unknown object type: " << type << endl;
1188 BackupRestore::has_temp_error(){
1189 return m_temp_error;
1195 if (!m_restore_epoch)
1199 unsigned apply_table_format= 0;
1208 err << NDB_APPLY_TABLE <<
": "
1217 apply_table_format= 1;
1224 apply_table_format= 2;
1227 if (apply_table_format == 0)
1229 err << NDB_APPLY_TABLE <<
" has wrong format\n";
1233 Uint32 server_id= 0;
1234 Uint64 epoch= Uint64(metaData.getStopGCP());
1235 Uint32 version= metaData.getNdbVersion();
1242 if (version >= NDBD_MICRO_GCP_63 ||
1243 (version >= NDBD_MICRO_GCP_62 && getMinor(version) == 2))
1251 epoch += (Uint64(1) << 32) - 1;
1255 char empty_string[1];
1260 err << NDB_APPLY_TABLE <<
": "
1267 err << NDB_APPLY_TABLE <<
": "
1272 op->
equal(0u, (
const char *)&server_id,
sizeof(server_id)) ||
1273 op->
setValue(1u, (
const char *)&epoch,
sizeof(epoch)))
1275 err << NDB_APPLY_TABLE <<
": "
1279 if ((apply_table_format == 2) &&
1280 (op->
setValue(2u, (
const char *)&empty_string, 1) ||
1281 op->
setValue(3u, (
const char *)&zero,
sizeof(zero)) ||
1282 op->
setValue(4u, (
const char *)&zero,
sizeof(zero))))
1284 err << NDB_APPLY_TABLE <<
": "
1290 err << NDB_APPLY_TABLE <<
": "
1301 BackupRestore::report_started(
unsigned backup_id,
unsigned node_id)
1309 Ndb_internal::send_event_report(
false , m_ndb, data, 3);
1315 BackupRestore::report_meta_data(
unsigned backup_id,
unsigned node_id)
1323 data[3]= m_n_tables;
1324 data[4]= m_n_tablespace;
1325 data[5]= m_n_logfilegroup;
1326 data[6]= m_n_datafile;
1327 data[7]= m_n_undofile;
1328 Ndb_internal::send_event_report(
false , m_ndb, data, 8);
1333 BackupRestore::report_data(
unsigned backup_id,
unsigned node_id)
1341 data[3]= m_dataCount & 0xFFFFFFFF;
1343 data[5]= (Uint32)(m_dataBytes & 0xFFFFFFFF);
1344 data[6]= (Uint32)((m_dataBytes >> 32) & 0xFFFFFFFF);
1345 Ndb_internal::send_event_report(
false , m_ndb, data, 7);
1351 BackupRestore::report_log(
unsigned backup_id,
unsigned node_id)
1359 data[3]= m_logCount & 0xFFFFFFFF;
1361 data[5]= (Uint32)(m_logBytes & 0xFFFFFFFF);
1362 data[6]= (Uint32)((m_logBytes >> 32) & 0xFFFFFFFF);
1363 Ndb_internal::send_event_report(
false , m_ndb, data, 7);
1369 BackupRestore::report_completed(
unsigned backup_id,
unsigned node_id)
1377 Ndb_internal::send_event_report(
false , m_ndb, data, 3);
1383 BackupRestore::column_compatible_check(
const char* tableName,
1387 if (backupCol->
equal(*dbCol))
1394 bool similarEnough =
true;
1399 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1400 <<
" has different name in DB (" << dbCol->
getName() <<
")"
1402 similarEnough =
false;
1407 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1408 << (
" has different type in DB; promotion or lossy type conversion"
1409 " (demotion, signed/unsigned) may be required.") << endl;
1410 similarEnough =
false;
1415 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1417 <<
" a primary key in the DB." << endl;
1418 similarEnough =
false;
1424 if (backupCol->getDistributionKey() != dbCol->getDistributionKey())
1426 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1427 << (dbCol->getDistributionKey()?
" is":
" is not")
1428 <<
" a distribution key in the DB." << endl;
1436 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1438 <<
" nullable in the DB." << endl;
1439 similarEnough =
false;
1444 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1445 <<
" precision is different in the DB" << endl;
1446 similarEnough =
false;
1451 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1452 <<
" scale is different in the DB" << endl;
1453 similarEnough =
false;
1458 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1459 <<
" length is different in the DB" << endl;
1460 similarEnough =
false;
1465 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1466 <<
" charset is different in the DB" << endl;
1467 similarEnough =
false;
1470 if (backupCol->getAutoIncrement() != dbCol->getAutoIncrement())
1472 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1473 << (dbCol->getAutoIncrement()?
" is":
" is not")
1474 <<
" AutoIncrementing in the DB" << endl;
1476 similarEnough =
false;
1480 unsigned int backupDefaultLen, dbDefaultLen;
1481 const void *backupDefaultPtr, *dbDefaultPtr;
1482 backupDefaultPtr = backupCol->getDefaultValue(&backupDefaultLen);
1483 dbDefaultPtr = dbCol->getDefaultValue(&dbDefaultLen);
1485 if ((backupDefaultLen != dbDefaultLen) ||
1486 (memcmp(backupDefaultPtr, dbDefaultPtr, backupDefaultLen) != 0))
1488 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1489 <<
" Default value is different in the DB" << endl;
1494 if (backupCol->getArrayType() != dbCol->getArrayType())
1496 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1497 <<
" ArrayType is different in the DB" << endl;
1498 similarEnough =
false;
1501 if (backupCol->getStorageType() != dbCol->getStorageType())
1503 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1504 <<
" Storagetype is different in the DB" << endl;
1508 if (backupCol->getBlobVersion() != dbCol->getBlobVersion())
1510 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1511 <<
" Blob version is different in the DB" << endl;
1512 similarEnough =
false;
1517 info <<
"Column " << tableName <<
"." << backupCol->
getName()
1519 <<
" Dynamic in the DB" << endl;
1524 info <<
" Difference(s) will be ignored during restore." << endl;
1526 info <<
" Difference(s) cannot be ignored. Cannot restore this column as is." << endl;
1528 return similarEnough;
1537 const char *tablename = tableS.getTableName();
1539 if(tableS.m_dictTable == NULL){
1540 ndbout<<
"Table %s has no m_dictTable " << tablename << endl;
1546 if(match_blob(tablename) >= 0)
1549 const NdbTableImpl & tmptab = NdbTableImpl::getImpl(* tableS.m_dictTable);
1555 if (!dissect_table_name(tablename, db_name, schema_name, table_name)) {
1558 check_rewrite_database(db_name);
1566 err <<
"Unable to find table: " << table_name << endl;
1579 if (col_in_kernel == 0)
1581 if ((m_tableChangesMask & TCM_EXCLUDE_MISSING_COLUMNS) == 0)
1583 ndbout <<
"Missing column("
1584 << tableS.m_dictTable->
getName() <<
"."
1586 <<
") in DB and exclude-missing-columns not specified" << endl;
1590 info <<
"Column in backup ("
1591 << tableS.m_dictTable->
getName() <<
"."
1593 <<
") missing in DB. Excluding column from restore." << endl;
1595 attr_desc->m_exclude =
true;
1606 const NDBCOL * col_in_backup =
1609 if (col_in_backup == 0)
1611 if ((m_tableChangesMask & TCM_EXCLUDE_MISSING_COLUMNS) == 0)
1613 ndbout <<
"Missing column("
1614 << tableS.m_dictTable->
getName() <<
"."
1616 <<
") in backup and exclude-missing-columns not specified"
1627 (col_in_kernel->getDefaultValue() == NULL)))
1629 ndbout <<
"Missing column("
1630 << tableS.m_dictTable->
getName() <<
"."
1632 <<
") in backup is primary key or not nullable or defaulted in DB"
1637 info <<
"Column in DB ("
1638 << tableS.m_dictTable->
getName() <<
"."
1640 <<
") missing in Backup. Will be set to "
1641 << ((col_in_kernel->getDefaultValue() == NULL)?
"Null":
"Default value")
1646 AttrCheckCompatFunc attrCheckCompatFunc = NULL;
1650 if (attr_desc->m_exclude)
1656 if(column_compatible_check(tablename,
1665 attrCheckCompatFunc = get_attr_check_compatability(type_in_backup,
1668 = (attrCheckCompatFunc == NULL ? ACT_UNSUPPORTED
1669 : attrCheckCompatFunc(*col_in_backup, *col_in_kernel));
1671 case ACT_UNSUPPORTED:
1673 err <<
"Table: "<< tablename
1674 <<
" column: " << col_in_backup->
getName()
1675 <<
" incompatible with kernel's definition" << endl;
1678 case ACT_PRESERVING:
1679 if ((m_tableChangesMask & TCM_ATTRIBUTE_PROMOTION) == 0)
1681 err <<
"Table: "<< tablename
1682 <<
" column: " << col_in_backup->
getName()
1683 <<
" promotable to kernel's definition but option"
1684 <<
" promote-attributes not specified" << endl;
1689 if ((m_tableChangesMask & TCM_ATTRIBUTE_DEMOTION) == 0)
1691 err <<
"Table: "<< tablename
1692 <<
" column: " << col_in_backup->
getName()
1693 <<
" convertable to kernel's definition but option"
1694 <<
" lossy-conversions not specified" << endl;
1699 err <<
"internal error: illegal value of compat = " << compat << endl;
1704 attr_desc->convertFunc = get_convert_func(type_in_backup,
1706 Uint32 m_attrSize = NdbColumnImpl::getImpl(*col_in_kernel).m_attrSize;
1707 Uint32 m_arraySize = NdbColumnImpl::getImpl(*col_in_kernel).m_arraySize;
1719 m_attrSize * m_arraySize;
1724 err <<
"No more memory available!" << endl;
1727 s->n_old = (attr_desc->size * attr_desc->arraySize) / 8;
1728 s->n_new = m_attrSize * m_arraySize;
1729 memset(s->new_row, 0 , m_attrSize * m_arraySize + 2);
1730 attr_desc->parameter = s;
1734 unsigned int size = m_attrSize * m_arraySize;
1735 attr_desc->parameter = malloc(size + 2);
1736 if (!attr_desc->parameter)
1738 err <<
"No more memory available!" << endl;
1741 memset(attr_desc->parameter, 0, size + 2);
1744 info <<
"Data for column "
1747 <<
" will be converted from Backup type into DB type." << endl;
1754 BackupRestore::createSystable(
const TableS & tables){
1755 if (!m_restore && !m_restore_meta && !m_restore_epoch)
1757 const char *tablename = tables.getTableName();
1759 if( strcmp(tablename, NDB_REP_DB
"/def/" NDB_APPLY_TABLE) != 0 &&
1760 strcmp(tablename, NDB_REP_DB
"/def/" NDB_SCHEMA_TABLE) != 0 )
1766 if (!dissect_table_name(tablename, db_name, schema_name, table_name)) {
1779 return table(tables);
1784 if (!m_restore && !m_restore_meta && !m_rebuild_indexes && !m_disable_indexes)
1787 const char * name = table.getTableName();
1792 if(match_blob(name) >= 0)
1795 const NdbTableImpl & tmptab = NdbTableImpl::getImpl(* table.m_dictTable);
1797 m_indexes.push_back(table.m_dictTable);
1802 if (!dissect_table_name(name, db_name, schema_name, table_name)) {
1805 check_rewrite_database(db_name);
1817 if (copy.getTablespace(&
id))
1819 debug <<
"Connecting " << name <<
" to tablespace oldid: " <<
id << flush;
1822 copy.setTablespace(* ts);
1825 if (copy.
getFragmentType() == NdbDictionary::Object::HashMapPartition)
1828 if (copy.getHashMap(&
id))
1831 copy.setHashMap(* hm);
1834 else if (copy.getDefaultNoPartitionsFlag())
1841 Uint32 no_nodes = m_cluster_connection->no_db_nodes();
1844 set_default_nodegroups(©);
1857 if (map_nodegroups(new_array.getBase(), no_parts))
1859 if (translate_frm(©))
1861 err <<
"Create table " << table.getTableName() <<
" failed: ";
1862 err <<
"Translate frm error" << endl;
1878 if (table.getBackupVersion() < MAKE_VERSION(5,1,18))
1879 copy.setForceVarPart(
true);
1880 else if (getMajor(table.getBackupVersion()) == 6 &&
1881 (table.getBackupVersion() < MAKE_VERSION(6,1,7) ||
1882 table.getBackupVersion() == MAKE_VERSION(6,2,0)))
1883 copy.setForceVarPart(
true);
1890 if (table.getNoOfRecords() > copy.getMaxRows())
1896 if (table.getBackupVersion() < MAKE_VERSION(5,1,0) && !m_no_upgrade){
1903 tableImpl.getColumn(i)->setArrayType(NdbDictionary::Column::ArrayTypeShortVar);
1906 tableImpl.getColumn(i)->setArrayType(NdbDictionary::Column::ArrayTypeMediumVar);
1912 err <<
"Create table `" << table.getTableName() <<
"` failed: "
1922 err <<
"The node groups defined in the table didn't exist in this";
1923 err <<
" cluster." << endl <<
"There is an option to use the";
1924 err <<
" the parameter ndb-nodegroup-map to define a mapping from";
1925 err << endl <<
"the old nodegroups to new nodegroups" << endl;
1930 info <<
"Successfully restored table `"
1931 << table.getTableName() <<
"`" << endl;
1936 err <<
"Unable to find table: `" << table_name <<
"`" << endl;
1952 my_event.setReport(NdbDictionary::Event::ER_DDL);
1955 bool has_blobs =
false;
1958 my_event.addEventColumn(a);
1965 my_event.mergeEvents(
true);
1971 info <<
"Event for table " << table.getTableName()
1972 <<
" already exists, removing.\n";
1973 if (!dict->
dropEvent(my_event.getName(), 1))
1976 err <<
"Create table event for " << table.getTableName() <<
" failed: "
1982 info <<
"Successfully restored table event " << event_name << endl ;
1995 BackupRestore::endOfTables(){
1996 if(!m_restore_meta && !m_rebuild_indexes && !m_disable_indexes)
2000 for(
size_t i = 0; i<m_indexes.size(); i++){
2001 NdbTableImpl & indtab = NdbTableImpl::getImpl(* m_indexes[i]);
2008 check_rewrite_database(db_name);
2015 err <<
"Unable to find base table `" << table_name
2017 << indtab.
getName() <<
"`" << endl;
2018 if (ga_skip_broken_objects)
2029 if (tmp.split(split_idx,
"/") != 4)
2031 err <<
"Invalid index name format `" << indtab.
getName() <<
"`" << endl;
2037 err <<
"Failed to create index `" << split_idx[3]
2038 <<
"` on " << table_name << endl;
2041 idx->
setName(split_idx[3].c_str());
2042 if (m_restore_meta && !m_disable_indexes && !m_rebuild_indexes)
2047 err <<
"Failed to create index `" << split_idx[3].c_str()
2048 <<
"` on `" << table_name <<
"`" << endl
2053 info <<
"Successfully created index `" << split_idx[3].c_str()
2054 <<
"` on `" << table_name <<
"`" << endl;
2056 else if (m_disable_indexes)
2061 info <<
"Dropped index `" << split_idx[3].c_str()
2062 <<
"` on `" << table_name <<
"`" << endl;
2066 if (m_index_per_table.size() <=
id)
2069 m_index_per_table.fill(
id + 1, tmp);
2072 list.push_back(idx);
2079 const TableS * tab = tup.getTable();
2084 while (m_free_callback == 0)
2086 assert(m_transactions == m_parallelism);
2098 cb->fragId = fragmentId;
2101 if (tab->isSYSTAB_0())
2103 tuple_SYSTAB_0(cb, *tab);
2107 m_free_callback = cb->next;
2114 Uint32 partition_id = cb->fragId;
2116 while (cb->retries < 10)
2122 if (cb->connection == NULL)
2129 err <<
"Cannot start transaction" << endl;
2133 const TupleS &tup = cb->tup;
2142 err <<
"Cannot get operation: " << cb->connection->
getNdbError() << endl;
2146 if (op->writeTuple() == -1)
2150 err <<
"Error defining op: " << cb->connection->
getNdbError() << endl;
2158 if (table->getDefaultNoPartitionsFlag())
2168 int i = tup.getNoOfAttributes() - 1;
2170 Uint32 hash_value = *attr_data->u_int32_value;
2171 op->setPartitionId(get_part_id(table, hash_value));
2180 op->setPartitionId(partition_id);
2184 for (
int j = 0; j < 2; j++)
2186 for (
int i = 0; i < tup.getNoOfAttributes(); i++)
2190 int size = attr_desc->size;
2191 int arraySize = attr_desc->arraySize;
2192 char * dataPtr = attr_data->string_value;
2195 if (attr_desc->m_exclude)
2198 if (!attr_data->null)
2200 const unsigned char * src = (
const unsigned char *)dataPtr;
2201 switch(attr_desc->m_column->
getType()){
2204 length = src[0] + 1;
2208 length = src[0] + (src[1] << 8) + 2;
2211 length = attr_data->size;
2215 if (j == 0 && tup.getTable()->have_auto_inc(i))
2216 tup.getTable()->update_max_auto_val(dataPtr,size*arraySize);
2218 if (attr_desc->convertFunc)
2221 (j == 1 && !attr_data->null))
2223 bool truncated =
true;
2224 dataPtr = (
char*)attr_desc->convertFunc(dataPtr,
2225 attr_desc->parameter,
2229 err <<
"Error: Convert data failed when restoring tuples!" << endl;
2237 attr_desc->truncation_detected =
true;
2244 if (j == 1)
continue;
2245 ret = op->equal(attr_desc->attrId, dataPtr, length);
2249 if (j == 0)
continue;
2250 if (attr_data->null)
2251 ret = op->setValue(attr_desc->attrId, NULL, 0);
2253 ret = op->setValue(attr_desc->attrId, dataPtr, length);
2256 ndbout_c(
"Column: %d type %d %d %d %d",i,
2257 attr_desc->m_column->
getType(),
2258 size, arraySize, length);
2270 err <<
"Error defining op: " << cb->connection->
getNdbError() << endl;
2276 op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
2280 cb->n_bytes= n_bytes;
2286 err <<
"Retried transaction " << cb->retries <<
" times.\nLast error"
2288 <<
"...Unable to recover from errors. Exiting..." << endl;
2295 const TupleS & tup = cb->tup;
2299 if (tab.get_auto_data(tup, &syskey, &nextid))
2306 if (restoreAutoIncrement(cb, syskey, nextid) == -1)
2312 Uint32 tableId, Uint64 value)
2330 while (cb->retries < 10)
2332 if ((result = m_ndb->setAutoIncrementValue(tab, value,
false) == -1))
2358 err <<
"Restore: Failed to restore data due to a unrecoverable error. Exiting..." << endl;
2369 cb->next= m_free_callback;
2370 m_free_callback= cb;
2371 m_dataBytes+= cb->n_bytes;
2395 Uint32 sleepTime = 100 + cb->retries * 300;
2398 cb->error_code = error.
code;
2403 err <<
"Success error: " << error << endl;
2408 err <<
"Temporary error: " << error << endl;
2409 m_temp_error =
true;
2410 NdbSleep_MilliSleep(sleepTime);
2415 err <<
"Unknown: " << error << endl;
2422 err <<
"Permanent: " << error << endl;
2425 err <<
"No error status" << endl;
2429 void BackupRestore::exitHandler()
2432 NDBT_ProgramExit(NDBT_FAILED);
2438 BackupRestore::tuple_free()
2444 while (m_transactions)
2451 BackupRestore::endOfTuples()
2459 if (table->getDefaultNoPartitionsFlag() &&
2472 if (table->getLinearFlag())
2476 while (no_frags > mask) mask <<= 1;
2478 part_id = hash_value & mask;
2479 if (part_id >= no_frags)
2480 part_id = hash_value & (mask >> 1);
2484 return (hash_value % no_frags);
2495 BackupRestore::logEntry(
const LogEntry & tup)
2506 err <<
"execute failed: " << errobj << endl;
2509 else if (retries > 0)
2511 NdbSleep_MilliSleep(100 + (retries - 1) * 100);
2524 err <<
"Cannot start transaction: " << errobj << endl;
2533 err <<
"Cannot get operation: " << trans->
getNdbError() << endl;
2540 case LogEntry::LE_INSERT:
2543 case LogEntry::LE_UPDATE:
2546 case LogEntry::LE_DELETE:
2550 err <<
"Log entry has wrong operation type."
2557 err <<
"Error defining op: " << trans->
getNdbError() << endl;
2563 if (table->getDefaultNoPartitionsFlag())
2566 Uint32 hash_value = *(Uint32*)attr->Data.string_value;
2575 for (Uint32 i= 0; i < tup.size(); i++)
2578 int size = attr->Desc->size;
2579 int arraySize = attr->Desc->arraySize;
2580 const char * dataPtr = attr->Data.string_value;
2582 if (attr->Desc->m_exclude)
2585 if (tup.m_table->have_auto_inc(attr->Desc->attrId))
2586 tup.m_table->update_max_auto_val(dataPtr,size*arraySize);
2588 const Uint32 length = (size / 8) * arraySize;
2591 if (attr->Desc->convertFunc)
2593 bool truncated =
true;
2594 dataPtr = (
char*)attr->Desc->convertFunc(dataPtr,
2595 attr->Desc->parameter,
2599 err <<
"Error: Convert data failed when restoring tuples!" << endl;
2607 attr->Desc->truncation_detected =
true;
2613 if(!keys.
get(attr->Desc->attrId))
2615 keys.
set(attr->Desc->attrId);
2616 check= op->
equal(attr->Desc->attrId, dataPtr, length);
2620 check= op->
setValue(attr->Desc->attrId, dataPtr, length);
2624 err <<
"Error defining op: " << trans->
getNdbError() << endl;
2631 op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
2645 case LogEntry::LE_INSERT:
2650 case LogEntry::LE_UPDATE:
2651 case LogEntry::LE_DELETE:
2659 err <<
"execute failed: " << errobj << endl;
2664 m_logBytes+= n_bytes;
2669 BackupRestore::endOfLogEntrys()
2675 info <<
"Restored " << m_dataCount <<
" tuples and "
2676 << m_logCount <<
" log entries" << endl;
2692 (cb->restore)->cback(result, cb);
2697 BackupRestore::get_attr_check_compatability(
const NDBCOL::Type &old_type,
2701 NDBCOL::Type first_item = m_allowed_promotion_attrs[0].old_type;
2702 NDBCOL::Type second_item = m_allowed_promotion_attrs[0].new_type;
2704 while (first_item != old_type || second_item != new_type)
2710 first_item = m_allowed_promotion_attrs[
i].old_type;
2711 second_item = m_allowed_promotion_attrs[
i].new_type;
2713 if (first_item == old_type && second_item == new_type)
2714 return m_allowed_promotion_attrs[
i].attr_check_compatability;
2719 BackupRestore::get_convert_func(
const NDBCOL::Type &old_type,
2723 NDBCOL::Type first_item = m_allowed_promotion_attrs[0].old_type;
2724 NDBCOL::Type second_item = m_allowed_promotion_attrs[0].new_type;
2726 while (first_item != old_type || second_item != new_type)
2731 first_item = m_allowed_promotion_attrs[
i].old_type;
2732 second_item = m_allowed_promotion_attrs[
i].new_type;
2734 if (first_item == old_type && second_item == new_type)
2735 return m_allowed_promotion_attrs[
i].attr_convert;
2742 BackupRestore::check_compat_promotion(
const NDBCOL &old_col,
2745 return ACT_PRESERVING;
2749 BackupRestore::check_compat_lossy(
const NDBCOL &old_col,
2756 BackupRestore::check_compat_sizes(
const NDBCOL &old_col,
2760 Uint32 new_size = new_col.
getSize();
2761 Uint32 old_size = old_col.
getSize();
2763 Uint32 new_length = new_col.
getLength();
2764 Uint32 old_length = old_col.
getLength();
2767 assert(new_size != old_size
2768 || new_length != old_length
2769 || new_col.getArrayType() != old_col.getArrayType());
2772 if (new_size < old_size || new_length < old_length) {
2777 if (new_size != old_size && new_length != old_length) {
2778 return ACT_UNSUPPORTED;
2781 assert(new_size >= old_size && new_length >= old_length);
2782 return ACT_PRESERVING;
2798 template void * BackupRestore::convert_array< Hchar, Hchar >(
const void *,
void *,
bool &);
2799 template void * BackupRestore::convert_array< Hchar, Hvarchar >(
const void *,
void *,
bool &);
2800 template void * BackupRestore::convert_array< Hchar, Hlongvarchar >(
const void *,
void *,
bool &);
2801 template void * BackupRestore::convert_array< Hvarchar, Hchar >(
const void *,
void *,
bool &);
2802 template void * BackupRestore::convert_array< Hvarchar, Hvarchar >(
const void *,
void *,
bool &);
2803 template void * BackupRestore::convert_array< Hvarchar, Hlongvarchar >(
const void *,
void *,
bool &);
2804 template void * BackupRestore::convert_array< Hlongvarchar, Hchar >(
const void *,
void *,
bool &);
2805 template void * BackupRestore::convert_array< Hlongvarchar, Hvarchar >(
const void *,
void *,
bool &);
2806 template void * BackupRestore::convert_array< Hlongvarchar, Hlongvarchar >(
const void *,
void *,
bool &);
2809 template void * BackupRestore::convert_array< Hbinary, Hbinary >(
const void *,
void *,
bool &);
2810 template void * BackupRestore::convert_array< Hbinary, Hvarbinary >(
const void *,
void *,
bool &);
2811 template void * BackupRestore::convert_array< Hbinary, Hlongvarbinary >(
const void *,
void *,
bool &);
2812 template void * BackupRestore::convert_array< Hvarbinary, Hbinary >(
const void *,
void *,
bool &);
2813 template void * BackupRestore::convert_array< Hvarbinary, Hvarbinary >(
const void *,
void *,
bool &);
2814 template void * BackupRestore::convert_array< Hvarbinary, Hlongvarbinary >(
const void *,
void *,
bool &);
2815 template void * BackupRestore::convert_array< Hlongvarbinary, Hbinary >(
const void *,
void *,
bool &);
2816 template void * BackupRestore::convert_array< Hlongvarbinary, Hvarbinary >(
const void *,
void *,
bool &);
2817 template void * BackupRestore::convert_array< Hlongvarbinary, Hlongvarbinary >(
const void *,
void *,
bool &);
2820 template void * BackupRestore::convert_integral<Hint8, Hint16>(
const void *,
void *,
bool &);
2821 template void * BackupRestore::convert_integral<Hint8, Hint24>(
const void *,
void *,
bool &);
2822 template void * BackupRestore::convert_integral<Hint8, Hint32>(
const void *,
void *,
bool &);
2823 template void * BackupRestore::convert_integral<Hint8, Hint64>(
const void *,
void *,
bool &);
2824 template void * BackupRestore::convert_integral<Hint16, Hint24>(
const void *,
void *,
bool &);
2825 template void * BackupRestore::convert_integral<Hint16, Hint32>(
const void *,
void *,
bool &);
2826 template void * BackupRestore::convert_integral<Hint16, Hint64>(
const void *,
void *,
bool &);
2827 template void * BackupRestore::convert_integral<Hint24, Hint32>(
const void *,
void *,
bool &);
2828 template void * BackupRestore::convert_integral<Hint24, Hint64>(
const void *,
void *,
bool &);
2829 template void * BackupRestore::convert_integral<Hint32, Hint64>(
const void *,
void *,
bool &);
2830 template void * BackupRestore::convert_integral<Huint8, Huint16>(
const void *,
void *,
bool &);
2831 template void * BackupRestore::convert_integral<Huint8, Huint24>(
const void *,
void *,
bool &);
2832 template void * BackupRestore::convert_integral<Huint8, Huint32>(
const void *,
void *,
bool &);
2833 template void * BackupRestore::convert_integral<Huint8, Huint64>(
const void *,
void *,
bool &);
2834 template void * BackupRestore::convert_integral<Huint16, Huint24>(
const void *,
void *,
bool &);
2835 template void * BackupRestore::convert_integral<Huint16, Huint32>(
const void *,
void *,
bool &);
2836 template void * BackupRestore::convert_integral<Huint16, Huint64>(
const void *,
void *,
bool &);
2837 template void * BackupRestore::convert_integral<Huint24, Huint32>(
const void *,
void *,
bool &);
2838 template void * BackupRestore::convert_integral<Huint24, Huint64>(
const void *,
void *,
bool &);
2839 template void * BackupRestore::convert_integral<Huint32, Huint64>(
const void *,
void *,
bool &);
2842 template void * BackupRestore::convert_integral<Hint16, Hint8>(
const void *,
void *,
bool &);
2843 template void * BackupRestore::convert_integral<Hint24, Hint8>(
const void *,
void *,
bool &);
2844 template void * BackupRestore::convert_integral<Hint24, Hint16>(
const void *,
void *,
bool &);
2845 template void * BackupRestore::convert_integral<Hint32, Hint8>(
const void *,
void *,
bool &);
2846 template void * BackupRestore::convert_integral<Hint32, Hint16>(
const void *,
void *,
bool &);
2847 template void * BackupRestore::convert_integral<Hint32, Hint24>(
const void *,
void *,
bool &);
2848 template void * BackupRestore::convert_integral<Hint64, Hint8>(
const void *,
void *,
bool &);
2849 template void * BackupRestore::convert_integral<Hint64, Hint16>(
const void *,
void *,
bool &);
2850 template void * BackupRestore::convert_integral<Hint64, Hint24>(
const void *,
void *,
bool &);
2851 template void * BackupRestore::convert_integral<Hint64, Hint32>(
const void *,
void *,
bool &);
2852 template void * BackupRestore::convert_integral<Huint16, Huint8>(
const void *,
void *,
bool &);
2853 template void * BackupRestore::convert_integral<Huint24, Huint8>(
const void *,
void *,
bool &);
2854 template void * BackupRestore::convert_integral<Huint24, Huint16>(
const void *,
void *,
bool &);
2855 template void * BackupRestore::convert_integral<Huint32, Huint8>(
const void *,
void *,
bool &);
2856 template void * BackupRestore::convert_integral<Huint32, Huint16>(
const void *,
void *,
bool &);
2857 template void * BackupRestore::convert_integral<Huint32, Huint24>(
const void *,
void *,
bool &);
2858 template void * BackupRestore::convert_integral<Huint64, Huint8>(
const void *,
void *,
bool &);
2859 template void * BackupRestore::convert_integral<Huint64, Huint16>(
const void *,
void *,
bool &);
2860 template void * BackupRestore::convert_integral<Huint64, Huint24>(
const void *,
void *,
bool &);
2861 template void * BackupRestore::convert_integral<Huint64, Huint32>(
const void *,
void *,
bool &);
2864 template void * BackupRestore::convert_integral<Hint8, Huint8>(
const void *,
void *,
bool &);
2865 template void * BackupRestore::convert_integral<Hint16, Huint16>(
const void *,
void *,
bool &);
2866 template void * BackupRestore::convert_integral<Hint24, Huint24>(
const void *,
void *,
bool &);
2867 template void * BackupRestore::convert_integral<Hint32, Huint32>(
const void *,
void *,
bool &);
2868 template void * BackupRestore::convert_integral<Hint64, Huint64>(
const void *,
void *,
bool &);
2869 template void * BackupRestore::convert_integral<Huint8, Hint8>(
const void *,
void *,
bool &);
2870 template void * BackupRestore::convert_integral<Huint16, Hint16>(
const void *,
void *,
bool &);
2871 template void * BackupRestore::convert_integral<Huint24, Hint24>(
const void *,
void *,
bool &);
2872 template void * BackupRestore::convert_integral<Huint32, Hint32>(
const void *,
void *,
bool &);
2873 template void * BackupRestore::convert_integral<Huint64, Hint64>(
const void *,
void *,
bool &);
2876 template void * BackupRestore::convert_integral<Hint8, Huint16>(
const void *,
void *,
bool &);
2877 template void * BackupRestore::convert_integral<Hint8, Huint24>(
const void *,
void *,
bool &);
2878 template void * BackupRestore::convert_integral<Hint8, Huint32>(
const void *,
void *,
bool &);
2879 template void * BackupRestore::convert_integral<Hint8, Huint64>(
const void *,
void *,
bool &);
2880 template void * BackupRestore::convert_integral<Hint16, Huint24>(
const void *,
void *,
bool &);
2881 template void * BackupRestore::convert_integral<Hint16, Huint32>(
const void *,
void *,
bool &);
2882 template void * BackupRestore::convert_integral<Hint16, Huint64>(
const void *,
void *,
bool &);
2883 template void * BackupRestore::convert_integral<Hint24, Huint32>(
const void *,
void *,
bool &);
2884 template void * BackupRestore::convert_integral<Hint24, Huint64>(
const void *,
void *,
bool &);
2885 template void * BackupRestore::convert_integral<Hint32, Huint64>(
const void *,
void *,
bool &);
2886 template void * BackupRestore::convert_integral<Huint8, Hint16>(
const void *,
void *,
bool &);
2887 template void * BackupRestore::convert_integral<Huint8, Hint24>(
const void *,
void *,
bool &);
2888 template void * BackupRestore::convert_integral<Huint8, Hint32>(
const void *,
void *,
bool &);
2889 template void * BackupRestore::convert_integral<Huint8, Hint64>(
const void *,
void *,
bool &);
2890 template void * BackupRestore::convert_integral<Huint16, Hint24>(
const void *,
void *,
bool &);
2891 template void * BackupRestore::convert_integral<Huint16, Hint32>(
const void *,
void *,
bool &);
2892 template void * BackupRestore::convert_integral<Huint16, Hint64>(
const void *,
void *,
bool &);
2893 template void * BackupRestore::convert_integral<Huint24, Hint32>(
const void *,
void *,
bool &);
2894 template void * BackupRestore::convert_integral<Huint24, Hint64>(
const void *,
void *,
bool &);
2895 template void * BackupRestore::convert_integral<Huint32, Hint64>(
const void *,
void *,
bool &);
2898 template void * BackupRestore::convert_integral<Hint16, Huint8>(
const void *,
void *,
bool &);
2899 template void * BackupRestore::convert_integral<Hint24, Huint8>(
const void *,
void *,
bool &);
2900 template void * BackupRestore::convert_integral<Hint24, Huint16>(
const void *,
void *,
bool &);
2901 template void * BackupRestore::convert_integral<Hint32, Huint8>(
const void *,
void *,
bool &);
2902 template void * BackupRestore::convert_integral<Hint32, Huint16>(
const void *,
void *,
bool &);
2903 template void * BackupRestore::convert_integral<Hint32, Huint24>(
const void *,
void *,
bool &);
2904 template void * BackupRestore::convert_integral<Hint64, Huint8>(
const void *,
void *,
bool &);
2905 template void * BackupRestore::convert_integral<Hint64, Huint16>(
const void *,
void *,
bool &);
2906 template void * BackupRestore::convert_integral<Hint64, Huint24>(
const void *,
void *,
bool &);
2907 template void * BackupRestore::convert_integral<Hint64, Huint32>(
const void *,
void *,
bool &);
2908 template void * BackupRestore::convert_integral<Huint16, Hint8>(
const void *,
void *,
bool &);
2909 template void * BackupRestore::convert_integral<Huint24, Hint8>(
const void *,
void *,
bool &);
2910 template void * BackupRestore::convert_integral<Huint24, Hint16>(
const void *,
void *,
bool &);
2911 template void * BackupRestore::convert_integral<Huint32, Hint8>(
const void *,
void *,
bool &);
2912 template void * BackupRestore::convert_integral<Huint32, Hint16>(
const void *,
void *,
bool &);
2913 template void * BackupRestore::convert_integral<Huint32, Hint24>(
const void *,
void *,
bool &);
2914 template void * BackupRestore::convert_integral<Huint64, Hint8>(
const void *,
void *,
bool &);
2915 template void * BackupRestore::convert_integral<Huint64, Hint16>(
const void *,
void *,
bool &);
2916 template void * BackupRestore::convert_integral<Huint64, Hint24>(
const void *,
void *,
bool &);
2917 template void * BackupRestore::convert_integral<Huint64, Hint32>(
const void *,
void *,
bool &);