aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-01-02 01:52:38 +0000
committerrowanbeentje <rowan@beent.je>2010-01-02 01:52:38 +0000
commite42f000e98e9ff33a91a86a3e2a0cf04c6778102 (patch)
treeab52b693e5fe7122e10536b626f18b1a48399794
parent7753ee58924ee3d8da9177a1c318a28dd0bcd6d9 (diff)
downloadsequelpro-e42f000e98e9ff33a91a86a3e2a0cf04c6778102.tar.gz
sequelpro-e42f000e98e9ff33a91a86a3e2a0cf04c6778102.tar.bz2
sequelpro-e42f000e98e9ff33a91a86a3e2a0cf04c6778102.zip
- With the improved row count support and behaviour, replace the old "Fetch correct row count" preference with a new Table row counts query level (never, only for small tables, always), defaulting to only for small tables - boundary currently set to 5MB. This addresses Issue #500
-rw-r--r--Interfaces/English.lproj/Preferences.xib387
-rw-r--r--Resources/PreferenceDefaults.plist6
-rw-r--r--Source/SPConstants.h10
-rw-r--r--Source/SPConstants.m3
-rw-r--r--Source/SPPreferenceController.m7
-rw-r--r--Source/TableContent.m6
6 files changed, 289 insertions, 130 deletions
diff --git a/Interfaces/English.lproj/Preferences.xib b/Interfaces/English.lproj/Preferences.xib
index bbdb122f..c4f0892d 100644
--- a/Interfaces/English.lproj/Preferences.xib
+++ b/Interfaces/English.lproj/Preferences.xib
@@ -49,11 +49,9 @@
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<string key="NSWindowContentMinSize">{500, 0}</string>
<object class="NSView" key="NSWindowView" id="1006">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{500, 172}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{500, 22}</string>
@@ -910,10 +908,117 @@
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSPopUpButton" id="67060802">
+ <reference key="NSNextResponder" ref="395894064"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{160, 16}, {322, 26}}</string>
+ <reference key="NSSuperview" ref="395894064"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="323591102">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">2048</int>
+ <reference key="NSSupport" ref="320262838"/>
+ <reference key="NSControlView" ref="67060802"/>
+ <int key="NSButtonFlags">109199615</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="550896231">
+ <reference key="NSMenu" ref="938113486"/>
+ <string key="NSTitle">Only use additional queries for small tables</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <reference key="NSOnImage" ref="1039721224"/>
+ <reference key="NSMixedImage" ref="720177216"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">1</int>
+ <reference key="NSTarget" ref="323591102"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="938113486">
+ <string key="NSTitle">OtherViews</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="649943493">
+ <reference key="NSMenu" ref="938113486"/>
+ <string key="NSTitle">Never use additional queries for table row counts</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="1039721224"/>
+ <reference key="NSMixedImage" ref="720177216"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="323591102"/>
+ </object>
+ <reference ref="550896231"/>
+ <object class="NSMenuItem" id="274383011">
+ <reference key="NSMenu" ref="938113486"/>
+ <string key="NSTitle">Always get accurate row counts (slow for InnoDB)</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="1039721224"/>
+ <reference key="NSMixedImage" ref="720177216"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">2</int>
+ <reference key="NSTarget" ref="323591102"/>
+ </object>
+ </object>
+ <reference key="NSMenuFont" ref="320262838"/>
+ </object>
+ <int key="NSSelectedIndex">1</int>
+ <int key="NSPreferredEdge">1</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">2</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="743152467">
+ <reference key="NSNextResponder" ref="395894064"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 22}, {140, 17}}</string>
+ <reference key="NSSuperview" ref="395894064"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="449580049">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">71304192</int>
+ <string key="NSContents">Table row counts:</string>
+ <reference key="NSSupport" ref="320262838"/>
+ <reference key="NSControlView" ref="743152467"/>
+ <reference key="NSBackgroundColor" ref="700609571"/>
+ <reference key="NSTextColor" ref="1035618107"/>
+ </object>
+ </object>
+ <object class="NSBox" id="169616697">
+ <reference key="NSNextResponder" ref="395894064"/>
+ <int key="NSvFlags">12</int>
+ <string key="NSFrame">{{163, 46}, {316, 5}}</string>
+ <reference key="NSSuperview" ref="395894064"/>
+ <string key="NSOffsets">{0, 0}</string>
+ <object class="NSTextFieldCell" key="NSTitleCell">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Box</string>
+ <reference key="NSSupport" ref="320262838"/>
+ <reference key="NSBackgroundColor" ref="1001357688"/>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
+ </object>
+ </object>
+ <int key="NSBorderType">3</int>
+ <int key="NSBoxType">2</int>
+ <int key="NSTitlePosition">0</int>
+ <bool key="NSTransparent">NO</bool>
+ </object>
<object class="NSButton" id="282702408">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 181}, {123, 18}}</string>
+ <string key="NSFrame">{{161, 198}, {123, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="7693853">
@@ -935,7 +1040,7 @@
<object class="NSTextField" id="302141262">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{32, 220}, {125, 17}}</string>
+ <string key="NSFrame">{{32, 237}, {125, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="524603578">
@@ -951,7 +1056,7 @@
<object class="NSTextField" id="265036898">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{383, 67}, {38, 17}}</string>
+ <string key="NSFrame">{{383, 104}, {38, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="596167553">
@@ -967,7 +1072,7 @@
<object class="NSButton" id="625748362">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 221}, {106, 18}}</string>
+ <string key="NSFrame">{{161, 238}, {106, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="29938940">
@@ -989,7 +1094,7 @@
<object class="NSButton" id="728219401">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 66}, {115, 18}}</string>
+ <string key="NSFrame">{{161, 103}, {115, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="920748663">
@@ -1011,7 +1116,7 @@
<object class="NSButton" id="563352266">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 201}, {105, 18}}</string>
+ <string key="NSFrame">{{161, 218}, {105, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="516443326">
@@ -1033,7 +1138,7 @@
<object class="NSStepper" id="813674245">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{362, 61}, {19, 27}}</string>
+ <string key="NSFrame">{{362, 98}, {19, 27}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSStepperCell" key="NSCell" id="1061407286">
@@ -1051,7 +1156,7 @@
<object class="NSTextField" id="479121914">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{282, 64}, {75, 22}}</string>
+ <string key="NSFrame">{{282, 101}, {75, 22}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="585678618">
@@ -1088,7 +1193,7 @@
</object>
</object>
<string key="NS.positiveformat">#,##1</string>
- <string key="NS.negativeformat">#,##0</string>
+ <string key="NS.negativeformat">#,##1</string>
<nil key="NS.positiveattrs"/>
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
@@ -1121,7 +1226,7 @@
<object class="NSTextField" id="618764971">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 22}, {140, 17}}</string>
+ <string key="NSFrame">{{17, 59}, {140, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="609090823">
@@ -1137,7 +1242,7 @@
<object class="NSTextField" id="423928419">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{163, 20}, {75, 22}}</string>
+ <string key="NSFrame">{{163, 57}, {75, 22}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="82744709">
@@ -1155,7 +1260,7 @@
<object class="NSButton" id="41303511">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 141}, {297, 18}}</string>
+ <string key="NSFrame">{{161, 158}, {297, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="441275">
@@ -1174,32 +1279,10 @@
<int key="NSPeriodicInterval">25</int>
</object>
</object>
- <object class="NSButton" id="1065711371">
- <reference key="NSNextResponder" ref="395894064"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 121}, {225, 18}}</string>
- <reference key="NSSuperview" ref="395894064"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="561991963">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Fetch correct row count (slower)</string>
- <reference key="NSSupport" ref="320262838"/>
- <reference key="NSControlView" ref="1065711371"/>
- <int key="NSButtonFlags">1211912703</int>
- <int key="NSButtonFlags2">2</int>
- <reference key="NSNormalImage" ref="752798171"/>
- <reference key="NSAlternateImage" ref="888311049"/>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
<object class="NSBox" id="692531763">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{163, 167}, {316, 5}}</string>
+ <string key="NSFrame">{{163, 184}, {316, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1221,7 +1304,7 @@
<object class="NSBox" id="205950287">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{163, 92}, {316, 5}}</string>
+ <string key="NSFrame">{{163, 129}, {316, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1243,7 +1326,7 @@
<object class="NSBox" id="17983744">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{163, 53}, {316, 5}}</string>
+ <string key="NSFrame">{{163, 90}, {316, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1265,7 +1348,7 @@
<object class="NSButton" id="761347322">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 101}, {206, 18}}</string>
+ <string key="NSFrame">{{161, 138}, {206, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="542131730">
@@ -1285,7 +1368,7 @@
</object>
</object>
</object>
- <string key="NSFrameSize">{500, 259}</string>
+ <string key="NSFrameSize">{499, 276}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
@@ -2920,7 +3003,7 @@ AQAAAAA</bytes>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="1033452264">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2936,7 +3019,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 199}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -2956,7 +3038,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 228}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -2976,7 +3057,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 141}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -2996,7 +3076,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 112}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -3016,7 +3095,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 286}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -3036,7 +3114,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 170}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -3056,7 +3133,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 83}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -3076,7 +3152,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 54}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -3096,7 +3171,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 315}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
@@ -3116,7 +3190,6 @@ AQAAAAA</bytes>
</object>
<string key="NSFrame">{{154, 257}, {44, 23}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSIsBordered">YES</bool>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">1</int>
@@ -3128,7 +3201,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{86, 202}, {63, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="465390474">
<int key="NSCellFlags">68288064</int>
@@ -3145,7 +3217,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{88, 173}, {61, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="629129203">
<int key="NSCellFlags">68288064</int>
@@ -3162,7 +3233,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{79, 231}, {70, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="841770398">
<int key="NSCellFlags">68288064</int>
@@ -3179,7 +3249,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{89, 86}, {60, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="837982163">
<int key="NSCellFlags">68288064</int>
@@ -3196,7 +3265,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{23, 58}, {125, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="554509386">
<int key="NSCellFlags">68288064</int>
@@ -3213,7 +3281,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{102, 144}, {47, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="728610506">
<int key="NSCellFlags">68288064</int>
@@ -3230,7 +3297,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{112, 318}, {37, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="693342907">
<int key="NSCellFlags">68288064</int>
@@ -3247,7 +3313,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{46, 115}, {103, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="336899348">
<int key="NSCellFlags">68288064</int>
@@ -3264,7 +3329,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{66, 289}, {83, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="896659768">
<int key="NSCellFlags">68288064</int>
@@ -3281,7 +3345,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{113, 357}, {36, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="10706281">
<int key="NSCellFlags">68288064</int>
@@ -3298,7 +3361,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{73, 12}, {131, 32}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="603963569">
<int key="NSCellFlags">-2080244224</int>
@@ -3319,7 +3381,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{396, 347}, {90, 32}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="345790946">
<int key="NSCellFlags">67239424</int>
@@ -3340,7 +3401,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{154, 355}, {240, 19}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="66452133">
<int key="NSCellFlags">-2076049856</int>
@@ -3358,7 +3418,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{107, 260}, {42, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="632150824">
<int key="NSCellFlags">605158976</int>
@@ -3375,7 +3434,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{257, 317}, {126, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="823431848">
<int key="NSCellFlags">-2080244224</int>
@@ -3398,7 +3456,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{257, 288}, {150, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="743257684">
<int key="NSCellFlags">-2080244224</int>
@@ -3421,7 +3478,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{257, 230}, {179, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="231642073">
<int key="NSCellFlags">67239424</int>
@@ -3444,7 +3500,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{257, 259}, {185, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="491730308">
<int key="NSCellFlags">-2080244224</int>
@@ -3467,7 +3522,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{257, 173}, {185, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="496801621">
<int key="NSCellFlags">-2080244224</int>
@@ -3490,7 +3544,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">-2147483380</int>
<string key="NSFrame">{{257, 144}, {197, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="420702000">
<int key="NSCellFlags">-1543373312</int>
@@ -3513,7 +3566,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{357, 205}, {29, 19}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="992523117">
<int key="NSCellFlags">-1538130368</int>
@@ -3587,7 +3639,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{298, 207}, {54, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="499174965">
<int key="NSCellFlags">605158976</int>
@@ -3604,7 +3655,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{392, 203}, {15, 22}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSStepperCell" key="NSCell" id="266600395">
<int key="NSCellFlags">604896800</int>
@@ -3623,7 +3673,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{410, 207}, {27, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="516695546">
<int key="NSCellFlags">605158976</int>
@@ -3640,7 +3689,6 @@ AQAAAAA</bytes>
<int key="NSvFlags">12</int>
<string key="NSFrame">{{154, 344}, {326, 5}}</string>
<reference key="NSSuperview" ref="1033452264"/>
- <reference key="NSWindow"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
@@ -3660,11 +3708,13 @@ AQAAAAA</bytes>
</object>
</object>
<string key="NSFrameSize">{500, 395}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSUserDefaultsController" id="151174232">
+ <object class="NSMutableArray" key="NSDeclaredKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>TableRowCountQueryLevel</string>
+ </object>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSArrayController" id="937123943">
@@ -3686,6 +3736,7 @@ AQAAAAA</bytes>
</object>
<string>DisplayTableViewVerticalGridlines</string>
<string>type</string>
+ <string>TableRowCountQueryLevel</string>
</object>
<bool key="NSEditable">YES</bool>
<bool key="NSAutomaticallyPreparesContent">YES</bool>
@@ -3847,22 +3898,6 @@ AQAAAAA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
- <string key="label">value: values.FetchCorrectRowCount</string>
- <reference key="source" ref="1065711371"/>
- <reference key="destination" ref="151174232"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="1065711371"/>
- <reference key="NSDestination" ref="151174232"/>
- <string key="NSLabel">value: values.FetchCorrectRowCount</string>
- <string key="NSBinding">value</string>
- <string key="NSKeyPath">values.FetchCorrectRowCount</string>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">615</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
<string key="label">value: values.ReloadAfterRemovingRow</string>
<reference key="source" ref="282702408"/>
<reference key="destination" ref="151174232"/>
@@ -5742,6 +5777,22 @@ AQAAAAA</bytes>
</object>
<int key="connectionID">1464</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">selectedTag: values.TableRowCountQueryLevel</string>
+ <reference key="source" ref="67060802"/>
+ <reference key="destination" ref="151174232"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="67060802"/>
+ <reference key="NSDestination" ref="151174232"/>
+ <string key="NSLabel">selectedTag: values.TableRowCountQueryLevel</string>
+ <string key="NSBinding">selectedTag</string>
+ <string key="NSKeyPath">values.TableRowCountQueryLevel</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">1484</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -6281,22 +6332,24 @@ AQAAAAA</bytes>
<reference key="object" ref="395894064"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="761347322"/>
- <reference ref="17983744"/>
- <reference ref="205950287"/>
<reference ref="692531763"/>
- <reference ref="1065711371"/>
<reference ref="41303511"/>
- <reference ref="423928419"/>
- <reference ref="618764971"/>
- <reference ref="479121914"/>
<reference ref="563352266"/>
- <reference ref="728219401"/>
<reference ref="625748362"/>
<reference ref="302141262"/>
<reference ref="282702408"/>
+ <reference ref="761347322"/>
+ <reference ref="17983744"/>
+ <reference ref="205950287"/>
+ <reference ref="423928419"/>
+ <reference ref="618764971"/>
+ <reference ref="479121914"/>
<reference ref="813674245"/>
+ <reference ref="728219401"/>
<reference ref="265036898"/>
+ <reference ref="169616697"/>
+ <reference ref="743152467"/>
+ <reference ref="67060802"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Tables</string>
@@ -6465,20 +6518,6 @@ AQAAAAA</bytes>
<reference key="parent" ref="41303511"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">544</int>
- <reference key="object" ref="1065711371"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="561991963"/>
- </object>
- <reference key="parent" ref="395894064"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">545</int>
- <reference key="object" ref="561991963"/>
- <reference key="parent" ref="1065711371"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">552</int>
<reference key="object" ref="692531763"/>
<reference key="parent" ref="395894064"/>
@@ -8124,6 +8163,69 @@ AQAAAAA</bytes>
<reference key="object" ref="513222356"/>
<reference key="parent" ref="227167312"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1467</int>
+ <reference key="object" ref="169616697"/>
+ <reference key="parent" ref="395894064"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1468</int>
+ <reference key="object" ref="743152467"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="449580049"/>
+ </object>
+ <reference key="parent" ref="395894064"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1469</int>
+ <reference key="object" ref="449580049"/>
+ <reference key="parent" ref="743152467"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1470</int>
+ <reference key="object" ref="67060802"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="323591102"/>
+ </object>
+ <reference key="parent" ref="395894064"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1471</int>
+ <reference key="object" ref="323591102"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="938113486"/>
+ </object>
+ <reference key="parent" ref="67060802"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1472</int>
+ <reference key="object" ref="938113486"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="649943493"/>
+ <reference ref="550896231"/>
+ <reference ref="274383011"/>
+ </object>
+ <reference key="parent" ref="323591102"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1473</int>
+ <reference key="object" ref="649943493"/>
+ <reference key="parent" ref="938113486"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1474</int>
+ <reference key="object" ref="550896231"/>
+ <reference key="parent" ref="938113486"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1475</int>
+ <reference key="object" ref="274383011"/>
+ <reference key="parent" ref="938113486"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -8316,6 +8418,16 @@ AQAAAAA</bytes>
<string>1465.IBPluginDependency</string>
<string>1465.ImportedFromIB2</string>
<string>1466.IBPluginDependency</string>
+ <string>1467.IBPluginDependency</string>
+ <string>1468.IBPluginDependency</string>
+ <string>1469.IBPluginDependency</string>
+ <string>1470.IBPluginDependency</string>
+ <string>1471.IBPluginDependency</string>
+ <string>1472.IBEditorWindowLastContentRect</string>
+ <string>1472.IBPluginDependency</string>
+ <string>1473.IBPluginDependency</string>
+ <string>1474.IBPluginDependency</string>
+ <string>1475.IBPluginDependency</string>
<string>17.IBEditorWindowLastContentRect</string>
<string>17.IBPluginDependency</string>
<string>17.IBUserGuides</string>
@@ -8495,8 +8607,6 @@ AQAAAAA</bytes>
<string>534.IBPluginDependency</string>
<string>535.IBPluginDependency</string>
<string>538.IBPluginDependency</string>
- <string>544.IBPluginDependency</string>
- <string>545.IBPluginDependency</string>
<string>552.IBPluginDependency</string>
<string>553.IBPluginDependency</string>
<string>554.IBPluginDependency</string>
@@ -8772,6 +8882,16 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{467, 116}, {401, 63}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{571, 222}, {500, 280}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
@@ -8952,7 +9072,7 @@ AQAAAAA</bytes>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{318, 154}, {500, 259}}</string>
+ <string>{{318, 137}, {499, 276}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -8989,8 +9109,6 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{254, 472}, {500, 209}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
@@ -9157,7 +9275,7 @@ AQAAAAA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1466</int>
+ <int key="maxID">1484</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -9429,6 +9547,13 @@ AQAAAAA</bytes>
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">BWToolkitFramework.framework/Headers/NSApplication+BWAdditions.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSArrayController</string>
<string key="superclassName">NSObjectController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -10060,6 +10185,13 @@ AQAAAAA</bytes>
<reference key="sourceIdentifier" ref="24090448"/>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">BWToolkitFramework.framework/Headers/NSView+BWAdditions.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
@@ -10082,6 +10214,13 @@ AQAAAAA</bytes>
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">BWToolkitFramework.framework/Headers/NSWindow+BWAdditions.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSWindowController</string>
<string key="superclassName">NSResponder</string>
<object class="NSMutableDictionary" key="actions">
diff --git a/Resources/PreferenceDefaults.plist b/Resources/PreferenceDefaults.plist
index 71e9473d..233569d2 100644
--- a/Resources/PreferenceDefaults.plist
+++ b/Resources/PreferenceDefaults.plist
@@ -20,8 +20,10 @@
<false/>
<key>LoadBlobsAsNeeded</key>
<false/>
- <key>FetchCorrectRowCount</key>
- <true/>
+ <key>TableRowCountQueryLevel</key>
+ <integer>1</integer>
+ <key>TableRowCountCheapLookupSizeBoundary</key>
+ <integer>5242880</integer>
<key>NewFieldsAllowNulls</key>
<true/>
<key>LimitResults</key>
diff --git a/Source/SPConstants.h b/Source/SPConstants.h
index 73f363c8..a4f844d4 100644
--- a/Source/SPConstants.h
+++ b/Source/SPConstants.h
@@ -48,6 +48,13 @@ typedef enum {
SPSSHTunnelConnection = 2
} SPConnectionType;
+// Table row count query usage levels
+typedef enum {
+ SPRowCountFetchNever = 0,
+ SPRowCountFetchIfCheap = 1,
+ SPRowCountFetchAlways = 2
+} SPRowCountQueryUsageLevels;
+
// Kill mode constants
extern NSString *SPKillProcessQueryMode;
extern NSString *SPKillProcessConnectionMode;
@@ -83,7 +90,8 @@ extern NSString *SPReloadAfterAddingRow;
extern NSString *SPReloadAfterEditingRow;
extern NSString *SPReloadAfterRemovingRow;
extern NSString *SPLoadBlobsAsNeeded;
-extern NSString *SPFetchCorrectRowCount;
+extern NSString *SPTableRowCountQueryLevel;
+extern NSString *SPTableRowCountCheapSizeBoundary;
extern NSString *SPNewFieldsAllowNulls;
extern NSString *SPLimitResults;
extern NSString *SPLimitResultsValue;
diff --git a/Source/SPConstants.m b/Source/SPConstants.m
index 27fa998e..f5f6e5bf 100644
--- a/Source/SPConstants.m
+++ b/Source/SPConstants.m
@@ -58,7 +58,8 @@ NSString *SPReloadAfterAddingRow = @"ReloadAfterAddingRow";
NSString *SPReloadAfterEditingRow = @"ReloadAfterEditingRow";
NSString *SPReloadAfterRemovingRow = @"ReloadAfterRemovingRow";
NSString *SPLoadBlobsAsNeeded = @"LoadBlobsAsNeeded";
-NSString *SPFetchCorrectRowCount = @"FetchCorrectRowCount";
+NSString *SPTableRowCountQueryLevel = @"TableRowCountQueryLevel";
+NSString *SPTableRowCountCheapSizeBoundary = @"TableRowCountCheapLookupSizeBoundary";
NSString *SPNewFieldsAllowNulls = @"NewFieldsAllowNulls";
NSString *SPLimitResults = @"LimitResults";
NSString *SPLimitResultsValue = @"LimitResultsValue";
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index 5d2f7575..1a2fdf41 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -166,7 +166,7 @@
@"reloadAfterEditing", SPReloadAfterEditingRow,
@"reloadAfterRemoving", SPReloadAfterRemovingRow,
@"dontShowBlob", SPLoadBlobsAsNeeded,
- @"fetchRowCount", SPFetchCorrectRowCount,
+ @"fetchRowCount", @"FetchCorrectRowCount",
@"limitRows", SPLimitResults,
@"limitRowsValue", SPLimitResultsValue,
@"nullValue", SPNullValue,
@@ -288,6 +288,11 @@
[prefs setObject:queryFavoritesArray forKey:SPQueryFavorites];
}
+ // For versions prior to r1636 (<0.9.8), remove the old "Fetch correct row count" pref
+ if (recordedVersionNumber < 1636 && [prefs objectForKey:@"FetchCorrectRowCount"]) {
+ [prefs removeObjectForKey:@"FetchCorrectRowCount"];
+ }
+
// Update the prefs revision
[prefs setObject:[NSNumber numberWithInt:currentVersionNumber] forKey:SPLastUsedVersion];
}
diff --git a/Source/TableContent.m b/Source/TableContent.m
index cd780f5e..4cc301c2 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -2482,7 +2482,11 @@
checkStatusCount = YES;
// Choose whether to display an estimate, or to fetch the correct row count, based on prefs
- } else if ([prefs boolForKey:SPFetchCorrectRowCount]) {
+ } else if ([[prefs objectForKey:SPTableRowCountQueryLevel] intValue] == SPRowCountFetchAlways
+ || ([[prefs objectForKey:SPTableRowCountQueryLevel] intValue] == SPRowCountFetchIfCheap
+ && [tableDataInstance statusValueForKey:@"Data_length"]
+ && [[prefs objectForKey:SPTableRowCountCheapSizeBoundary] intValue] > [[tableDataInstance statusValueForKey:@"Data_length"] intValue]))
+ {
maxNumRows = [self fetchNumberOfRows];
maxNumRowsIsEstimate = NO;
[tableDataInstance setStatusValue:[NSString stringWithFormat:@"%d", maxNumRows] forKey:@"Rows"];