aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit
Commit message (Collapse)AuthorAgeFilesLines
* • removed unnecessary retains, ergo fixed some memory leaksBibiko2010-03-311-11/+9
|
* • querying for db structure is queued for the same connection to avoid ↵Bibiko2010-03-312-316/+361
| | | | | | | | | | | 'overlapping' access to global variables • after querying db structure write back data on main thread • completion list displays animated sync images if connection is just querying db structure data • fixed some minor issue for completion list • make sure that if last window of a connection is closed all relevant data will be removed from global variables Note: please test!
* • next trial to make getAllKeysOfDbStructure thread safeBibiko2010-03-301-6/+28
| | | | | | | | • some speed improvements for navigator - pre-calculate display string for type info to avoid doing it all the time while refreshing the outline view • suppress double-clicking at a not yet queried db structure if the same connection is querying another structure to avoid accessing the same storage objects from different threads (test) • reload outline view after filtering in navigator runs in its own thread to avoid blocking SP • fixed memory leaks while returning [obj copy]
* • some speed improvements and code simplifications for navigatorBibiko2010-03-301-10/+12
| | | | | | • avoid making the completion key list unique since it's possible to insert unique items only • added trigger to query db structure after SQL import • some work to avoid http://log.sequelpro.com/view/90 (not yet ideally - WIP)
* • fixed several threading issues due to threadingBibiko2010-03-292-8/+10
| | | | | - collection classes as NSMutableSet are NOT thread safe! • further tiny speed improvements for navigator
* • added some more sanity checks to avoid exceptions due to threadingBibiko2010-03-291-3/+9
|
* • improved completion suggestion for db schemataBibiko2010-03-291-3/+5
| | | | | | | | - if user typed "foo." and there's an unique schema path regardless cases (like there's an item Foo) show the content of the path Foo - now getUniqueDbIdentifierFor:term returns an array of found type (db or table) and the found string to handle case better for completion • tried to speed up the search in the navigator by using a NSPredicate • [MCPConennection allKeysofDbStructure] - fixed issue while returning if allKeysofDbStructure == nil
* • fixed several issue for completion listsBibiko2010-03-292-74/+65
| | | | | | | • improved gathering and caching of structure data coming from connection windows with the same connection • made the structure querying more stable against threading issues • moved getUniqueDbIdentifierFor from MCPConnection to SPNavigatorController to be up-to-date in all connection windows • improved detection if db structure querying should be performed or not (not yet finished)
* - db structure for tables and views will now be queried by using SHOW… ↵Bibiko2010-03-282-101/+197
| | | | | | | | | | | statements - completion now works for server versions < 5 as well - proc/func info will be queried by using information_schema for mysql >= 5 - changed completion logic to handle new format - completion will get the info from SPNavigator since this controller caches all information about db structure - optimization and fine-tuning will follow very soon
* - Improve MCPConnection behaviour with respect to run loops and proxies, ↵rowanbeentje2010-03-271-7/+29
| | | | | | | improving both proxy disconnection and reconnection after dropped connections - Slightly tweak SPSSHTunnel to improve proxy behaviour
* - When switching tables, correctly catch disconnections and suppress error ↵rowanbeentje2010-03-271-4/+4
| | | | | | | | | dialogs and related crashes - Move connection error sheet close method to the connection delegate - Tweak the information_schema db schema building query to be much faster on busy servers by amending the VIEW part - Set the connection lock to nil after releasing, coping with connection unlocks deferred on the main thread until after dealloc
* • navigatorBibiko2010-03-262-6/+7
| | | | | - fixed issue if different connection windows are connected to the same connection - prepared structure querying method to be able to add user info containing which table/db was changed if we know it to reduce the future parsing cost
* • Navigator and completion listBibiko2010-03-262-49/+57
| | | | | | - fixed issues for deletion of a db like remove all relevant items and refresh the navigator - simplified and minimized code and memory usage while querying the connection structure - whether a schema name is an unique db or table will be evaluated on run-time via allKeysofDbStructure
* • first steps to ease the structure querying for auto-completion and navigatorBibiko2010-03-262-35/+92
| | | | | | | - now it accumulates the data and caches them db by db, ie one has to select a db before using its structure for completion and navigator - next step is to avoid querying info_schema as much as possible - it will only query the structure if something was changed - next steps follows as soon as possible
* Revert a change made in r2005 by not waiting on the completion of calls to ↵stuconnolly2010-03-261-1/+1
| | | | unlockConnection on the main thread.
* Minor MCPKit tidy up, including the resolution of potential issues raised ↵stuconnolly2010-03-267-47/+128
| | | | during static analysis.
* - Simplify connection keepalives, moving to a single repeating timer on the ↵rowanbeentje2010-03-262-89/+37
| | | | | | | | main thread. This cleans up calls, results in small speed improvements when making lots of queries (no more stopping/starting of keepalives), and ensures only the main thread handles the initial keepalives. - Move connection unlocking to a blocking call to fix http://log.sequelpro.com/view/73 - Fix memory leaks caused by non-detached pthreads
* Suppress the connection structure query if there're more than 10000 items ↵Bibiko2010-03-251-2/+24
| | | | are listed in `information_schema`.`COLUMNS` for now which is a 'quick-fix' for i608. In the near future the gathering routine will do it db/table by db/table to minimize the traffic starting from the current selected db.
* • NavigatorBibiko2010-03-252-0/+24
| | | | | | | - first implementation of a search functionality, workable but tiny issues have to be improved - up to now the only search implemented is 'contains', regexp/fuzzy search will come soon - the search is only performed in the main outline view, the upper one is static - for the new search store all available schema paths uniquely in an array which will be set during queryDbStructure (this avoids re-parsing of a dict structure)
* • NavigatorBibiko2010-03-252-8/+6
| | | | | | - make usage of a notification sent by the [MCPConnection queryDbStructure] to update the navigator, and this decouples a doc window and MCPConnection from the navigator - minimized the tree update - now connectionID-based - any tree update will be now performed on main thread and waits until done to avoid 'overlapping' updates triggered by different notifications which normally ended up in an inchoate tree display
* - Make [MCPConnection getLastErrorMessage] more consistent by always ↵rowanbeentje2010-03-252-1/+10
| | | | | | | returning nil if no error occurred (previously a blank string was returned most of the time) - Add a new (BOOL)[MCPConnection queryErrored] method, changing all error message checks to use it for clarity
* • NavigatorBibiko2010-03-231-9/+14
| | | | | | | | - gather more information - show infos for proc/func - improved error handling - reduced jittering while closing a connection window - still hidden - if navigator is not visible no navigator code will be executed
* - Fix a crash when connecting to a non-existant database by cleaning up ↵rowanbeentje2010-03-231-4/+3
| | | | dealloc/unlock procedure. Addresses http://log.sequelpro.com/view/73
* - Simplify table source table setup and make thread safe. This should ↵rowanbeentje2010-03-221-0/+6
| | | | | | | | address http://log.sequelpro.com/view/43 , http://log.sequelpro.com/view/46 - Improve keepalive timer interaction - this should address http://log.sequelpro.com/view/74 and http://log.sequelpro.com/view/71 - Further thread safety improvements to Custom Query, Table Document, and the history controller
* - Tweak keepalive process, ensuring keepalives have a minimum time ↵rowanbeentje2010-03-221-2/+12
| | | | separation and fixing thread compatibility (not mentioned in docs but it seems NSTimers from terminated threads also terminate!)
* (no commit message)Bibiko2010-03-201-1/+4
|
* • further work on Navigator (not yet active but workable -> unHide menu item)Bibiko2010-03-192-8/+28
|
* - Clean up connection unlocking to prevent race conditions causing logged ↵rowanbeentje2010-03-191-5/+7
| | | | warnings
* - Improve thread locking in certain thread conditionsrowanbeentje2010-03-191-1/+1
|
* - Move streaming query result connection unlocking to the download thread ↵rowanbeentje2010-03-181-3/+4
| | | | rather than the data processing thread. This ensures the connection unlock is walys called - even when no data is present - thus addressing Issue #594. (Prior to r1931 manual memory management caught this case anyway)
* • changed NSDictionary structure for [MCPConnection queryDbStructure]Bibiko2010-03-171-6/+10
| | | | | | - added key, extra, privileges information to it - changed object type for 'field_name' to an array containing the values type, charset, key, extra, priv - completion for fields now also shows PRI, MUL, etc. keys
* - Make a number of changes to attempt to improve disconnection/quit ↵rowanbeentje2010-03-164-8/+22
| | | | | | | | | crashes: prevent multiple disconnects, add more checks, cancel current queries, and add a tiny delay to allow mysql cleanup. - Alter MCPStreamingResult to no longer return a retained instance, setting up correct result disposal on autorelease but changing callers to retain as soon as they receive. - Review and change a number of local variables shadowing/shielding other local or global variables.
* Following a manual code review, fix some local variables overriding global ↵rowanbeentje2010-03-153-7/+8
| | | | variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
* - Fix some leaks and autoreleases after checking static analysisrowanbeentje2010-03-131-0/+3
|
* - Use a modified connection timeout for the keepalive ping timeout, topping ↵rowanbeentje2010-03-111-5/+13
| | | | | | | out at 30 seconds to prevent sleeping threads - Improve keepalive timer interaction
* - Update MySQL client libraries to 5.1.44, incorporating all changes since ↵rowanbeentje2010-03-093-2/+2
| | | | | | | previous 5.1.36 - Update MySQL client build script for snow leopard compatibility, and to build the client libraries as a three-way binary (x86/ppc/x86_64) in keeping with the rest of Sequel Pro
* Rework MCPConnection for greater thread safety:rowanbeentje2010-03-082-61/+87
| | | | | | | | - The delegate is now triggered for connectionLost: on the main thread, as this action will probably trigger a GUI update; this addresses http://log.sequelpro.com/view/10 . - Connection proxy disconnects are now triggered on the main thread - Connection checks are now made via a pthread'd ping in a loop, removing the reliance on SIGALRM which may hop thread execution back to the main thread when called on another thread. The new approach is cleaner but does rely on a loop with a sleep. This will hopefully improve the disconnect/retry/reconnect crashes.
* Fix a number of memory leaks, and over-releases, as both a result of manual ↵rowanbeentje2010-02-103-23/+25
| | | | inspection of leaks and Clang static analysis.
* - Rework SPSQLParser, extending DELIMITER support into all the original ↵rowanbeentje2010-02-051-1/+1
| | | | | | | | | | | functions (off by default). Remove the forked "...Sql..." functions, as they're now duplicates, and switch CustomQuery to using the original methods. - TableDump imports can now process DELIMITERs correctly as a result. - Alter the TableDump display of tables etc to use TablesList as the source of information, and used cached lists where appropriate for a small speedup. Also means we gain consistent sorting. - Display procedures and functions in the toggleable list when exporting as SQL - Tweak the procedure and function export to only export selected items, and also to respect the "export drop syntax" and "export create syntax" checkboxes - Fix a crash when removing items from the TablesList resulted in an errorneous selection by deselecting all rows before deleting (and preemptively applying the same fix to TableContent)
* - Fix SSH threads (and connections) which were never cleaned up or closed, ↵rowanbeentje2010-01-271-11/+18
| | | | | | | probably as a result of r1709 - Improve SSH and object cleanup, especially for cases where the connection drops, to ensure the connection proxy is cleaned up and all memory released
* Improve Disconnection on connection loss:rowanbeentje2010-01-241-1/+6
| | | | | | | | | - Set error strings on MCPConnection on user disconnect to allow existing error chcking to catch the state - Improve close behaviour from threads - Improve window close behaviour and appearance - Add new checks for disconnection in one or two crash-prone locations This addresses Issue #531, one of Issue #532, one of Issue #539, and probable reported crashes on Issue #541.
* • added method to get an info about unique database/tables names for ↵Bibiko2010-01-142-1/+42
| | | | completion
* Replace COUNT(*) with COUNT(1) which is usually faster, and much faster in ↵bamse162010-01-141-2/+2
| | | | certain conditions
* - Move the query for the database structure to a background processing ↵rowanbeentje2010-01-121-2/+4
| | | | thread, as well as the existing background database connection, for a smoother experience
* • further developments for the F5 completionBibiko2010-01-111-2/+1
| | | | Note: not yet finished!
* • further preparations to F5 completionBibiko2010-01-111-5/+17
| | | | Note: not yet active - only querying the data in background will be performed for testing
* • first preparations to improve the Custom Query database names/table ↵Bibiko2010-01-102-0/+150
| | | | | | | | | names/field names + type and encoding completion - after connecting and updating the table list a background task executed on a different connection will be performed to query the information_schema db (MySQL >= 5 only so far) - the MCPConnection object holds a NSDictionary with all structural data Note: not yet active
* - Ensure all results for server variable requests are returned as strings, ↵rowanbeentje2010-01-035-20/+56
| | | | | | | to avoid binary-mode result issues with certain versions of MySQL (including 4.1.14). This should address Issue #509. - TableDocument now requests the server version string from MCPConnection, aiding caching
* - Fix saving of files or images added to the SPFieldEditorrowanbeentje2009-12-041-1/+1
| | | | | | - Fix a couple of memory leaks in the SPFieldEditor - Fix a crash caused by attempted reselection of databases after disconnection if no database was selected
* - Make a change to the area covered by threading locks in ↵rowanbeentje2009-11-281-4/+2
| | | | MCPStreamingConnection for a ~10-15% speedup in CPU-bound loops (eg data sets with lots of rows but little data) by reducing lock contention. (To be tested against #463)