Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
9 additions
and
5 deletions.
-
+3
−3
Source/SPExportInitializer.m
-
+6
−2
Source/SPViewCopy.m
|
@@ -451,11 +451,11 @@ - (void)exportTables:(NSArray *)exportTables orDataArray:(NSArray *)dataArray |
|
|
if ([problemFiles count] > 0) { |
|
|
[self errorCreatingExportFileHandles:problemFiles]; |
|
|
} |
|
|
else { |
|
|
[problemFiles release]; |
|
|
|
|
|
else { |
|
|
[self startExport]; |
|
|
} |
|
|
|
|
|
[problemFiles release]; |
|
|
} |
|
|
|
|
|
/** |
|
|
|
@@ -45,14 +45,18 @@ - (BOOL)moveView:(NSString *)view from:(NSString *)sourceDatabase to:(NSString * |
|
|
NSMutableString *createStatement = [[NSMutableString alloc] initWithString:[self _createViewStatementFor:view inDatabase:sourceDatabase]]; |
|
|
|
|
|
NSString *search = [NSString stringWithFormat:@"VIEW %@", [view backtickQuotedString]]; |
|
|
|
|
|
|
|
|
NSRange range = [createStatement rangeOfString:search]; |
|
|
|
|
|
if (range.location != NSNotFound) { |
|
|
|
|
|
NSUInteger replaced = [createStatement replaceOccurrencesOfString:search withString:[NSString stringWithFormat:@"VIEW %@.%@", [targetDatabase backtickQuotedString], [view backtickQuotedString]] options:0 range:range]; |
|
|
|
|
|
if (replaced != 1) return NO; |
|
|
if (replaced != 1) { |
|
|
[createStatement release]; |
|
|
|
|
|
return NO; |
|
|
} |
|
|
|
|
|
// Replace all occurrences of the old database name |
|
|
[createStatement replaceOccurrencesOfString:[sourceDatabase backtickQuotedString] |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.