aboutsummaryrefslogtreecommitdiffstats
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* • some improvement to speed up queryString:Bibiko2009-06-173-10/+26
| | | | | | | - caching of delegate && respondsToSelector - use clock() to calculate query's execution time • converting to cString: if utf8 encoding make usage of UTF8String • added to StringAddition to display µs for a timeIntervall
* • changed regex of trigger a reload of table/db according to executed queriesBibiko2009-06-171-3/+4
| | | | | - now it also recognizes such keywords with leading comments - still further improvements are needed
* • in r801 the code for inserting a new field containing a PRIMARY KEY ↵Bibiko2009-06-171-9/+19
| | | | | | | after the selected one was commented out - it's fixed now - improved code to ensure that in this case AFTER ... will be only appended for a new field
* Significant connection improvements:rowanbeentje2009-06-172-35/+98
| | | | | | | | | | - Restored MySQL 3 compatibility - max_packet_size details are now cached per connection for query speedup and to fix network recovery problems - Improved disconnection recovery - Errors during results fetching are correctly detected for the first time - Error strings are now correctly set in several places - The correct number of rows affected is now returned for queries which triggered reconnects or max_packet_size increases
* • added to CMMCPConnection:Bibiko2009-06-162-20/+81
| | | | | | | | | | | - register notification "SMySQLQueryWillBePerformed" to be able to identify the sender of the current query - (void)willPerformQuery:(NSNotification *)notification -- receives the "SMySQLQueryWillBePerformed" notification -- if CustomQuery was the sender retryAllowed will be set to NO • changed: now using mysql_real_query() because we've already calculated the length of the current query • changed: now the query length will be checked in beforehand against max_allowed_packet - if max_allowed_packet is editable increase it and reconnect - if not outputs an informative error alert
* • fixed: "Duplicate field" will be disabled explicitly if selected table ↵Bibiko2009-06-161-4/+6
| | | | is not a BASE TABLE
* • changed the behaviour of the "Duplicate Field" button in TableSource:Bibiko2009-06-161-5/+12
| | | | - if no field definition is selected "Duplicate Field" copies the last field structure defined in the table
* • fixed: if the user tries to delete the last defined field in a given ↵Bibiko2009-06-161-0/+18
| | | | table show an alert saying that this isn't allowed
* Rework queryString:withEncoding:, and ensure memory is correctly released ↵rowanbeentje2009-06-152-38/+88
| | | | | | | | | | | where used in our overwrites: - Check allocated memory and ensure it is released in our code - Consolidate code controlling both an initial query and any retries following connection failures - Perform additional checking to ensure a connection error was the cause - Correctly capture any result sets after the max_allowed_packet setting was changed - Check and cache the error strings and numbers for the intended queries, not any helper queries, and return them when requested.
* Move the QuickLook interface to its own header file.stuconnolly2009-06-154-94/+118
|
* • subclassed the editSheet textViewBibiko2009-06-153-22/+279
| | | | | - added drag&drop feature of file content or path resp. - added feature to in/decrease font size via ⌘+/- or two-finger zoom gesture
* • different log message for changing max_allowed_packet for increasing it ↵Bibiko2009-06-154-20/+39
| | | | | | | | and for resetting it (a bit more transparent info) - now also check the delegate if queryGaveError: method is implemented • while adding/updating a row to the db Table Content's pane now indicates that process better via spinning wheel • after TRUNCATE TABLE reload that table content
* Replace the change table type button with an edit button that switches the ↵stuconnolly2009-06-152-84/+7
| | | | current view to the table info pane.
* Implementation of enhancement #273: Allow user to truncate table by right ↵stuconnolly2009-06-152-45/+97
| | | | clicking.
* • deleted the drag&drop feature of file path or content from ↵Bibiko2009-06-156-180/+187
| | | | | | | | | | | SPTextViewAdditions - that feature should be added by subclassing NSTextView • fixed focus setting of editSheet • fixed general issue if SP tries to execute a query which is longer than max_allowed_packet - now it reconnects after changing max_allowed_packet (if it's editable) - the user will be informed via a log entry about that change - the new max_allowed_packet size will be valid during the current session; after reconnection to that db the default size will be used
* • improved event handling while showing QuickLook preview in editSheetBibiko2009-06-151-6/+39
| | | | | | - this also fixes the issue to play sound files properly • QuickLook's temp file will be deleted after closing the editSheet to allow double-click at the QuickLook preview for opening it in the default app • fixed some issues of loading data into the editSheet (data/string recognition)
* Cleanups and improvements within queryString:encoding:rowanbeentje2009-06-152-35/+52
| | | | | | | - The correct result set is returned even if extra internal queries are used - The correct error message is written even if extra internal queries are used - If the mysql thread is altered as a result of a query - resetting the connection - the encoding details are now restored on the connection
* Add support for titlebar connection status images, and use for SSH tunnels.rowanbeentje2009-06-144-3/+66
| | | | | | | - Add view and code to support drawing a connection status icon at the left of the titlebar - Use for SSH tunnels; completes Issue #114. - Remove reference to an image resource "j" in the DBView - fixes console log errors.
* - Default the index type picker to INDEX if a primary key already exists on ↵rowanbeentje2009-06-131-1/+15
| | | | | | | the table (addresses #290) - Set the default focus correctly on the add index sheet
* - Correct ability to look up passwords for connection names, user names, or ↵rowanbeentje2009-06-131-6/+6
| | | | databases containing non-alphanumeric characters. Resolves Issue #292.
* • moved code for de/increasing font and drag&drop feature (content or ↵Bibiko2009-06-137-275/+299
| | | | | | | | | | | | | | while holding ⌘ path) to SPTextViewAddition - two finger zooming gesture is disabled for NSTableView cells - i.e. all NSTextViews including NSTableView cells inherit these feature • simplified QuickLookFormat IBActions - added bin/text storing type to each action • QuickLook animation set to SP's window middle point • fixed issue that while having an image in editSheet an attribute change (font/size) in the editTextView destroyed the image data • fix to allow again drag&drop an image to editSheet • hide text/image/hex segment controll and QuickLook pull down button if user chose multipleLineEditingButton for non-blob fields • disabled NSLog of print result in TableDocument
* • cleaned and commented the rewritten editSheet codeBibiko2009-06-122-30/+75
| | | | - TODO: if a row contains large blob data addRowToDb: “sometimes” doesn't get rid of the correct encoding; e.g. inserted into a varchar field a ü; changed the table; went back to the table; the ü is still there; after closing and reopen the connection the ü is shown as two latin1 char.
* • rewrote editSheet for editing and displaying BLOB or TEXT data completelyBibiko2009-06-122-20/+300
| | | | • added the possibility to QuickLook the current data by choosing a data format
* • fixed position for scanning error 2006 to increase max_allowed_packetBibiko2009-06-121-6/+6
|
* Fixes connection timeouts during queries of over three seconds, and speeds ↵rowanbeentje2009-06-122-79/+21
| | | | | | | up queries further (1.5x faster for short socket queries). Doing further research, it turns out that mysql_query should effectively lock the connection, and mysql_ping should not be performed while a query is active as mysql is specifically not thread-safe in this one regard. This fixes #293. However, it means that we will suffer from http://bugs.mysql.com/bug.php?id=9678 again; if we don't complete the framework integration before 0.9.6, we should roll back this patch and r831 to allow all connections to behave properly and avoid hangs.
* - Fix saving of SSH tunnel passwords entered in preferencesrowanbeentje2009-06-112-2/+6
| | | | | | - Select favourites added in preferences - Scroll to newly added or duplicated favourites in both preferences and connection sheet
* • fix to allow insert large blob dataBibiko2009-06-112-21/+37
| | | | | | If a query gave the error 2006 (server has gone away) try to increase max_allowed_packet - if the user has SUPER privileges - and redo the query. If max_allowed_packet was changed reset it to default after executing. In addition if error 2006 occurred and max_allowed_packet can't be set write an additional error message to the log "(Please check if query size < max_allowed_packet)". - 10MB of data are no problem - while trying to insert 67MB MySQL gave the error : ... X'(null)' plus malloc: mmap(size=141287424) failed (error code=12); can't allocate region
* • introduced these methods to CMMCPConnectionBibiko2009-06-112-0/+54
| | | | | | | - (int) getMaxAllowedPacket; - (BOOL) isMaxAllowedPacketEditable; - (int) setMaxAllowedPacketTo:(int)newSize;
* - Rename the preference pane 'Alerts' to 'Alerts & Logs'.stuconnolly2009-06-111-3/+3
| | | | | | - Move the new disable query logging to the 'Alerts & Logs' pane. - Hide the display of the new 'Shortcuts' toolbar item.
* • fixed exception if content table view wants to load data from a table ↵Bibiko2009-06-111-1/+1
| | | | | | but the table data are not accessible (e.g. for information_schema) - this fix sets the content table view into a defined state as well
* Add a very basic preference to disable all query logging. This can be ↵stuconnolly2009-06-113-4/+25
| | | | expanded upon to disable different types of queries.
* updated dot generator to handle multi-col fk's with a different arrow type ↵mtvee2009-06-112-4/+22
| | | | and views as a different header color
* • cleaned code for the case that the user selects a view which causes a ↵Bibiko2009-06-103-6/+14
| | | | | | | | | MySQL error while retrieving data - [SPTableData tableEncoding] returns nil if no encoding can be found - [TableList tableViewSelectionDidChange:] checks in beforehand for a valid table encoding; this avoids to get the same MySQL error message twice and cleaned the structure view • if a MySQL error occurred while retrieving table data for the content view set the content view to a defined and clean status • bound TableContent's filterButton to DBView.xib to disable it if an error occurred (otherwise the status bar shows unexplainable results )
* - Table Info pane now has fixed heightavenjamin2009-06-104-7/+70
| | | | | - Table Info pane is collapsable - Export Controller code cleanup
* small fix for WebView not printing background colorsmtvee2009-06-101-0/+3
|
* update dot file genertor to use SPTableData instead of a v5 style query for ↵mtvee2009-06-102-19/+22
| | | | fk relations
* • fixed some minor issues in fetchResultFieldsStructureBibiko2009-06-101-5/+7
| | | | | - detection tiny/medium blob now uses length/max_lengthOfCharOfEnc - dropped mac_char_length key from dict because it's not possible to calculate the correct max_length in a given encoding
* • fixed issue that after changing the pref "Use monospaced fonts" the ↵Bibiko2009-06-101-1/+20
| | | | table structure view did not recognize the change after a reload
* - Replace TableSource use of a custom, flawed NSScanner-based parser with ↵rowanbeentje2009-06-101-29/+32
| | | | SPSQLParser usage - fixes errors like closing brackets (")") truncating ENUM/SET definitions
* • introduced the method (NSArray *)fetchResultFieldsStructure to CMMCPResultBibiko2009-06-092-88/+582
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - it returns an array of dicts containing general information about each field of the result array of the last executed query dict example so far for: SELECT ucs_comp AS co FROM comp_ucs3 AS co_table AUTO_INCREMENT_FLAG = 0; BINARY_FLAG = 0; BLOB_FLAG = 0; ENUM_FLAG = 0; MULTIPLE_KEY_FLAG = 1; NOT_NULL_FLAG = 0; NUM_FLAG = 0; PART_KEY_FLAG = 1; PRI_KEY_FLAG = 0; SET_FLAG = 0; UNIQUE_KEY_FLAG = 0; UNSIGNED_FLAG = 0; ZEROFILL_FLAG = 0; byte_length = 30; char_length = 10; charset_collation = utf8_general_ci; charset_name = utf8; charsetnr = 33; db = test; decimals = 0; flags = 16392; max_byte_length = 4; max_char_length = 1; name = co; org_name = ucs_comp; org_table = comp_ucs3; table = co_table; type = VARCHAR; typegrouping = string; Hint: To test that new method one can add the following code after the execution of a mysql query: NSArray *fStruct = [NSArray arrayWithArray:[theResult fetchResultFieldsStructure]];
* • fixed bug for "Show help while typing" - prevent an internal loop of ↵Bibiko2009-06-091-1/+2
| | | | calling ShowMySQLHelpForCurrentWord if "Highlight the current Query" is activated.
* • added: "Copy as SQL INSERT" ^⌥⌘CBibiko2009-06-083-89/+184
| | | | | | - up to now only available for the table content pane - supports blobs - if a primary key is given it also support (not yet loaded) blobs and long text data fields
* Effectively halve connection lag for queries, speeding up all queries and so ↵rowanbeentje2009-06-082-17/+114
| | | | | | | | | | | | interface responsiveness. - Rework [CMMCPConnection queryString:usingEncoding:] to no longer check the connection before every query. This removes a ping from the equation and therefore effectively halves connection lag. - Move the actual query to a thread (note this is *not* the long-desired multithreading!) to still correctly cope with http://bugs.mysql.com/bug.php?id=9678 . As soon as we upgrade the MySQL client libraries this can be removed, the code simplified, and a further processing speedup will be seen. - When testing a ~10,000 row CSV import (=10,000 queries), the following speedups were observed: - Local server, socket connection: 1.2x speedup - Remove server, 30ms ping: 1.85x speedup Slower connections will observe the biggest benefit from this commit.
* • improved "Copy as SQL INSERT" (still hidden)Bibiko2009-06-074-5/+15
| | | | • disabled "Copy with Column Names" if Custom Query editor is active
* • improved "Copy as SQL INSERT" (still hidden - can be tested if the menu ↵Bibiko2009-06-073-17/+59
| | | | item is set to 'not hidden' in the MainMenu)
* Further SSH tunnel improvements:rowanbeentje2009-06-066-14/+91
| | | | | | | | - Redesigned SSH key authentication dialog - Added ability to add SSH key passphrases to keychain (sharing details with system SSH) - SSH tunnels with keys which fail are now correctly restarted, interacting with the GUI as necessary - GUI interaction now performed on the main thread for increased stability
* • moved macros enumerate() and sizeOf() to sequel-pro_Prefix.pchBibiko2009-06-066-29/+131
| | | | | | • added to SPArrayAdditions.m - (NSArray *)subarrayWithIndexes:(NSIndexSet *)indexes • added "Copy as SQL INSERT" to MainMenu (not yet activated) • added to CMCopyTable - (NSString *)selectedRowsAsSqlInserts for copying selectedRows as INSERT INTO ... string (under constructions, up to now it works for strings)
* • improved: sped up removing the background color for query highlightingBibiko2009-06-062-2/+11
| | | | • added: DELIMITER to the completion suggestions
* - Fix some manual memory releases in r820 which llvm/clang has ↵rowanbeentje2009-06-051-8/+2
| | | | | | | misidentified (an autorelease is already present). - Ensure manually allocated memory is correctly releases
* • added "Select Enclosing Brackets" to each NSTextView (⇧⌘B)Bibiko2009-06-052-0/+87
|