aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableInfo.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2016-11-01 19:00:30 +0100
committerMax <post@wickenrode.com>2016-11-01 19:00:30 +0100
commitf77f8715cf1bcc8811804008fc5d3ac964988ce1 (patch)
treed1954e726cb160790ba5ceca5f414d03da671e00 /Source/SPTableInfo.m
parentee5e4db6cf7f35e9802d25bc413aa74221bed371 (diff)
downloadsequelpro-f77f8715cf1bcc8811804008fc5d3ac964988ce1.tar.gz
sequelpro-f77f8715cf1bcc8811804008fc5d3ac964988ce1.tar.bz2
sequelpro-f77f8715cf1bcc8811804008fc5d3ac964988ce1.zip
Some changes suggested in PR #2606 to improve MySQL 5.8 handling
Diffstat (limited to 'Source/SPTableInfo.m')
-rw-r--r--Source/SPTableInfo.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPTableInfo.m b/Source/SPTableInfo.m
index 1767d3b0..b72d55f8 100644
--- a/Source/SPTableInfo.m
+++ b/Source/SPTableInfo.m
@@ -190,8 +190,11 @@
[info addObject:[NSString stringWithFormat:[[tableStatus objectForKey:@"RowsCountAccurate"] boolValue] ? NSLocalizedString(@"rows: %@", @"Table Info Section : number of rows (exact value)") : NSLocalizedString(@"rows: ~%@", @"Table Info Section : number of rows (estimated value)"),
[numberFormatter stringFromNumber:[NSNumber numberWithLongLong:[[tableStatus objectForKey:@"Rows"] longLongValue]]]]];
}
-
- [info addObject:[NSString stringWithFormat:NSLocalizedString(@"size: %@", @"Table Info Section : table size on disk"), [NSString stringForByteSize:[[tableStatus objectForKey:@"Data_length"] longLongValue]]]];
+
+ // Check for 'Data_Length' == NULL (see PR #2606)
+ if([[tableStatus objectForKey:@"Data_length"] unboxNull]) {
+ [info addObject:[NSString stringWithFormat:NSLocalizedString(@"size: %@", @"Table Info Section : table size on disk"), [NSString stringForByteSize:[[tableStatus objectForKey:@"Data_length"] longLongValue]]]];
+ }
NSString *tableEnc = [tableDataInstance tableEncoding];
NSString *tableColl = [tableStatus objectForKey:@"Collation"];
if([tableColl length]) {