Fix an issue where the contents of a duplicated query favorite would be overwritten if the selection was changed bevore saving (#2938)More Details

2f0099e1bf

Pending

11 months, 18 days

Max

* Moved `-[SPHistoryController currentlySelectedView]` to SPDatabaseDocument (was completely out of place there)
* Removed some redundant code in the process
* Remove a few cross-thread UI calls Xcode 9.2 complains about (but there are just so many...)More Details

b04ca67477

Pending

1 year, 2 days

Max

SQL export used the wrong syntax for view placeholders when the columns contained a type with decimals (#2927)More Details

b9a2d6c138

Pending

1 year, 2 days

Max

Fix a rare timing-sensitive crash when closing a window during a connection attempt (part of #2924)More Details

For UTF16 and UTF32 encoded files the charset autodetection logic did not return a specific enough value, resulting in Cocoa sometimes guessing the wrong byte order even when a BOM was present (part of #2860)More Details

* Instead of trying to figure out if an index is used by an FK ahead of time Sequel Pro will now simply run the query and check for the error code (and only for error 1553 will it attempt to also remove the FK)
* This means that a user will receive two remove dialogs in this rare case, but I think that is actually preferable. Common wisdom shows that users never read the first warning dialog, so in the past they may have agreed to something that they didn’t intend to do. The second dialog should actually make them pause and read it. Also there is a different confirmation button now.
* This also fixes the code to detect which FK in particular MySQL is referring to. SP should now correctly handle compound indexes and multi-column FKs as well as ambiguous results.More Details

* hostname and file paths are places where libmysqlclient ultimately only passes the string to an OS library so we should use whatever charset the OS expects, not mysql
* Even though _makeRawMySQLConnectionWithEncoding:isMasterConnection: takes an explicit charset argument most of the conversion logic simply used whatever charset the existing connection currently has, which is not neccesarily the one the new connection should use
* Add some remarks about the charset handling with passwords and mysql_error()
* Charsets do not apply to sqlstate.More Details

* Remove forward SDK declaration for 10.8 and below (since that is the minimum required development SDK)
* Fix one case where a method unconditionally required a 10.9+ runtime
* Move all of the forward/backward hacks into their own fileMore Details

Fix an issue where the wrong table could be deleted when switching tables (by key press) fast enough after confirming deletion (#2742)

This was caused by the delete code being called via a `performSelector:…` timer event instead of directly, which gave the run loop a chance to handle the key event between confirming the delete and actually executing it.More Details

* Turn `-[SPMySQLConnection checkConnectionIfNecessary]` into a public method, since it is actually the preferable way to `-[SPMySQLConnection checkConnection]` (which forces network IO in a new thread each time)

Change the behavior of user manager to only update values that actually changed when editing users (part of #2229)

(This also removes an additional db roundtrip when updating per-db user privileges that previously was needed to differentiate between user actions „Only removing privileges from user“ and „Backtracking on adding privileges to user“. Since we now only update changed values and the latter one would be an empty changeset this is no longer needed)More Details

With this change we no longer KVObserve an object we aren’t interested in anymore and the -tabView:didCloseTabViewItem: method actually matches its name now (before it was more of a tabView:willCloseTabViewItem: method).

Background:
Normally the tab bar cell observes its delegate’s (SPDatabaseDocument) isProcessing property. Changes to this will trigger an async redraw of the tab view. The redrawing itself may involve a timer and a call to the tab view delegate (SPWindowController). Now, when the window is being closed this would cause the connection to close, which would affect the isProcessing property. However this time, when the timer is being fired the window controller would already be dealloc’d (since the tab bar delegate is unretained) causing a use-after-free crash.
Previously -[PSMTabBarControl viewWillMoveToWindow:] stepped in at the right time and killed the timer before it could fire but on 10.12 the calls have shifted so the timer actually gets to fire and crash.
This change solves the issue by not even letting the tab bar come to the point where it creates the problematic timer.More Details