25
25
#include <drizzled/common.h>
26
26
#include <drizzled/session.h>
27
27
#include <drizzled/table.h>
28
28
#include <drizzled/message/table.pb.h>
29
#include <drizzled/charset_info.h>
29
#include "drizzled/charset_info.h"
30
30
#include <drizzled/table_proto.h>
31
31
#include <drizzled/session.h>
32
32
#include <drizzled/field.h>
269
269
release_(src_objectKey);
273
272
// Go through the list copying the keys.
274
dst_cloudRef = src_cloudRef;
275
dst_cloud = src_cloud;
274
dst_cloudRef = src_cloudRef;
275
dst_cloud = src_cloud;
278
push_ref_(dst_cloud); // Push a reference to dst_cloud so that what ever it references will be released.
280
while ((key = (CSString*)(list->take(0))) ) {
283
// The source key name must be parsed to get its
284
// destination cloud reference. The destination for
285
// the BLOBs may not all be in the same cloud.
286
CloudObjectKey::parseObjectKey(key->getCString(), &cloudKey);
288
// Reset the destination cloud if required.
289
if (cloudKey.cloud_ref != dst_cloudRef) {
291
dst_cloud->release();
278
while ((key = (CSString*)(list->take(0))) ) {
281
// The source key name must be parsed to get its
282
// destination cloud reference. The destination for
283
// the BLOBs may not all be in the same cloud.
284
CloudObjectKey::parseObjectKey(key->getCString(), &cloudKey);
286
// Reset the destination cloud if required.
287
if (cloudKey.cloud_ref != dst_cloudRef) {
289
dst_cloud->release();
292
dst_cloudRef = cloudKey.cloud_ref;
293
dst_cloud = MSCloudInfo::getCloudInfo(dst_cloudRef);
294
dst_cloudRef = cloudKey.cloud_ref;
295
dst_cloud = MSCloudInfo::getCloudInfo(dst_cloudRef);
296
// Copy the BLOB to the recovered database.
297
dst_objectKey->setObjectKey(&cloudKey);
298
src_cloud->copy(RETAIN(dst_cloud), dst_objectKey->getCString(), key->getCString());
298
// Copy the BLOB to the recovered database.
299
dst_objectKey->setObjectKey(&cloudKey);
300
src_cloud->copy(RETAIN(dst_cloud), dst_objectKey->getCString(), key->getCString());
306
dst_cloud->release();
308
finally_end_block(a);
307
310
blob_recovery_no = 0;