diff options
author | Max <post@wickenrode.com> | 2016-11-01 19:00:30 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2016-11-01 19:00:30 +0100 |
commit | f77f8715cf1bcc8811804008fc5d3ac964988ce1 (patch) | |
tree | d1954e726cb160790ba5ceca5f414d03da671e00 /Source/SPTableInfo.m | |
parent | ee5e4db6cf7f35e9802d25bc413aa74221bed371 (diff) | |
download | sequelpro-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.m | 7 |
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]) { |