aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit
Commit message (Collapse)AuthorAgeFilesLines
* - changed the query locking mechanism for MCPConnection to be more thread ↵jakob2010-04-164-69/+127
| | | | | | | | safe. From now on, always use [self lockConnection] rather than [queryLock lock], independent of what thread you are running on - A warning is written to the console when the connection is unlocked multiple times (to identify potential race conditions) - modified MCPStreamingResult to ensure it only closes the connection once - added a check to prevent arrow key navigation past the last row
* Review usage of notifications, afterDelay: and waitUntilDone:NO calls:rowanbeentje2010-04-121-0/+1
| | | | | | | - Add more calls to deregister watchers to fix crashes to closing threads or objects - Fix a couple of memory leaks - Alter a few calls to be performed on main thread (afterDelay: operates on the thread is is called on) - this fixed database reloading after import and field/index deletion error sheets
* • improved querying db structure handlingBibiko2010-04-072-0/+22
| | | | - distinguish between any update tables list invoked by SP which causes a weak and quick refresh if nothing was changed and if the user pressed Table List Refresh button explicitly which will cancel any current db querying and pending ones
* • query db structureBibiko2010-04-072-57/+98
| | | | | | - improved encoding handling while querying - if SET NAMES ... fails bail to avoid exceptions - this should fix http://log.sequelpro.com/view/101
* - Improve on r2050, running reconnections after a proxy disconnect on a new ↵rowanbeentje2010-04-041-15/+22
| | | | thread to allow the UI to update and handle events on 10.6. Also clean up the logic in MCPConnection waiting for a proxy discoonect to handle more cases and simplify code.
* - Improve SPSSHTunnel question/password dialogs to no longer eat 100% CPU ↵rowanbeentje2010-03-311-2/+5
| | | | | | | | by switching from NSCondition blocking to NSLock blocking - Improve behaviour of SSH tunnels with no password in keychain - prompt appropriately - Set MXPConnection to check the proxy state when attempting to reconnect a dropped connection, extending the timer when an auth UI is up. This prevents a multiple-dialogs misbehaviour (or sometimes deadlock), addressing the last part of http://log.sequelpro.com/view/86 .
* • 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
ef='#n1403'>1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621