diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 000000000..10c4c8f87 --- /dev/null +++ b/.bundle/config @@ -0,0 +1,2 @@ +--- +BUNDLE_CLEAN: "true" diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 000000000..0a88a29fe --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,16 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json + language: "en" # English + early_access: false + reviews: + high_level_summary: true + poem: false # Disable the poem feature because it adds noise and doesn't improve the review process. + review_status: false + collapse_walkthrough: true + path_filters: [] + path_instructions: [] + auto_review: + enabled: true + drafts: false + base_branches: [] + chat: + auto_reply: false diff --git a/.gitattributes b/.gitattributes index f4ed7ca70..4712d86eb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -*.strings diff +*.strings diff=localizablestrings diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 0ec2621a5..23feaffde 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -5,10 +5,17 @@ about: Create a report to help us improve --- + -- Sequel Ace Version: +- Sequel Ace Version (including build number): +- Sequel Ace Source (App Store/GitHub/Homebrew): - macOS Version: +- Processor Type (Intel/Apple): - MySQL Version: +- macOS Localization: + +**Is Issue Present in [Latest Beta](https://github.com/Sequel-Ace/Sequel-Ace/releases)?** + **Description** A clear and concise description of what the bug is. @@ -18,12 +25,12 @@ A clear and concise description of what the bug is. 2. **Expected Behaviour** -A clear and concise description of what you expected to happen. + -**Is Issue Present in [Latest Beta](https://github.com/Sequel-Ace/Sequel-Ace/releases)?** -Please try the [latest beta](https://github.com/Sequel-Ace/Sequel-Ace/releases). If the latest beta works, we've fixed the issue already and will get the fix out soon. +**Related Issues** + **Additional Context** -Add any other context about the problem here. - - + + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..203f3c889 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d7e815096..d095116ed 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,32 +1,35 @@ - -What does this implement/fix? Explain your changes. ---------------------------------------------------- -… - -Does this close any currently open issues? ------------------------------------------- -… - -Any relevant logs, error output, etc? -------------------------------------- - -Any other comments? -------------------- -… - -Where has this been tested? ---------------------------- -**Devices/Simulators:** … - -**macOS Version:** … - -**Sequel-Ace Version:** … - - +## Changes: +- + +## Closes following issues: +- Closes: + +## Tested: +- Processors: + - [ ] Intel + - [ ] Apple Silicon +- macOS Versions: + - [ ] 12.x (Monterey) + - [ ] 13.x (Ventura) + - [ ] 14.x (Sonoma) + - [ ] 15.x (Sequoia) +- Localizations: + - [ ] English + - [ ] Spanish + - [ ] Other (please specify) +- Xcode Version: + +## Screenshots: + +## Additional notes: diff --git a/.github/stale.yml b/.github/stale.yml index ad2824a55..838683c10 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,14 +1,14 @@ # Configuration for probot-stale - https://github.com/probot/stale # Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 28 +daysUntilStale: 58 # Number of days of inactivity before a stale Issue or Pull Request is closed daysUntilClose: 7 # Issues or Pull Requests with these labels will never be considered stale exemptLabels: - - "enhancement" + - "Feature Request" - "bug" - "good first issue" - "help wanted" diff --git a/.github/workflows/ci_pr_tests.yml b/.github/workflows/ci_pr_tests.yml index 1957a27de..dff61e87b 100644 --- a/.github/workflows/ci_pr_tests.yml +++ b/.github/workflows/ci_pr_tests.yml @@ -2,13 +2,17 @@ name: PR Tests on: pull_request +permissions: + contents: read + jobs: tests: name: Run Tests - runs-on: macOS-latest + runs-on: macos-15 steps: - name: Checkout the Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Build and run tests - run: ./build.sh tests - + run: ./Scripts/build.sh tests + env: + DEVELOPER_DIR: '/Applications/Xcode_16.2.app/Contents/Developer' diff --git a/.gitignore b/.gitignore index 6b9e92ebf..fc47830a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,30 @@ -.DS_Store -xcuserdata -project.xcworkspace -*.pbxuser -prebuild.log +## OSX generated files +.DS_store + +## User settings +xcuserdata/ + +## Build generated +build/ +DerivedData/ +Frameworks/**/*.tar.gz -# I want the pod project file in the repo +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +# Custom Pods/* -!Pods/Pods.xcodeproj/ \ No newline at end of file +!Pods/SwiftLint +fastlane/metadata +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output +fastlane/build_folder +fastlane/.env +prebuild.log +/docs/_site +vendor diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 000000000..6798800ff --- /dev/null +++ b/.swiftlint.yml @@ -0,0 +1,87 @@ +disabled_rules: + - trailing_whitespace + - file_length + - line_length + - type_body_length + - identifier_name + - function_parameter_count + - switch_case_alignment + - orphaned_doc_comment + - inclusive_language + +opt_in_rules: + - force_unwrapping + - implicitly_unwrapped_optional + - conditional_returns_on_newline + - empty_count + - empty_string + - extension_access_modifier + - closure_spacing + - fatal_error_message + - first_where + - toggle_bool + - unused_declaration + - modifier_order + - contains_over_first_not_nil + - convenience_type + - fallthrough + - unused_import + - unavailable_function + - strict_fileprivate + - explicit_init + - anyobject_protocol + - switch_case_on_newline + - contains_over_range_nil_comparison + - contains_over_filter_count + - contains_over_filter_is_empty + - empty_collection_literal + - flatmap_over_map_reduce + - no_space_in_method_call + +excluded: + - Pods + - Tests + - Vendor + - Scripts + - fastlane + - "ClassDojo/Supporting Files" + - Playgrounds + +function_body_length: 120 +type_name: + min_length: 3 + max_length: 60 +identifier_name: + min_length: 3 + max_length: 60 +cyclomatic_complexity: 20 +large_tuple: + warning: 4 + error: 5 +implicitly_unwrapped_optional: + mode: all_except_iboutlets + +colon: + flexible_right_spacing: false + apply_to_dictionaries: true + +# Custom rules definitions +custom_rules: + + no_negated_isEmpty: + included: ".*\\.swift" + excluded: ".*Test\\.swift" + name: "Negated isEmpty" + regex: (![(\w+\.)+]+isEmpty) + severity: error + message: "Use .isNotEmpty" + match_kinds: + - identifier + + no_fatal_init_coder: + included: ".*\\.swift" + excluded: ".*Test\\.swift" + name: "Implement init(coder:)" + regex: (fatalError\("init\(coder:\) has not been implemented"\)) + severity: error + message: "Return nil or implement NSCoding" diff --git a/Artwork/Ace Background.afdesign b/Artwork/Ace Background.afdesign new file mode 100644 index 000000000..41065f051 Binary files /dev/null and b/Artwork/Ace Background.afdesign differ diff --git a/Artwork/Ace Background.png b/Artwork/Ace Background.png new file mode 100644 index 000000000..0c2ddde01 Binary files /dev/null and b/Artwork/Ace Background.png differ diff --git a/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_1024.png b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_1024.png new file mode 100644 index 000000000..ce46980d9 Binary files /dev/null and b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_1024.png differ diff --git a/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_128.png b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_128.png new file mode 100644 index 000000000..db57cff4b Binary files /dev/null and b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_128.png differ diff --git a/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_256.png b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_256.png new file mode 100644 index 000000000..d0389ae79 Binary files /dev/null and b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_256.png differ diff --git a/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_30.png b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_30.png new file mode 100644 index 000000000..fc2d04673 Binary files /dev/null and b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_30.png differ diff --git a/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_512.png b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_512.png new file mode 100644 index 000000000..aeff0dec0 Binary files /dev/null and b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_512.png differ diff --git a/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_64.png b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_64.png new file mode 100644 index 000000000..358d9926f Binary files /dev/null and b/Artwork/AppIcon alternative (Airam)/AppIcon_Airam_64.png differ diff --git a/Artwork/AppIcon/Icon Profile - no cutout.png b/Artwork/AppIcon/Icon Profile - no cutout.png new file mode 100644 index 000000000..aa9c5381c Binary files /dev/null and b/Artwork/AppIcon/Icon Profile - no cutout.png differ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..9748d8994 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,1278 @@ +## [5.1.0] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +### Unfinished + + +## [5.0.9] + +### Added +- 08085999c, support goto database.table with the "Go to Database" (#2244) + +### Fixed +- 5d43e5702, #1746 clicking foreign key arrows on _bin column filters correctly (#2248) +- 2340e0ca2, Reset the relevant variables to prepare for the next time (#2243) + +### Changed + + +### Removed + + +### Infra +- 0c81e48ec, This file has extension "xcodeproj" not "xcworkspace" (#2261) + +### Unfinished + + +## [5.0.8] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +### Unfinished + + +## [5.0.7] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [5.0.6] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [5.0.5] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [5.0.4] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [5.0.3] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [5.0.2] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [5.0.1] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [5.0.0] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.2.1] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.2.0] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.7] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.6] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.5] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.4] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.3] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.2] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.1] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.1.0] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.17] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.16] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.15] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.14] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.13] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.12] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.11] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.10] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.9] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.8] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.7] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.6] + +### Added + + +### Fixed + + +### Changed + + +### Removed + + +### Infra + + +## [4.0.5] + +### Added +- 9c3dd59f, Add preference for column types visibility +- fe2b4506, preference for column type visibility + +### Fixed +- 1a47d524, Error when altering Timestamp/Datetime columns in structure view + +### Changed + + +### Removed + + +### Infra + + +## [4.0.4] + +### Added + + +### Fixed +- b09e83df, Temporary Hotfix: Kill the task after termination +- 9f6d5ec0, Fix column types when copying content with column types and when exporting +- 49ec01cb, Autocomplete weirdness +- 4e1dfbec, Pasting content in unloaded text/blob field causes crash + +### Changed +- 55f6cc02, Update OpenSSL to 1.1.1s + +### Removed + + +### Infra +- e2d231a1, Move OCMock to SPM from included framework + +## [4.0.3] + +### Added + + +### Fixed +- 81e08793, Fix copy as SQL insert, Fix users modal resizing + +### Changed + + +### Removed + + +### Infra + + +## [4.0.2] + +### Added +- 51fad246, Show column type in query editor and content view + +### Fixed +- 0756e835, Remove data type names from CSV exports +- e8fa9487, Text is not invalidated if just a cut or paste action is executed +- 9ccf9d19, Enable Help menu for connection screen + +### Changed + + +### Removed + + +### Infra + + +## [4.0.1] + +### Added + + +### Fixed +- 1b531f4c, Fix closing all connections that are being opened + +### Changed + + +### Removed + + +### Infra + + +## [4.0.0] + +### Added +- 968d5361, Make analytics opt-out + +### Fixed +- c9d037a3, Fix small typo on Export dialog +- e37e799e, Portuguese localization +- f8f016ca, Fix major memory leak with database document not being released +- 24676d51, Fix memory leaks when closing connection +- c9e367d5, Fix saving session not saving / restoring tabs +- 6381ff81, Fix crash on right click when field editor is active +- dd6d02c5, Fix deprecations and warnings +- 2dd099f6, Fix saving session more than once + +### Changed + + +### Removed +- 26092354, Breaking change: Officially drop MySQL 5.6 support +- 6183c515, Drop macOS 10.12 + +### Infra + + +## [3.5.3] + +### Added + + +### Fixed + + +### Changed +- ebeb253c, Update MAMP Documentation regarding settings to connect + +### Removed + + +### Infra +- ed74fc85, Fix preferences path, keychain path, formatting +- b10de447, [CLEANUP] Migration HowTo +- c5ecac7e, chore: Included githubactions in the dependabot config + +## [3.5.2] + +### Added + + +### Fixed +- c25b64a7, Possible fix for crash on tables with invisible columns +- 03c9e6f1, Only append a default value if its specified + +### Changed + + +### Removed + + +### Infra + + +## [3.5.1] + +### Added +- 3acc82a8, support to copy table's name with database name in the list of tables + +### Fixed + + +### Changed +- e9ac3d3c, Attempt non-SSL connections if we fail connecting via SSL and SSL is not required + +### Removed + + +### Infra +- 4dac484c, Infra cleanup, xcworkspace removal, hierarchy simplification + +## [3.5.0] + +### Added +- 49ed5429, Support for pinning tables at top of tables list +- 18af48c0, Clicking S[tructure] C[ontent] or D[rop] in export window will toggle the value for all tables +- 7293fc50, Filter and Sorting to Structure "fields" Table View. + +### Fixed +- 7e16cee2, Disable dark mode variants of colors for tab bar +- d46f0712, Disable TouchBar font panel API + +### Changed +- 8afb7e51, Improved tab coloring appearance in Dark and Light modes +- 81ec264f, Stop exporting a placeholder table for views in database exports +- da43e08c, Accurately show SSL connection status always +- a37b653c, Allow sorting every column on the Structure "fields" table view +- b002cae1, Change default query editor font to Menlo to improve query editor performance + +### Removed + + +### Infra + + +## [3.4.5] + +### Added + + +### Fixed +- 8b89abd0, Fix ssh connections broken by latest beta +- 3ea8b8c4, Undo/Redo in Query Editor +- dbfc1369, Add Find Next/Previous Menu Items with Shortcuts + +### Changed +- 285a4f69, Handle special characters in bookmark file names and paths +- 06794a4c, - Remove GeneratedColumn from 'Copy as SQL Insert' #1282 + +### Removed + + +### Infra + + +## [3.4.4] + +### Added + + +### Fixed +- f8ae57d1, Fixed spreadsheet edit mode not honoring the cutoff length setting and add an option to edit multiline content in popup editor +- 5a65d157, Fixed JSON viewer UI bugs and occasional failures to parse +- 4bd96b9f, Fix user editing crash +- 00fa40e9, Show time in addition to date for table created and updated at dates + +### Changed + + +### Removed + + +### Infra + + +## [3.4.3] + +### Added + + +### Fixed +- 3c313175, #979 Properly reset the sorting column +- 864b9cb1, Show tab color on the first tab after it's expanded #1216 + +### Changed + + +### Removed + + +### Infra +- 58e233e7, Attempt app center fixes for Xcode Cloud +- c6695f62, More bundle execution refactoring +- 671eb8d6, Extract duplicate bundle dispatch logic +- 5c49df6a, Clean up bundle loading + +## [3.4.2] + +### Added +- 4b298830, #fixed Shortcut to show/hide toolbar. Shortcut to duplicate connection in new tab. + +### Fixed +- c7594584, Add new line only when adding to existing queries +- 5ba8e135, Make Preferences elements consistent #2 +- 904f9240, Reload query history after new entries are added +- 72f4d43d, Favorite and placeholder display bug in query editor fixed +- 88fb0a7d, Make Preferences elements consistent +- f9fa6430, Fix crash when adding a row locally +- 0f03c3a6, Allow Updating in Joined Instances +- c44118ff, Remove redundant rawErrorText parameter +- 4b298830, Shortcut to show/hide toolbar. #added Shortcut to duplicate connection in new tab. + +### Changed + + +### Removed + + +### Infra + + +## [3.4.1] + +### Added + + +### Fixed +- a0ce9cc2, Fix stats counts not updating immediately for MySQL 8 +- 865043fa, Fix issue with Check for Update Failing +- dd4d3093, Possible fix for issues with reconnecting +- c0470af9, Resolved 'alter table' bug for generated column + +### Changed + + +### Removed + + +### Infra + + +## [3.4.0] + +### Added + + +### Fixed +- 3dbc261f, Fix tabbing, titles and window order +- 304f4d62, Fixed buggy behavior when trying to edit a generated column +- a30214a9, Fix character counts for multi-byte strings + +### Changed + + +### Removed + + +### Infra + + +## [3.3.3] + +### Added +- 22493671, Options when Deleting All Rows from Table + +### Fixed +- 3ecace04, Fix query timer after reconnect +- 36c79bb8, Fix text jump and crash in query editor + +### Changed +- 879307e5, Take 2 at UTF8mb3 Support +- bbf6f99c, Update encodings mappings + +### Removed + + +### Infra + + +## [3.3.2] + +### Added +- f26d498b, New Nord theme + +### Fixed +- 878a9553, Fix grammar of "Check for Updates..." menu item +- 09845e14, Fix getting windows for bundles + +### Changed + + +### Removed + + +### Infra + + +## [3.3.1] + +### Added + + +### Fixed +- 8eee143e, Stop query button works as expected +- a86bee7a, Fix tab title to show different string than window title +- b7019ec0, Shortcuts for switching between tabs work as expected +- 40e1cb9b, Open table in new tab works as expected +- 6c8b05d0, Users icon is clickable and doesn't crash +- 95fa0270, Improve tabs coloring +- 5749f2bd, Display binary data as hex color in dark mode + +### Changed + + +### Removed +- a8f67d0a, Remove favorites divider + +### Infra + + +## [3.3.0] + +### Added +- 57f0bbfb, Ability to choose custom known_hosts file + +### Fixed +- 8d56fa4f, re-added Edit inline or popup +- 21e80ddb, Improve memory handling on SQL export +- 672b44a4, #changed/ - Feature requests 955 +- 588d1c42, custom query result sorting +- 1dd4b0f0, various small legibility issues across the documentation +- a792bd67, Auto pair characters changing font +- e7b089b2, exporting database with no selected table + +### Changed +- c5f1a35c, Windows & Tabs refactoring: Remove Custom tabbing, implement native tabbed windows, rewrite app structure & hierarchy +- 672b44a4, /#fixed - Feature requests 955 +- 6018892c, - foreign key creation when skip-show-database is on + +### Removed +- 25942e3a, Remove unused SPFlippedView +- 479f8a8a, Remove titleAccessoryView + +### Infra +- 4879793e, re-added SPTaskAdditions.m +- 574bad74, Move NSWindowDelegate to Swift + +## [3.2.3] + +### Added +- eb3378d5, No Newer Release Available info alert +- caa4103b, kill ssh child processes on crash +- baa65392, Edit cells inline or popup 'intelligent' switch +- 3b188a8f, GitHub release checker + +### Fixed +- e6899d3b, Fix windows being created instead of populated +- 07e01804, GitHub version checker fixes +- b074152d, saving individual query history +- 1a8377bf, some analyzer warnings +- 53f87c86, hide the filter for the current session +- f07244a8, a couple of crashes +- 0b0ae9cf, allow insertion of NULL into varchar fields of length < 4 +- bff9f326, latest crashes +- 62491cb9, edit in popup +- 22de4acc, Export directory bookmarks +- 8163a425, some crashes + +### Changed +- e4a68c3e, Don't show no new release available alert on startup + +### Removed + + +### Infra +- cf73d714, faster-stringForByteSize +- b967b556, Sqlite error logging + +## [3.2.2] + +### Added + + +### Fixed +- 3cb1d8aa, maintain table filter state +- 104cc39f, Tooltip crash attempt two +- 57890626, show error if setting the time zone fails + +### Changed +- 550a566e, Remove hard-coded minimum for resetting auto-increment +- 839bdfc8, Build Version is now selectable + +### Removed + + +### Infra + + +## [3.2.1] + +### Added + + +### Fixed +- cb22f005, some crashes +- 2db66191, Tooltip crash +- 73d2bfa9, Export directory bookmarks + +### Changed + + +### Removed + + +### Infra + + +## [3.2.0] + +### Added +- cccc8755, UTC time tooltips +- 85d0d6b5, Allow creating foreign keys referencing other databases + +### Fixed +- 9f32eeff, import/export when table has a trigger +- 2e642c83, information schema crash 883 +- dab36f4f, indenting issue on query editor +- fc7ced75, text wrapping on query screen +- e8b516b1, a few crashes +- 4a711678, Duplicate Table... name not editable +- 2e468c1b, some crashes +- e30d9f53, rename table so that it drops the original table +- 0aa257c0, Users screen schemas not updating +- 8a2dbe4d, remove space char used to trigger syntax highlighting on paste +- a67ef9ed, more fb crashes +- 351b9daa, Fix CSV Import Index out of bound in array crash +- 30836826, Bookmarks not being generated correctly + +### Changed + + +### Removed + + +### Infra +- 69e2d39d, Set some App Center configs and events +- c827cfd4, Rename SPWindowController's properties, start AutoLayout programatically without xibs +- 05fa4958, Appcenter upload_symbols script +- 351643ce, Get rid of Firebase Crashlytics, move to MSAppCenter Crashlytics & Analytics +- e6ffd106, Windows hierarchy cleanup and typesafety, part 1 +- fac631db, Added more logging and removed a few non-fatal error reports + +## [3.1.1] + +### Added +- ebe453a7, Add Chinese localizations +- edd5e4eb, Add support for generic Spanish language next to Spanish (Spain) language + +### Fixed +- b7578c22, Fix Broken run current query button +- 74fd2acb, syntax highlighting not being properly applied after pasting +- f220ccb3, Some crashes +- a53198a7, Query history duplicates and order +- 100cd2db, Table history buttons not working +- cb7f9022, Fix reconnect timeout - accept SSH password after network connection reset +- 056bb81a, some more crashes + +### Changed +- 3350b13d, apply custom font to all inserted snippets +- 5df7a388, highlight errors in red in the query status field +- 8f91391c, Get rid of CocoaPods, switch FMDB to SPM, enable Swift standard libraries +- 656cc948, Consistently use encoding utf8mb4 + +### Removed + + +### Infra +- 056e7e9e, os_log wrapper for swift + +## [3.1.0] + +### Added +- 01fa877d, Copy tables between databases + +### Fixed +- 9bd486ab, table information eye symbol crash +- 5ae47f9d, exporting multiple tables +- 1bcfe5f4, changing custom query font and respect font when inserting favourite +- d21af610, some crashes +- c08f883b, some crashes +- 0738da94, Two custom queries with syntax errors = crash +- d6e987d9, Fix cutoff file names in Preferences +- 02b68274, display json string properly in edit popup +- e424db42, - SSHTunnel crash +- 8cca7500, more crashes +- 9430b976, Improve query editor performance - Revert double click functionality by overriding NSTextStorage +- dddf027d, a few new crashes +- 4030d3fb, Fix quick connect not clearing fields + +### Changed +- da1c1c8c, better handle stale bookmarks +- 5474b93f, Better export error handling +- 2664a177, Bookmarks improvements +- 460e706b, Always show tab bar as native macOS apps, cleanup tab bar code + +### Removed + + +### Infra +- ae7d0dd7, Improved clarity of bug report issue template +- e254ba0e, More doc tweaks +- 4e8931d3, Doc tweaks +- 4044855c, Connection logging +- dea19267, App Sandbox and Secure Bookmarks docs +- 051134ab, fave colour support optimisation + +## [3.0.2] + +### Added + + +### Fixed +- c199dd0d, spfieldmappercontroller match header names crash +- f03f6146, Fix Query Window Forgets Active Query +- b0b0da30, SPExtendedTableInfo loadTable crash +- b7b93ad3, SPTableCopy _createTableStatementFor:inDatabase crash +- f2899dd6, Homebrew installation command +- 4540f8e8, SPTableInfo crash +- b33ac44f, Fixed commenting out one or multiple lines in query editor +- 7eba8716, double error alerts on connection failure +- c7cc1506, sp table structure load table crash +- 07b2d485, - tableChanged NSNull Collation crash +- 013c0f94, tableViewColumnDidResize crash +- 38a712e7, Update UI for light and dark mode on Tabs +- 5d70e94d, deriveQueryString crash +- 03fefe99, databasestructure crash +- 4c3f1a82, Keychain improvements and safety checks +- ab1e3ea7, Query editor improvements +- 2bf774db, Use entered password for favorite if it changed +- b10320f8, Various fixes/changes + +### Changed +- cd85311a, Improvements to Console + +### Removed + + +### Infra +- 42e36f3b, Remove a few extraneous log messages +- 22926dce, Change all NSArrayObjectAtIndex to safeObjectAtIndex +- 21fbea78, logging in RegexKit's Exception and Error generation code +- 20d48662, Update pull_request_template.md +- 7710ca24, Update bug_report.md + +## [3.0.1] + +### Added + + +### Fixed +- 4d7ae04c, Fix 3.0.0 bugs +- 7cf9986a, CSV import crash +- 69011da7, Query alias completions +- 863909cc, Alerts being created on background threads +- 26f8b0bc, SPQueryController addHistory:forFileURL crash +- c5644649, Crash when taking substring of query +- 8f079d3e, Fix couple of Crashlytics crashes +- 4f5a1900, Secure bookmark generation and logging + +### Changed + + +### Removed + + +### Infra +- d02aa6cc, Added logging for missing key + + +## [3.0.0] + +### Added +- 4facbb7c, Shift + Cmd ←/→ shortcuts to next/previous arrows on content view +- b4f2a858, Re-implement double click functionality for Query editor +- 5dec70de, Implement localizations mechanism, add Spanish localization as first +- cb74045b, kill tidb query and kill tidb connection support +- 58fde57b, Compile libmysqlclient for Apple Silicon, enable ARM architecture, make Sequel Ace Apple Silicon compatible + +### Fixed +- ce01e021, Fix reopening window when last window is closed +- 17c7c0cd, very large combo box warning +- ce03040d, fixed deleting rows +- a6bbf298, Fix connection controller and keychain getters +- 7c390fca, Fix spelling of "occurred" +- 76e7b423, Fix color changes to favorites +- 29ea14a2, Crash and bug fixes +- 8b73fb16, Beta 1 & 2 fixes, crash fixes, fix table content positioning +- 068622cc, Get rid of SPAlertSheets and fix over 150 warnings +- 4db1f957, Main thread crashes +- 3ef4e6ec, Fix couple of warnings and deprecations +- fd57651a, A couple of fixes +- 395006b9, Fix broken add connection button +- 12d1d8a8, Show alert on bad bundle, also actually delete it +- 4ba2bc9f, Fix table list allow resizing table information +- 6944d8d8, Fix close button style on tabs +- d58d3a93, Fix Query ruler view and rows count +- 2e0af572, Speedup loading list of the tables + +### Changed +- 0f66fda8, More bundle handling +- 3437f246, Switch Firebase to SPM instead of CocoaPods +- 084c8ce0, Migrate query history to sqlite +- 7614d567, Cleanup query abort support +- 9b1cfae4, Handle .saBundle and .spBundle files +- db395c51, SPTextView: Rewrite behavior of syntax highlight and scroll +- 52af9e8f, SPTextView improvements and warnings +- c3733542, ShortcutRecorder converted to ARC and ARM +- 007e82a7, Rewrite appearance for split view actions - part 2 +- a66c083f, Rewrite appearance for settings toolbar, database toolbar and split view actions + +### Removed + + +### Infra +- 93a8ebf2, Update to OpenSSL 1.1.1i +- a1995e67, crashlytics-logging +- 5de34545, fix path to Crashlytics upload-symbols script for SPM build +- cc27ecb1, Tweak issue and pr templates +- 6f87e6cb, Fix Beta Scheme +- fa2e2e83, Add fastlane automation for increment_build and for Changelog generation +- 363bb954, Add Swiftlint to the project + + +## [2.3.1] + +### Added +- Added connection option to enable Cleartext plugin (fixes #368: Thanks, @SumBeam!) + +### Fixed +- Made query history search much faster (fixes #366) +- Fixed re-ordering the query favorites by drag and drop (fixes #475) +- Fixed favorite query variables always displaying black in the query editor (fixes #382) +- Fixed invalid bundles and Beeping of the app (fixes #489) +- Fixed bracket highlighter crash on macOS 10.10 and 10.11 (fixes #511) + +### Changed + +### Removed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index f16a0fa69..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# How to contribute - -I'm really glad you're reading this, because we need volunteer developers to help this project be successful long-term. - -We make a commitment to review *all* PRs (pull requests) that are submitted by members of the community. We will provide feedback and recommendations with the effort of incorperating contributions from the community whenever possible. - -## Testing - -If you add a new feature or fix a bug, it's generally a good idea to write a test to accompany it! Tests help us ensure that our users can depend on Sequel Ace. - -## Submitting changes - -Please send a [GitHub Pull Request to Sequel Ace](https://github.com/Sequel-Ace/Sequel-Ace/pull/new/dev), pointed at the *dev* branch, with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). Please include detailed explainations of what changed (screenshots of changes are preferred). Please avoid committing changes that are unrelated to the pull request (if you accidentally edited an .xib file, it's all good, just revert changes to that unrelated file). - -Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: - - $ git commit -m "A brief summary of the commit - > - > A paragraph describing what changed and its impact." - -## Coding conventions - -Start reading our code and you'll get the hang of it. We optimize for readability! - -Thanks, -The Sequel Ace Team diff --git a/Sequel Ace.entitlements b/Entitlements/Sequel Ace.entitlements similarity index 92% rename from Sequel Ace.entitlements rename to Entitlements/Sequel Ace.entitlements index f28882b09..0c5bba9b2 100644 --- a/Sequel Ace.entitlements +++ b/Entitlements/Sequel Ace.entitlements @@ -12,6 +12,8 @@ com.apple.security.files.bookmarks.app-scope + com.apple.security.files.downloads.read-write + com.apple.security.files.user-selected.read-write com.apple.security.network.client diff --git a/SequelAceTunnelAssistant.entitlements b/Entitlements/SequelAceTunnelAssistant.entitlements similarity index 100% rename from SequelAceTunnelAssistant.entitlements rename to Entitlements/SequelAceTunnelAssistant.entitlements diff --git a/xibLocalizationPostprocessor.entitlements b/Entitlements/xibLocalizationPostprocessor.entitlements similarity index 100% rename from xibLocalizationPostprocessor.entitlements rename to Entitlements/xibLocalizationPostprocessor.entitlements diff --git a/Frameworks/OCMock.framework/Headers b/Frameworks/OCMock.framework/Headers deleted file mode 120000 index a177d2a6b..000000000 --- a/Frameworks/OCMock.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/Frameworks/OCMock.framework/OCMock b/Frameworks/OCMock.framework/OCMock deleted file mode 120000 index c388ea8df..000000000 --- a/Frameworks/OCMock.framework/OCMock +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/OCMock \ No newline at end of file diff --git a/Frameworks/OCMock.framework/Resources b/Frameworks/OCMock.framework/Resources deleted file mode 120000 index 953ee36f3..000000000 --- a/Frameworks/OCMock.framework/Resources +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Resources \ No newline at end of file diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h b/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h deleted file mode 100644 index c20a9c2b2..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2009-2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import - -@class OCObserverMockObject; - - -@interface NSNotificationCenter(OCMAdditions) - -- (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; - -@end diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h deleted file mode 100644 index d53437cb7..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2009-2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import - -@interface OCMArg : NSObject - -// constraining arguments - -+ (id)any; -+ (SEL)anySelector; -+ (void *)anyPointer; -+ (id __autoreleasing *)anyObjectRef; -+ (id)isNil; -+ (id)isNotNil; -+ (id)isEqual:(id)value; -+ (id)isNotEqual:(id)value; -+ (id)isKindOfClass:(Class)cls; -+ (id)checkWithSelector:(SEL)selector onObject:(id)anObject; -+ (id)checkWithBlock:(BOOL (^)(id obj))block; - -// manipulating arguments - -+ (id *)setTo:(id)value; -+ (void *)setToValue:(NSValue *)value; - -// internal use only - -+ (id)resolveSpecialValues:(NSValue *)value; - -@end - -#define OCMOCK_ANY [OCMArg any] - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) - #define OCMOCK_VALUE(variable) \ - ({ __typeof__(variable) __v = (variable); [NSValue value:&__v withObjCType:@encode(__typeof__(__v))]; }) -#else - #define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))] -#endif diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h deleted file mode 100644 index 777966ab7..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2007-2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import - - -@interface OCMConstraint : NSObject - -+ (instancetype)constraint; -- (BOOL)evaluate:(id)value; - -// if you are looking for any, isNil, etc, they have moved to OCMArg - -// try to use [OCMArg checkWith...] instead of the constraintWith... methods below - -+ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject; -+ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue; - - -@end - -@interface OCMAnyConstraint : OCMConstraint -@end - -@interface OCMIsNilConstraint : OCMConstraint -@end - -@interface OCMIsNotNilConstraint : OCMConstraint -@end - -@interface OCMIsNotEqualConstraint : OCMConstraint -{ - @public - id testValue; -} - -@end - -@interface OCMInvocationConstraint : OCMConstraint -{ - @public - NSInvocation *invocation; -} - -@end - -@interface OCMBlockConstraint : OCMConstraint -{ - BOOL (^block)(id); -} - -- (instancetype)initWithConstraintBlock:(BOOL (^)(id))block; - -@end - - -#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self] -#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)] diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMLocation.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMLocation.h deleted file mode 100644 index e510db7aa..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMLocation.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import - -@interface OCMLocation : NSObject -{ - id testCase; - NSString *file; - NSUInteger line; -} - -+ (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; - -- (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; - -- (id)testCase; -- (NSString *)file; -- (NSUInteger)line; - -@end - -extern OCMLocation *OCMMakeLocation(id testCase, const char *file, int line); diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMMacroState.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMMacroState.h deleted file mode 100644 index 4b2d63508..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMMacroState.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import - -@class OCMLocation; -@class OCMRecorder; -@class OCMStubRecorder; -@class OCMockObject; - - -@interface OCMMacroState : NSObject -{ - OCMRecorder *recorder; -} - -+ (void)beginStubMacro; -+ (OCMStubRecorder *)endStubMacro; - -+ (void)beginExpectMacro; -+ (OCMStubRecorder *)endExpectMacro; - -+ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation; -+ (void)endVerifyMacro; - -+ (OCMMacroState *)globalState; - -- (OCMRecorder *)recorder; - -- (void)switchToClassMethod; - -@end diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMRecorder.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMRecorder.h deleted file mode 100644 index f56d2ca4c..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMRecorder.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import - -@class OCMockObject; -@class OCMInvocationMatcher; - - -@interface OCMRecorder : NSProxy -{ - OCMockObject *mockObject; - OCMInvocationMatcher *invocationMatcher; -} - -- (instancetype)init; -- (instancetype)initWithMockObject:(OCMockObject *)aMockObject; - -- (void)setMockObject:(OCMockObject *)aMockObject; - -- (OCMInvocationMatcher *)invocationMatcher; - -- (id)classMethod; -- (id)ignoringNonObjectArgs; - -@end diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMStubRecorder.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMStubRecorder.h deleted file mode 100644 index 890c9ef3b..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMStubRecorder.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2004-2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import "OCMRecorder.h" - - -@interface OCMStubRecorder : OCMRecorder - -- (id)andReturn:(id)anObject; -- (id)andReturnValue:(NSValue *)aValue; -- (id)andThrow:(NSException *)anException; -- (id)andPost:(NSNotification *)aNotification; -- (id)andCall:(SEL)selector onObject:(id)anObject; -- (id)andDo:(void (^)(NSInvocation *invocation))block; -- (id)andForwardToRealObject; - -@end - - -@interface OCMStubRecorder (Properties) - -#define andReturn(aValue) _andReturn(({ __typeof__(aValue) _v = (aValue); [NSValue value:&_v withObjCType:@encode(__typeof__(_v))]; })) -@property (nonatomic, readonly) OCMStubRecorder *(^ _andReturn)(NSValue *); - -#define andThrow(anException) _andThrow(anException) -@property (nonatomic, readonly) OCMStubRecorder *(^ _andThrow)(NSException *); - -#define andPost(aNotification) _andPost(aNotification) -@property (nonatomic, readonly) OCMStubRecorder *(^ _andPost)(NSNotification *); - -#define andCall(anObject, aSelector) _andCall(anObject, aSelector) -@property (nonatomic, readonly) OCMStubRecorder *(^ _andCall)(id, SEL); - -#define andDo(aBlock) _andDo(aBlock) -@property (nonatomic, readonly) OCMStubRecorder *(^ _andDo)(void (^)(NSInvocation *)); - -#define andForwardToRealObject() _andForwardToRealObject() -@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void); - -@end - - - diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h deleted file mode 100644 index f0083b350..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2004-2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import -#import -#import -#import -#import -#import -#import -#import - - -#define OCMClassMock(cls) [OCMockObject niceMockForClass:cls] - -#define OCMStrictClassMock(cls) [OCMockObject mockForClass:cls] - -#define OCMProtocolMock(protocol) [OCMockObject niceMockForProtocol:protocol] - -#define OCMStrictProtocolMock(protocol) [OCMockObject mockForProtocol:protocol] - -#define OCMPartialMock(obj) [OCMockObject partialMockForObject:obj] - -#define OCMObserverMock() [OCMockObject observerMock] - - -#define OCMStub(invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginStubMacro]; \ - invocation; \ - [OCMMacroState endStubMacro]; \ - ); \ -}) - -#define OCMExpect(invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginExpectMacro]; \ - invocation; \ - [OCMMacroState endExpectMacro]; \ - ); \ -}) - -#define ClassMethod(invocation) \ - _OCMSilenceWarnings( \ - [[OCMMacroState globalState] switchToClassMethod]; \ - invocation; \ - ); - - -#define OCMVerifyAll(mock) [mock verifyAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)] - -#define OCMVerifyAllWithDelay(mock, delay) [mock verifyWithDelay:delay atLocation:OCMMakeLocation(self, __FILE__, __LINE__)] - -#define OCMVerify(invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)]; \ - invocation; \ - [OCMMacroState endVerifyMacro]; \ - ); \ -}) - -#define _OCMSilenceWarnings(macro) \ -({ \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wunused-value\"") \ - macro \ - _Pragma("clang diagnostic pop") \ -}) diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h deleted file mode 100644 index 63f2bae2b..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2004-2014 Erik Doernenburg and contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use these files except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -#import - -@class OCMLocation; -@class OCMInvocationStub; -@class OCMStubRecorder; -@class OCMInvocationMatcher; -@class OCMInvocationExpectation; - - -@interface OCMockObject : NSProxy -{ - BOOL isNice; - BOOL expectationOrderMatters; - NSMutableArray *stubs; - NSMutableArray *expectations; - NSMutableArray *exceptions; - NSMutableArray *invocations; -} - -+ (id)mockForClass:(Class)aClass; -+ (id)mockForProtocol:(Protocol *)aProtocol; -+ (id)partialMockForObject:(NSObject *)anObject; - -+ (id)niceMockForClass:(Class)aClass; -+ (id)niceMockForProtocol:(Protocol *)aProtocol; - -+ (id)observerMock; - -- (instancetype)init; - -- (void)setExpectationOrderMatters:(BOOL)flag; - -- (id)stub; -- (id)expect; -- (id)reject; - -- (id)verify; -- (id)verifyAtLocation:(OCMLocation *)location; - -- (void)verifyWithDelay:(NSTimeInterval)delay; -- (void)verifyWithDelay:(NSTimeInterval)delay atLocation:(OCMLocation *)location; - -- (void)stopMocking; - -// internal use only - -- (void)addStub:(OCMInvocationStub *)aStub; -- (void)addExpectation:(OCMInvocationExpectation *)anExpectation; - -- (BOOL)handleInvocation:(NSInvocation *)anInvocation; -- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; -- (BOOL)handleSelector:(SEL)sel; - -- (void)verifyInvocation:(OCMInvocationMatcher *)matcher; -- (void)verifyInvocation:(OCMInvocationMatcher *)matcher atLocation:(OCMLocation *)location; - -@end - diff --git a/Frameworks/OCMock.framework/Versions/A/OCMock b/Frameworks/OCMock.framework/Versions/A/OCMock deleted file mode 100755 index 3fb5afb50..000000000 Binary files a/Frameworks/OCMock.framework/Versions/A/OCMock and /dev/null differ diff --git a/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist b/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist deleted file mode 100644 index 20bc26037..000000000 --- a/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist +++ /dev/null @@ -1,42 +0,0 @@ - - - - - BuildMachineOSBuild - 13F34 - CFBundleDevelopmentRegion - English - CFBundleExecutable - OCMock - CFBundleIdentifier - com.mulle-kybernetik.OCMock - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - OCMock - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 6A2008a - DTPlatformVersion - GM - DTSDKBuild - 14A382 - DTSDKName - macosx10.10 - DTXcode - 0611 - DTXcodeBuild - 6A2008a - NSHumanReadableCopyright - Copyright © 2004-2013 Mulle Kybernetik. - - diff --git a/Frameworks/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings b/Frameworks/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings deleted file mode 100644 index 5e45963c3..000000000 Binary files a/Frameworks/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings and /dev/null differ diff --git a/Frameworks/OCMock.framework/Versions/Current b/Frameworks/OCMock.framework/Versions/Current deleted file mode 120000 index 8c7e5a667..000000000 --- a/Frameworks/OCMock.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file diff --git a/Frameworks/PSMTabBar/Images/AddTabButton.png b/Frameworks/PSMTabBar/Images/AddTabButton.png deleted file mode 100644 index ee7623120..000000000 Binary files a/Frameworks/PSMTabBar/Images/AddTabButton.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AddTabButtonPushed.png b/Frameworks/PSMTabBar/Images/AddTabButtonPushed.png deleted file mode 100644 index 633d0d51b..000000000 Binary files a/Frameworks/PSMTabBar/Images/AddTabButtonPushed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AddTabButtonRollover.png b/Frameworks/PSMTabBar/Images/AddTabButtonRollover.png deleted file mode 100644 index 633d0d51b..000000000 Binary files a/Frameworks/PSMTabBar/Images/AddTabButtonRollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AdiumGradient.png b/Frameworks/PSMTabBar/Images/AdiumGradient.png deleted file mode 100644 index bad81b86b..000000000 Binary files a/Frameworks/PSMTabBar/Images/AdiumGradient.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front.png b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front.png deleted file mode 100644 index 82c371505..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Pressed.png b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Pressed.png deleted file mode 100644 index 01570fbdb..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Pressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Rollover.png b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Rollover.png deleted file mode 100644 index 55db65313..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Rollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabClose_Front.png b/Frameworks/PSMTabBar/Images/AquaTabClose_Front.png deleted file mode 100644 index 17c88d3d9..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabClose_Front.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Pressed.png b/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Pressed.png deleted file mode 100644 index 8050f582d..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Pressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Rollover.png b/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Rollover.png deleted file mode 100644 index 3612b28e6..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Rollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabNew.png b/Frameworks/PSMTabBar/Images/AquaTabNew.png deleted file mode 100644 index 10a83705d..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabNew.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabNewPressed.png b/Frameworks/PSMTabBar/Images/AquaTabNewPressed.png deleted file mode 100644 index cb4dd10f2..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabNewPressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabNewRollover.png b/Frameworks/PSMTabBar/Images/AquaTabNewRollover.png deleted file mode 100644 index 4d469f8a6..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabNewRollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabsBackground.png b/Frameworks/PSMTabBar/Images/AquaTabsBackground.png deleted file mode 100644 index 1303779fc..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabsBackground.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabsDown.png b/Frameworks/PSMTabBar/Images/AquaTabsDown.png deleted file mode 100644 index 65f3ccb98..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabsDown.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabsDownGraphite.png b/Frameworks/PSMTabBar/Images/AquaTabsDownGraphite.png deleted file mode 100644 index 15bcc19c7..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabsDownGraphite.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabsDownNonKey.png b/Frameworks/PSMTabBar/Images/AquaTabsDownNonKey.png deleted file mode 100644 index 96e54aecc..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabsDownNonKey.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabsSeparator.png b/Frameworks/PSMTabBar/Images/AquaTabsSeparator.png deleted file mode 100644 index 60f38a215..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabsSeparator.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/AquaTabsSeparatorDown.png b/Frameworks/PSMTabBar/Images/AquaTabsSeparatorDown.png deleted file mode 100644 index 5f40dfc21..000000000 Binary files a/Frameworks/PSMTabBar/Images/AquaTabsSeparatorDown.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose.png b/Frameworks/PSMTabBar/Images/SequelProTabClose.png deleted file mode 100644 index 355fffcb2..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabClose.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabClose@2x.png deleted file mode 100644 index 7e5d610f3..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabClose@2x.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed.png deleted file mode 100644 index 0303b744e..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed@2x.png deleted file mode 100644 index e9f4e5537..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed@2x.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover.png deleted file mode 100644 index 0303b744e..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover@2x.png deleted file mode 100644 index e9f4e5537..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover@2x.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty.png deleted file mode 100644 index e5d3c8504..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabDirty.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty@2x.png deleted file mode 100644 index c06b59555..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabDirty@2x.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed.png deleted file mode 100644 index d0befe120..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed@2x.png deleted file mode 100644 index 06d74af23..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed@2x.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover.png deleted file mode 100644 index d0befe120..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover@2x.png deleted file mode 100644 index 06d74af23..000000000 Binary files a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover@2x.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabClose_Dirty.png b/Frameworks/PSMTabBar/Images/TabClose_Dirty.png deleted file mode 100644 index 5899b7372..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabClose_Dirty.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Pressed.png b/Frameworks/PSMTabBar/Images/TabClose_Dirty_Pressed.png deleted file mode 100644 index eb286a01e..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Pressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Rollover.png b/Frameworks/PSMTabBar/Images/TabClose_Dirty_Rollover.png deleted file mode 100644 index 599d47535..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Rollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabClose_Front.png b/Frameworks/PSMTabBar/Images/TabClose_Front.png deleted file mode 100644 index 192b69910..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabClose_Front.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabClose_Front_Pressed.png b/Frameworks/PSMTabBar/Images/TabClose_Front_Pressed.png deleted file mode 100644 index 68ebd583e..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabClose_Front_Pressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabClose_Front_Rollover.png b/Frameworks/PSMTabBar/Images/TabClose_Front_Rollover.png deleted file mode 100644 index ce45746e1..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabClose_Front_Rollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabNewMetal.png b/Frameworks/PSMTabBar/Images/TabNewMetal.png deleted file mode 100644 index be02d7083..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabNewMetal.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabNewMetalPressed.png b/Frameworks/PSMTabBar/Images/TabNewMetalPressed.png deleted file mode 100644 index 18118ec36..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabNewMetalPressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/TabNewMetalRollover.png b/Frameworks/PSMTabBar/Images/TabNewMetalRollover.png deleted file mode 100644 index 208c96408..000000000 Binary files a/Frameworks/PSMTabBar/Images/TabNewMetalRollover.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/overflowImage.png b/Frameworks/PSMTabBar/Images/overflowImage.png deleted file mode 100644 index 4cf35e4e7..000000000 Binary files a/Frameworks/PSMTabBar/Images/overflowImage.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/overflowImagePressed.png b/Frameworks/PSMTabBar/Images/overflowImagePressed.png deleted file mode 100644 index f69168375..000000000 Binary files a/Frameworks/PSMTabBar/Images/overflowImagePressed.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/Images/pi.png b/Frameworks/PSMTabBar/Images/pi.png deleted file mode 100644 index 9cd57539b..000000000 Binary files a/Frameworks/PSMTabBar/Images/pi.png and /dev/null differ diff --git a/Frameworks/PSMTabBar/NSBezierPath_AMShading.h b/Frameworks/PSMTabBar/NSBezierPath_AMShading.h deleted file mode 100755 index aed6f13ba..000000000 --- a/Frameworks/PSMTabBar/NSBezierPath_AMShading.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// NSBezierPath_AMShading.h -// ------------------------ -// -// Created by Andreas on 2005-06-01. -// Copyright 2005 Andreas Mayer. All rights reserved. -// -// based on http://www.cocoadev.com/index.pl?GradientFill - - -#import - -@interface NSBezierPath (AMShading) - -- (void)customHorizontalFillWithCallbacks:(CGFunctionCallbacks)functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor; -- (void)customVerticalFillWithCallbacks:(CGFunctionCallbacks)functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor; - -- (void)linearGradientFillWithStartColor:(NSColor *)startColor endColor:(NSColor *)endColor; -- (void)linearVerticalGradientFillWithStartColor:(NSColor *)startColor endColor:(NSColor *)endColor; - -- (void)bilinearGradientFillWithOuterColor:(NSColor *)outerColor innerColor:(NSColor *)innerColor; - -@end diff --git a/Frameworks/PSMTabBar/NSBezierPath_AMShading.m b/Frameworks/PSMTabBar/NSBezierPath_AMShading.m deleted file mode 100755 index b878688d4..000000000 --- a/Frameworks/PSMTabBar/NSBezierPath_AMShading.m +++ /dev/null @@ -1,127 +0,0 @@ -// -// NSBezierPath_AMShading.m -// ------------------------ -// -// Created by Andreas on 2005-06-01. -// Copyright 2005 Andreas Mayer. All rights reserved. -// - -#import "NSBezierPath_AMShading.h" - - -@implementation NSBezierPath (AMShading) - -static void linearShadedColor(void *info, const CGFloat *in, CGFloat *out) -{ - CGFloat *colors = (CGFloat *)info; - *out++ = colors[0] + *in * colors[8]; - *out++ = colors[1] + *in * colors[9]; - *out++ = colors[2] + *in * colors[10]; - *out++ = colors[3] + *in * colors[11]; -} - -static void bilinearShadedColor(void *info, const CGFloat *in, CGFloat *out) -{ - CGFloat *colors = (CGFloat *)info; - CGFloat factor = (*in)*2.0f; - if (*in > 0.5) { - factor = 2-factor; - } - *out++ = colors[0] + factor * colors[8]; - *out++ = colors[1] + factor * colors[9]; - *out++ = colors[2] + factor * colors[10]; - *out++ = colors[3] + factor * colors[11]; -} - -- (void)linearGradientFillWithStartColor:(NSColor *)startColor endColor:(NSColor *)endColor -{ - static const CGFunctionCallbacks callbacks = {0, &linearShadedColor, NULL}; - - [self customHorizontalFillWithCallbacks:callbacks firstColor:startColor secondColor:endColor]; -} - -- (void)linearVerticalGradientFillWithStartColor:(NSColor *)startColor endColor:(NSColor *)endColor -{ - static const CGFunctionCallbacks callbacks = {0, &linearShadedColor, NULL}; - - [self customVerticalFillWithCallbacks:callbacks firstColor:startColor secondColor:endColor]; -} - -- (void)bilinearGradientFillWithOuterColor:(NSColor *)outerColor innerColor:(NSColor *)innerColor -{ - static const CGFunctionCallbacks callbacks = {0, &bilinearShadedColor, NULL}; - - [self customHorizontalFillWithCallbacks:callbacks firstColor:innerColor secondColor:outerColor]; -} - -- (void)customFillWithCallbacks:(CGFunctionCallbacks)functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint -{ - CGColorSpaceRef colorspace; - CGShadingRef shading; - CGFunctionRef function; - CGFloat colors[12]; // pointer to color values - - // get my context - CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; - - NSColor *deviceDependentFirstColor = [firstColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]; - NSColor *deviceDependentSecondColor = [secondColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]; - - // set up colors for gradient - colors[0] = [deviceDependentFirstColor redComponent]; - colors[1] = [deviceDependentFirstColor greenComponent]; - colors[2] = [deviceDependentFirstColor blueComponent]; - colors[3] = [deviceDependentFirstColor alphaComponent]; - - colors[4] = [deviceDependentSecondColor redComponent]; - colors[5] = [deviceDependentSecondColor greenComponent]; - colors[6] = [deviceDependentSecondColor blueComponent]; - colors[7] = [deviceDependentSecondColor alphaComponent]; - - // difference between start and end color for each color components - colors[8] = (colors[4]-colors[0]); - colors[9] = (colors[5]-colors[1]); - colors[10] = (colors[6]-colors[2]); - colors[11] = (colors[7]-colors[3]); - - // draw gradient - colorspace = CGColorSpaceCreateDeviceRGB(); - size_t components = 1 + CGColorSpaceGetNumberOfComponents(colorspace); - static const CGFloat domain[2] = {0.0f, 1.0f}; - static const CGFloat range[10] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1}; - //static const CGFunctionCallbacks callbacks = {0, &bilinearShadedColor, NULL}; - - // Create a CGFunctionRef that describes a function taking 1 input and kChannelsPerColor outputs. - function = CGFunctionCreate(colors, 1, domain, components, range, &functionCallbacks); - - shading = CGShadingCreateAxial(colorspace, startPoint, endPoint, function, NO, NO); - - CGContextSaveGState(currentContext); - [self addClip]; - CGContextDrawShading(currentContext, shading); - CGContextRestoreGState(currentContext); - - CGShadingRelease(shading); - CGFunctionRelease(function); - CGColorSpaceRelease(colorspace); -} - -- (void)customHorizontalFillWithCallbacks:(CGFunctionCallbacks)functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor -{ - [self customFillWithCallbacks:functionCallbacks - firstColor:firstColor - secondColor:secondColor - startPoint:CGPointMake(0, NSMinY([self bounds])) - endPoint:CGPointMake(0, NSMaxY([self bounds]))]; -} - -- (void)customVerticalFillWithCallbacks:(CGFunctionCallbacks)functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor -{ - [self customFillWithCallbacks:functionCallbacks - firstColor:firstColor - secondColor:secondColor - startPoint:CGPointMake(NSMinX([self bounds]), 0) - endPoint:CGPointMake(NSMaxX([self bounds]), 0)]; -} - -@end diff --git a/Frameworks/PSMTabBar/NSString_AITruncation.h b/Frameworks/PSMTabBar/NSString_AITruncation.h deleted file mode 100644 index cbcbf2c7f..000000000 --- a/Frameworks/PSMTabBar/NSString_AITruncation.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// NSString_AITruncation.h -// PSMTabBarControl -// -// Created by Evan Schoenberg on 7/14/07. -// - -#import - -@interface NSString (AITruncation) -- (NSString *)stringWithEllipsisByTruncatingToLength:(NSUInteger)length; -@end diff --git a/Frameworks/PSMTabBar/NSString_AITruncation.m b/Frameworks/PSMTabBar/NSString_AITruncation.m deleted file mode 100644 index 567c78f2f..000000000 --- a/Frameworks/PSMTabBar/NSString_AITruncation.m +++ /dev/null @@ -1,34 +0,0 @@ -// -// NSString_AITruncation.m -// PSMTabBarControl -// -// Created by Evan Schoenberg on 7/14/07. -// From Adium, which is licensed under the GPL. Used in PSMTabBarControl with permission. -// The contents of this remain licensed under the GPL. -// - -#import "NSString_AITruncation.h" - -@implementation NSString (AITruncation) - -+ (id)ellipsis -{ - return [NSString stringWithUTF8String:"\xE2\x80\xA6"]; -} - -- (NSString *)stringWithEllipsisByTruncatingToLength:(NSUInteger)length -{ - NSString *returnString; - - if (length < [self length]) { - //Truncate and append the ellipsis - returnString = [[self substringToIndex:length-1] stringByAppendingString:[NSString ellipsis]]; - } else { - //We don't need to truncate, so don't append an ellipsis - returnString = [[self copy] autorelease]; - } - - return returnString; -} - -@end diff --git a/Frameworks/PSMTabBar/PSMOverflowPopUpButton.h b/Frameworks/PSMTabBar/PSMOverflowPopUpButton.h deleted file mode 100644 index 8c81207f4..000000000 --- a/Frameworks/PSMTabBar/PSMOverflowPopUpButton.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// PSMOverflowPopUpButton.h -// PSMTabBarControl -// -// Created by John Pannell on 11/4/05. -// Copyright 2005 Positive Spin Media. All rights reserved. -// - -#import - - -@interface PSMOverflowPopUpButton : NSPopUpButton { - NSImage *_PSMTabBarOverflowPopUpImage; - NSImage *_PSMTabBarOverflowDownPopUpImage; - BOOL _down; - BOOL _animatingAlternateImage; - NSTimer *_animationTimer; - CGFloat _animationValue; -} - -//alternate image display -- (BOOL)animatingAlternateImage; -- (void)setAnimatingAlternateImage:(BOOL)flag; - -// Notifications -- (void)notificationReceived:(NSNotification *)notification; - -// Animations -- (void)animateStep:(NSTimer *)timer; - -// archiving -- (void)encodeWithCoder:(NSCoder *)aCoder; -- (id)initWithCoder:(NSCoder *)aDecoder; -@end diff --git a/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m b/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m deleted file mode 100644 index 69d30c682..000000000 --- a/Frameworks/PSMTabBar/PSMOverflowPopUpButton.m +++ /dev/null @@ -1,155 +0,0 @@ -// -// PSMOverflowPopUpButton.m -// PSMTabBarControl -// -// Created by John Pannell on 11/4/05. -// Copyright 2005 Positive Spin Media. All rights reserved. -// - -#import "PSMOverflowPopUpButton.h" -#import "PSMTabBarControl.h" - -#define TIMER_INTERVAL 1.0 / 15.0 -#define ANIMATION_STEP 0.033f - -@implementation PSMOverflowPopUpButton - -- (id)initWithFrame:(NSRect)frameRect pullsDown:(BOOL)flag -{ - if ((self = [super initWithFrame:frameRect pullsDown:YES])) { - [self setBezelStyle:NSRegularSquareBezelStyle]; - [self setBordered:NO]; - [self setTitle:@""]; - [self setPreferredEdge:NSMaxXEdge]; - _PSMTabBarOverflowPopUpImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"overflowImage"]]; - _PSMTabBarOverflowDownPopUpImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"overflowImagePressed"]]; - _animatingAlternateImage = NO; - } - return self; -} - -- (void)dealloc -{ - [_PSMTabBarOverflowPopUpImage release]; - [_PSMTabBarOverflowDownPopUpImage release]; - [super dealloc]; -} - -- (void)drawRect:(NSRect)rect -{ - if(_PSMTabBarOverflowPopUpImage == nil){ - [super drawRect:rect]; - return; - } - - NSImage *image = (_down) ? _PSMTabBarOverflowDownPopUpImage : _PSMTabBarOverflowPopUpImage; - NSSize imageSize = [image size]; - NSRect bounds = [self bounds]; - - NSPoint drawPoint = NSMakePoint(NSMidX(bounds) - (imageSize.width * 0.5f), NSMidY(bounds) - (imageSize.height * 0.5f)); - NSRect drawRect = NSMakeRect(drawPoint.x, drawPoint.y, imageSize.width, imageSize.height); - - [image drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:(_animatingAlternateImage ? 0.7f : 1.0f) respectFlipped:YES hints:nil]; - - if (_animatingAlternateImage) { - NSImage *alternateImage = [self alternateImage]; - NSSize altImageSize = [alternateImage size]; - drawPoint = NSMakePoint(NSMidX(bounds) - (altImageSize.width * 0.5f), NSMidY(bounds) - (altImageSize.height * 0.5f)); - drawRect = NSMakeRect(drawPoint.x, drawPoint.y, altImageSize.width, altImageSize.height); - - [[self alternateImage] drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:sinf(_animationValue * (float)M_PI) respectFlipped:YES hints:nil]; - } -} - -- (void)mouseDown:(NSEvent *)event -{ - _down = YES; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notificationReceived:) name:NSMenuDidEndTrackingNotification object:[self menu]]; - [self setNeedsDisplay:YES]; - [super mouseDown:event]; -} - -- (void)setHidden:(BOOL)value -{ - if ([self isHidden] != value) { - if (value) { - // Stop any animating alternate image if we hide - (void)([_animationTimer invalidate]), _animationTimer = nil; - } else if (_animatingAlternateImage) { - // Restart any animating alternate image if we unhide - _animationValue = ANIMATION_STEP; - _animationTimer = [NSTimer scheduledTimerWithTimeInterval:TIMER_INTERVAL target:self selector:@selector(animateStep:) userInfo:nil repeats:YES]; - [[NSRunLoop currentRunLoop] addTimer:_animationTimer forMode:NSEventTrackingRunLoopMode]; - } - } - - [super setHidden:value]; -} - -- (void)notificationReceived:(NSNotification *)notification -{ - _down = NO; - [self setNeedsDisplay:YES]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -- (void)setAnimatingAlternateImage:(BOOL)flag -{ - if (_animatingAlternateImage != flag) { - _animatingAlternateImage = flag; - - if (![self isHidden]) { - if (flag) { - _animationValue = ANIMATION_STEP; - _animationTimer = [NSTimer scheduledTimerWithTimeInterval:TIMER_INTERVAL target:self selector:@selector(animateStep:) userInfo:nil repeats:YES]; - [[NSRunLoop currentRunLoop] addTimer:_animationTimer forMode:NSEventTrackingRunLoopMode]; - - } else { - (void)([_animationTimer invalidate]), _animationTimer = nil; - } - - [self setNeedsDisplay:YES]; - } - } -} - -- (BOOL)animatingAlternateImage; -{ - return _animatingAlternateImage; -} - -- (void)animateStep:(NSTimer *)timer -{ - _animationValue += ANIMATION_STEP; - - if (_animationValue >= 1) { - _animationValue = ANIMATION_STEP; - } - - [self setNeedsDisplay:YES]; -} - -#pragma mark - -#pragma mark Archiving - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [super encodeWithCoder:aCoder]; - if ([aCoder allowsKeyedCoding]) { - [aCoder encodeObject:_PSMTabBarOverflowPopUpImage forKey:@"PSMTabBarOverflowPopUpImage"]; - [aCoder encodeObject:_PSMTabBarOverflowDownPopUpImage forKey:@"PSMTabBarOverflowDownPopUpImage"]; - [aCoder encodeBool:_animatingAlternateImage forKey:@"PSMTabBarOverflowAnimatingAlternateImage"]; - } -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - if ( (self = [super initWithCoder:aDecoder]) ) { - if ([aDecoder allowsKeyedCoding]) { - _PSMTabBarOverflowPopUpImage = [[aDecoder decodeObjectForKey:@"PSMTabBarOverflowPopUpImage"] retain]; - _PSMTabBarOverflowDownPopUpImage = [[aDecoder decodeObjectForKey:@"PSMTabBarOverflowDownPopUpImage"] retain]; - [self setAnimatingAlternateImage:[aDecoder decodeBoolForKey:@"PSMTabBarOverflowAnimatingAlternateImage"]]; - } - } - return self; -} - -@end diff --git a/Frameworks/PSMTabBar/PSMProgressIndicator.h b/Frameworks/PSMTabBar/PSMProgressIndicator.h deleted file mode 100644 index 8c34e4440..000000000 --- a/Frameworks/PSMTabBar/PSMProgressIndicator.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// PSMProgressIndicator.h -// PSMTabBarControl -// -// Created by John Pannell on 2/23/06. -// Copyright 2006 Positive Spin Media. All rights reserved. -// - -#import -#import "PSMTabBarControl.h" - - -@interface PSMProgressIndicator : NSProgressIndicator { - -} - -@end - -@interface PSMTabBarControl (LayoutPlease) - -- (void)update; - -@end diff --git a/Frameworks/PSMTabBar/PSMProgressIndicator.m b/Frameworks/PSMTabBar/PSMProgressIndicator.m deleted file mode 100644 index f79852a26..000000000 --- a/Frameworks/PSMTabBar/PSMProgressIndicator.m +++ /dev/null @@ -1,27 +0,0 @@ -// -// PSMProgressIndicator.m -// PSMTabBarControl -// -// Created by John Pannell on 2/23/06. -// Copyright 2006 Positive Spin Media. All rights reserved. -// - -#import "PSMProgressIndicator.h" - -@implementation PSMProgressIndicator - -// overrides to make tab bar control re-layout things if status changes -- (void)setHidden:(BOOL)flag -{ - [super setHidden:flag]; - [(PSMTabBarControl *)[self superview] update]; -} - -- (void)stopAnimation:(id)sender -{ - [NSObject cancelPreviousPerformRequestsWithTarget:self - selector:@selector(startAnimation:) - object:nil]; - [super stopAnimation:sender]; -} -@end diff --git a/Frameworks/PSMTabBar/PSMRolloverButton.h b/Frameworks/PSMTabBar/PSMRolloverButton.h deleted file mode 100644 index 5a2ac368f..000000000 --- a/Frameworks/PSMTabBar/PSMRolloverButton.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// PSMOverflowPopUpButton.h -// NetScrape -// -// Created by John Pannell on 8/4/04. -// Copyright 2004 Positive Spin Media. All rights reserved. -// - -#import - -@interface PSMRolloverButton : NSButton -{ - NSImage *_rolloverImage; - NSImage *_usualImage; - NSTrackingRectTag _myTrackingRectTag; -} - -// the regular image -- (void)setUsualImage:(nullable NSImage *)newImage; -- (nullable NSImage *)usualImage; - -// the rollover image -- (void)setRolloverImage:(nullable NSImage *)newImage; -- (nullable NSImage *)rolloverImage; - -// tracking rect for mouse events -- (void)rolloverFrameDidChange:(nonnull NSNotification *)notification; -- (void)addTrackingRect; -- (void)removeTrackingRect; - -- (void)mouseEntered:(nullable NSEvent *)event; -- (void)mouseExited:(nullable NSEvent *)event; - -@end diff --git a/Frameworks/PSMTabBar/PSMRolloverButton.m b/Frameworks/PSMTabBar/PSMRolloverButton.m deleted file mode 100644 index 084658a7f..000000000 --- a/Frameworks/PSMTabBar/PSMRolloverButton.m +++ /dev/null @@ -1,205 +0,0 @@ -// -// PSMOverflowPopUpButton.m -// NetScrape -// -// Created by John Pannell on 8/4/04. -// Copyright 2004 Positive Spin Media. All rights reserved. -// - -#import "PSMRolloverButton.h" - -@implementation PSMRolloverButton - -- (void)awakeFromNib -{ - if ([[self superclass] instancesRespondToSelector:@selector(awakeFromNib)]) { - [super awakeFromNib]; - } - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(rolloverFrameDidChange:) - name:NSViewFrameDidChangeNotification - object:self]; - - [self setPostsFrameChangedNotifications:YES]; - [self resetCursorRects]; - - _myTrackingRectTag = -1; - _rolloverImage = nil; - _usualImage = nil; -} - -// the regular image -- (void)setUsualImage:(NSImage *)newImage -{ - [newImage retain]; - [_usualImage release]; - _usualImage = newImage; - - [self setImage:_usualImage]; -} - -- (NSImage *)usualImage -{ - return _usualImage; -} - -- (void)setRolloverImage:(NSImage *)newImage -{ - [newImage retain]; - [_rolloverImage release]; - _rolloverImage = newImage; -} - -- (NSImage *)rolloverImage -{ - return _rolloverImage; -} - -// Remove old tracking rects when we change superviews -- (void)viewWillMoveToSuperview:(NSView *)newSuperview -{ - [self removeTrackingRect]; - - [super viewWillMoveToSuperview:newSuperview]; -} - -- (void)viewDidMoveToSuperview -{ - [super viewDidMoveToSuperview]; - - [self resetCursorRects]; -} - -- (void)viewWillMoveToWindow:(NSWindow *)newWindow -{ - [self removeTrackingRect]; - - [super viewWillMoveToWindow:newWindow]; -} - -- (void)viewDidMoveToWindow -{ - [super viewDidMoveToWindow]; - - [self resetCursorRects]; -} - -- (void)rolloverFrameDidChange:(NSNotification *)notification -{ - [self resetCursorRects]; -} - -- (void)addTrackingRect -{ - // assign a tracking rect to watch for mouse enter/exit - NSPoint globalPoint; - - if (@available(macOS 10.12, *)) { - globalPoint = [[self window] convertPointToScreen:[NSEvent mouseLocation]]; - } else { - globalPoint = [[self window] convertRectToScreen:(CGRect){.origin=[NSEvent mouseLocation]}].origin; - } - - NSRect trackRect = [self bounds]; - NSPoint localPoint = [self convertPoint:globalPoint fromView:nil]; - - BOOL mouseInside = NSPointInRect(localPoint, trackRect); - - _myTrackingRectTag = [self addTrackingRect:trackRect owner:self userData:nil assumeInside:mouseInside]; - - if (mouseInside) { - [self mouseEntered:nil]; - } - else { - [self mouseExited:nil]; - } -} - -- (void)removeTrackingRect -{ - if (_myTrackingRectTag != -1) { - [self removeTrackingRect:_myTrackingRectTag]; - } - - _myTrackingRectTag = -1; -} - -// override for rollover effect -- (void)mouseEntered:(nullable NSEvent *)event -{ - // set rollover image - [self setImage:_rolloverImage]; - - [super mouseEntered:event]; -} - -- (void)mouseExited:(nullable NSEvent *)event -{ - // restore usual image - [self setImage:_usualImage]; - - [super mouseExited:event]; -} - -- (void)resetCursorRects -{ - // called when the button rect has been changed - [self removeTrackingRect]; - [self addTrackingRect]; -} - -- (void)setFrame:(NSRect)rect -{ - [super setFrame:rect]; - [self resetCursorRects]; -} - -- (void)setBounds:(NSRect)rect -{ - [super setBounds:rect]; - [self resetCursorRects]; -} - -#pragma mark - -#pragma mark Archiving - -- (void)encodeWithCoder:(NSCoder *)coder -{ - [super encodeWithCoder:coder]; - - if ([coder allowsKeyedCoding]) { - [coder encodeObject:_rolloverImage forKey:@"rolloverImage"]; - [coder encodeObject:_usualImage forKey:@"usualImage"]; - [coder encodeInteger:_myTrackingRectTag forKey:@"myTrackingRectTag"]; - } -} - -- (id)initWithCoder:(NSCoder *)decoder -{ - if ((self = [super initWithCoder:decoder])) { - if ([decoder allowsKeyedCoding]) { - _rolloverImage = [[decoder decodeObjectForKey:@"rolloverImage"] retain]; - _usualImage = [[decoder decodeObjectForKey:@"usualImage"] retain]; - _myTrackingRectTag = [decoder decodeIntegerForKey:@"myTrackingRectTag"]; - } - } - - return self; -} - -#pragma mark - - -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [self removeTrackingRect]; - - [_rolloverImage release]; - [_usualImage release]; - - [super dealloc]; -} - -@end diff --git a/Frameworks/PSMTabBar/PSMTabBarCell.h b/Frameworks/PSMTabBar/PSMTabBarCell.h deleted file mode 100644 index c68f98142..000000000 --- a/Frameworks/PSMTabBar/PSMTabBarCell.h +++ /dev/null @@ -1,121 +0,0 @@ -// -// PSMTabBarCell.h -// PSMTabBarControl -// -// Created by John Pannell on 10/13/05. -// Copyright 2005 Positive Spin Media. All rights reserved. -// - -#import -#import "PSMTabBarControl.h" - -@class PSMTabBarControl; -@class PSMProgressIndicator; - -@interface PSMTabBarCell : NSActionCell { - // sizing - NSRect _frame; - NSSize _stringSize; - NSInteger _currentStep; - BOOL _isPlaceholder; - - // state - NSInteger _tabState; - NSTrackingRectTag _closeButtonTrackingTag; // left side tracking, if dragging - NSTrackingRectTag _cellTrackingTag; // right side tracking, if dragging - BOOL _closeButtonOver; - BOOL _closeButtonPressed; - PSMProgressIndicator *_indicator; - BOOL _isInOverflowMenu; - BOOL _hasCloseButton; - BOOL _isCloseButtonSuppressed; - BOOL _hasIcon; - BOOL _hasLargeImage; - NSInteger _count; - NSColor *_countColor; - BOOL _isEdited; - NSColor *_backgroundColor; - id _customControlView; -} - -// creation/destruction -- (id)initWithControlView:(PSMTabBarControl *)controlView; -- (id)initPlaceholderWithFrame:(NSRect)frame expanded:(BOOL)value inControlView:(PSMTabBarControl *)controlView; -- (void)dealloc; - -// accessors -- (id)customControlView; -- (void)setCustomControlView:(id)view; -- (NSTrackingRectTag)closeButtonTrackingTag; -- (void)setCloseButtonTrackingTag:(NSTrackingRectTag)tag; -- (NSTrackingRectTag)cellTrackingTag; -- (void)setCellTrackingTag:(NSTrackingRectTag)tag; -- (CGFloat)width; -- (NSRect)frame; -- (void)setFrame:(NSRect)rect; -- (void)setStringValue:(NSString *)aString; -- (NSSize)stringSize; -- (NSAttributedString *)attributedStringValue; -- (NSInteger)tabState; -- (void)setTabState:(NSInteger)state; -- (NSProgressIndicator *)indicator; -- (BOOL)isInOverflowMenu; -- (void)setIsInOverflowMenu:(BOOL)value; -- (BOOL)closeButtonPressed; -- (void)setCloseButtonPressed:(BOOL)value; -- (BOOL)closeButtonOver; -- (void)setCloseButtonOver:(BOOL)value; -- (BOOL)hasCloseButton; -- (void)setHasCloseButton:(BOOL)set; -- (void)setCloseButtonSuppressed:(BOOL)suppress; -- (BOOL)isCloseButtonSuppressed; -- (BOOL)hasIcon; -- (void)setHasIcon:(BOOL)value; -- (BOOL)hasLargeImage; -- (void)setHasLargeImage:(BOOL)value; -- (NSInteger)count; -- (void)setCount:(NSInteger)value; -- (NSColor *)countColor; -- (void)setCountColor:(NSColor *)value; -- (BOOL)isPlaceholder; -- (void)setIsPlaceholder:(BOOL)value; -- (NSInteger)currentStep; -- (void)setCurrentStep:(NSInteger)value; -- (BOOL)isEdited; -- (void)setIsEdited:(BOOL)value; -- (void)setBackgroundColor:(NSColor *)aColor; -- (NSColor *)backgroundColor; - -// component attributes -- (NSRect)indicatorRectForFrame:(NSRect)cellFrame; -- (NSRect)closeButtonRectForFrame:(NSRect)cellFrame; -- (CGFloat)minimumWidthOfCell; -- (CGFloat)desiredWidthOfCell; - -// drawing -- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView; - -// tracking the mouse -- (void)mouseEntered:(NSEvent *)theEvent; -- (void)mouseExited:(NSEvent *)theEvent; - -// drag support -- (NSImage *)dragImage; - -// archiving -- (void)encodeWithCoder:(NSCoder *)aCoder; -- (id)initWithCoder:(NSCoder *)aDecoder; - -@end - -@interface PSMTabBarControl (CellAccessors) - -- (id)style; - -@end - -@interface NSObject (IdentifierAccesors) - -- (NSImage *)largeImage; - -@end diff --git a/Frameworks/PSMTabBar/PSMTabBarCell.m b/Frameworks/PSMTabBar/PSMTabBarCell.m deleted file mode 100644 index 06e1cefbd..000000000 --- a/Frameworks/PSMTabBar/PSMTabBarCell.m +++ /dev/null @@ -1,538 +0,0 @@ -// -// PSMTabBarCell.m -// PSMTabBarControl -// -// Created by John Pannell on 10/13/05. -// Copyright 2005 Positive Spin Media. All rights reserved. -// - -#import "PSMTabBarCell.h" -#import "PSMTabBarControl.h" -#import "PSMTabStyle.h" -#import "PSMProgressIndicator.h" -#import "PSMTabDragAssistant.h" - -@interface PSMTabBarControl (Private) -- (void)update; -@end - -@implementation PSMTabBarCell - -#pragma mark - -#pragma mark Creation/Destruction -- (id)initWithControlView:(PSMTabBarControl *)controlView -{ - if ( (self = [super init]) ) { - _customControlView = controlView; - _closeButtonTrackingTag = 0; - _cellTrackingTag = 0; - _closeButtonOver = NO; - _closeButtonPressed = NO; - _indicator = [[PSMProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f,0.0f,kPSMTabBarIndicatorWidth,kPSMTabBarIndicatorWidth)]; - [_indicator setStyle:NSProgressIndicatorSpinningStyle]; - [_indicator setAutoresizingMask:NSViewMinYMargin]; - _hasCloseButton = YES; - _isCloseButtonSuppressed = NO; - _count = 0; - _countColor = nil; - _isEdited = NO; - _isPlaceholder = NO; - _backgroundColor = nil; - self.accessibilityRole = NSAccessibilityButtonRole; - self.accessibilityHelp = [self accessibilityHelpGenerated]; - self.accessibilityFocused = ([self tabState] == 2); - } - return self; -} - -- (id)initPlaceholderWithFrame:(NSRect)frame expanded:(BOOL)value inControlView:(PSMTabBarControl *)controlView -{ - if ( (self = [super init]) ) { - _customControlView = controlView; - _isPlaceholder = YES; - if (!value) { - if ([controlView orientation] == PSMTabBarHorizontalOrientation) { - frame.size.width = 0.0f; - } else { - frame.size.height = 0.0f; - } - } - [self setFrame:frame]; - _closeButtonTrackingTag = 0; - _cellTrackingTag = 0; - _closeButtonOver = NO; - _closeButtonPressed = NO; - _indicator = nil; - _hasCloseButton = YES; - _isCloseButtonSuppressed = NO; - _count = 0; - _countColor = nil; - _isEdited = NO; - _backgroundColor = nil; - - if (value) { - [self setCurrentStep:(kPSMTabDragAnimationSteps - 1)]; - } else { - [self setCurrentStep:0]; - } - } - return self; -} - -- (void)dealloc -{ - [_countColor release]; - - [_indicator removeFromSuperviewWithoutNeedingDisplay]; - - [_indicator release]; - [_backgroundColor release]; - [super dealloc]; -} - -#pragma mark - -#pragma mark Accessors - -- (id)customControlView -{ - return _customControlView; -} - -- (void)setCustomControlView:(id)view -{ - // no retain release pattern, as this simply switches a tab to another view. - _customControlView = view; -} - -- (NSTrackingRectTag)closeButtonTrackingTag -{ - return _closeButtonTrackingTag; -} - -- (void)setCloseButtonTrackingTag:(NSTrackingRectTag)tag -{ - _closeButtonTrackingTag = tag; -} - -- (NSTrackingRectTag)cellTrackingTag -{ - return _cellTrackingTag; -} - -- (void)setCellTrackingTag:(NSTrackingRectTag)tag -{ - _cellTrackingTag = tag; -} - -- (CGFloat)width -{ - return _frame.size.width; -} - -- (NSRect)frame -{ - return _frame; -} - -- (void)setFrame:(NSRect)rect -{ - _frame = rect; - - //move the status indicator along with the rest of the cell - if (![[self indicator] isHidden] && ![_customControlView isTabBarHidden]) { - [[self indicator] setFrame:[self indicatorRectForFrame:rect]]; - } -} - -- (void)setStringValue:(NSString *)aString -{ - [super setStringValue:aString]; - _stringSize = [[self attributedStringValue] size]; - // need to redisplay now - binding observation was too quick. - [_customControlView update]; -} - -- (NSSize)stringSize -{ - return _stringSize; -} - -- (NSAttributedString *)attributedStringValue -{ - return [[(PSMTabBarControl *)_customControlView style] attributedStringValueForTabCell:self]; -} - -- (NSInteger)tabState -{ - return _tabState; -} - -- (void)setTabState:(NSInteger)state -{ - _tabState = state; -} - -- (NSProgressIndicator *)indicator -{ - return _indicator; -} - -- (BOOL)isInOverflowMenu -{ - return _isInOverflowMenu; -} - -- (void)setIsInOverflowMenu:(BOOL)value -{ - if (_isInOverflowMenu != value) { - _isInOverflowMenu = value; - if ([[[self customControlView] delegate] respondsToSelector:@selector(tabView:tabViewItem:isInOverflowMenu:)]) { - [[[self customControlView] delegate] tabView:[self customControlView] tabViewItem:[self representedObject] isInOverflowMenu:_isInOverflowMenu]; - } - } -} - -- (BOOL)closeButtonPressed -{ - return _closeButtonPressed; -} - -- (void)setCloseButtonPressed:(BOOL)value -{ - _closeButtonPressed = value; -} - -- (BOOL)closeButtonOver -{ - return (_closeButtonOver && ([_customControlView allowsBackgroundTabClosing] || ([self tabState] & PSMTab_SelectedMask) || [[NSApp currentEvent] modifierFlags] & NSEventModifierFlagCommand)); -} - -- (void)setCloseButtonOver:(BOOL)value -{ - _closeButtonOver = value; -} - -- (BOOL)hasCloseButton -{ - return _hasCloseButton; -} - -- (void)setHasCloseButton:(BOOL)set; -{ - _hasCloseButton = set; -} - -- (void)setCloseButtonSuppressed:(BOOL)suppress; -{ - _isCloseButtonSuppressed = suppress; -} - -- (BOOL)isCloseButtonSuppressed; -{ - return _isCloseButtonSuppressed; -} - -- (BOOL)hasIcon -{ - return _hasIcon; -} - -- (void)setHasIcon:(BOOL)value -{ - _hasIcon = value; - //[_customControlView update:[[self customControlView] automaticallyAnimates]]; // binding notice is too fast -} - -- (BOOL)hasLargeImage -{ - return _hasLargeImage; -} - -- (void)setHasLargeImage:(BOOL)value -{ - _hasLargeImage = value; -} - - -- (NSInteger)count -{ - return _count; -} - -- (void)setCount:(NSInteger)value -{ - _count = value; - //[_customControlView update:[[self customControlView] automaticallyAnimates]]; // binding notice is too fast -} - -- (NSColor *)countColor -{ - return _countColor; -} - -- (void)setCountColor:(NSColor *)color -{ - [_countColor release]; - _countColor = [color retain]; -} - -- (BOOL)isPlaceholder -{ - return _isPlaceholder; -} - -- (void)setIsPlaceholder:(BOOL)value; -{ - _isPlaceholder = value; -} - -- (NSInteger)currentStep -{ - return _currentStep; -} - -- (void)setCurrentStep:(NSInteger)value -{ - if(value < 0) - value = 0; - - if(value > (kPSMTabDragAnimationSteps - 1)) - value = (kPSMTabDragAnimationSteps - 1); - - _currentStep = value; -} - -- (BOOL)isEdited -{ - return _isEdited; -} - -- (void)setIsEdited:(BOOL)value -{ - _isEdited = value; - //[_customControlView update:[[self customControlView] automaticallyAnimates]]; // binding notice is too fast -} - -- (NSColor *)backgroundColor { - return _backgroundColor; -} - -- (void)setBackgroundColor:(NSColor *)aColor -{ - [aColor retain]; - [_backgroundColor release]; - _backgroundColor = aColor; -} - -#pragma mark - -#pragma mark Bindings - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - // the progress indicator, label, icon, or count has changed - redraw the control view - //[_customControlView update]; - //I seem to have run into some odd issue with update not being called at the right time. This seems to avoid the problem. - [_customControlView performSelector:@selector(update) withObject:nil afterDelay:0.0]; -} - -#pragma mark - -#pragma mark Component Attributes - -- (NSRect)indicatorRectForFrame:(NSRect)cellFrame -{ - return [[(PSMTabBarControl *)_customControlView style] indicatorRectForTabCell:self]; -} - -- (NSRect)closeButtonRectForFrame:(NSRect)cellFrame -{ - return [[(PSMTabBarControl *)_customControlView style] closeButtonRectForTabCell:self withFrame:cellFrame]; -} - -- (CGFloat)minimumWidthOfCell -{ - return [[(PSMTabBarControl *)_customControlView style] minimumWidthOfTabCell:self]; -} - -- (CGFloat)desiredWidthOfCell -{ - return [[(PSMTabBarControl *)_customControlView style] desiredWidthOfTabCell:self]; -} - -#pragma mark - -#pragma mark Drawing - -- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView -{ - if (_isPlaceholder) { - if (![_customControlView usesSafariStyleDragging]) { - [[NSColor colorWithCalibratedWhite:0.0f alpha:0.2f] set]; - NSRectFillUsingOperation(cellFrame, NSCompositingOperationSourceAtop); - } - return; - } - - [[(PSMTabBarControl *)_customControlView style] drawTabCell:self]; -} - -#pragma mark - -#pragma mark Tracking - -- (void)mouseEntered:(NSEvent *)theEvent -{ - // check for which tag - if ([theEvent trackingNumber] == _closeButtonTrackingTag) { - _closeButtonOver = YES; - } - if ([theEvent trackingNumber] == _cellTrackingTag) { - [self setHighlighted:YES]; - [_customControlView setNeedsDisplay:NO]; - } - - // scrubtastic - if ([_customControlView allowsScrubbing] && ([theEvent modifierFlags] & NSEventModifierFlagOption)) - [_customControlView tabClick:self]; - - // tell the control we only need to redraw the affected tab - [_customControlView setNeedsDisplayInRect:NSInsetRect([self frame], -2, -2)]; -} - -- (void)mouseExited:(NSEvent *)theEvent -{ - // check for which tag - if ([theEvent trackingNumber] == _closeButtonTrackingTag) { - _closeButtonOver = NO; - } - - if ([theEvent trackingNumber] == _cellTrackingTag) { - [self setHighlighted:NO]; - [_customControlView setNeedsDisplay:NO]; - } - - //tell the control we only need to redraw the affected tab - [_customControlView setNeedsDisplayInRect:NSInsetRect([self frame], -2, -2)]; -} - -#pragma mark - -#pragma mark Drag Support - -- (NSImage *)dragImage -{ - NSRect cellFrame = [(id )[(PSMTabBarControl *)_customControlView style] dragRectForTabCell:self orientation:(PSMTabBarOrientation)[(PSMTabBarControl *)_customControlView orientation]]; - //NSRect cellFrame = [self frame]; - - // Determine the target coordinates to draw into - NSRect oldFrame = [self frame]; - NSRect tabDrawFrame = oldFrame; - tabDrawFrame.origin.x -= cellFrame.origin.x; - - // Draw the tab into a new image - NSImage *image = [[[NSImage alloc] initWithSize:cellFrame.size] autorelease]; - -#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060 - [image setFlipped:YES]; - [image lockFocus]; -#else - [image lockFocusFlipped:YES]; -#endif - [self setFrame:tabDrawFrame]; - - [(id )[(PSMTabBarControl *)_customControlView style] drawTabCellForDragImage:self]; - - [self setFrame:oldFrame]; - - [image unlockFocus]; - - // Add the indicator if appropriate - if (![[self indicator] isHidden]) { - NSImage *pieImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"pi"]]; - [image lockFocus]; - NSPoint indicatorPoint = NSMakePoint([self frame].size.width - MARGIN_X - kPSMTabBarIndicatorWidth, MARGIN_Y); - NSRect indicatorRect = NSMakeRect(indicatorPoint.x, indicatorPoint.y, [pieImage size].width, [pieImage size].height); - [pieImage drawInRect:indicatorRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0f respectFlipped:YES hints:nil]; - [image unlockFocus]; - [pieImage release]; - } - - return image; -} - -#pragma mark - -#pragma mark Archiving - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [super encodeWithCoder:aCoder]; - if ([aCoder allowsKeyedCoding]) { - [aCoder encodeRect:_frame forKey:@"frame"]; - [aCoder encodeSize:_stringSize forKey:@"stringSize"]; - [aCoder encodeInteger:_currentStep forKey:@"currentStep"]; - [aCoder encodeBool:_isPlaceholder forKey:@"isPlaceholder"]; - [aCoder encodeInteger:_tabState forKey:@"tabState"]; - [aCoder encodeInteger:_closeButtonTrackingTag forKey:@"closeButtonTrackingTag"]; - [aCoder encodeInteger:_cellTrackingTag forKey:@"cellTrackingTag"]; - [aCoder encodeBool:_closeButtonOver forKey:@"closeButtonOver"]; - [aCoder encodeBool:_closeButtonPressed forKey:@"closeButtonPressed"]; - [aCoder encodeObject:_indicator forKey:@"indicator"]; - [aCoder encodeBool:_isInOverflowMenu forKey:@"isInOverflowMenu"]; - [aCoder encodeBool:_hasCloseButton forKey:@"hasCloseButton"]; - [aCoder encodeBool:_isCloseButtonSuppressed forKey:@"isCloseButtonSuppressed"]; - [aCoder encodeBool:_hasIcon forKey:@"hasIcon"]; - [aCoder encodeBool:_hasLargeImage forKey:@"hasLargeImage"]; - [aCoder encodeInteger:_count forKey:@"count"]; - [aCoder encodeBool:_isEdited forKey:@"isEdited"]; - } -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - if ([aDecoder allowsKeyedCoding]) { - _frame = [aDecoder decodeRectForKey:@"frame"]; - _stringSize = [aDecoder decodeSizeForKey:@"stringSize"]; - _currentStep = [aDecoder decodeIntegerForKey:@"currentStep"]; - _isPlaceholder = [aDecoder decodeBoolForKey:@"isPlaceholder"]; - _tabState = [aDecoder decodeIntegerForKey:@"tabState"]; - _closeButtonTrackingTag = [aDecoder decodeIntegerForKey:@"closeButtonTrackingTag"]; - _cellTrackingTag = [aDecoder decodeIntegerForKey:@"cellTrackingTag"]; - _closeButtonOver = [aDecoder decodeBoolForKey:@"closeButtonOver"]; - _closeButtonPressed = [aDecoder decodeBoolForKey:@"closeButtonPressed"]; - _indicator = [[aDecoder decodeObjectForKey:@"indicator"] retain]; - _isInOverflowMenu = [aDecoder decodeBoolForKey:@"isInOverflowMenu"]; - _hasCloseButton = [aDecoder decodeBoolForKey:@"hasCloseButton"]; - _isCloseButtonSuppressed = [aDecoder decodeBoolForKey:@"isCloseButtonSuppressed"]; - _hasIcon = [aDecoder decodeBoolForKey:@"hasIcon"]; - _hasLargeImage = [aDecoder decodeBoolForKey:@"hasLargeImage"]; - _count = [aDecoder decodeIntegerForKey:@"count"]; - _isEdited = [aDecoder decodeBoolForKey:@"isEdited"]; - } - } - return self; -} - -#pragma mark - -#pragma mark Accessibility - -- (BOOL)accessibilityPerformPress { - [_customControlView tabClick:self]; - return YES; -} - -- (NSString *)accessibilityHelpGenerated { - if ([[[self customControlView] delegate] respondsToSelector:@selector(accessibilityStringForTabView:objectCount:)]) { - return [NSString stringWithFormat:@"%@, %lu %@", - [self stringValue], - (unsigned long)[self count], - [[[self customControlView] delegate] accessibilityStringForTabView:[[self customControlView] tabView] objectCount:[self count]]]; - } else { - return [self stringValue]; - } -} - -- (id)accessibilityHitTest:(NSPoint)point { - return NSAccessibilityUnignoredAncestor(self); -} - -- (id)accessibilityFocusedUIElement:(NSPoint)point { - return NSAccessibilityUnignoredAncestor(self); -} - -@end diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.h b/Frameworks/PSMTabBar/PSMTabBarControl.h deleted file mode 100644 index 67648a624..000000000 --- a/Frameworks/PSMTabBar/PSMTabBarControl.h +++ /dev/null @@ -1,274 +0,0 @@ -// -// PSMTabBarControl.h -// PSMTabBarControl -// -// Created by John Pannell on 10/13/05. -// Copyright 2005 Positive Spin Media. All rights reserved. -// - -/* - This view provides a control interface to manage a regular NSTabView. It looks and works like the tabbed browsing interface of many popular browsers. - */ - -#import - -#define PSMTabDragDidEndNotification @"PSMTabDragDidEndNotification" -#define PSMTabDragDidBeginNotification @"PSMTabDragDidBeginNotification" - -#define kPSMTabBarControlHeight 25 -#define kPSMTabBarControlDefaultHeightCollapsed 0 // can be changed with a property - -// internal cell border -#define MARGIN_X 6 -#define MARGIN_Y 6 - -// padding between objects -#define kPSMTabBarCellPadding 4 - -// fixed size objects -#define kPSMMinimumTitleWidth 30 -#define kPSMTabBarIndicatorWidth 16.0f -#define kPSMTabBarIconWidth 16.0f -#define kPSMHideAnimationSteps 3.0f - -// Value used in _currentStep to indicate that resizing operation is not in progress -#define kPSMIsNotBeingResized -1 - -// Value used in _currentStep when a resizing operation has just been started -#define kPSMStartResizeAnimation 0 - -@class PSMOverflowPopUpButton, PSMRolloverButton, PSMTabBarCell, PSMTabBarController; -@protocol PSMTabStyle; - -typedef enum { - PSMTabBarHorizontalOrientation, - PSMTabBarVerticalOrientation -} PSMTabBarOrientation; - -typedef enum { - PSMTabBarTearOffAlphaWindow, - PSMTabBarTearOffMiniwindow -} PSMTabBarTearOffStyle; - -enum { - PSMTab_SelectedMask = 1 << 1, - PSMTab_LeftIsSelectedMask = 1 << 2, - PSMTab_RightIsSelectedMask = 1 << 3, - PSMTab_PositionLeftMask = 1 << 4, - PSMTab_PositionMiddleMask = 1 << 5, - PSMTab_PositionRightMask = 1 << 6, - PSMTab_PositionSingleMask = 1 << 7 -}; - -@interface PSMTabBarControl : NSControl { - // control basics - NSMutableArray *_cells; // the cells that draw the tabs - IBOutlet NSTabView *tabView; // the tab view being navigated - PSMOverflowPopUpButton *_overflowPopUpButton; // for too many tabs - PSMRolloverButton *_addTabButton; - PSMTabBarController *_controller; - - // Spring-loading. - NSTabViewItem *_tabViewItemWithSpring; - - // drawing style - id style; - BOOL _canCloseOnlyTab; - BOOL _disableTabClose; - BOOL _hideForSingleTab; - BOOL _showAddTabButton; - BOOL _sizeCellsToFit; - BOOL _useOverflowMenu; - BOOL _alwaysShowActiveTab; - BOOL _allowsScrubbing; - BOOL _useSafariStyleDragging; - NSInteger _resizeAreaCompensation; - PSMTabBarOrientation _orientation; - BOOL _automaticallyAnimates; - NSTimer *_animationTimer; - PSMTabBarTearOffStyle _tearOffStyle; - - // behavior - BOOL _allowsBackgroundTabClosing; - BOOL _selectsTabsOnMouseDown; - BOOL _createsTabOnDoubleClick; - id _createNewTabTarget; - SEL _createNewTabAction; - id _doubleClickTarget; - SEL _doubleClickAction; - - // vertical tab resizing - BOOL _allowsResizing; - BOOL _resizing; - - // cell width - NSInteger _cellMinWidth; - NSInteger _cellMaxWidth; - NSInteger _cellOptimumWidth; - - // animation for hide/show - NSInteger _currentStep; - BOOL _isHidden; - IBOutlet id partnerView; // gets resized when hide/show - BOOL _awakenedFromNib; - NSInteger _tabBarWidth; - NSTimer *_showHideAnimationTimer; - - // Tracking last window state for update draws - BOOL _lastWindowIsMainCheck; - BOOL _lastAttachedWindowIsMainCheck; - BOOL _lastAppIsActiveCheck; - - // drag and drop - NSEvent *_lastMouseDownEvent; // keep this for dragging reference - BOOL _didDrag; - BOOL _closeClicked; - - // MVC help - IBOutlet id delegate; -} - -// control characteristics -+ (NSBundle *)bundle; -- (CGFloat)availableCellWidth; -- (NSRect)genericCellRect; - -// control configuration -- (PSMTabBarOrientation)orientation; -- (void)setOrientation:(PSMTabBarOrientation)value; -- (BOOL)canCloseOnlyTab; -- (void)setCanCloseOnlyTab:(BOOL)value; -- (BOOL)disableTabClose; -- (void)setDisableTabClose:(BOOL)value; -- (id)style; -- (void)setStyle:(id )newStyle; -- (NSString *)styleName; -- (void)setStyleNamed:(NSString *)name; -- (BOOL)hideForSingleTab; -- (void)setHideForSingleTab:(BOOL)value; -- (BOOL)showAddTabButton; -- (void)setShowAddTabButton:(BOOL)value; - -- (id)createNewTabTarget; -- (void)setCreateNewTabTarget:(id)object; -- (SEL)createNewTabAction; -- (void)setCreateNewTabAction:(SEL)selector; - -- (id)doubleClickTarget; -- (void)setDoubleClickTarget:(id)object; -- (SEL)doubleClickAction; -- (void)setDoubleClickAction:(SEL)selector; - -- (NSInteger)cellMinWidth; -- (void)setCellMinWidth:(NSInteger)value; -- (NSInteger)cellMaxWidth; -- (void)setCellMaxWidth:(NSInteger)value; -- (NSInteger)cellOptimumWidth; -- (void)setCellOptimumWidth:(NSInteger)value; -- (BOOL)sizeCellsToFit; -- (void)setSizeCellsToFit:(BOOL)value; -- (BOOL)useOverflowMenu; -- (void)setUseOverflowMenu:(BOOL)value; -- (BOOL)allowsBackgroundTabClosing; -- (void)setAllowsBackgroundTabClosing:(BOOL)value; -- (BOOL)allowsResizing; -- (void)setAllowsResizing:(BOOL)value; -- (BOOL)selectsTabsOnMouseDown; -- (void)setSelectsTabsOnMouseDown:(BOOL)value; -- (BOOL)createsTabOnDoubleClick; -- (void)setCreatesTabOnDoubleClick:(BOOL)value; -- (BOOL)automaticallyAnimates; -- (void)setAutomaticallyAnimates:(BOOL)value; -- (BOOL)alwaysShowActiveTab; -- (void)setAlwaysShowActiveTab:(BOOL)value; -- (BOOL)allowsScrubbing; -- (void)setAllowsScrubbing:(BOOL)value; -- (BOOL)usesSafariStyleDragging; -- (void)setUsesSafariStyleDragging:(BOOL)value; -- (PSMTabBarTearOffStyle)tearOffStyle; -- (void)setTearOffStyle:(PSMTabBarTearOffStyle)tearOffStyle; -@property CGFloat heightCollapsed; - -// accessors -- (NSTabView *)tabView; -- (void)setTabView:(NSTabView *)view; -- (id)delegate; -- (void)setDelegate:(id)object; -- (id)partnerView; -- (void)setPartnerView:(id)view; - -// the buttons -- (PSMRolloverButton *)addTabButton; -- (PSMOverflowPopUpButton *)overflowPopUpButton; - -// actions -- (void)tabClick:(id)sender; -- (void)overflowMenuAction:(id)sender; - -// tab information -- (NSMutableArray *)representedTabViewItems; -- (NSUInteger)numberOfVisibleTabs; -- (PSMTabBarCell *)lastVisibleTab; - -// special effects -- (void)hideTabBar:(BOOL)hide animate:(BOOL)animate; -- (BOOL)isTabBarHidden; -- (BOOL)isAnimating; -- (void)destroyAnimations; - -// internal bindings methods also used by the tab drag assistant -- (void)bindPropertiesForCell:(PSMTabBarCell *)cell andTabViewItem:(NSTabViewItem *)item; -- (void)removeTabForCell:(PSMTabBarCell *)cell; - -// External drawing accessors -- (void)update; -- (void)update:(BOOL)animate; - -@end - - -@interface NSObject (TabBarControlDelegateMethods) - -//Standard NSTabView methods -- (BOOL)tabView:(NSTabView *)aTabView shouldCloseTabViewItem:(NSTabViewItem *)tabViewItem; -- (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabViewItem; - -//"Spring-loaded" tabs methods -- (NSArray *)allowedDraggedTypesForTabView:(NSTabView *)aTabView; -- (void)tabView:(NSTabView *)aTabView acceptedDraggingInfo:(id )draggingInfo onTabViewItem:(NSTabViewItem *)tabViewItem; - -//Contextual menu method -- (NSMenu *)tabView:(NSTabView *)aTabView menuForTabViewItem:(NSTabViewItem *)tabViewItem; - -//Drag and drop methods -- (BOOL)tabView:(NSTabView *)aTabView shouldDragTabViewItem:(NSTabViewItem *)tabViewItem fromTabBar:(PSMTabBarControl *)tabBarControl; -- (BOOL)tabView:(NSTabView *)aTabView shouldDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl; -- (BOOL)tabView:(NSTabView *)aTabView shouldAllowTabViewItem:(NSTabViewItem *)tabViewItem toLeaveTabBar:(PSMTabBarControl *)tabBarControl; -- (void)tabView:(NSTabView*)aTabView didDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl; -- (void)draggingEvent:(id )dragEvent enteredTabBar:(PSMTabBarControl *)tabBarControl tabView:(NSTabViewItem *)tabViewItem; -- (void)tabViewDragWindowCreated:(NSWindow *)dragWindow; - -//Tear-off tabs methods -- (NSImage *)tabView:(NSTabView *)aTabView imageForTabViewItem:(NSTabViewItem *)tabViewItem offset:(NSSize *)offset styleMask:(NSUInteger *)styleMask; -- (PSMTabBarControl *)tabView:(NSTabView *)aTabView newTabBarForDraggedTabViewItem:(NSTabViewItem *)tabViewItem atPoint:(NSPoint)point; -- (void)tabView:(NSTabView *)aTabView closeWindowForLastTabViewItem:(NSTabViewItem *)tabViewItem; - -//Overflow menu validation -- (BOOL)tabView:(NSTabView *)aTabView validateOverflowMenuItem:(NSMenuItem *)menuItem forTabViewItem:(NSTabViewItem *)tabViewItem; -- (void)tabView:(NSTabView *)aTabView tabViewItem:(NSTabViewItem *)tabViewItem isInOverflowMenu:(BOOL)inOverflowMenu; - -//tab bar hiding methods -- (void)tabView:(NSTabView *)aTabView tabBarDidHide:(PSMTabBarControl *)tabBarControl; -- (void)tabView:(NSTabView *)aTabView tabBarDidUnhide:(PSMTabBarControl *)tabBarControl; -- (CGFloat)desiredWidthForVerticalTabBar:(PSMTabBarControl *)tabBarControl; - -//closing -- (BOOL)tabView:(NSTabView *)aTabView disableTabCloseForTabViewItem:(NSTabViewItem *)tabViewItem; - -//tooltips -- (NSString *)tabView:(NSTabView *)aTabView toolTipForTabViewItem:(NSTabViewItem *)tabViewItem; - -//accessibility -- (NSString *)accessibilityStringForTabView:(NSTabView *)aTabView objectCount:(NSInteger)objectCount; - -@end diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m deleted file mode 100644 index 1b0cd4a26..000000000 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ /dev/null @@ -1,2178 +0,0 @@ -// -// PSMTabBarControl.m -// PSMTabBarControl -// -// Created by John Pannell on 10/13/05. -// Copyright 2005 Positive Spin Media. All rights reserved. -// - -#import "PSMTabBarControl.h" -#import "PSMTabBarCell.h" -#import "PSMOverflowPopUpButton.h" -#import "PSMRolloverButton.h" -#import "PSMTabStyle.h" -#import "PSMSequelProTabStyle.h" -#import "PSMTabDragAssistant.h" -#import "PSMTabBarController.h" - -#include /* for GetKeys() and KeyMap */ -#include - -@interface PSMTabBarControl (Private) - - // constructor/destructor -- (void)initAddedProperties; - - // accessors -- (NSEvent *)lastMouseDownEvent; -- (void)setLastMouseDownEvent:(NSEvent *)event; - - // contents -- (void)addTabViewItem:(NSTabViewItem *)item; -- (void)removeTabForCell:(PSMTabBarCell *)cell; - - // draw -- (void)_setupTrackingRectsForCell:(PSMTabBarCell *)cell; -- (void)_positionOverflowMenu; -- (void)_checkWindowFrame; -- (void)update:(BOOL)animate updateTabs:(BOOL)updateTabs; - - // actions -- (void)closeTabClick:(id)sender; -- (void)tabNothing:(id)sender; - - // notification handlers -- (void)frameDidChange:(NSNotification *)notification; -- (void)windowDidMove:(NSNotification *)aNotification; -- (void)windowDidUpdate:(NSNotification *)notification; -- (void)windowStatusDidChange:(NSNotification *)notification; - - // NSTabView delegate -- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem; -- (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem; -- (void)tabView:(NSTabView *)tabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem; -- (void)tabViewDidChangeNumberOfTabViewItems:(NSTabView *)tabView; - - // archiving -- (void)encodeWithCoder:(NSCoder *)aCoder; -- (id)initWithCoder:(NSCoder *)aDecoder; - - // convenience -- (void)_bindPropertiesForCell:(PSMTabBarCell *)cell andTabViewItem:(NSTabViewItem *)item; -- (id)cellForPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame; - -- (void)fireSpring:(NSTimer *)timer; -- (void)animateShowHide:(NSTimer *)timer; -- (void)_animateCells:(NSTimer *)timer; -@end - -@implementation PSMTabBarControl - -#pragma mark - -#pragma mark Characteristics -+ (NSBundle *)bundle; -{ - static NSBundle *bundle = nil; - if (!bundle) bundle = [NSBundle bundleForClass:[PSMTabBarControl class]]; - return bundle; -} - -/*! - @method availableCellWidth - @abstract The number of pixels available for cells - @discussion Calculates the number of pixels available for cells based on margins and the window resize badge. - @returns Returns the amount of space for cells. -*/ - -- (CGFloat)availableCellWidth -{ - return [self frame].size.width - [style leftMarginForTabBarControl] - [style rightMarginForTabBarControl] - _resizeAreaCompensation; -} - -/*! - @method genericCellRect - @abstract The basic rect for a tab cell. - @discussion Creates a generic frame for a tab cell based on the current control state. - @returns Returns a basic rect for a tab cell. -*/ - -- (NSRect)genericCellRect -{ - NSRect aRect=[self frame]; - aRect.origin.x = [style leftMarginForTabBarControl]; - aRect.origin.y = 0.0f; - aRect.size.width = [self availableCellWidth]; - aRect.size.height = [style tabCellHeight]; - return aRect; -} - -#pragma mark - -#pragma mark Constructor/destructor - -- (void)initAddedProperties -{ - _cells = [[NSMutableArray alloc] initWithCapacity:10]; - _controller = [[PSMTabBarController alloc] initWithTabBarControl:self]; - _animationTimer = nil; - _lastWindowIsMainCheck = NO; - _lastAttachedWindowIsMainCheck = NO; - _lastAppIsActiveCheck = NO; - _lastMouseDownEvent = nil; - - // default config - _currentStep = kPSMIsNotBeingResized; - _orientation = PSMTabBarHorizontalOrientation; - _canCloseOnlyTab = NO; - _disableTabClose = NO; - _showAddTabButton = NO; - _hideForSingleTab = NO; - _sizeCellsToFit = NO; - _isHidden = NO; - _awakenedFromNib = NO; - _automaticallyAnimates = NO; - _useOverflowMenu = YES; - _allowsBackgroundTabClosing = YES; - _allowsResizing = NO; - _selectsTabsOnMouseDown = NO; - _alwaysShowActiveTab = NO; - _allowsScrubbing = NO; - _useSafariStyleDragging = NO; - _cellMinWidth = 100; - _cellMaxWidth = 280; - _cellOptimumWidth = 130; - _tearOffStyle = PSMTabBarTearOffAlphaWindow; - - self.heightCollapsed = kPSMTabBarControlDefaultHeightCollapsed; - - style = [[PSMSequelProTabStyle alloc] init]; - - // the overflow button/menu - NSRect overflowButtonRect = NSMakeRect([self frame].size.width - [style rightMarginForTabBarControl] + 1, 0, [style rightMarginForTabBarControl] - 1, [self frame].size.height); - _overflowPopUpButton = [[PSMOverflowPopUpButton alloc] initWithFrame:overflowButtonRect pullsDown:YES]; - [_overflowPopUpButton setAutoresizingMask:NSViewNotSizable | NSViewMinXMargin]; - [_overflowPopUpButton setHidden:YES]; - [self addSubview:_overflowPopUpButton]; - [self _positionOverflowMenu]; - - // new tab button - NSRect addTabButtonRect = NSMakeRect([self frame].size.width - [style rightMarginForTabBarControl] + 1, 3.0f, 16.0f, 16.0f); - _addTabButton = [[PSMRolloverButton alloc] initWithFrame:addTabButtonRect]; - - if (_addTabButton) { - NSImage *newButtonImage = [style addTabButtonImage]; - if (newButtonImage) { - [_addTabButton setUsualImage:newButtonImage]; - } - newButtonImage = [style addTabButtonPressedImage]; - if (newButtonImage) { - [_addTabButton setAlternateImage:newButtonImage]; - } - newButtonImage = [style addTabButtonRolloverImage]; - if (newButtonImage) { - [_addTabButton setRolloverImage:newButtonImage]; - } - [_addTabButton setTitle:@""]; - [_addTabButton setImagePosition:NSImageOnly]; - [_addTabButton setButtonType:NSMomentaryChangeButton]; - [_addTabButton setBordered:NO]; - [_addTabButton setBezelStyle:NSShadowlessSquareBezelStyle]; - [self addSubview:_addTabButton]; - - if (_showAddTabButton) { - [_addTabButton setHidden:NO]; - } else { - [_addTabButton setHidden:YES]; - } - [_addTabButton setNeedsDisplay:YES]; - } -} - -- (id)initWithFrame:(NSRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - // Initialization - [self initAddedProperties]; - [self registerForDraggedTypes:@[@"PSMTabBarControlItemPBType"]]; - - // resize - [self setPostsFrameChangedNotifications:YES]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(frameDidChange:) name:NSViewFrameDidChangeNotification object:self]; - } - [self setTarget:self]; - return self; -} - -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [self destroyAnimations]; - - //unbind all the items to prevent crashing - //not sure if this is necessary or not - NSArray *cells = [NSArray arrayWithArray:_cells]; // create a copy as we will change the original array while being enumerated - NSEnumerator *enumerator = [cells objectEnumerator]; - PSMTabBarCell *nextCell; - while ( (nextCell = [enumerator nextObject]) ) { - [self removeTabForCell:nextCell]; - } - - [_overflowPopUpButton release]; - [_cells release]; - [_controller release]; - [tabView release]; - [_addTabButton release]; - [partnerView release]; - [_lastMouseDownEvent release]; - [style release]; - - [self unregisterDraggedTypes]; - - [super dealloc]; -} - -- (void)awakeFromNib -{ - // build cells from existing tab view items - NSArray *existingItems = [tabView tabViewItems]; - NSEnumerator *e = [existingItems objectEnumerator]; - NSTabViewItem *item; - while ( (item = [e nextObject]) ) { - if (![[self representedTabViewItems] containsObject:item]) { - [self addTabViewItem:item]; - } - } -} - -- (void)viewWillMoveToWindow:(NSWindow *)aWindow { - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - - [center removeObserver:self name:NSWindowDidBecomeMainNotification object:nil]; - [center removeObserver:self name:NSWindowDidResignMainNotification object:nil]; - [center removeObserver:self name:NSWindowDidUpdateNotification object:nil]; - [center removeObserver:self name:NSWindowDidMoveNotification object:nil]; - - if (_showHideAnimationTimer) { - [_showHideAnimationTimer invalidate]; - [_showHideAnimationTimer release]; _showHideAnimationTimer = nil; - } - - if (aWindow) { - [center addObserver:self selector:@selector(windowStatusDidChange:) name:NSWindowDidBecomeMainNotification object:aWindow]; - [center addObserver:self selector:@selector(windowStatusDidChange:) name:NSWindowDidResignMainNotification object:aWindow]; - [center addObserver:self selector:@selector(windowDidUpdate:) name:NSWindowDidUpdateNotification object:aWindow]; - [center addObserver:self selector:@selector(windowDidMove:) name:NSWindowDidMoveNotification object:aWindow]; - } -} - -/** - * Allow a window to be redrawn in response to changes in position or focus level. - */ -- (void)windowStatusDidChange:(NSNotification *)notification -{ - [self setNeedsDisplay:YES]; -} - -#pragma mark - -#pragma mark Accessors - -- (NSMutableArray *)cells -{ - return _cells; -} - -- (NSEvent *)lastMouseDownEvent -{ - return _lastMouseDownEvent; -} - -- (void)setLastMouseDownEvent:(NSEvent *)event -{ - [event retain]; - [_lastMouseDownEvent release]; - _lastMouseDownEvent = event; -} - -- (id)delegate -{ - return delegate; -} - -- (void)setDelegate:(id)object -{ - delegate = object; - - NSMutableArray *types = [NSMutableArray arrayWithObjects:@"PSMTabBarControlItemPBType", NSStringPboardType,nil]; - - //Update the allowed drag types - if ([self delegate] && [[self delegate] respondsToSelector:@selector(allowedDraggedTypesForTabView:)]) { - [types addObjectsFromArray:[[self delegate] allowedDraggedTypesForTabView:tabView]]; - } - [self unregisterDraggedTypes]; - [self registerForDraggedTypes:types]; -} - -- (NSTabView *)tabView -{ - return tabView; -} - -- (void)setTabView:(NSTabView *)view -{ - [view retain]; - [tabView release]; - tabView = view; -} - -- (id)style -{ - return style; -} - -- (NSString *)styleName -{ - return [style name]; -} - -- (void)setStyle:(id )newStyle -{ - if (style != newStyle) { - [style autorelease]; - style = [newStyle retain]; - - // restyle add tab button - if (_addTabButton) { - NSImage *newButtonImage = [style addTabButtonImage]; - if (newButtonImage) { - [_addTabButton setUsualImage:newButtonImage]; - } - - newButtonImage = [style addTabButtonPressedImage]; - if (newButtonImage) { - [_addTabButton setAlternateImage:newButtonImage]; - } - - newButtonImage = [style addTabButtonRolloverImage]; - if (newButtonImage) { - [_addTabButton setRolloverImage:newButtonImage]; - } - } - - [self update]; - } -} - -- (void)setStyleNamed:(NSString *)name -{ - id newStyle; - - if ([name isEqualToString:@"SequelPro"]) { - newStyle = [[PSMSequelProTabStyle alloc] init]; - } - else { - newStyle = [[PSMSequelProTabStyle alloc] init]; - } - - [self setStyle:newStyle]; - - [newStyle release]; -} - -- (PSMTabBarOrientation)orientation -{ - return _orientation; -} - -- (void)setOrientation:(PSMTabBarOrientation)value -{ - PSMTabBarOrientation lastOrientation = _orientation; - _orientation = value; - - if (_tabBarWidth < 10) { - _tabBarWidth = 120; - } - - if (lastOrientation != _orientation) { - [[self style] setOrientation:_orientation]; - - [self _positionOverflowMenu]; //move the overflow popup button to the right place - [self update:NO]; - } -} - -- (BOOL)canCloseOnlyTab -{ - return _canCloseOnlyTab; -} - -- (void)setCanCloseOnlyTab:(BOOL)value -{ - _canCloseOnlyTab = value; - if ([_cells count] == 1) { - [self update]; - } -} - -- (BOOL)disableTabClose -{ - return _disableTabClose; -} - -- (void)setDisableTabClose:(BOOL)value -{ - _disableTabClose = value; - [self update]; -} - -- (BOOL)hideForSingleTab -{ - return _hideForSingleTab; -} - -- (void)setHideForSingleTab:(BOOL)value -{ - _hideForSingleTab = value; - if ([_cells count] == 1) { - [self update]; - } -} - -- (BOOL)showAddTabButton -{ - return _showAddTabButton; -} - -- (void)setShowAddTabButton:(BOOL)value -{ - _showAddTabButton = value; - if (!NSIsEmptyRect([_controller addButtonRect])) - [_addTabButton setFrame:[_controller addButtonRect]]; - - [_addTabButton setHidden:!_showAddTabButton]; - [_addTabButton setNeedsDisplay:YES]; - - [self update]; -} - -- (id)createNewTabTarget -{ - return _createNewTabTarget; -} - -- (void)setCreateNewTabTarget:(id)object -{ - _createNewTabTarget = object; - [[self addTabButton] setTarget:object]; -} - -- (SEL)createNewTabAction -{ - return _createNewTabAction; -} - -- (void)setCreateNewTabAction:(SEL)selector -{ - _createNewTabAction = selector; - [[self addTabButton] setAction:selector]; -} - -- (id)doubleClickTarget -{ - return _doubleClickTarget; -} - -- (void)setDoubleClickTarget:(id)object -{ - _doubleClickTarget = object; -} - -- (SEL)doubleClickAction -{ - return _doubleClickAction; -} - -- (void)setDoubleClickAction:(SEL)selector -{ - _doubleClickAction = selector; -} - -- (NSInteger)cellMinWidth -{ - return _cellMinWidth; -} - -- (void)setCellMinWidth:(NSInteger)value -{ - _cellMinWidth = value; - [self update]; -} - -- (NSInteger)cellMaxWidth -{ - return _cellMaxWidth; -} - -- (void)setCellMaxWidth:(NSInteger)value -{ - _cellMaxWidth = value; - [self update]; -} - -- (NSInteger)cellOptimumWidth -{ - return _cellOptimumWidth; -} - -- (void)setCellOptimumWidth:(NSInteger)value -{ - _cellOptimumWidth = value; - [self update]; -} - -- (BOOL)sizeCellsToFit -{ - return _sizeCellsToFit; -} - -- (void)setSizeCellsToFit:(BOOL)value -{ - _sizeCellsToFit = value; - [self update]; -} - -- (BOOL)useOverflowMenu -{ - return _useOverflowMenu; -} - -- (void)setUseOverflowMenu:(BOOL)value -{ - _useOverflowMenu = value; - [self update]; -} - -- (PSMRolloverButton *)addTabButton -{ - return _addTabButton; -} - -- (PSMOverflowPopUpButton *)overflowPopUpButton -{ - return _overflowPopUpButton; -} - -- (BOOL)allowsBackgroundTabClosing -{ - return _allowsBackgroundTabClosing; -} - -- (void)setAllowsBackgroundTabClosing:(BOOL)value -{ - _allowsBackgroundTabClosing = value; -} - -- (BOOL)allowsResizing -{ - return _allowsResizing; -} - -- (void)setAllowsResizing:(BOOL)value -{ - _allowsResizing = value; -} - -- (BOOL)selectsTabsOnMouseDown -{ - return _selectsTabsOnMouseDown; -} - -- (void)setSelectsTabsOnMouseDown:(BOOL)value -{ - _selectsTabsOnMouseDown = value; -} - -- (BOOL)createsTabOnDoubleClick; -{ - return _createsTabOnDoubleClick; -} - -- (void)setCreatesTabOnDoubleClick:(BOOL)value -{ - _createsTabOnDoubleClick = value; -} - -- (BOOL)automaticallyAnimates -{ - return _automaticallyAnimates; -} - -- (void)setAutomaticallyAnimates:(BOOL)value -{ - _automaticallyAnimates = value; -} - -- (BOOL)alwaysShowActiveTab -{ - return _alwaysShowActiveTab; -} - -- (void)setAlwaysShowActiveTab:(BOOL)value -{ - _alwaysShowActiveTab = value; -} - -- (BOOL)allowsScrubbing -{ - return _allowsScrubbing; -} - -- (void)setAllowsScrubbing:(BOOL)value -{ - _allowsScrubbing = value; -} - -- (BOOL)usesSafariStyleDragging -{ - return _useSafariStyleDragging; -} - -- (void)setUsesSafariStyleDragging:(BOOL)value -{ - _useSafariStyleDragging = value; -} - -- (PSMTabBarTearOffStyle)tearOffStyle -{ - return _tearOffStyle; -} - -- (void)setTearOffStyle:(PSMTabBarTearOffStyle)tearOffStyle -{ - _tearOffStyle = tearOffStyle; -} - -#pragma mark - -#pragma mark Functionality - -- (void)addTabViewItem:(NSTabViewItem *)item -{ - // create cell - PSMTabBarCell *cell = [[PSMTabBarCell alloc] initWithControlView:self]; - NSRect cellRect, lastCellFrame = [[_cells lastObject] frame]; - - if ([self orientation] == PSMTabBarHorizontalOrientation) { - cellRect = [self genericCellRect]; - cellRect.size.width = 30; - cellRect.origin.x = lastCellFrame.origin.x + lastCellFrame.size.width; - } else { - cellRect = /*lastCellFrame*/[self genericCellRect]; - cellRect.size.width = lastCellFrame.size.width; - cellRect.size.height = 0; - cellRect.origin.y = lastCellFrame.origin.y + lastCellFrame.size.height; - } - - [cell setRepresentedObject:item]; - [cell setFrame:cellRect]; - - // bind it up - [self bindPropertiesForCell:cell andTabViewItem:item]; - - // add to collection - [_cells addObject:cell]; - [cell release]; - if ((NSInteger)[_cells count] == [tabView numberOfTabViewItems]) { - [self update]; // don't update unless all are accounted for! - } -} - -- (void)removeTabForCell:(PSMTabBarCell *)cell -{ - NSTabViewItem *item = [cell representedObject]; - - // unbind - [[cell indicator] unbind:@"animate"]; - [[cell indicator] unbind:@"hidden"]; - [cell unbind:@"hasIcon"]; - [cell unbind:@"hasLargeImage"]; - [cell unbind:@"title"]; - [cell unbind:@"count"]; - [cell unbind:@"countColor"]; - [cell unbind:@"isEdited"]; - - if ([item identifier] != nil) { - if ([[item identifier] respondsToSelector:@selector(isProcessing)]) { - [[item identifier] removeObserver:cell forKeyPath:@"isProcessing"]; - } - } - - if ([item identifier] != nil) { - if ([[item identifier] respondsToSelector:@selector(icon)]) { - [[item identifier] removeObserver:cell forKeyPath:@"icon"]; - } - } - - if ([item identifier] != nil) { - if ([[item identifier] respondsToSelector:@selector(count)]) { - [[item identifier] removeObserver:cell forKeyPath:@"objectCount"]; - } - } - - if ([item identifier] != nil) { - if ([[item identifier] respondsToSelector:@selector(countColor)]) { - [[item identifier] removeObserver:cell forKeyPath:@"countColor"]; - } - } - - if ([item identifier] != nil) { - if ([[item identifier] respondsToSelector:@selector(largeImage)]) { - [[item identifier] removeObserver:cell forKeyPath:@"largeImage"]; - } - } - - if ([item identifier] != nil) { - if ([[item identifier] respondsToSelector:@selector(isEdited)]) { - [[item identifier] removeObserver:cell forKeyPath:@"isEdited"]; - } - } - - // stop watching identifier - [item removeObserver:self forKeyPath:@"identifier"]; - - // remove indicator - if ([[self subviews] containsObject:[cell indicator]]) { - [[cell indicator] removeFromSuperview]; - } - // remove tracking - [[NSNotificationCenter defaultCenter] removeObserver:cell]; - - if ([cell closeButtonTrackingTag] != 0) { - [self removeTrackingRect:[cell closeButtonTrackingTag]]; - [cell setCloseButtonTrackingTag:0]; - } - if ([cell cellTrackingTag] != 0) { - [self removeTrackingRect:[cell cellTrackingTag]]; - [cell setCellTrackingTag:0]; - } - - // pull from collection - [_cells removeObject:cell]; - - [self update]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - // did the tab's identifier change? - if ([keyPath isEqualToString:@"identifier"]) { - NSEnumerator *e = [_cells objectEnumerator]; - PSMTabBarCell *cell; - while ( (cell = [e nextObject]) ) { - if ([cell representedObject] == object) { - [self _bindPropertiesForCell:cell andTabViewItem:object]; - } - } - } else { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } -} - -#pragma mark - -#pragma mark Hide/Show - -- (void)hideTabBar:(BOOL)hide animate:(BOOL)animate -{ - if (!_awakenedFromNib/* || (_isHidden && hide) || (!_isHidden && !hide)*/) { - return; - } - - [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; - - _isHidden = hide; - _currentStep = 0; - if (!animate) { - _currentStep = (NSInteger)kPSMHideAnimationSteps; - } - - if (hide) { - [_overflowPopUpButton removeFromSuperview]; - [_addTabButton removeFromSuperview]; - } else if (!animate) { - [self addSubview:_overflowPopUpButton]; - [self addSubview:_addTabButton]; - } - - CGFloat partnerOriginalSize, partnerOriginalOrigin, myOriginalSize, myOriginalOrigin, partnerTargetSize, partnerTargetOrigin, myTargetSize, myTargetOrigin; - - // target values for partner - if ([self orientation] == PSMTabBarHorizontalOrientation) { - // current (original) values - myOriginalSize = [self frame].size.height; - myOriginalOrigin = [self frame].origin.y; - if (partnerView) { - partnerOriginalSize = [partnerView frame].size.height; - partnerOriginalOrigin = [partnerView frame].origin.y; - } else { - partnerOriginalSize = [[self window] frame].size.height; - partnerOriginalOrigin = [[self window] frame].origin.y; - } - - // Determine the target sizes - if (_isHidden) { - myTargetSize = self.heightCollapsed; - } else { - myTargetSize = kPSMTabBarControlHeight; - } - - if (partnerView) { - partnerTargetSize = partnerOriginalSize + myOriginalSize - myTargetSize; - - // above or below me? - if ((myOriginalOrigin - kPSMTabBarControlHeight) > partnerOriginalOrigin) { - - // partner is below me, keeps its origin - partnerTargetOrigin = partnerOriginalOrigin; - myTargetOrigin = myOriginalOrigin + myOriginalSize - myTargetSize; - } else { - - // partner is above me, I keep my origin - myTargetOrigin = myOriginalOrigin; - partnerTargetOrigin = partnerOriginalOrigin + myOriginalSize - myTargetSize; - } - } else { - - // for window movement - myTargetOrigin = myOriginalOrigin; - partnerTargetOrigin = partnerOriginalOrigin + myOriginalSize - myTargetSize; - partnerTargetSize = partnerOriginalSize - myOriginalSize + myTargetSize; - } - } else /* vertical */ { - // current (original) values - myOriginalSize = [self frame].size.width; - myOriginalOrigin = [self frame].origin.x; - if (partnerView) { - partnerOriginalSize = [partnerView frame].size.width; - partnerOriginalOrigin = [partnerView frame].origin.x; - } else { - partnerOriginalSize = [[self window] frame].size.width; - partnerOriginalOrigin = [[self window] frame].origin.x; - } - - if (partnerView) { - //to the left or right? - if (myOriginalOrigin < partnerOriginalOrigin + partnerOriginalSize) { - // partner is to the left - if (_isHidden) { - // I'm shrinking - myTargetOrigin = myOriginalOrigin; - myTargetSize = 1; - partnerTargetOrigin = partnerOriginalOrigin - myOriginalSize + 1; - partnerTargetSize = partnerOriginalSize + myOriginalSize - 1; - _tabBarWidth = myOriginalSize; - } else { - // I'm growing - myTargetOrigin = myOriginalOrigin; - myTargetSize = myOriginalSize + _tabBarWidth; - partnerTargetOrigin = partnerOriginalOrigin + _tabBarWidth; - partnerTargetSize = partnerOriginalSize - _tabBarWidth; - } - } else { - // partner is to the right - if (_isHidden) { - // I'm shrinking - myTargetOrigin = myOriginalOrigin + myOriginalSize; - myTargetSize = 1; - partnerTargetOrigin = partnerOriginalOrigin; - partnerTargetSize = partnerOriginalSize + myOriginalSize; - _tabBarWidth = myOriginalSize; - } else { - // I'm growing - myTargetOrigin = myOriginalOrigin - _tabBarWidth; - myTargetSize = myOriginalSize + _tabBarWidth; - partnerTargetOrigin = partnerOriginalOrigin; - partnerTargetSize = partnerOriginalSize - _tabBarWidth; - } - } - } else { - // for window movement - if (_isHidden) { - // I'm shrinking - myTargetOrigin = myOriginalOrigin; - myTargetSize = 1; - partnerTargetOrigin = partnerOriginalOrigin + myOriginalSize - 1; - partnerTargetSize = partnerOriginalSize - myOriginalSize + 1; - _tabBarWidth = myOriginalSize; - } else { - // I'm growing - myTargetOrigin = myOriginalOrigin; - myTargetSize = _tabBarWidth; - partnerTargetOrigin = partnerOriginalOrigin - _tabBarWidth + 1; - partnerTargetSize = partnerOriginalSize + _tabBarWidth - 1; - } - } - - if (!_isHidden && [[self delegate] respondsToSelector:@selector(desiredWidthForVerticalTabBar:)]) - myTargetSize = [[self delegate] desiredWidthForVerticalTabBar:self]; - } - - NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithDouble:myOriginalOrigin], @"myOriginalOrigin", [NSNumber numberWithDouble:partnerOriginalOrigin], @"partnerOriginalOrigin", [NSNumber numberWithDouble:myOriginalSize], @"myOriginalSize", [NSNumber numberWithDouble:partnerOriginalSize], @"partnerOriginalSize", [NSNumber numberWithDouble:myTargetOrigin], @"myTargetOrigin", [NSNumber numberWithDouble:partnerTargetOrigin], @"partnerTargetOrigin", [NSNumber numberWithDouble:myTargetSize], @"myTargetSize", [NSNumber numberWithDouble:partnerTargetSize], @"partnerTargetSize", nil]; - if (_showHideAnimationTimer) { - [_showHideAnimationTimer invalidate]; - [_showHideAnimationTimer release]; - } - _showHideAnimationTimer = [[NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(animateShowHide:) userInfo:userInfo repeats:YES] retain]; -} - -- (void)animateShowHide:(NSTimer *)timer -{ - // moves the frame of the tab bar and window (or partner view) linearly to hide or show the tab bar - NSRect myFrame = [self frame]; - NSDictionary *userInfo = [timer userInfo]; - CGFloat myCurrentOrigin = ([[userInfo objectForKey:@"myOriginalOrigin"] floatValue] + (([[userInfo objectForKey:@"myTargetOrigin"] floatValue] - [[userInfo objectForKey:@"myOriginalOrigin"] floatValue]) * (_currentStep/kPSMHideAnimationSteps))); - CGFloat myCurrentSize = ([[userInfo objectForKey:@"myOriginalSize"] floatValue] + (([[userInfo objectForKey:@"myTargetSize"] floatValue] - [[userInfo objectForKey:@"myOriginalSize"] floatValue]) * (_currentStep/kPSMHideAnimationSteps))); - CGFloat partnerCurrentOrigin = ([[userInfo objectForKey:@"partnerOriginalOrigin"] floatValue] + (([[userInfo objectForKey:@"partnerTargetOrigin"] floatValue] - [[userInfo objectForKey:@"partnerOriginalOrigin"] floatValue]) * (_currentStep/kPSMHideAnimationSteps))); - CGFloat partnerCurrentSize = ([[userInfo objectForKey:@"partnerOriginalSize"] floatValue] + (([[userInfo objectForKey:@"partnerTargetSize"] floatValue] - [[userInfo objectForKey:@"partnerOriginalSize"] floatValue]) * (_currentStep/kPSMHideAnimationSteps))); - - NSRect myNewFrame; - if ([self orientation] == PSMTabBarHorizontalOrientation) { - myNewFrame = NSMakeRect(myFrame.origin.x, myCurrentOrigin, myFrame.size.width, myCurrentSize); - } else { - myNewFrame = NSMakeRect(myCurrentOrigin, myFrame.origin.y, myCurrentSize, myFrame.size.height); - } - - if (partnerView) { - // resize self and view - NSRect resizeRect; - if ([self orientation] == PSMTabBarHorizontalOrientation) { - resizeRect = NSMakeRect([partnerView frame].origin.x, partnerCurrentOrigin, [partnerView frame].size.width, partnerCurrentSize); - } else { - resizeRect = NSMakeRect(partnerCurrentOrigin, [partnerView frame].origin.y, partnerCurrentSize, [partnerView frame].size.height); - } - [partnerView setFrame:resizeRect]; - [partnerView setNeedsDisplay:YES]; - [self setFrame:myNewFrame]; - } else { - // resize self and window - NSRect resizeRect; - if ([self orientation] == PSMTabBarHorizontalOrientation) { - resizeRect = NSMakeRect([[self window] frame].origin.x, partnerCurrentOrigin, [[self window] frame].size.width, partnerCurrentSize); - } else { - resizeRect = NSMakeRect(partnerCurrentOrigin, [[self window] frame].origin.y, partnerCurrentSize, [[self window] frame].size.height); - } - [[self window] setFrame:resizeRect display:YES]; - [self setFrame:myNewFrame]; - } - - // next - _currentStep++; - if (_currentStep == kPSMHideAnimationSteps + 1) { - _currentStep = kPSMIsNotBeingResized; - [self viewDidEndLiveResize]; - [self update:NO]; - - //send the delegate messages - if (_isHidden) { - if ([self delegate] && [[self delegate] respondsToSelector:@selector(tabView:tabBarDidHide:)]) { - [[self delegate] tabView:[self tabView] tabBarDidHide:self]; - } - } else { - [self addSubview:_overflowPopUpButton]; - [self addSubview:_addTabButton]; - - if ([self delegate] && [[self delegate] respondsToSelector:@selector(tabView:tabBarDidUnhide:)]) { - [[self delegate] tabView:[self tabView] tabBarDidUnhide:self]; - } - } - - [_showHideAnimationTimer invalidate]; - [_showHideAnimationTimer release]; _showHideAnimationTimer = nil; - } - [[self window] display]; -} - -- (BOOL)isTabBarHidden -{ - return _isHidden; -} - -- (BOOL)isAnimating -{ - return _animationTimer != nil; -} - -- (id)partnerView -{ - return partnerView; -} - -- (void)setPartnerView:(id)view -{ - [partnerView release]; - [view retain]; - partnerView = view; -} - -- (void)destroyAnimations -{ - // Stop any animations that may be running - - [_animationTimer invalidate]; - [_animationTimer release]; _animationTimer = nil; - - [_showHideAnimationTimer invalidate]; - [_showHideAnimationTimer release]; _showHideAnimationTimer = nil; -} - -#pragma mark - -#pragma mark Drawing - -- (BOOL)isFlipped -{ - return YES; -} - -- (void)drawRect:(NSRect)rect -{ - [style drawTabBar:self inRect:rect]; -} - -- (void)update -{ - [self update:_automaticallyAnimates]; -} - -- (void)update:(BOOL)animate -{ - [self update:animate updateTabs:YES]; -} - -- (void)update:(BOOL)animate updateTabs:(BOOL)updateTabs -{ - // make sure all of our tabs are accounted for before updating, - // or only proceed if a drag is in progress (where counts may mismatch) - if ([[self tabView] numberOfTabViewItems] != (NSInteger)[_cells count] && ![[PSMTabDragAssistant sharedDragAssistant] isDragging]) { - return; - } - - if (updateTabs) { - // hide/show? (these return if already in desired state) - if ( (_hideForSingleTab) && ([_cells count] <= 1) ) { - [self hideTabBar:YES animate:YES]; - } else { - [self hideTabBar:NO animate:YES]; - } - } - - [self removeAllToolTips]; - [_controller layoutCells]; //eventually we should only have to call this when we know something has changed - - PSMTabBarCell *currentCell; - - NSMenu *overflowMenu = [_controller overflowMenu]; - [_overflowPopUpButton setHidden:(overflowMenu == nil)]; - [_overflowPopUpButton setMenu:overflowMenu]; - - if (_animationTimer) { - [_animationTimer invalidate]; - [_animationTimer release]; _animationTimer = nil; - } - - if (animate) { - NSMutableArray *targetFrames = [NSMutableArray arrayWithCapacity:[_cells count]]; - - for (NSUInteger i = 0; i < [_cells count]; i++) { - currentCell = [_cells objectAtIndex:i]; - - //we're going from NSRect -> NSValue -> NSRect -> NSValue here - oh well - [targetFrames addObject:[NSValue valueWithRect:[_controller cellFrameAtIndex:i]]]; - } - - [_addTabButton setHidden:!_showAddTabButton]; - - NSAnimation *animation = [[NSAnimation alloc] initWithDuration:0.50 animationCurve:NSAnimationEaseInOut]; - [animation setAnimationBlockingMode:NSAnimationNonblocking]; - [animation startAnimation]; - _animationTimer = [[NSTimer scheduledTimerWithTimeInterval:1.0 / 30.0 - target:self - selector:@selector(_animateCells:) - userInfo:[NSArray arrayWithObjects:targetFrames, animation, nil] - repeats:YES] retain]; - [animation release]; - [[NSRunLoop currentRunLoop] addTimer:_animationTimer forMode:NSEventTrackingRunLoopMode]; - [self _animateCells:_animationTimer]; - - } else { - for (NSUInteger i = 0; i < [_cells count]; i++) { - currentCell = [_cells objectAtIndex:i]; - [currentCell setFrame:[_controller cellFrameAtIndex:i]]; - - if (![currentCell isInOverflowMenu]) { - [self _setupTrackingRectsForCell:currentCell]; - } - } - - [_addTabButton setFrame:[_controller addButtonRect]]; - [_addTabButton setHidden:!_showAddTabButton]; - [self setNeedsDisplay:YES]; - } -} - -- (void)_animateCells:(NSTimer *)timer -{ - NSAnimation *animation = [[timer userInfo] objectAtIndex:1]; - NSArray *targetFrames = [[timer userInfo] objectAtIndex:0]; - PSMTabBarCell *currentCell; - NSUInteger cellCount = (NSUInteger)[_cells count]; - - if ((cellCount > 0) && [animation isAnimating]) { - //compare our target position with the current position and move towards the target - for (NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) { - currentCell = [_cells objectAtIndex:i]; - NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue]; - CGFloat sizeChange; - CGFloat originChange; - - if ([self orientation] == PSMTabBarHorizontalOrientation) { - sizeChange = (targetFrame.size.width - cellFrame.size.width) * [animation currentProgress]; - originChange = (targetFrame.origin.x - cellFrame.origin.x) * [animation currentProgress]; - cellFrame.size.width += sizeChange; - cellFrame.origin.x += originChange; - } else { - sizeChange = (targetFrame.size.height - cellFrame.size.height) * [animation currentProgress]; - originChange = (targetFrame.origin.y - cellFrame.origin.y) * [animation currentProgress]; - cellFrame.size.height += sizeChange; - cellFrame.origin.y += originChange; - } - - [currentCell setFrame:cellFrame]; - - //highlight the cell if the mouse is over it - NSPoint mousePoint = [self convertPoint:[[self window] mouseLocationOutsideOfEventStream] fromView:nil]; - NSRect closeRect = [currentCell closeButtonRectForFrame:cellFrame]; - [currentCell setHighlighted:NSMouseInRect(mousePoint, cellFrame, [self isFlipped])]; - [currentCell setCloseButtonOver:NSMouseInRect(mousePoint, closeRect, [self isFlipped])]; - } - - if (_showAddTabButton) { - //animate the add tab button - NSRect target = [_controller addButtonRect], frame = [_addTabButton frame]; - frame.origin.x += (target.origin.x - frame.origin.x) * [animation currentProgress]; - [_addTabButton setFrame:frame]; - } - } else { - //put all the cells where they should be in their final position - if (cellCount > 0) { - for (NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) { - currentCell = [_cells objectAtIndex:i]; - NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue]; - - if ([self orientation] == PSMTabBarHorizontalOrientation) { - cellFrame.size.width = targetFrame.size.width; - cellFrame.origin.x = targetFrame.origin.x; - } else { - cellFrame.size.height = targetFrame.size.height; - cellFrame.origin.y = targetFrame.origin.y; - } - - [currentCell setFrame:cellFrame]; - - //highlight the cell if the mouse is over it - NSPoint mousePoint = [self convertPoint:[[self window] mouseLocationOutsideOfEventStream] fromView:nil]; - NSRect closeRect = [currentCell closeButtonRectForFrame:cellFrame]; - [currentCell setHighlighted:NSMouseInRect(mousePoint, cellFrame, [self isFlipped])]; - [currentCell setCloseButtonOver:NSMouseInRect(mousePoint, closeRect, [self isFlipped])]; - } - } - - //set the frame for the add tab button - if (_showAddTabButton) { - NSRect frame = [_addTabButton frame]; - frame.origin.x = [_controller addButtonRect].origin.x; - [_addTabButton setFrame:frame]; - } - - [_animationTimer invalidate]; - [_animationTimer release]; _animationTimer = nil; - - for (NSUInteger i = 0; i < cellCount; i++) { - currentCell = [_cells objectAtIndex:i]; - - //we've hit the cells that are in overflow, stop setting up tracking rects - if ([currentCell isInOverflowMenu]) { - break; - } - - [self _setupTrackingRectsForCell:currentCell]; - } - } - - [self setNeedsDisplay:YES]; -} - -- (void)_setupTrackingRectsForCell:(PSMTabBarCell *)cell -{ - - // Skip tracking rects for placeholders - not required. - if ([cell isPlaceholder]) return; - - NSInteger tag; - NSUInteger anIndex = [_cells indexOfObject:cell]; - NSRect cellTrackingRect = [_controller cellTrackingRectAtIndex:anIndex]; - NSPoint mousePoint = [self convertPoint:[[self window] mouseLocationOutsideOfEventStream] fromView:nil]; - BOOL mouseInCell = NSMouseInRect(mousePoint, cellTrackingRect, [self isFlipped]); - - // If dragging, suppress mouse interaction - if ([[PSMTabDragAssistant sharedDragAssistant] isDragging]) mouseInCell = NO; - - //set the cell tracking rect - [self removeTrackingRect:[cell cellTrackingTag]]; - tag = [self addTrackingRect:cellTrackingRect owner:cell userData:nil assumeInside:mouseInCell]; - [cell setCellTrackingTag:tag]; - [cell setHighlighted:mouseInCell]; - - if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed]) { - NSRect closeRect = [_controller closeButtonTrackingRectAtIndex:anIndex]; - BOOL mouseInCloseRect = NSMouseInRect(mousePoint, closeRect, [self isFlipped]); - - //set the close button tracking rect - [self removeTrackingRect:[cell closeButtonTrackingTag]]; - tag = [self addTrackingRect:closeRect owner:cell userData:nil assumeInside:mouseInCloseRect]; - [cell setCloseButtonTrackingTag:tag]; - - [cell setCloseButtonOver:mouseInCloseRect]; - } - - //set the tooltip tracking rect - [self addToolTipRect:[cell frame] owner:self userData:nil]; -} - -- (void)_positionOverflowMenu -{ - NSRect cellRect, frame = [self frame]; - cellRect.size.height = [style tabCellHeight]; - cellRect.size.width = [style rightMarginForTabBarControl]; - - if ([self orientation] == PSMTabBarHorizontalOrientation) { - cellRect.origin.y = 0; - cellRect.origin.x = frame.size.width - [style rightMarginForTabBarControl] + (_resizeAreaCompensation ? -(_resizeAreaCompensation - 1) : 1); - [_overflowPopUpButton setAutoresizingMask:NSViewNotSizable | NSViewMinXMargin]; - } else { - cellRect.origin.x = 0; - cellRect.origin.y = frame.size.height - [style tabCellHeight]; - cellRect.size.width = frame.size.width; - [_overflowPopUpButton setAutoresizingMask:NSViewNotSizable | NSViewMinXMargin | NSViewMinYMargin]; - } - - [_overflowPopUpButton setFrame:cellRect]; -} - -- (void)_checkWindowFrame -{ - //figure out if the new frame puts the control in the way of the resize widget - NSWindow *window = [self window]; - - if (window) { - NSRect resizeWidgetFrame = [[window contentView] frame]; - resizeWidgetFrame.origin.x += resizeWidgetFrame.size.width - 22; - resizeWidgetFrame.size.width = 22; - resizeWidgetFrame.size.height = 22; - - if ([window showsResizeIndicator] && NSIntersectsRect([self frame], resizeWidgetFrame)) { - //the resize widgets are larger on metal windows - _resizeAreaCompensation = [window styleMask] & NSTexturedBackgroundWindowMask ? 20 : 8; - } else { - _resizeAreaCompensation = 0; - } - - [self _positionOverflowMenu]; - } -} - -#pragma mark - -#pragma mark Mouse Tracking - -- (BOOL)mouseDownCanMoveWindow -{ - return NO; -} - -- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent -{ - return YES; -} - -- (void)mouseDown:(NSEvent *)theEvent -{ - _didDrag = NO; - - // keep for dragging - [self setLastMouseDownEvent:theEvent]; - // what cell? - NSPoint mousePt = [self convertPoint:[theEvent locationInWindow] fromView:nil]; - NSRect frame = [self frame]; - - if ([self orientation] == PSMTabBarVerticalOrientation && [self allowsResizing] && partnerView && (mousePt.x > frame.size.width - 3)) { - _resizing = YES; - } - - NSRect cellFrame; - PSMTabBarCell *cell = [self cellForPoint:mousePt cellFrame:&cellFrame]; - if (cell) { - BOOL overClose = NSMouseInRect(mousePt, [cell closeButtonRectForFrame:cellFrame], [self isFlipped]); - if (overClose && - ![self disableTabClose] && - ![cell isCloseButtonSuppressed] && - ([self allowsBackgroundTabClosing] || [[cell representedObject] isEqualTo:[tabView selectedTabViewItem]] || [theEvent modifierFlags] & NSEventModifierFlagCommand)) { - [cell setCloseButtonOver:NO]; - [cell setCloseButtonPressed:YES]; - _closeClicked = YES; - } - else if ([theEvent clickCount] == 2) { - [cell setCloseButtonOver:NO]; - - [_doubleClickTarget performSelector:_doubleClickAction withObject:cell]; - } else { - [cell setCloseButtonPressed:NO]; - if (_selectsTabsOnMouseDown) { - [self performSelector:@selector(tabClick:) withObject:cell]; - } - } - [self setNeedsDisplay:YES]; - } else { - if ([theEvent clickCount] == 2) { - // fire create new tab - if ([self createsTabOnDoubleClick] && [self createNewTabTarget] != nil && [self createNewTabAction] != nil) { - [[self createNewTabTarget] performSelector:[self createNewTabAction]]; - } - return; - } - } -} - -- (void)mouseDragged:(NSEvent *)theEvent -{ - if (![self lastMouseDownEvent]) { - return; - } - - NSPoint currentPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil]; - - if (_resizing) { - NSRect frame = [self frame]; - CGFloat resizeAmount = [theEvent deltaX]; - if ((currentPoint.x > frame.size.width && resizeAmount > 0) || (currentPoint.x < frame.size.width && resizeAmount < 0)) { - [[NSCursor resizeLeftRightCursor] push]; - - NSRect partnerFrame = [partnerView frame]; - - //do some bounds checking - if ((frame.size.width + resizeAmount > [self cellMinWidth]) && (frame.size.width + resizeAmount < [self cellMaxWidth])) { - frame.size.width += resizeAmount; - partnerFrame.size.width -= resizeAmount; - partnerFrame.origin.x += resizeAmount; - - [self setFrame:frame]; - [partnerView setFrame:partnerFrame]; - [[self superview] setNeedsDisplay:YES]; - } - } - return; - } - - NSRect cellFrame; - NSPoint trackingStartPoint = [self convertPoint:[[self lastMouseDownEvent] locationInWindow] fromView:nil]; - PSMTabBarCell *cell = [self cellForPoint:trackingStartPoint cellFrame:&cellFrame]; - if (cell) { - //check to see if the close button was the target in the clicked cell - //highlight/unhighlight the close button as necessary - NSRect iconRect = [cell closeButtonRectForFrame:cellFrame]; - - if (_closeClicked && NSMouseInRect(trackingStartPoint, iconRect, [self isFlipped]) && - ([self allowsBackgroundTabClosing] || [[cell representedObject] isEqualTo:[tabView selectedTabViewItem]])) { - [cell setCloseButtonPressed:NSMouseInRect(currentPoint, iconRect, [self isFlipped])]; - [self setNeedsDisplay:YES]; - return; - } - - CGFloat dx = fabs(currentPoint.x - trackingStartPoint.x); - CGFloat dy = fabs(currentPoint.y - trackingStartPoint.y); - CGFloat distance = sqrtf(dx * dx + dy * dy); - - if (distance >= 10 && !_didDrag && ![[PSMTabDragAssistant sharedDragAssistant] isDragging] && - [self delegate] && [[self delegate] respondsToSelector:@selector(tabView:shouldDragTabViewItem:fromTabBar:)] && - [[self delegate] tabView:tabView shouldDragTabViewItem:[cell representedObject] fromTabBar:self]) { - _didDrag = YES; - [[PSMTabDragAssistant sharedDragAssistant] startDraggingCell:cell fromTabBar:self withMouseDownEvent:[self lastMouseDownEvent]]; - } - } -} - -- (void)mouseUp:(NSEvent *)theEvent -{ - if (![self lastMouseDownEvent]) { - return; - } - - if (_resizing) { - _resizing = NO; - [[NSCursor arrowCursor] set]; - } else { - // what cell? - NSPoint mousePt = [self convertPoint:[theEvent locationInWindow] fromView:nil]; - NSRect cellFrame, mouseDownCellFrame; - PSMTabBarCell *cell = [self cellForPoint:mousePt cellFrame:&cellFrame]; - PSMTabBarCell *mouseDownCell = [self cellForPoint:[self convertPoint:[[self lastMouseDownEvent] locationInWindow] fromView:nil] cellFrame:&mouseDownCellFrame]; - if (cell) { - NSPoint trackingStartPoint = [self convertPoint:[[self lastMouseDownEvent] locationInWindow] fromView:nil]; - NSRect iconRect = [mouseDownCell closeButtonRectForFrame:mouseDownCellFrame]; - - if ((NSMouseInRect(mousePt, iconRect,[self isFlipped])) && ![self disableTabClose] && ![cell isCloseButtonSuppressed] && [mouseDownCell closeButtonPressed]) { - if (([[NSApp currentEvent] modifierFlags] & NSEventModifierFlagOption) != 0) { - //If the user is holding Option, close all other tabs - NSEnumerator *enumerator = [[[[self cells] copy] autorelease] objectEnumerator]; - PSMTabBarCell *otherCell; - - while ((otherCell = [enumerator nextObject])) { - if (otherCell != cell) - [self performSelector:@selector(closeTabClick:) withObject:otherCell]; - } - - //Fix the close button for the clicked tab not to be pressed - [cell setCloseButtonPressed:NO]; - - } else { - //Otherwise, close this tab - [self performSelector:@selector(closeTabClick:) withObject:cell]; - } - - } else if (NSMouseInRect(mousePt, mouseDownCellFrame, [self isFlipped]) && - (!NSMouseInRect(trackingStartPoint, [cell closeButtonRectForFrame:cellFrame], [self isFlipped]) || ![self allowsBackgroundTabClosing] || [self disableTabClose])) { - [mouseDownCell setCloseButtonPressed:NO]; - // If -[self selectsTabsOnMouseDown] is TRUE, we already performed tabClick: on mouseDown. - if (![self selectsTabsOnMouseDown]) { - [self performSelector:@selector(tabClick:) withObject:cell]; - } - - } else { - [mouseDownCell setCloseButtonPressed:NO]; - [self performSelector:@selector(tabNothing:) withObject:cell]; - } - } - - _closeClicked = NO; - } - - // Clear the last mouse down event to prevent drag issues - [self setLastMouseDownEvent:nil]; -} - -- (NSMenu *)menuForEvent:(NSEvent *)event -{ - NSMenu *menu = nil; - NSTabViewItem *item = [[self cellForPoint:[self convertPoint:[event locationInWindow] fromView:nil] cellFrame:nil] representedObject]; - - if (item && [[self delegate] respondsToSelector:@selector(tabView:menuForTabViewItem:)]) { - menu = [[self delegate] tabView:tabView menuForTabViewItem:item]; - } - return menu; -} - -#pragma mark - -#pragma mark Drag and Drop - -- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent -{ - return YES; -} - -// NSDraggingSource - - -- (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context{ - - return (context == NSDraggingContextWithinApplication ? NSDragOperationMove : NSDragOperationNone); -} - -- (BOOL)ignoreModifierKeysForDraggingSession:(NSDraggingSession *)session{ - return YES; -} - -- (void)draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint{ - [[PSMTabDragAssistant sharedDragAssistant] draggingBeganAt:screenPoint]; -} - -- (void)draggingSession:(NSDraggingSession *)session movedToPoint:(NSPoint)screenPoint{ - [[PSMTabDragAssistant sharedDragAssistant] draggingMovedTo:screenPoint]; - -} - -// NSDraggingDestination -- (NSDragOperation)draggingEntered:(id )sender -{ - if([[[sender draggingPasteboard] types] indexOfObject:@"PSMTabBarControlItemPBType"] != NSNotFound) { - - if ([self delegate] && [[self delegate] respondsToSelector:@selector(tabView:shouldDropTabViewItem:inTabBar:)] && - ![[self delegate] tabView:[[sender draggingSource] tabView] shouldDropTabViewItem:[[[PSMTabDragAssistant sharedDragAssistant] draggedCell] representedObject] inTabBar:self]) { - return NSDragOperationNone; - } - - [[PSMTabDragAssistant sharedDragAssistant] draggingEnteredTabBar:self atPoint:[self convertPoint:[sender draggingLocation] fromView:nil]]; - return NSDragOperationMove; - } - - return NSDragOperationNone; -} - -- (NSDragOperation)draggingUpdated:(id )sender -{ - - if ([[[sender draggingPasteboard] types] indexOfObject:@"PSMTabBarControlItemPBType"] != NSNotFound) { - - if ([self delegate] && [[self delegate] respondsToSelector:@selector(tabView:shouldDropTabViewItem:inTabBar:)] && - ![[self delegate] tabView:[[sender draggingSource] tabView] shouldDropTabViewItem:[[[PSMTabDragAssistant sharedDragAssistant] draggedCell] representedObject] inTabBar:self]) { - return NSDragOperationNone; - } - - [[PSMTabDragAssistant sharedDragAssistant] draggingUpdatedInTabBar:self atPoint:[self convertPoint:[sender draggingLocation] fromView:nil]]; - return NSDragOperationMove; - } - - PSMTabBarCell *cell = [self cellForPoint:[self convertPoint:[sender draggingLocation] fromView:nil] cellFrame:nil]; - if (cell) { - //something that was accepted by the delegate was dragged on - - // Notify the delegate to respond to drag events if supported. This allows custom - // behaviour when dragging certain drag types onto the tab - for example changing the - // view appropriately. - if ([self delegate] && [[self delegate] respondsToSelector:@selector(draggingEvent:enteredTabBar:tabView:)]) { - [[self delegate] draggingEvent:sender enteredTabBar:self tabView:[cell representedObject]]; - } - return NSDragOperationCopy; - } - - return NSDragOperationNone; -} - -- (void)draggingExited:(id )sender -{ - - [[PSMTabDragAssistant sharedDragAssistant] draggingExitedTabBar:self]; -} - -- (BOOL)prepareForDragOperation:(id )sender -{ - //validate the drag operation only if there's a valid tab bar to drop into - return [[[sender draggingPasteboard] types] indexOfObject:@"PSMTabBarControlItemPBType"] == NSNotFound || - [[PSMTabDragAssistant sharedDragAssistant] destinationTabBar] != nil; -} - -- (BOOL)performDragOperation:(id )sender -{ - if ([[[sender draggingPasteboard] types] indexOfObject:@"PSMTabBarControlItemPBType"] != NSNotFound) { - [[PSMTabDragAssistant sharedDragAssistant] performDragOperation]; - } else if ([self delegate] && [[self delegate] respondsToSelector:@selector(tabView:acceptedDraggingInfo:onTabViewItem:)]) { - //forward the drop to the delegate - [[self delegate] tabView:tabView acceptedDraggingInfo:sender onTabViewItem:[[self cellForPoint:[self convertPoint:[sender draggingLocation] fromView:nil] cellFrame:nil] representedObject]]; - } - return YES; -} - -- (void)draggingSession:(NSDraggingSession *)session - endedAtPoint:(NSPoint)screenPoint - operation:(NSDragOperation)operation{ - - [[PSMTabDragAssistant sharedDragAssistant] draggedImageEndedAt:screenPoint operation:operation]; -} - -- (void)concludeDragOperation:(id )sender -{ - -} - -#pragma mark - -#pragma mark Actions - -- (void)overflowMenuAction:(id)sender -{ - NSTabViewItem *tabViewItem = (NSTabViewItem *)[sender representedObject]; - [tabView selectTabViewItem:tabViewItem]; -} - -- (void)closeTabClick:(id)sender -{ - NSTabViewItem *item = [sender representedObject]; - [sender retain]; - if(([_cells count] == 1) && (![self canCloseOnlyTab])) - return; - - if ([[self delegate] respondsToSelector:@selector(tabView:shouldCloseTabViewItem:)]) { - if (![[self delegate] tabView:tabView shouldCloseTabViewItem:item]) { - // fix mouse downed close button - [sender setCloseButtonPressed:NO]; - [sender release]; - return; - } - } - - [item retain]; - - [tabView removeTabViewItem:item]; - [item release]; - [sender release]; -} - -- (void)tabClick:(id)sender -{ - [tabView selectTabViewItem:[sender representedObject]]; -} - -- (void)tabNothing:(id)sender -{ - //[self update]; // takes care of highlighting based on state -} - -- (void)frameDidChange:(NSNotification *)notification -{ - [self _checkWindowFrame]; - - // trying to address the drawing artifacts for the progress indicators - hackery follows - // this one fixes the "blanking" effect when the control hides and shows itself - NSEnumerator *e = [_cells objectEnumerator]; - PSMTabBarCell *cell; - while ( (cell = [e nextObject]) ) { - [[cell indicator] stopAnimation:self]; - - [[cell indicator] performSelector:@selector(startAnimation:) - withObject:nil - afterDelay:0]; - } - - [self update:NO updateTabs:NO]; -} - -- (void)viewDidMoveToWindow -{ - [self _checkWindowFrame]; -} - -- (void)viewWillStartLiveResize -{ - NSEnumerator *e = [_cells objectEnumerator]; - PSMTabBarCell *cell; - while ( (cell = [e nextObject]) ) { - [[cell indicator] stopAnimation:self]; - } - [self setNeedsDisplay:YES]; -} - --(void)viewDidEndLiveResize -{ - NSEnumerator *e = [_cells objectEnumerator]; - PSMTabBarCell *cell; - while ( (cell = [e nextObject]) ) { - [[cell indicator] startAnimation:self]; - } - - [self _checkWindowFrame]; - [self update:NO]; -} - -- (void)resetCursorRects -{ - [super resetCursorRects]; - if ([self orientation] == PSMTabBarVerticalOrientation) { - NSRect frame = [self frame]; - [self addCursorRect:NSMakeRect(frame.size.width - 2, 0, 2, frame.size.height) cursor:[NSCursor resizeLeftRightCursor]]; - } -} - -- (void)windowDidMove:(NSNotification *)aNotification -{ - [self setNeedsDisplay:YES]; -} - -- (void)windowDidUpdate:(NSNotification *)notification -{ - // hide? must readjust things if I'm not supposed to be showing - // this block of code only runs when the app launches - if (!_awakenedFromNib && [self hideForSingleTab] && ([_cells count] <= 1)) { - - // must adjust frames now before display - NSRect myFrame = [self frame]; - if ([self orientation] == PSMTabBarHorizontalOrientation) { - if (partnerView) { - NSRect partnerFrame = [partnerView frame]; - // above or below me? - if (myFrame.origin.y - kPSMTabBarControlHeight > [partnerView frame].origin.y) { - // partner is below me - [self setFrame:NSMakeRect(myFrame.origin.x, myFrame.origin.y + (kPSMTabBarControlHeight - 1), myFrame.size.width, myFrame.size.height - (kPSMTabBarControlHeight - 1))]; - [partnerView setFrame:NSMakeRect(partnerFrame.origin.x, partnerFrame.origin.y, partnerFrame.size.width, partnerFrame.size.height + (kPSMTabBarControlHeight - 1))]; - } else { - // partner is above me - [self setFrame:NSMakeRect(myFrame.origin.x, myFrame.origin.y, myFrame.size.width, myFrame.size.height - (kPSMTabBarControlHeight - 1))]; - [partnerView setFrame:NSMakeRect(partnerFrame.origin.x, partnerFrame.origin.y - (kPSMTabBarControlHeight - 1), partnerFrame.size.width, partnerFrame.size.height + (kPSMTabBarControlHeight - 1))]; - } - [partnerView setNeedsDisplay:YES]; - [self setNeedsDisplay:YES]; - } else { - // for window movement - NSRect windowFrame = [[self window] frame]; - [[self window] setFrame:NSMakeRect(windowFrame.origin.x, windowFrame.origin.y + (kPSMTabBarControlHeight - 1), windowFrame.size.width, windowFrame.size.height - (kPSMTabBarControlHeight - 1)) display:YES]; - [self setFrame:NSMakeRect(myFrame.origin.x, myFrame.origin.y, myFrame.size.width, myFrame.size.height - (kPSMTabBarControlHeight - 1))]; - } - } else { - if (partnerView) { - NSRect partnerFrame = [partnerView frame]; - //to the left or right? - if (myFrame.origin.x < [partnerView frame].origin.x) { - // partner is to the left - [self setFrame:NSMakeRect(myFrame.origin.x, myFrame.origin.y, 1, myFrame.size.height)]; - [partnerView setFrame:NSMakeRect(partnerFrame.origin.x - myFrame.size.width + 1, partnerFrame.origin.y, partnerFrame.size.width + myFrame.size.width - 1, partnerFrame.size.height)]; - } else { - // partner to the right - [self setFrame:NSMakeRect(myFrame.origin.x + myFrame.size.width, myFrame.origin.y, 1, myFrame.size.height)]; - [partnerView setFrame:NSMakeRect(partnerFrame.origin.x, partnerFrame.origin.y, partnerFrame.size.width + myFrame.size.width, partnerFrame.size.height)]; - } - _tabBarWidth = myFrame.size.width; - [partnerView setNeedsDisplay:YES]; - [self setNeedsDisplay:YES]; - } else { - // for window movement - NSRect windowFrame = [[self window] frame]; - [[self window] setFrame:NSMakeRect(windowFrame.origin.x + myFrame.size.width - 1, windowFrame.origin.y, windowFrame.size.width - myFrame.size.width + 1, windowFrame.size.height) display:YES]; - [self setFrame:NSMakeRect(myFrame.origin.x, myFrame.origin.y, 1, myFrame.size.height)]; - } - } - - _isHidden = YES; - - if ([[self delegate] respondsToSelector:@selector(tabView:tabBarDidHide:)]) { - [[self delegate] tabView:[self tabView] tabBarDidHide:self]; - } - - // The above tasks only needs to be run once, so set a flag to ensure that - _awakenedFromNib = YES; - } - - // Determine whether a draw update in response to window state change might be required - BOOL isMainWindow = [[self window] isMainWindow]; - BOOL attachedWindowIsMainWindow = [[[self window] attachedSheet] isMainWindow]; - BOOL isActiveApplication = [NSApp isActive]; - if (_lastWindowIsMainCheck != isMainWindow || _lastAttachedWindowIsMainCheck != attachedWindowIsMainWindow || _lastAppIsActiveCheck != isActiveApplication) { - _lastWindowIsMainCheck = isMainWindow; - _lastAttachedWindowIsMainCheck = attachedWindowIsMainWindow; - _lastAppIsActiveCheck = isActiveApplication; - - // Allow the tab bar to redraw itself in result to window ordering/sheet/etc changes - [self setNeedsDisplay:YES]; - } -} - -#pragma mark - -#pragma mark Menu Validation - -- (BOOL)validateMenuItem:(NSMenuItem *)sender -{ - [sender setState:([[sender representedObject] isEqualTo:[tabView selectedTabViewItem]]) ? NSOnState : NSOffState]; - - return [[self delegate] respondsToSelector:@selector(tabView:validateOverflowMenuItem:forTabViewItem:)] ? - [[self delegate] tabView:[self tabView] validateOverflowMenuItem:sender forTabViewItem:[sender representedObject]] : YES; -} - -#pragma mark - -#pragma mark NSTabView Delegate - -- (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - // here's a weird one - this message is sent before the "tabViewDidChangeNumberOfTabViewItems" - // message, thus I can end up updating when there are no cells, if no tabs were (yet) present - NSInteger tabIndex = [aTabView indexOfTabViewItem:tabViewItem]; - - if ([_cells count] > 0 && tabIndex < (NSInteger)[_cells count]) { - PSMTabBarCell *thisCell = [_cells objectAtIndex:tabIndex]; - if (_alwaysShowActiveTab && [thisCell isInOverflowMenu]) { - - //temporarily disable the delegate in order to move the tab to a different index - id tempDelegate = [aTabView delegate]; - [aTabView setDelegate:nil]; - - // move it all around first - [tabViewItem retain]; - [thisCell retain]; - [aTabView removeTabViewItem:tabViewItem]; - [aTabView insertTabViewItem:tabViewItem atIndex:0]; - [_cells removeObjectAtIndex:tabIndex]; - [_cells insertObject:thisCell atIndex:0]; - [thisCell setIsInOverflowMenu:NO]; //very important else we get a fun recursive loop going - [[_cells objectAtIndex:[_cells count] - 1] setIsInOverflowMenu:YES]; //these 2 lines are pretty uncool and this logic needs to be updated - [thisCell release]; - [tabViewItem release]; - - [aTabView setDelegate:tempDelegate]; - - //reset the selection since removing it changed the selection - [aTabView selectTabViewItem:tabViewItem]; - - [self update]; - } else { - [_controller setSelectedCell:thisCell]; - [self setNeedsDisplay:YES]; - } - } - - if ([[self delegate] respondsToSelector:@selector(tabView:didSelectTabViewItem:)]) { - [[self delegate] performSelector:@selector(tabView:didSelectTabViewItem:) withObject:aTabView withObject:tabViewItem]; - } -} - -- (BOOL)tabView:(NSTabView *)aTabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - if ([[self delegate] respondsToSelector:@selector(tabView:shouldSelectTabViewItem:)]) { - return [[self delegate] tabView:aTabView shouldSelectTabViewItem:tabViewItem]; - } else { - return YES; - } -} -- (void)tabView:(NSTabView *)aTabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - if ([[self delegate] respondsToSelector:@selector(tabView:willSelectTabViewItem:)]) { - [[self delegate] performSelector:@selector(tabView:willSelectTabViewItem:) withObject:aTabView withObject:tabViewItem]; - } -} - -- (void)tabViewDidChangeNumberOfTabViewItems:(NSTabView *)aTabView -{ - NSArray *tabItems = [tabView tabViewItems]; - // go through cells, remove any whose representedObjects are not in [tabView tabViewItems] - NSEnumerator *e = [[[_cells copy] autorelease] objectEnumerator]; - PSMTabBarCell *cell; - while ( (cell = [e nextObject]) ) { - //remove the observer binding - if ([cell representedObject] && ![tabItems containsObject:[cell representedObject]]) { - // see issue #2609 - // -removeTabForCell: comes first to stop the observing that would be triggered in the delegate's call tree - // below and finally caused a crash. - [self removeTabForCell:cell]; - - if ([[self delegate] respondsToSelector:@selector(tabView:didCloseTabViewItem:)]) { - [[self delegate] tabView:aTabView didCloseTabViewItem:[cell representedObject]]; - } - } - } - - // go through tab view items, add cell for any not present - NSMutableArray *cellItems = [self representedTabViewItems]; - NSEnumerator *ex = [tabItems objectEnumerator]; - NSTabViewItem *item; - while ( (item = [ex nextObject]) ) { - if (![cellItems containsObject:item]) { - [self addTabViewItem:item]; - } - } - - // pass along for other delegate responses - if ([[self delegate] respondsToSelector:@selector(tabViewDidChangeNumberOfTabViewItems:)]) { - [[self delegate] performSelector:@selector(tabViewDidChangeNumberOfTabViewItems:) withObject:aTabView]; - } - - // reset cursor tracking for the add tab button if one exists - if ([self addTabButton]) [[self addTabButton] resetCursorRects]; -} - -#pragma mark - -#pragma mark Tooltips - -- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)userData -{ - if ([[self delegate] respondsToSelector:@selector(tabView:toolTipForTabViewItem:)]) { - return [[self delegate] tabView:[self tabView] toolTipForTabViewItem:[[self cellForPoint:point cellFrame:nil] representedObject]]; - } - return nil; -} - -#pragma mark - -#pragma mark Archiving - -- (void)encodeWithCoder:(NSCoder *)aCoder -{ - [super encodeWithCoder:aCoder]; - if ([aCoder allowsKeyedCoding]) { - [aCoder encodeObject:_cells forKey:@"PSMcells"]; - [aCoder encodeObject:tabView forKey:@"PSMtabView"]; - [aCoder encodeObject:_overflowPopUpButton forKey:@"PSMoverflowPopUpButton"]; - [aCoder encodeObject:_addTabButton forKey:@"PSMaddTabButton"]; - [aCoder encodeObject:style forKey:@"PSMstyle"]; - [aCoder encodeInteger:_orientation forKey:@"PSMorientation"]; - [aCoder encodeBool:_canCloseOnlyTab forKey:@"PSMcanCloseOnlyTab"]; - [aCoder encodeBool:_disableTabClose forKey:@"PSMdisableTabClose"]; - [aCoder encodeBool:_hideForSingleTab forKey:@"PSMhideForSingleTab"]; - [aCoder encodeBool:_allowsBackgroundTabClosing forKey:@"PSMallowsBackgroundTabClosing"]; - [aCoder encodeBool:_allowsResizing forKey:@"PSMallowsResizing"]; - [aCoder encodeBool:_selectsTabsOnMouseDown forKey:@"PSMselectsTabsOnMouseDown"]; - [aCoder encodeBool:_showAddTabButton forKey:@"PSMshowAddTabButton"]; - [aCoder encodeBool:_sizeCellsToFit forKey:@"PSMsizeCellsToFit"]; - [aCoder encodeInteger:_cellMinWidth forKey:@"PSMcellMinWidth"]; - [aCoder encodeInteger:_cellMaxWidth forKey:@"PSMcellMaxWidth"]; - [aCoder encodeInteger:_cellOptimumWidth forKey:@"PSMcellOptimumWidth"]; - [aCoder encodeInteger:_currentStep forKey:@"PSMcurrentStep"]; - [aCoder encodeBool:_isHidden forKey:@"PSMisHidden"]; - [aCoder encodeObject:partnerView forKey:@"PSMpartnerView"]; - [aCoder encodeBool:_awakenedFromNib forKey:@"PSMawakenedFromNib"]; - [aCoder encodeObject:_lastMouseDownEvent forKey:@"PSMlastMouseDownEvent"]; - [aCoder encodeObject:delegate forKey:@"PSMdelegate"]; - [aCoder encodeBool:_useOverflowMenu forKey:@"PSMuseOverflowMenu"]; - [aCoder encodeBool:_automaticallyAnimates forKey:@"PSMautomaticallyAnimates"]; - [aCoder encodeBool:_alwaysShowActiveTab forKey:@"PSMalwaysShowActiveTab"]; - } -} - -- (id)initWithCoder:(NSCoder *)aDecoder -{ - self = [super initWithCoder:aDecoder]; - if (self) { - - // Initialization - [self initAddedProperties]; - [self registerForDraggedTypes:@[@"PSMTabBarControlItemPBType"]]; - - if ([aDecoder allowsKeyedCoding]) { - _cells = [[aDecoder decodeObjectForKey:@"PSMcells"] retain]; - tabView = [[aDecoder decodeObjectForKey:@"PSMtabView"] retain]; - _overflowPopUpButton = [[aDecoder decodeObjectForKey:@"PSMoverflowPopUpButton"] retain]; - _addTabButton = [[aDecoder decodeObjectForKey:@"PSMaddTabButton"] retain]; - style = [[aDecoder decodeObjectForKey:@"PSMstyle"] retain]; - _orientation = (PSMTabBarOrientation)[aDecoder decodeIntegerForKey:@"PSMorientation"]; - _canCloseOnlyTab = [aDecoder decodeBoolForKey:@"PSMcanCloseOnlyTab"]; - _disableTabClose = [aDecoder decodeBoolForKey:@"PSMdisableTabClose"]; - _hideForSingleTab = [aDecoder decodeBoolForKey:@"PSMhideForSingleTab"]; - _allowsBackgroundTabClosing = [aDecoder decodeBoolForKey:@"PSMallowsBackgroundTabClosing"]; - _allowsResizing = [aDecoder decodeBoolForKey:@"PSMallowsResizing"]; - _selectsTabsOnMouseDown = [aDecoder decodeBoolForKey:@"PSMselectsTabsOnMouseDown"]; - _showAddTabButton = [aDecoder decodeBoolForKey:@"PSMshowAddTabButton"]; - _sizeCellsToFit = [aDecoder decodeBoolForKey:@"PSMsizeCellsToFit"]; - _cellMinWidth = [aDecoder decodeIntegerForKey:@"PSMcellMinWidth"]; - _cellMaxWidth = [aDecoder decodeIntegerForKey:@"PSMcellMaxWidth"]; - _cellOptimumWidth = [aDecoder decodeIntegerForKey:@"PSMcellOptimumWidth"]; - _currentStep = [aDecoder decodeIntegerForKey:@"PSMcurrentStep"]; - _isHidden = [aDecoder decodeBoolForKey:@"PSMisHidden"]; - partnerView = [[aDecoder decodeObjectForKey:@"PSMpartnerView"] retain]; - _awakenedFromNib = [aDecoder decodeBoolForKey:@"PSMawakenedFromNib"]; - _lastMouseDownEvent = [[aDecoder decodeObjectForKey:@"PSMlastMouseDownEvent"] retain]; - _useOverflowMenu = [aDecoder decodeBoolForKey:@"PSMuseOverflowMenu"]; - _automaticallyAnimates = [aDecoder decodeBoolForKey:@"PSMautomaticallyAnimates"]; - _alwaysShowActiveTab = [aDecoder decodeBoolForKey:@"PSMalwaysShowActiveTab"]; - delegate = [[aDecoder decodeObjectForKey:@"PSMdelegate"] retain]; - } - - // resize - [self setPostsFrameChangedNotifications:YES]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(frameDidChange:) name:NSViewFrameDidChangeNotification object:self]; - } - - [self setTarget:self]; - return self; -} - -#pragma mark - -#pragma mark IB Palette - -- (NSSize)minimumFrameSizeFromKnobPosition:(NSInteger)position -{ - return NSMakeSize(100.0f, 22.0f); -} - -- (NSSize)maximumFrameSizeFromKnobPosition:(NSInteger)knobPosition -{ - return NSMakeSize(10000.0f, 22.0f); -} - -- (void)placeView:(NSRect)newFrame -{ - // this is called any time the view is resized in IB - [self setFrame:newFrame]; - [self update:NO]; -} - -#pragma mark - -#pragma mark Convenience - -- (void)bindPropertiesForCell:(PSMTabBarCell *)cell andTabViewItem:(NSTabViewItem *)item -{ - [self _bindPropertiesForCell:cell andTabViewItem:item]; - - // watch for changes in the identifier - [item addObserver:self forKeyPath:@"identifier" options:0 context:nil]; -} - -- (void)_bindPropertiesForCell:(PSMTabBarCell *)cell andTabViewItem:(NSTabViewItem *)item -{ - // bind the indicator to the represented object's status (if it exists) - [[cell indicator] setHidden:YES]; - if ([item identifier] != nil) { - if ([[[cell representedObject] identifier] respondsToSelector:@selector(isProcessing)]) { - NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary]; - [bindingOptions setObject:NSNegateBooleanTransformerName forKey:@"NSValueTransformerName"]; - [[cell indicator] bind:@"animate" toObject:[item identifier] withKeyPath:@"isProcessing" options:nil]; - [[cell indicator] bind:@"hidden" toObject:[item identifier] withKeyPath:@"isProcessing" options:bindingOptions]; - [[item identifier] addObserver:cell forKeyPath:@"isProcessing" options:0 context:nil]; - } - } - - // bind for the existence of an icon - [cell setHasIcon:NO]; - if ([item identifier] != nil) { - if ([[[cell representedObject] identifier] respondsToSelector:@selector(icon)]) { - NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary]; - [bindingOptions setObject:NSIsNotNilTransformerName forKey:@"NSValueTransformerName"]; - [cell bind:@"hasIcon" toObject:[item identifier] withKeyPath:@"icon" options:bindingOptions]; - [[item identifier] addObserver:cell forKeyPath:@"icon" options:0 context:nil]; - } - } - - // bind for the existence of a counter - [cell setCount:0]; - if ([item identifier] != nil) { - if ([[[cell representedObject] identifier] respondsToSelector:@selector(count)]) { - [cell bind:@"count" toObject:[item identifier] withKeyPath:@"objectCount" options:nil]; - [[item identifier] addObserver:cell forKeyPath:@"objectCount" options:0 context:nil]; - } - } - - // bind for the color of a counter - [cell setCountColor:nil]; - if ([item identifier] != nil) { - if ([[[cell representedObject] identifier] respondsToSelector:@selector(countColor)]) { - [cell bind:@"countColor" toObject:[item identifier] withKeyPath:@"countColor" options:nil]; - [[item identifier] addObserver:cell forKeyPath:@"countColor" options:0 context:nil]; - } - } - - // bind for a large image - [cell setHasLargeImage:NO]; - if ([item identifier] != nil) { - if ([[[cell representedObject] identifier] respondsToSelector:@selector(largeImage)]) { - NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary]; - [bindingOptions setObject:NSIsNotNilTransformerName forKey:@"NSValueTransformerName"]; - [cell bind:@"hasLargeImage" toObject:[item identifier] withKeyPath:@"largeImage" options:bindingOptions]; - [[item identifier] addObserver:cell forKeyPath:@"largeImage" options:0 context:nil]; - } - } - - [cell setIsEdited:NO]; - if ([item identifier] != nil) { - if ([[[cell representedObject] identifier] respondsToSelector:@selector(isEdited)]) { - [cell bind:@"isEdited" toObject:[item identifier] withKeyPath:@"isEdited" options:nil]; - [[item identifier] addObserver:cell forKeyPath:@"isEdited" options:0 context:nil]; - } - } - - // bind my string value to the label on the represented tab - [cell bind:@"title" toObject:item withKeyPath:@"label" options:nil]; - [cell bind:@"backgroundColor" toObject:item withKeyPath:@"color" options:nil]; -} - -- (NSMutableArray *)representedTabViewItems -{ - NSMutableArray *temp = [NSMutableArray arrayWithCapacity:[_cells count]]; - NSEnumerator *e = [_cells objectEnumerator]; - PSMTabBarCell *cell; - while ( (cell = [e nextObject])) { - if ([cell representedObject]) { - [temp addObject:[cell representedObject]]; - } - } - return temp; -} - -- (id)cellForPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame -{ - if ([self orientation] == PSMTabBarHorizontalOrientation && !NSPointInRect(point, [self genericCellRect])) { - return nil; - } - - NSInteger i, cnt = [_cells count]; - for (i = 0; i < cnt; i++) { - PSMTabBarCell *cell = [_cells objectAtIndex:i]; - - if (NSPointInRect(point, [cell frame])) { - if (outFrame) { - *outFrame = [cell frame]; - } - return cell; - } - } - return nil; -} - -- (PSMTabBarCell *)lastVisibleTab -{ - NSInteger i, cellCount = [_cells count]; - for (i = 0; i < cellCount; i++) { - if ([[_cells objectAtIndex:i] isInOverflowMenu]) { - return [_cells objectAtIndex:(i - 1)]; - } - } - return [_cells objectAtIndex:(cellCount - 1)]; -} - -- (NSUInteger)numberOfVisibleTabs -{ - NSUInteger i, cellCount = 0; - PSMTabBarCell *nextCell; - - for (i = 0; i < [_cells count]; i++) { - nextCell = [_cells objectAtIndex:i]; - - if ([nextCell isInOverflowMenu]) { - break; - } - - if (![nextCell isPlaceholder]) { - cellCount++; - } - } - - return cellCount; -} - -#pragma mark - -#pragma mark Accessibility - --(BOOL)isAccessibilityEnabled { - return YES; -} - -// TODO: jcs - this is hardly ever called with any meaningful values, won't fix for the moment - 2020-10-22 -- (id)accessibilityAttributeValue:(NSString *)attribute { - id attributeValue = nil; - if ([attribute isEqualToString: NSAccessibilityRoleAttribute]) { - attributeValue = NSAccessibilityGroupRole; - } else if ([attribute isEqualToString: NSAccessibilityChildrenAttribute]) { - attributeValue = NSAccessibilityUnignoredChildren(_cells); - } else { - attributeValue = [super accessibilityAttributeValue:attribute]; - } - return attributeValue; -} - -- (id)accessibilityHitTest:(NSPoint)point { - id hitTestResult = self; - - NSEnumerator *enumerator = [_cells objectEnumerator]; - PSMTabBarCell *cell = nil; - PSMTabBarCell *highlightedCell = nil; - - while (!highlightedCell && (cell = [enumerator nextObject])) { - if ([cell isHighlighted]) { - highlightedCell = cell; - } - } - - if (highlightedCell) { - hitTestResult = [highlightedCell accessibilityHitTest:point]; - } - - return hitTestResult; -} - -@end diff --git a/Frameworks/PSMTabBar/PSMTabBarController.h b/Frameworks/PSMTabBar/PSMTabBarController.h deleted file mode 100644 index 4389a1368..000000000 --- a/Frameworks/PSMTabBar/PSMTabBarController.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// PSMTabBarController.h -// PSMTabBarControl -// -// Created by Kent Sutherland on 11/24/06. -// Copyright 2006 Kent Sutherland. All rights reserved. -// - -#import - -@class PSMTabBarControl, PSMTabBarCell; - -@interface PSMTabBarController : NSObject -{ - PSMTabBarControl *_control; - NSMutableArray *_cellTrackingRects, *_closeButtonTrackingRects; - NSMutableArray *_cellFrames; - NSRect _addButtonRect; - NSMenu *_overflowMenu; -} - -- (id)initWithTabBarControl:(PSMTabBarControl *)control; - -- (NSRect)addButtonRect; -- (NSMenu *)overflowMenu; -- (NSRect)cellTrackingRectAtIndex:(NSUInteger)anIndex; -- (NSRect)closeButtonTrackingRectAtIndex:(NSUInteger)anIndex; -- (NSRect)cellFrameAtIndex:(NSUInteger)anIndex; - -- (void)setSelectedCell:(PSMTabBarCell *)cell; - -- (void)layoutCells; - -@end - -@interface NSObject (TabRepresentedObjectIdentifierMethods) - -// Method for generating a tooltip for a tab -- (NSString *)tabTitleForTooltip; - -// Retrieving whether a tab is working -- (BOOL)isProcessing; - -@end diff --git a/Frameworks/PSMTabBar/PSMTabBarController.m b/Frameworks/PSMTabBar/PSMTabBarController.m deleted file mode 100644 index 2402b40dc..000000000 --- a/Frameworks/PSMTabBar/PSMTabBarController.m +++ /dev/null @@ -1,670 +0,0 @@ -// -// PSMTabBarController.m -// PSMTabBarControl -// -// Created by Kent Sutherland on 11/24/06. -// Copyright 2006 Kent Sutherland. All rights reserved. -// - -#import "PSMTabBarController.h" -#import "PSMTabBarControl.h" -#import "PSMTabBarCell.h" -#import "PSMTabStyle.h" -#import "NSString_AITruncation.h" -#import "PSMTabDragAssistant.h" - -#define MAX_OVERFLOW_MENUITEM_TITLE_LENGTH 60 - -@interface PSMTabBarController (Private) -- (NSArray *)_generateWidthsFromCells:(NSArray *)cells; -- (void)_setupCells:(NSArray *)cells withWidths:(NSArray *)widths; -@end - -@implementation PSMTabBarController - -/*! - @method initWithTabBarControl: - @abstract Creates a new PSMTabBarController instance. - @discussion Creates a new PSMTabBarController for controlling a PSMTabBarControl. Should only be called by - PSMTabBarControl. - @param A PSMTabBarControl. - @returns A newly created PSMTabBarController instance. -*/ - -- (id)initWithTabBarControl:(PSMTabBarControl *)control -{ - if ( (self = [super init]) ) { - _control = control; - _cellTrackingRects = [[NSMutableArray alloc] init]; - _closeButtonTrackingRects = [[NSMutableArray alloc] init]; - _cellFrames = [[NSMutableArray alloc] init]; - _addButtonRect = NSZeroRect; - } - return self; -} - -- (void)dealloc -{ - [_cellTrackingRects release]; - [_closeButtonTrackingRects release]; - [_cellFrames release]; - [super dealloc]; -} - -/*! - @method addButtonRect - @abstract Returns the position for the add tab button. - @discussion Returns the position for the add tab button. - @returns The rect for the add button rect. -*/ - -- (NSRect)addButtonRect -{ - return _addButtonRect; -} - -/*! - @method overflowMenu - @abstract Returns current overflow menu or nil if there is none. - @discussion Returns current overflow menu or nil if there is none. - @returns The current overflow menu. -*/ - -- (NSMenu *)overflowMenu -{ - return _overflowMenu; -} - -/*! - @method cellTrackingRectAtIndex: - @abstract Returns the rect for the tracking rect at the requested index. - @discussion Returns the rect for the tracking rect at the requested index. - @param Index of a cell. - @returns The tracking rect of the cell at the requested index. -*/ - -- (NSRect)cellTrackingRectAtIndex:(NSUInteger)anIndex -{ - NSRect rect; - if (anIndex < [_cellTrackingRects count]) { - rect = [[_cellTrackingRects objectAtIndex:anIndex] rectValue]; - } else { - NSLog(@"cellTrackingRectAtIndex: Invalid index (%lu)", (unsigned long)anIndex); - rect = NSZeroRect; - } - return rect; -} - -/*! - @method closeButtonTrackingRectAtIndex: - @abstract Returns the tracking rect for the close button at the requested index. - @discussion Returns the tracking rect for the close button at the requested index. - @param Index of a cell. - @returns The close button tracking rect of the cell at the requested index. -*/ - -- (NSRect)closeButtonTrackingRectAtIndex:(NSUInteger)anIndex -{ - NSRect rect; - if (anIndex < [_closeButtonTrackingRects count]) { - rect = [[_closeButtonTrackingRects objectAtIndex:anIndex] rectValue]; - } else { - NSLog(@"closeButtonTrackingRectAtIndex: Invalid index (%lu)", (unsigned long)anIndex); - rect = NSZeroRect; - } - return rect; -} - -/*! - @method cellFrameAtIndex: - @abstract Returns the frame for the cell at the requested index. - @discussion Returns the frame for the cell at the requested index. - @param Index of a cell. - @returns The frame of the cell at the requested index. -*/ - -- (NSRect)cellFrameAtIndex:(NSUInteger)anIndex -{ - NSRect rect; - - if (anIndex < [_cellFrames count]) { - rect = [[_cellFrames objectAtIndex:anIndex] rectValue]; - } else { - NSLog(@"cellFrameAtIndex: Invalid index (%lu)", (unsigned long)anIndex); - rect = NSZeroRect; - } - return rect; -} - -/*! - @method setSelectedCell: - @abstract Changes the cell states so the given cell is the currently selected cell. - @discussion Makes the given cell the active cell and properly recalculates the tab states for surrounding cells. - @param An instance of PSMTabBarCell to make active. -*/ - -- (void)setSelectedCell:(PSMTabBarCell *)cell -{ - NSArray *cells = [_control cells]; - NSEnumerator *enumerator = [cells objectEnumerator]; - PSMTabBarCell *lastCell = nil, *nextCell; - - //deselect the previously selected tab - while ( (nextCell = [enumerator nextObject]) && ([nextCell state] == NSOffState) ) { - lastCell = nextCell; - } - - [nextCell setState:NSOffState]; - [nextCell setTabState:PSMTab_PositionMiddleMask]; - - if (lastCell && lastCell != [_control lastVisibleTab]) { - [lastCell setTabState:~[lastCell tabState] & PSMTab_RightIsSelectedMask]; - } - - if ( (nextCell = [enumerator nextObject]) ) { - [nextCell setTabState:~[lastCell tabState] & PSMTab_LeftIsSelectedMask]; - } - - [cell setState:NSOnState]; - [cell setTabState:PSMTab_SelectedMask]; - - if (![cell isInOverflowMenu]) { - NSUInteger cellIndex = [cells indexOfObject:cell]; - - if (cellIndex > 0) { - nextCell = [cells objectAtIndex:cellIndex - 1]; - [nextCell setTabState:[nextCell tabState] | PSMTab_RightIsSelectedMask]; - } - - if (cellIndex < [cells count] - 1) { - nextCell = [cells objectAtIndex:cellIndex + 1]; - [nextCell setTabState:[nextCell tabState] | PSMTab_LeftIsSelectedMask]; - } - } -} - -/*! - @method layoutCells - @abstract Recalculates cell positions and states. - @discussion This method calculates the proper frame, tabState and overflow menu status for all cells in the - tab bar control. -*/ - -- (void)layoutCells -{ - NSArray *cells = [_control cells]; - NSInteger cellCount = [cells count]; - - // make sure all of our tabs are accounted for before updating, - // or only proceed if a drag is in progress (where counts may mismatch) - if ([[_control tabView] numberOfTabViewItems] != cellCount && ![[PSMTabDragAssistant sharedDragAssistant] isDragging]) { - return; - } - - // - [_cellTrackingRects removeAllObjects]; - [_closeButtonTrackingRects removeAllObjects]; - [_cellFrames removeAllObjects]; - - NSArray *cellWidths = [self _generateWidthsFromCells:cells]; - [self _setupCells:cells withWidths:cellWidths]; - - //set up the rect from the add tab button - _addButtonRect = [_control genericCellRect]; - _addButtonRect.size = [[_control addTabButton] frame].size; - if ([_control orientation] == PSMTabBarHorizontalOrientation) { - _addButtonRect.origin.y = MARGIN_Y; - _addButtonRect.origin.x += [[cellWidths valueForKeyPath:@"@sum.floatValue"] floatValue] + MARGIN_X; - } else { - _addButtonRect.origin.x = 0; - _addButtonRect.origin.y = [[cellWidths lastObject] floatValue]; - } -} - -/*! - * @method _shrinkWidths:towardMinimum:withAvailableWidth: - * @abstract Decreases widths in an array toward a minimum until they fit within availableWidth, if possible - * @param An array of NSNumbers - * @param The target minimum - * @param The maximum available width - * @returns The amount by which the total array width was shrunk - */ -- (NSInteger)_shrinkWidths:(NSMutableArray *)newWidths towardMinimum:(NSInteger)minimum withAvailableWidth:(CGFloat)availableWidth -{ - BOOL changed = NO; - NSInteger count = [newWidths count]; - NSInteger totalWidths = [[newWidths valueForKeyPath:@"@sum.intValue"] integerValue]; - NSInteger originalTotalWidths = totalWidths; - - do { - changed = NO; - - NSInteger q = 0; - for (q = (count - 1); q >= 0; q--) { - CGFloat cellWidth = [[newWidths objectAtIndex:q] floatValue]; - if (cellWidth - 1 >= minimum) { - cellWidth--; - totalWidths--; - - [newWidths replaceObjectAtIndex:q - withObject:[NSNumber numberWithDouble:cellWidth]]; - - changed = YES; - } - } - - } while (changed && (totalWidths > availableWidth)); - - return (originalTotalWidths - totalWidths); -} - -/*! - * @function potentialMinimumForArray() - * @abstract Calculate the minimum total for a given array of widths - * @discussion The array is summed using, for each item, the minimum between the current value and the passed minimum value. - * This is useful for getting a sum if the array has size-to-fit widths which will be allowed to be less than the - * specified minimum. - * @param An array of widths - * @param The minimum - * @returns The smallest possible sum for the array - */ -static NSInteger potentialMinimumForArray(NSArray *array, NSInteger minimum) -{ - NSInteger runningTotal = 0; - NSInteger count = [array count]; - - NSInteger i = 0; - for (i = 0; i < count; i++) { - NSInteger currentValue = [[array objectAtIndex:i] integerValue]; - runningTotal += MIN(currentValue, minimum); - } - - return runningTotal; -} - -/*! - @method _generateWidthsFromCells: - @abstract Calculates the width of cells that would be visible. - @discussion Calculates the width of cells in the tab bar and returns an array of widths for the cells that would be - visible. Uses large blocks of code that were previously in PSMTabBarControl's update method. - @param An array of PSMTabBarCells. - @returns An array of numbers representing the widths of cells that would be visible. -*/ - -- (NSArray *)_generateWidthsFromCells:(NSArray *)cells -{ - NSInteger cellCount = [cells count], i, numberOfVisibleCells = ([_control orientation] == PSMTabBarHorizontalOrientation) ? 1 : 0; - NSMutableArray *newWidths = [NSMutableArray arrayWithCapacity:cellCount]; - id style = [_control style]; - CGFloat availableWidth = [_control availableCellWidth], currentOrigin = 0, totalOccupiedWidth = 0.0f, width; - NSRect cellRect = [_control genericCellRect], controlRect = [_control frame]; - PSMTabBarCell *currentCell; - - if ([_control orientation] == PSMTabBarVerticalOrientation) { - currentOrigin = [style topMarginForTabBarControl]; - } - - //Don't let cells overlap the add tab button if it is visible - if ([_control showAddTabButton]) { - availableWidth -= [self addButtonRect].size.width; - } - - for (i = 0; i < cellCount; i++) { - currentCell = [cells objectAtIndex:i]; - - // supress close button? - [currentCell setCloseButtonSuppressed:((cellCount == 1 && [_control canCloseOnlyTab] == NO) || - [_control disableTabClose] || - ([[_control delegate] respondsToSelector:@selector(tabView:disableTabCloseForTabViewItem:)] && - [[_control delegate] tabView:[_control tabView] disableTabCloseForTabViewItem:[currentCell representedObject]]))]; - - if ([_control orientation] == PSMTabBarHorizontalOrientation) { - // Determine cell width - if ([_control sizeCellsToFit]) { - width = [currentCell desiredWidthOfCell]; - if (width > [_control cellMaxWidth]) { - width = [_control cellMaxWidth]; - } - } else { - width = [_control cellOptimumWidth]; - } - - width = ceilf(width); - - //check to see if there is not enough space to place all tabs as preferred - if (totalOccupiedWidth + width >= availableWidth) { - //There's not enough space to add currentCell at its preferred width! - - //If we're not going to use the overflow menu, cram all the tab cells into the bar regardless of minimum width - if (![_control useOverflowMenu]) { - NSInteger j, averageWidth = (availableWidth / cellCount); - - numberOfVisibleCells = cellCount; - [newWidths removeAllObjects]; - - for (j = 0; j < cellCount; j++) { - CGFloat desiredWidth = [[cells objectAtIndex:j] desiredWidthOfCell]; - [newWidths addObject:[NSNumber numberWithDouble:(desiredWidth < averageWidth && [_control sizeCellsToFit]) ? desiredWidth : averageWidth]]; - } - - totalOccupiedWidth = [[newWidths valueForKeyPath:@"@sum.intValue"] integerValue]; - break; - } - - //We'll be using the overflow menu if needed. - numberOfVisibleCells = i; - if ([_control sizeCellsToFit]) { - BOOL remainingCellsMustGoToOverflow = NO; - - totalOccupiedWidth = [[newWidths valueForKeyPath:@"@sum.intValue"] integerValue]; - - /* Can I squeeze it in without violating min cell width? This is the width we would take up - * if every cell so far were at the control minimum size (or their current size if that is less than the control minimum). - */ - if ((potentialMinimumForArray(newWidths, [_control cellMinWidth]) + MIN(width, [_control cellMinWidth])) <= availableWidth) { - /* It's definitely possible for cells so far to be visible. - * Shrink other cells to allow this one to fit - */ - NSInteger cellMinWidth = [_control cellMinWidth]; - - /* Start off adding it to the array; we know that it will eventually fit because - * (the potential minimum <= availableWidth) - * - * This allows average and minimum aggregates on the NSArray to work. - */ - [newWidths addObject:[NSNumber numberWithDouble:width]]; - numberOfVisibleCells++; - - totalOccupiedWidth += width; - - //First, try to shrink tabs toward the average. Tabs smaller than average won't change - totalOccupiedWidth -= [self _shrinkWidths:newWidths - towardMinimum:[[newWidths valueForKeyPath:@"@avg.intValue"] integerValue] - withAvailableWidth:availableWidth]; - - - - if (totalOccupiedWidth > availableWidth) { - //Next, shrink tabs toward the smallest of the existing tabs. The smallest tab won't change. - NSInteger smallestTabWidth = [[newWidths valueForKeyPath:@"@min.intValue"] integerValue]; - if (smallestTabWidth > cellMinWidth) { - totalOccupiedWidth -= [self _shrinkWidths:newWidths - towardMinimum:smallestTabWidth - withAvailableWidth:availableWidth]; - } - } - - if (totalOccupiedWidth > availableWidth) { - //Finally, shrink tabs toward the imposed minimum size. All tabs larger than the minimum wll change. - totalOccupiedWidth -= [self _shrinkWidths:newWidths - towardMinimum:cellMinWidth - withAvailableWidth:availableWidth]; - } - - if (totalOccupiedWidth > availableWidth) { - NSLog(@"**** -[PSMTabBarController generateWidthsFromCells:] This is a failure (available %f, total %f, width is %f)", - availableWidth, totalOccupiedWidth, width); - remainingCellsMustGoToOverflow = YES; - } - - if (totalOccupiedWidth < availableWidth) { - /* We're not using all available space not but exceeded available width before; - * stretch all cells to fully fit the bar - */ - NSInteger leftoverWidth = availableWidth - totalOccupiedWidth; - if (leftoverWidth > 0) { - NSInteger q; - for (q = numberOfVisibleCells - 1; q >= 0; q--) { - NSInteger desiredAddition = (NSInteger)leftoverWidth / (q + 1); - NSInteger newCellWidth = (NSInteger)[[newWidths objectAtIndex:q] doubleValue] + desiredAddition; - [newWidths replaceObjectAtIndex:q withObject:[NSNumber numberWithDouble:newCellWidth]]; - leftoverWidth -= desiredAddition; - totalOccupiedWidth += desiredAddition; - } - } - } - - } else { - // stretch - distribute leftover room among cells, since we can't add this cell - NSInteger leftoverWidth = availableWidth - totalOccupiedWidth; - NSInteger q; - for (q = i - 1; q >= 0; q--) { - NSInteger desiredAddition = (NSInteger)leftoverWidth / (q + 1); - NSInteger newCellWidth = (NSInteger)[[newWidths objectAtIndex:q] doubleValue] + desiredAddition; - [newWidths replaceObjectAtIndex:q withObject:[NSNumber numberWithDouble:newCellWidth]]; - leftoverWidth -= desiredAddition; - } - - remainingCellsMustGoToOverflow = YES; - } - - // done assigning widths; remaining cells go in overflow menu - if (remainingCellsMustGoToOverflow) { - break; - } - - } else { - //We're not using size-to-fit - NSInteger revisedWidth = availableWidth / (i + 1); - if (revisedWidth >= [_control cellMinWidth]) { - NSUInteger q; - totalOccupiedWidth = 0; - - for (q = 0; q < [newWidths count]; q++) { - [newWidths replaceObjectAtIndex:q withObject:[NSNumber numberWithDouble:revisedWidth]]; - totalOccupiedWidth += revisedWidth; - } - // just squeezed this one in... - [newWidths addObject:[NSNumber numberWithDouble:revisedWidth]]; - totalOccupiedWidth += revisedWidth; - numberOfVisibleCells++; - } else { - // couldn't fit that last one... - break; - } - } - } else { - //(totalOccupiedWidth < availableWidth) - numberOfVisibleCells = cellCount; - [newWidths addObject:[NSNumber numberWithDouble:width]]; - totalOccupiedWidth += width; - } - - } else { - //lay out vertical tabs - if (currentOrigin + cellRect.size.height <= controlRect.size.height) { - [newWidths addObject:[NSNumber numberWithDouble:currentOrigin]]; - numberOfVisibleCells++; - currentOrigin += cellRect.size.height; - } else { - //out of room, the remaining tabs go into overflow - if ([newWidths count] > 0 && controlRect.size.height - currentOrigin < 17) { - [newWidths removeLastObject]; - numberOfVisibleCells--; - } - break; - } - } - } - - //make sure there are at least two items in the horizontal tab bar - if ([_control orientation] == PSMTabBarHorizontalOrientation) { - if (numberOfVisibleCells < 2 && [cells count] > 1) { - PSMTabBarCell *cell1 = [cells objectAtIndex:0], *cell2 = [cells objectAtIndex:1]; - NSNumber *cellWidth; - - [newWidths removeAllObjects]; - totalOccupiedWidth = 0; - - cellWidth = [NSNumber numberWithDouble:[cell1 desiredWidthOfCell] < availableWidth * 0.5f ? [cell1 desiredWidthOfCell] : availableWidth * 0.5f]; - [newWidths addObject:cellWidth]; - totalOccupiedWidth += [cellWidth floatValue]; - - cellWidth = [NSNumber numberWithDouble:[cell2 desiredWidthOfCell] < (availableWidth - totalOccupiedWidth) ? [cell2 desiredWidthOfCell] : (availableWidth - totalOccupiedWidth)]; - [newWidths addObject:cellWidth]; - totalOccupiedWidth += [cellWidth floatValue]; - - if (totalOccupiedWidth < availableWidth) { - [newWidths replaceObjectAtIndex:0 withObject:[NSNumber numberWithDouble:availableWidth - [cellWidth doubleValue]]]; - } - - numberOfVisibleCells = 2; - } - } - - return newWidths; -} - -/*! - @method _setupCells:withWidths - @abstract Creates tracking rect arrays and sets the frames of the visible cells. - @discussion Creates tracking rect arrays and sets the cells given in the widths array. -*/ - -- (void)_setupCells:(NSArray *)cells withWidths:(NSArray *)widths -{ - NSUInteger i, tabState, cellCount = [cells count]; - NSRect cellRect = [_control genericCellRect]; - PSMTabBarCell *cell; - NSTabViewItem *selectedTabViewItem = [[_control tabView] selectedTabViewItem]; - NSMenuItem *menuItem; - - [_overflowMenu release]; - _overflowMenu = nil; - - for (i = 0; i < cellCount; i++) { - cell = [cells objectAtIndex:i]; - - if (i < [widths count]) { - tabState = 0; - - // set cell frame - if ([_control orientation] == PSMTabBarHorizontalOrientation) { - cellRect.size.width = [[widths objectAtIndex:i] floatValue]; - } else { - cellRect.size.width = [_control frame].size.width; - cellRect.origin.y = [[widths objectAtIndex:i] floatValue]; - cellRect.origin.x = 0; - } - - [_cellFrames addObject:[NSValue valueWithRect:cellRect]]; - - //add tracking rects to arrays - [_closeButtonTrackingRects addObject:[NSValue valueWithRect:[cell closeButtonRectForFrame:cellRect]]]; - [_cellTrackingRects addObject:[NSValue valueWithRect:cellRect]]; - - if ([[cell representedObject] isEqualTo:selectedTabViewItem]) { - [cell setState:NSOnState]; - tabState |= PSMTab_SelectedMask; - // previous cell - if (i > 0) { - [[cells objectAtIndex:i - 1] setTabState:([(PSMTabBarCell *)[cells objectAtIndex:i - 1] tabState] | PSMTab_RightIsSelectedMask)]; - } - // next cell - see below - } else { - [cell setState:NSOffState]; - // see if prev cell was selected - if ( (i > 0) && ([[cells objectAtIndex:i - 1] state] == NSOnState) ) { - tabState |= PSMTab_LeftIsSelectedMask; - } - } - - // more tab states - if ([widths count] == 1) { - tabState |= PSMTab_PositionLeftMask | PSMTab_PositionRightMask | PSMTab_PositionSingleMask; - } else if (i == 0) { - tabState |= PSMTab_PositionLeftMask; - } else if (i == [widths count] - 1) { - tabState |= PSMTab_PositionRightMask; - } - - [cell setTabState:tabState]; - [cell setIsInOverflowMenu:NO]; - - // indicator - if (![[cell indicator] isHidden] && ![_control isTabBarHidden]) { - if (![[_control subviews] containsObject:[cell indicator]]) { - [_control addSubview:[cell indicator]]; - [[cell indicator] startAnimation:self]; - } - } - - // next... - cellRect.origin.x += [[widths objectAtIndex:i] floatValue]; - } else { - [cell setState:NSOffState]; - [cell setIsInOverflowMenu:YES]; - [[cell indicator] removeFromSuperview]; - - //position the cell well offscreen - if ([_control orientation] == PSMTabBarHorizontalOrientation) { - cellRect.origin.x += [[_control style] rightMarginForTabBarControl] + 20; - } else { - cellRect.origin.y = [_control frame].size.height + 2; - } - - [_cellFrames addObject:[NSValue valueWithRect:cellRect]]; - - if (_overflowMenu == nil) { - _overflowMenu = [[NSMenu alloc] init]; - [_overflowMenu insertItemWithTitle:@"" action:nil keyEquivalent:@"" atIndex:0]; // Because the overflowPupUpButton is a pull down menu - [_overflowMenu setDelegate:self]; - } - - // Each item's title is limited to 60 characters. If more than 60 characters, use an ellipsis to indicate that more exists. - menuItem = [_overflowMenu addItemWithTitle:[[[cell attributedStringValue] string] stringWithEllipsisByTruncatingToLength:MAX_OVERFLOW_MENUITEM_TITLE_LENGTH] - action:@selector(overflowMenuAction:) - keyEquivalent:@""]; - [menuItem setTarget:_control]; - [menuItem setRepresentedObject:[cell representedObject]]; - if([[[cell representedObject] identifier] respondsToSelector:@selector(tabTitleForTooltip)]) - [menuItem setToolTip:[[[cell representedObject] identifier] tabTitleForTooltip]]; - if ([cell count] > 0) { - [menuItem setTitle:[[menuItem title] stringByAppendingFormat:@" (%lu)", (unsigned long)[cell count]]]; - } - } - } -} - -- (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)menuItem atIndex:(NSInteger)anIndex shouldCancel:(BOOL)shouldCancel -{ - if (menu == _overflowMenu) { - if ([[[menuItem representedObject] identifier] respondsToSelector:@selector(icon)]) { - [menuItem setImage:[[[menuItem representedObject] identifier] valueForKey:@"icon"]]; - } - } - - return YES; -} - -- (NSInteger)numberOfItemsInMenu:(NSMenu *)menu -{ - if (menu == _overflowMenu) { - return [_overflowMenu numberOfItems]; - - } else { - NSLog(@"Warning: Unexpected menu delegate call for menu %@",menu); - return 0; - } -} - -@end - -/* -PSMTabBarController will store what the current tab frame state should be like based off the last layout. PSMTabBarControl -has to handle fetching the new frame and then changing the tab cell frame. - Tab states will probably be changed immediately. - -Tabs that aren't going to be visible need to have their frame set offscreen. Treat them as if they were visible. - -The overflow menu is rebuilt and stored by the controller. - -Arrays of tracking rects will be created here, but not applied. - Tracking rects are removed and added by PSMTabBarControl at the end of an animate/display cycle. - -The add tab button frame is handled by this controller. Visibility and location are set by the control. - -isInOverflowMenu should probably be removed in favor of a call that returns yes/no to if a cell is in overflow. (Not yet implemented) - -Still need to rewrite most of the code in PSMTabDragAssistant. -*/ diff --git a/Frameworks/PSMTabBar/PSMTabDragAssistant.h b/Frameworks/PSMTabBar/PSMTabDragAssistant.h deleted file mode 100644 index 92a8d4d8d..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragAssistant.h +++ /dev/null @@ -1,103 +0,0 @@ -// -// PSMTabDragAssistant.h -// PSMTabBarControl -// -// Created by John Pannell on 4/10/06. -// Copyright 2006 Positive Spin Media. All rights reserved. -// - -/* - This class is a sigleton that manages the details of a tab drag and drop. The details were beginning to overwhelm me when keeping all of this in the control and cells :-) - */ - -#import -#import "PSMTabBarControl.h" - -#define kPSMTabDragAnimationSteps 8 - -@class PSMTabBarCell, PSMTabDragWindowController; - -@interface PSMTabDragAssistant : NSObject { - PSMTabBarControl *_sourceTabBar; - PSMTabBarControl *_destinationTabBar; - NSMutableSet *_participatingTabBars; - PSMTabBarCell *_draggedCell; - NSInteger _draggedCellIndex; // for snap back - BOOL _isDragging; - - // Support for dragging into new windows - PSMTabDragWindowController *_draggedTab, *_draggedView; - NSSize _dragWindowOffset; - NSTimer *_fadeTimer; - BOOL _centersDragWindows; - PSMTabBarTearOffStyle _currentTearOffStyle; - - // Animation - NSTimer *_animationTimer; - NSMutableArray *_sineCurveWidths; - NSPoint _currentMouseLoc; - PSMTabBarCell *_targetCell; -} - -// Creation/destruction -+ (PSMTabDragAssistant *)sharedDragAssistant; - -// Accessors -- (PSMTabBarControl *)sourceTabBar; -- (void)setSourceTabBar:(PSMTabBarControl *)tabBar; -- (PSMTabBarControl *)destinationTabBar; -- (void)setDestinationTabBar:(PSMTabBarControl *)tabBar; -- (PSMTabBarCell *)draggedCell; -- (void)setDraggedCell:(PSMTabBarCell *)cell; -- (NSInteger)draggedCellIndex; -- (void)setDraggedCellIndex:(NSInteger)value; -- (BOOL)isDragging; -- (void)setIsDragging:(BOOL)value; -- (NSPoint)currentMouseLoc; -- (void)setCurrentMouseLoc:(NSPoint)point; -- (PSMTabBarCell *)targetCell; -- (void)setTargetCell:(PSMTabBarCell *)cell; - -// Functionality -- (void)startDraggingCell:(PSMTabBarCell *)cell fromTabBar:(PSMTabBarControl *)control withMouseDownEvent:(NSEvent *)event; -- (void)draggingEnteredTabBar:(PSMTabBarControl *)control atPoint:(NSPoint)mouseLoc; -- (void)draggingUpdatedInTabBar:(PSMTabBarControl *)control atPoint:(NSPoint)mouseLoc; -- (void)draggingExitedTabBar:(PSMTabBarControl *)control; -- (void)performDragOperation; -- (void)draggedImageEndedAt:(NSPoint)aPoint operation:(NSDragOperation)operation; -- (void)finishDrag; - -- (void)draggingBeganAt:(NSPoint)aPoint; -- (void)draggingMovedTo:(NSPoint)aPoint; - -- (void)fadeInDragWindow:(NSTimer *)timer; -- (void)fadeOutDragWindow:(NSTimer *)timer; - -// Animation -- (void)animateDrag:(NSTimer *)timer; -- (void)calculateDragAnimationForTabBar:(PSMTabBarControl *)control; - -// Placeholder -- (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control withDraggedCell:(PSMTabBarCell *)cell; -- (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control; -- (void)removeAllPlaceholdersFromTabBar:(PSMTabBarControl *)control; - -@end - -@interface PSMTabBarControl (DragAccessors) - -- (id)style; -- (NSMutableArray *)cells; -- (void)setControlView:(id)view; -- (id)cellForPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame; -- (PSMTabBarCell *)lastVisibleTab; -- (NSUInteger)numberOfVisibleTabs; - -@end - -void CGContextCopyWindowCaptureContentsToRect(void *grafport, CGRect rect, NSInteger cid, NSInteger wid, NSInteger zero); -OSStatus CGSSetWindowTransform(NSInteger cid, NSInteger wid, CGAffineTransform transform); - -@interface NSApplication (CoreGraphicsUndocumented) -- (NSInteger)contextID; -@end diff --git a/Frameworks/PSMTabBar/PSMTabDragAssistant.m b/Frameworks/PSMTabBar/PSMTabDragAssistant.m deleted file mode 100644 index 12489f0bb..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragAssistant.m +++ /dev/null @@ -1,1009 +0,0 @@ -// -// PSMTabDragAssistant.m -// PSMTabBarControl -// -// Created by John Pannell on 4/10/06. -// Copyright 2006 Positive Spin Media. All rights reserved. -// - -#import "PSMTabDragAssistant.h" -#import "PSMTabBarCell.h" -#import "PSMTabStyle.h" -#import "PSMTabDragWindowController.h" - -#define PI 3.1417 - -@interface PSMTabBarControl (Private) -- (void)update:(BOOL)animate; -@end - -@interface PSMTabDragAssistant (Private) -- (NSImage *)_imageForViewOfCell:(PSMTabBarCell *)cell styleMask:(NSUInteger *)outMask; -- (NSImage *)_miniwindowImageOfWindow:(NSWindow *)window; -- (void)_expandWindow:(NSWindow *)window atPoint:(NSPoint)point; -- (void)_expandWindowTimerFired:(NSTimer *)timer; -@end - -@implementation PSMTabDragAssistant - -static PSMTabDragAssistant *sharedDragAssistant = nil; - -#pragma mark - -#pragma mark Creation/Destruction - -+ (PSMTabDragAssistant *)sharedDragAssistant -{ - if (!sharedDragAssistant) { - sharedDragAssistant = [[PSMTabDragAssistant alloc] init]; - } - - return sharedDragAssistant; -} - -- (id)init -{ - if ( (self = [super init]) ) { - _sourceTabBar = nil; - _destinationTabBar = nil; - _participatingTabBars = [[NSMutableSet alloc] init]; - _draggedCell = nil; - _animationTimer = nil; - _sineCurveWidths = [[NSMutableArray alloc] initWithCapacity:kPSMTabDragAnimationSteps]; - _targetCell = nil; - _isDragging = NO; - } - - return self; -} - -- (void)dealloc -{ - [_sourceTabBar release]; - [_destinationTabBar release]; - [_participatingTabBars release]; - [_draggedCell release]; - [_animationTimer release]; - [_sineCurveWidths release]; - [_targetCell release]; - [super dealloc]; -} - -#pragma mark - -#pragma mark Accessors - -- (PSMTabBarControl *)sourceTabBar -{ - return _sourceTabBar; -} - -- (void)setSourceTabBar:(PSMTabBarControl *)tabBar -{ - [tabBar retain]; - [_sourceTabBar release]; - _sourceTabBar = tabBar; -} - -- (PSMTabBarControl *)destinationTabBar -{ - return _destinationTabBar; -} - -- (void)setDestinationTabBar:(PSMTabBarControl *)tabBar -{ - [tabBar retain]; - [_destinationTabBar release]; - _destinationTabBar = tabBar; -} - -- (PSMTabBarCell *)draggedCell -{ - return _draggedCell; -} - -- (void)setDraggedCell:(PSMTabBarCell *)cell -{ - [cell retain]; - [_draggedCell release]; - _draggedCell = cell; -} - -- (NSInteger)draggedCellIndex -{ - return _draggedCellIndex; -} - -- (void)setDraggedCellIndex:(NSInteger)value -{ - _draggedCellIndex = value; -} - -- (BOOL)isDragging -{ - return _isDragging; -} - -- (void)setIsDragging:(BOOL)value -{ - _isDragging = value; -} - -- (NSPoint)currentMouseLoc -{ - return _currentMouseLoc; -} - -- (void)setCurrentMouseLoc:(NSPoint)point -{ - _currentMouseLoc = point; -} - -- (PSMTabBarCell *)targetCell -{ - return _targetCell; -} - -- (void)setTargetCell:(PSMTabBarCell *)cell -{ - [cell retain]; - [_targetCell release]; - _targetCell = cell; -} - -#pragma mark - -#pragma mark Functionality - -- (void)startDraggingCell:(PSMTabBarCell *)cell fromTabBar:(PSMTabBarControl *)control withMouseDownEvent:(NSEvent *)event -{ - - // Ensure the window is frontmost - [[control window] makeKeyAndOrderFront:self]; - - [self setIsDragging:YES]; - [self setSourceTabBar:control]; - [self setDestinationTabBar:control]; - [_participatingTabBars addObject:control]; - [self setDraggedCell:cell]; - [self setDraggedCellIndex:[[control cells] indexOfObject:cell]]; - - NSRect cellFrame = [cell frame]; - - // Generate a list of widths for animation - NSInteger i; - CGFloat cellStepSize = ([control orientation] == PSMTabBarHorizontalOrientation) ? (cellFrame.size.width + 6) : (cellFrame.size.height + 1); - for (i = 0; i < kPSMTabDragAnimationSteps - 1; i++) { - NSInteger thisWidth = (NSInteger)(cellStepSize - ((cellStepSize/2.0) + ((sin((PI/2.0) + ((CGFloat)i/(CGFloat)kPSMTabDragAnimationSteps)*PI) * cellStepSize) / 2.0))); - [_sineCurveWidths addObject:[NSNumber numberWithInteger:thisWidth]]; - } - [_sineCurveWidths addObject:[NSNumber numberWithInteger:([control orientation] == PSMTabBarHorizontalOrientation) ? cellFrame.size.width : cellFrame.size.height]]; - - // hide UI buttons - [[control overflowPopUpButton] setHidden:YES]; - [[control addTabButton] setHidden:YES]; - - [[NSCursor closedHandCursor] set]; - - NSPasteboard *pboard; - if (@available(macOS 10.13, *)) { - pboard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag]; - } else { - pboard = [NSPasteboard pasteboardWithName:NSDragPboard]; - } - NSImage *dragImage = [cell dragImage]; - [[cell indicator] removeFromSuperview]; - [self distributePlaceholdersInTabBar:control withDraggedCell:cell]; - - if ([control isFlipped]) { - cellFrame.origin.y += cellFrame.size.height; - } - [cell setHighlighted:NO]; - NSSize offset = NSZeroSize; - [pboard declareTypes:@[@"PSMTabBarControlItemPBType"] owner:nil]; - [pboard setString:[[NSNumber numberWithInteger:[[control cells] indexOfObject:cell]] stringValue] forType:@"PSMTabBarControlItemPBType"]; - _animationTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0/30.0) target:self selector:@selector(animateDrag:) userInfo:nil repeats:YES]; - - [[NSNotificationCenter defaultCenter] postNotificationName:PSMTabDragDidBeginNotification object:nil]; - - //retain the control in case the drag operation causes the control to be released - [control retain]; - - //TODO: jcs - fixing deprecated dragImage needs a DraggingItems and DragginSource. Beyond me. 2020-10-22 - if ([control delegate] && [[control delegate] respondsToSelector:@selector(tabView:shouldDropTabViewItem:inTabBar:)] && - [[control delegate] tabView:[control tabView] shouldDropTabViewItem:[[self draggedCell] representedObject] inTabBar:nil]) { - _currentTearOffStyle = [control tearOffStyle]; - _draggedTab = [[PSMTabDragWindowController alloc] initWithImage:dragImage styleMask:NSBorderlessWindowMask tearOffStyle:_currentTearOffStyle initialAlpha:[control usesSafariStyleDragging]?1:kPSMTabDragWindowAlpha]; - - cellFrame.origin.y -= cellFrame.size.height; - [control dragImage:[[[NSImage alloc] initWithSize:NSMakeSize(1, 1)] autorelease] at:cellFrame.origin offset:offset event:event pasteboard:pboard source:control slideBack:NO]; - } else { - [control dragImage:dragImage at:cellFrame.origin offset:offset event:event pasteboard:pboard source:control slideBack:YES]; - } - - [control release]; -} - -- (void)draggingEnteredTabBar:(PSMTabBarControl *)control atPoint:(NSPoint)mouseLoc -{ - - // Bring the new tab window to the front - [[control window] makeKeyAndOrderFront:self]; - - if (_currentTearOffStyle == PSMTabBarTearOffMiniwindow && ![self destinationTabBar]) { - [_draggedTab switchImages]; - } - - // If this is not the starting drag bar... - if ([self sourceTabBar] != [self destinationTabBar] && control != [self destinationTabBar]) { - - // Add a single placeholder to the tab bar and tell the new tab bar to update. - // The placeholder is later removed by distributePlaceholdersInTabBar:. - PSMTabBarCell *pc = [[[PSMTabBarCell alloc] initPlaceholderWithFrame:[[self draggedCell] frame] expanded:NO inControlView:control] autorelease]; - [[control cells] addObject:pc]; - [control update:NO]; - - // Deselect any currently selected tabs after the update - for (PSMTabBarCell *aCell in [control cells]) { - if ([aCell tabState] & PSMTab_SelectedMask) { - [aCell setState:NSOffState]; - [aCell setTabState:PSMTab_PositionMiddleMask]; - break; - } - } - } - - [self setDestinationTabBar:control]; - [self setCurrentMouseLoc:mouseLoc]; - - [_participatingTabBars addObject:control]; - - // Add placeholders if necessary - if ([[control cells] count] == 0 || ![[[control cells] objectAtIndex:0] isPlaceholder]) { - [self distributePlaceholdersInTabBar:control]; - } - - // hide UI buttons - [[control overflowPopUpButton] setHidden:YES]; - [[control addTabButton] setHidden:YES]; - - //tell the drag window to display only the header if there is one - if (_currentTearOffStyle == PSMTabBarTearOffAlphaWindow && _draggedView) { - if (_fadeTimer) { - [_fadeTimer invalidate]; - } - - [[_draggedTab window] orderFront:nil]; - _fadeTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 / 30.0 target:self selector:@selector(fadeOutDragWindow:) userInfo:nil repeats:YES]; - } -} - -- (void)draggingUpdatedInTabBar:(PSMTabBarControl *)control atPoint:(NSPoint)mouseLoc -{ - if ([self destinationTabBar] != control) { - [self setDestinationTabBar:control]; - } - [self setCurrentMouseLoc:mouseLoc]; -} - -- (void)draggingExitedTabBar:(PSMTabBarControl *)control -{ - if ([[control delegate] respondsToSelector:@selector(tabView:shouldAllowTabViewItem:toLeaveTabBar:)] && - ![[control delegate] tabView:[control tabView] shouldAllowTabViewItem:[[self draggedCell] representedObject] toLeaveTabBar:control]) { - return; - } - - [self setDestinationTabBar:nil]; - [self setCurrentMouseLoc:NSMakePoint(-1.0f, -1.0f)]; - - if (_fadeTimer) { - [_fadeTimer invalidate]; - _fadeTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 / 30.0 target:self selector:@selector(fadeInDragWindow:) userInfo:nil repeats:YES]; - } else if (_draggedTab) { - if (_currentTearOffStyle == PSMTabBarTearOffAlphaWindow) { - //create a new floating drag window - if (!_draggedView) { - NSUInteger styleMask; - NSImage *viewImage = [self _imageForViewOfCell:[self draggedCell] styleMask:&styleMask]; - - _draggedView = [[PSMTabDragWindowController alloc] initWithImage:viewImage styleMask:styleMask tearOffStyle:PSMTabBarTearOffAlphaWindow initialAlpha:[control usesSafariStyleDragging]?1:kPSMTabDragWindowAlpha]; - [[_draggedView window] setAlphaValue:0.0f]; - - // Inform the delegate a new drag window was created to allow any changes - if ([control delegate] && [[control delegate] respondsToSelector:@selector(tabViewDragWindowCreated:)]) { - [[control delegate] tabViewDragWindowCreated:[_draggedView window]]; - } - } - - NSPoint targetPoint = [[_draggedTab window] frame].origin; - targetPoint.y += _dragWindowOffset.height; - [[_draggedView window] setFrameTopLeftPoint:targetPoint]; - [[_draggedView window] orderWindow:NSWindowBelow relativeTo:[[_draggedTab window] windowNumber]]; - - } else if (_currentTearOffStyle == PSMTabBarTearOffMiniwindow && ![_draggedTab alternateImage]) { - NSImage *image; - NSSize imageSize; - NSUInteger mask; //we don't need this but we can't pass nil in for the style mask, as some delegate implementations will crash - - if ( !(image = [self _miniwindowImageOfWindow:[control window]]) ) { - image = [[self _imageForViewOfCell:[self draggedCell] styleMask:&mask] copy]; - } - - imageSize = [image size]; - - if (imageSize.width > imageSize.height) { - [image setSize:NSMakeSize(125, 125 * (imageSize.height / imageSize.width))]; - } else { - [image setSize:NSMakeSize(125 * (imageSize.width / imageSize.height), 125)]; - } - - [_draggedTab setAlternateImage:image]; - } - - //set the window's alpha mask to zero if the last tab is being dragged - //don't fade out the old window if the delegate doesn't respond to the new tab bar method, just to be safe - if ([[[self sourceTabBar] tabView] numberOfTabViewItems] == 1 && [self sourceTabBar] == control && - [[[self sourceTabBar] delegate] respondsToSelector:@selector(tabView:newTabBarForDraggedTabViewItem:atPoint:)]) { - [[[self sourceTabBar] window] setAlphaValue:0.0f]; - [[[self sourceTabBar] window] setIgnoresMouseEvents:YES]; - - if ([_sourceTabBar tearOffStyle] == PSMTabBarTearOffAlphaWindow) { - [[_draggedView window] setAlphaValue:kPSMTabDragWindowAlpha]; - } else { - [_draggedTab switchImages]; - _centersDragWindows = YES; - } - } else { - if ([_sourceTabBar tearOffStyle] == PSMTabBarTearOffAlphaWindow) { - _fadeTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 / 30.0 target:self selector:@selector(fadeInDragWindow:) userInfo:nil repeats:YES]; - } else { - [_draggedTab switchImages]; - _centersDragWindows = YES; - } - } - } -} - -- (void)performDragOperation -{ - // move cell - NSUInteger destinationIndex = [[[self destinationTabBar] cells] indexOfObject:[self targetCell]]; - - //there is the slight possibility of the targetCell now being set properly, so avoid errors - if (destinationIndex >= [[[self destinationTabBar] cells] count]) { - destinationIndex = [[[self destinationTabBar] cells] count] - 1; - } - - [[[self destinationTabBar] cells] replaceObjectAtIndex:destinationIndex withObject:[self draggedCell]]; - [[self draggedCell] setCustomControlView:[self destinationTabBar]]; - - // move actual NSTabViewItem - if ([self sourceTabBar] != [self destinationTabBar]) { - - //remove the tracking rects and bindings registered on the old tab - [[self sourceTabBar] removeTrackingRect:[[self draggedCell] closeButtonTrackingTag]]; - [[self sourceTabBar] removeTrackingRect:[[self draggedCell] cellTrackingTag]]; - [[self sourceTabBar] removeTabForCell:[self draggedCell]]; - - NSUInteger i; - NSInteger insertIndex; - NSArray *cells = [[self destinationTabBar] cells]; - - //find the index of where the dragged cell was just dropped - for (i = 0, insertIndex = 0; (i < [cells count]) && ([cells objectAtIndex:i] != [self draggedCell]); i++, insertIndex++) { - if ([[cells objectAtIndex:i] isPlaceholder]) { - insertIndex--; - } - } - - [[[self sourceTabBar] tabView] removeTabViewItem:[[self draggedCell] representedObject]]; - [[[self destinationTabBar] tabView] insertTabViewItem:[[self draggedCell] representedObject] atIndex:insertIndex]; - - //calculate the position for the dragged cell - if ([[self destinationTabBar] automaticallyAnimates]) { - if (insertIndex > 0) { - NSRect cellRect = [[cells objectAtIndex:insertIndex - 1] frame]; - cellRect.origin.x += cellRect.size.width; - [[self draggedCell] setFrame:cellRect]; - } - } - - //rebind the cell to the new control - [[self destinationTabBar] bindPropertiesForCell:[self draggedCell] andTabViewItem:[[self draggedCell] representedObject]]; - - //select the newly moved item in the destination tab view - [[[self destinationTabBar] tabView] selectTabViewItem:[[self draggedCell] representedObject]]; - } else { - //have to do this before checking the index of a cell otherwise placeholders will be counted - [self removeAllPlaceholdersFromTabBar:[self sourceTabBar]]; - - //rearrange the tab view items - NSTabView *tabView = [[self sourceTabBar] tabView]; - NSTabViewItem *item = [[self draggedCell] representedObject]; - BOOL reselect = ([tabView selectedTabViewItem] == item); - NSUInteger anIndex; - NSArray *cells = [[self sourceTabBar] cells]; - - //find the index of where the dragged cell was just dropped - for (anIndex = 0; anIndex < [cells count] && [cells objectAtIndex:anIndex] != [self draggedCell]; anIndex++); - - //temporarily disable the delegate in order to move the tab to a different index - id tempDelegate = [tabView delegate]; - [tabView setDelegate:nil]; - [item retain]; - [tabView removeTabViewItem:item]; - [tabView insertTabViewItem:item atIndex:anIndex]; - if (reselect) { - [tabView selectTabViewItem:item]; - } - [tabView setDelegate:tempDelegate]; - } - - if (([self sourceTabBar] != [self destinationTabBar] || (NSInteger)[[[self sourceTabBar] cells] indexOfObject:[self draggedCell]] != _draggedCellIndex) && [[[self sourceTabBar] delegate] respondsToSelector:@selector(tabView:didDropTabViewItem:inTabBar:)]) { - [[[self sourceTabBar] delegate] tabView:[[self sourceTabBar] tabView] didDropTabViewItem:[[self draggedCell] representedObject] inTabBar:[self destinationTabBar]]; - } - - [self finishDrag]; - - [[NSNotificationCenter defaultCenter] postNotificationName:PSMTabDragDidEndNotification object:nil]; -} - -- (void)draggedImageEndedAt:(NSPoint)aPoint operation:(NSDragOperation)operation -{ - if ([self isDragging]) { // means there was not a successful drop (performDragOperation) - id sourceDelegate = [[self sourceTabBar] delegate]; - - // Extract the menu bar rect - NSScreen *menuBarScreen = [[NSScreen screens] objectAtIndex:0]; - NSRect menuBarRect = [menuBarScreen frame]; - menuBarRect.origin.y = menuBarRect.size.height; - menuBarRect.size.height = 22; - - // Split off the dragged tab into a new window. - // Do this if there's no destination tab bar, the delegate approves it, and the delegate supports it - and - // not if the drag ended in the menu bar (which acts as a cancel) - if ([self destinationTabBar] == nil - && sourceDelegate && [sourceDelegate respondsToSelector:@selector(tabView:shouldDropTabViewItem:inTabBar:)] && - [sourceDelegate tabView:[[self sourceTabBar] tabView] shouldDropTabViewItem:[[self draggedCell] representedObject] inTabBar:nil] - && [sourceDelegate respondsToSelector:@selector(tabView:newTabBarForDraggedTabViewItem:atPoint:)] - && !NSPointInRect(aPoint, menuBarRect)) - { - PSMTabBarControl *control = [sourceDelegate tabView:[[self sourceTabBar] tabView] newTabBarForDraggedTabViewItem:[[self draggedCell] representedObject] atPoint:aPoint]; - - if (control) { - //add the dragged tab to the new window - [[control cells] insertObject:[self draggedCell] atIndex:0]; - - //remove the tracking rects and bindings registered on the old tab - [[self sourceTabBar] removeTrackingRect:[[self draggedCell] closeButtonTrackingTag]]; - [[self sourceTabBar] removeTrackingRect:[[self draggedCell] cellTrackingTag]]; - [[self sourceTabBar] removeTabForCell:[self draggedCell]]; - - //rebind the cell to the new control - [control bindPropertiesForCell:[self draggedCell] andTabViewItem:[[self draggedCell] representedObject]]; - - [[self draggedCell] setCustomControlView:control]; - - [[[self sourceTabBar] tabView] removeTabViewItem:[[self draggedCell] representedObject]]; - - [[control tabView] addTabViewItem:[[self draggedCell] representedObject]]; - [control update:NO]; //make sure the new tab is set in the correct position - - if (_currentTearOffStyle == PSMTabBarTearOffAlphaWindow) { - - // Grab the window frame, and show - which moves it fully onto screen - before restoring - NSRect draggedWindowFrame = [[control window] frame]; - [[control window] makeKeyAndOrderFront:nil]; - [[control window] setFrame:draggedWindowFrame display:YES]; - } else { - //center the window over where we ended dragging - [self _expandWindow:[control window] atPoint:[NSEvent mouseLocation]]; - } - - if ([sourceDelegate respondsToSelector:@selector(tabView:didDropTabViewItem:inTabBar:)]) { - [sourceDelegate tabView:[[self sourceTabBar] tabView] didDropTabViewItem:[[self draggedCell] representedObject] inTabBar:control]; - } - } else { - NSLog(@"Delegate returned no control to add to."); - [[[self sourceTabBar] cells] insertObject:[self draggedCell] atIndex:[self draggedCellIndex]]; - } - - } else { - - // put cell back - [[[self sourceTabBar] cells] insertObject:[self draggedCell] atIndex:[self draggedCellIndex]]; - [[[self sourceTabBar] window] makeKeyAndOrderFront:self]; - - // Restore the window alpha if appropriate - if ([[[self sourceTabBar] tabView] numberOfTabViewItems]) { - [[[self sourceTabBar] window] setAlphaValue:1.0f]; - } - } - - [self finishDrag]; - - [[NSNotificationCenter defaultCenter] postNotificationName:PSMTabDragDidEndNotification object:nil]; - } -} - -- (void)finishDrag -{ - if ([[[self sourceTabBar] tabView] numberOfTabViewItems] == 0 && [[[self sourceTabBar] delegate] respondsToSelector:@selector(tabView:closeWindowForLastTabViewItem:)]) { - [[[self sourceTabBar] delegate] tabView:[[self sourceTabBar] tabView] closeWindowForLastTabViewItem:[[self draggedCell] representedObject]]; - } - - if (_draggedTab) { - [[_draggedTab window] orderOut:nil]; - [_draggedTab release]; - _draggedTab = nil; - } - - if (_draggedView) { - [[_draggedView window] orderOut:nil]; - [_draggedView release]; - _draggedView = nil; - } - - _centersDragWindows = NO; - - [_animationTimer invalidate]; - _animationTimer = nil; - - [self removeAllPlaceholdersFromTabBar:[self sourceTabBar]]; - [self setSourceTabBar:nil]; - [self setDestinationTabBar:nil]; - - NSEnumerator *e = [_participatingTabBars objectEnumerator]; - PSMTabBarControl *tabBar; - while ( (tabBar = [e nextObject]) ) { - [self removeAllPlaceholdersFromTabBar:tabBar]; - } - [_participatingTabBars removeAllObjects]; - - [self setDraggedCell:nil]; - [_sineCurveWidths removeAllObjects]; - [self setTargetCell:nil]; - [self setIsDragging:NO]; -} - -- (void)draggingBeganAt:(NSPoint)aPoint -{ - if (_draggedTab) { - [[_draggedTab window] setFrameTopLeftPoint:aPoint]; - [[_draggedTab window] orderFront:nil]; - - if ([[[self sourceTabBar] tabView] numberOfTabViewItems] == 1) { - [self draggingExitedTabBar:[self sourceTabBar]]; - if ([_sourceTabBar tearOffStyle] == PSMTabBarTearOffAlphaWindow) { - [[_draggedTab window] setAlphaValue:0.0f]; - } - } - } -} - -- (void)draggingMovedTo:(NSPoint)aPoint -{ - if (_draggedTab) { - if (_centersDragWindows) { - if ([_draggedTab isAnimating]) { - return; - } - - //Ignore aPoint, as it seems to give wacky values - NSRect frame = [[_draggedTab window] frame]; - frame.origin = [NSEvent mouseLocation]; - frame.origin.x -= frame.size.width / 2; - frame.origin.y -= frame.size.height / 2; - [[_draggedTab window] setFrame:frame display:NO]; - } else { - - // If there is a destination tab bar set to snapping, snap the tab to it. - if ([self destinationTabBar] - && [[self destinationTabBar] usesSafariStyleDragging] - && [[self destinationTabBar] orientation] == PSMTabBarHorizontalOrientation) - { - NSRect windowFrame = [[[self destinationTabBar] window] frame]; - NSPoint dragPointInWindow = [[self destinationTabBar] convertPoint:aPoint fromView:nil]; - - // Vertical snapping - aPoint.y += windowFrame.origin.y + dragPointInWindow.y; - - // Horizontal constraining/snapping - if (dragPointInWindow.x - windowFrame.origin.x < 0) aPoint.x = windowFrame.origin.x; - if (dragPointInWindow.x - windowFrame.origin.x + [[_draggedTab window] frame].size.width > windowFrame.size.width) aPoint.x = windowFrame.origin.x + windowFrame.size.width - [[_draggedTab window] frame].size.width; - } - [[_draggedTab window] setFrameTopLeftPoint:aPoint]; - } - - if (_draggedView) { - //move the view representation with the tab - //the relative position of the dragged view window will be different - //depending on the position of the tab bar relative to the controlled tab view - - aPoint.y -= [[_draggedTab window] frame].size.height; - aPoint.x -= _dragWindowOffset.width; - aPoint.y += _dragWindowOffset.height; - [[_draggedView window] setFrameTopLeftPoint:aPoint]; - } - } -} - -- (void)fadeInDragWindow:(NSTimer *)timer -{ - CGFloat value = [[_draggedView window] alphaValue]; - if (value >= kPSMTabDragWindowAlpha || _draggedTab == nil) { - [timer invalidate]; - _fadeTimer = nil; - } else { - [[_draggedTab window] setAlphaValue:[[_draggedTab window] alphaValue] - kPSMTabDragAlphaInterval]; - [[_draggedView window] setAlphaValue:value + kPSMTabDragAlphaInterval]; - } -} - -- (void)fadeOutDragWindow:(NSTimer *)timer -{ - CGFloat value = [[_draggedView window] alphaValue]; - NSWindow *tabWindow = [_draggedTab window], *viewWindow = [_draggedView window]; - float tabWindowAlphaValue = [[self destinationTabBar] usesSafariStyleDragging]?1:kPSMTabDragWindowAlpha; - - if (value <= 0.0) { - [viewWindow setAlphaValue:0.0f]; - [tabWindow setAlphaValue:tabWindowAlphaValue]; - - [timer invalidate]; - _fadeTimer = nil; - } else { - if ([tabWindow alphaValue] < tabWindowAlphaValue) { - [tabWindow setAlphaValue:[tabWindow alphaValue] + kPSMTabDragAlphaInterval]; - } - [viewWindow setAlphaValue:value - kPSMTabDragAlphaInterval]; - } -} - -#pragma mark - -#pragma mark Private - -- (NSImage *)_imageForViewOfCell:(PSMTabBarCell *)cell styleMask:(NSUInteger *)outMask -{ - PSMTabBarControl *control = (PSMTabBarControl *)[cell controlView]; - NSImage *viewImage = nil; - - if (outMask) { - *outMask = NSBorderlessWindowMask; - } - - if ([control delegate] && [[control delegate] respondsToSelector:@selector(tabView:imageForTabViewItem:offset:styleMask:)]) { - //get a custom image representation of the view to drag from the delegate - NSImage *tabImage = [_draggedTab image]; - NSPoint drawPoint; - NSRect drawRect; - _dragWindowOffset = NSZeroSize; - viewImage = [[control delegate] tabView:[control tabView] imageForTabViewItem:[cell representedObject] offset:&_dragWindowOffset styleMask:outMask]; - [viewImage lockFocus]; - - //draw the tab into the returned window, that way we don't have two windows being dragged (this assumes the tab will be on the window) - drawPoint = NSMakePoint(_dragWindowOffset.width, [viewImage size].height - _dragWindowOffset.height); - - if ([control orientation] == PSMTabBarHorizontalOrientation) { - drawPoint.y += [[control style] tabCellHeight] - [tabImage size].height; - _dragWindowOffset.height -= [[control style] tabCellHeight] - [tabImage size].height; - } else { - drawPoint.x += [control frame].size.width - [tabImage size].width; - } - drawRect = NSMakeRect(drawPoint.x, drawPoint.y, [tabImage size].width, [tabImage size].height); - - [tabImage drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0f respectFlipped:YES hints:nil]; - - [viewImage unlockFocus]; - } else { - //the delegate doesn't give a custom image, so use an image of the view - NSView *tabView = [[cell representedObject] view]; - viewImage = [[[NSImage alloc] initWithSize:[tabView frame].size] autorelease]; - [viewImage lockFocus]; - [tabView drawRect:[tabView bounds]]; - [viewImage unlockFocus]; - } - - if (outMask && (*outMask | NSBorderlessWindowMask)) { - _dragWindowOffset.height += 22; - } - - return viewImage; -} - -- (NSImage *)_miniwindowImageOfWindow:(NSWindow *)window -{ - NSRect rect = [window frame]; - NSImage *image = [[[NSImage alloc] initWithSize:rect.size] autorelease]; - [image lockFocus]; - rect.origin = NSZeroPoint; - CGContextCopyWindowCaptureContentsToRect([[NSGraphicsContext currentContext] graphicsPort], *(CGRect *)&rect, [NSApp contextID], [window windowNumber], 0); - [image unlockFocus]; - - return image; -} - -- (void)_expandWindow:(NSWindow *)window atPoint:(NSPoint)point -{ - NSRect frame = [window frame]; - [window setFrameTopLeftPoint:NSMakePoint(point.x - frame.size.width / 2, point.y + frame.size.height / 2)]; - [window setAlphaValue:0.0f]; - [window makeKeyAndOrderFront:nil]; - - NSAnimation *animation = [[NSAnimation alloc] initWithDuration:0.25 animationCurve:NSAnimationEaseInOut]; - [animation setAnimationBlockingMode:NSAnimationNonblocking]; - [animation setCurrentProgress:0.1f]; - [animation startAnimation]; - NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:1.0 / 30.0 target:self selector:@selector(_expandWindowTimerFired:) userInfo:[NSDictionary dictionaryWithObjectsAndKeys:window, @"Window", animation, @"Animation", nil] repeats:YES]; - [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSEventTrackingRunLoopMode]; -} - -- (void)_expandWindowTimerFired:(NSTimer *)timer -{ - NSWindow *window = [[timer userInfo] objectForKey:@"Window"]; - NSAnimation *animation = [[timer userInfo] objectForKey:@"Animation"]; - CGAffineTransform transform; - NSPoint translation; - NSRect winFrame = [window frame]; - - translation.x = (winFrame.size.width / 2.0f); - translation.y = (winFrame.size.height / 2.0f); - transform = CGAffineTransformMakeTranslation(translation.x, translation.y); - transform = CGAffineTransformScale(transform, 1.0f / [animation currentValue], 1.0f / [animation currentValue]); - transform = CGAffineTransformTranslate(transform, -translation.x, -translation.y); - - translation.x = -winFrame.origin.x; - translation.y = winFrame.origin.y + winFrame.size.height - [[NSScreen mainScreen] frame].size.height; - - transform = CGAffineTransformTranslate(transform, translation.x, translation.y); - - CGSSetWindowTransform([NSApp contextID], [window windowNumber], transform); - - [window setAlphaValue:[animation currentValue]]; - - if (![animation isAnimating]) { - [timer invalidate]; - [animation release]; - } -} - -#pragma mark - -#pragma mark Animation - -- (void)animateDrag:(NSTimer *)timer -{ - NSEnumerator *e = [[[_participatingTabBars copy] autorelease] objectEnumerator]; - PSMTabBarControl *tabBar; - while ( (tabBar = [e nextObject]) ) { - [self calculateDragAnimationForTabBar:tabBar]; - [[NSRunLoop currentRunLoop] performSelector:@selector(display) target:tabBar argument:nil order:1 modes:@[@"NSEventTrackingRunLoopMode", @"NSDefaultRunLoopMode"]]; - } -} - -- (void)calculateDragAnimationForTabBar:(PSMTabBarControl *)control -{ - BOOL removeFlag = YES; - NSMutableArray *cells = [control cells]; - NSInteger i, cellCount = [cells count]; - CGFloat position = [control orientation] == PSMTabBarHorizontalOrientation ? [[control style] leftMarginForTabBarControl] : [[control style] topMarginForTabBarControl]; - - if ([self destinationTabBar] == control) { - removeFlag = NO; - - // Determine the location of the point to use. - NSPoint targetPoint; - if ([control usesSafariStyleDragging]) { - NSRect draggedTabWindowFrame = [[_draggedTab window] contentRectForFrameRect:[[_draggedTab window] frame]]; - NSRect controlWindowFrame = [[control window] contentRectForFrameRect:[[control window] frame]]; - NSPoint tabTopLeftInWindowCoords = NSMakePoint(draggedTabWindowFrame.origin.x - controlWindowFrame.origin.x, controlWindowFrame.origin.y + (2*controlWindowFrame.size.height) - draggedTabWindowFrame.origin.y); - targetPoint = [control convertPoint:tabTopLeftInWindowCoords fromView:nil]; - targetPoint.x += (draggedTabWindowFrame.size.width / 2.0f); - targetPoint.y = 0 - (draggedTabWindowFrame.size.height / 2.0f) - targetPoint.y; - } else { - targetPoint = [self currentMouseLoc]; - } - - if (targetPoint.x < [[control style] leftMarginForTabBarControl]) { - [self setTargetCell:[cells objectAtIndex:0]]; - } else { - - // Identify which cell the mouse is over - NSRect overCellRect; - PSMTabBarCell *overCell = [control cellForPoint:targetPoint cellFrame:&overCellRect]; - if (overCell) { - - // Mouse is among cells - placeholder - if ([overCell isPlaceholder]) { - [self setTargetCell:overCell]; - - // Non-placeholder cells - horizontal orientation - } else if ([control orientation] == PSMTabBarHorizontalOrientation) { - - // Handle Safari-style dragging - if ([control usesSafariStyleDragging]) { - - // Determine the index of the tab the dragged tab is over - NSUInteger overCellIndex = [cells indexOfObject:overCell]; - - // Determine the index of the current target - NSUInteger currentTargetCellIndex = _targetCell?[cells indexOfObject:_targetCell]:NSUIntegerMax; - - // Ensure that drag changes aren't as a result of an animation - NSInteger currentCellStep = [[cells objectAtIndex:(overCellIndex - 1)] currentStep]; - if (!currentCellStep || currentCellStep == kPSMTabDragAnimationSteps - 1) { - - // Center of the tab is past the edge of the tab to the left - if (targetPoint.x < (overCellRect.origin.x + overCellRect.size.width) - && currentTargetCellIndex > overCellIndex) - { - [self setTargetCell:[cells objectAtIndex:(overCellIndex - 1)]]; - - // Center of the tab is past the edge of the tab to the right - } else if (targetPoint.x > overCellRect.origin.x) { - [self setTargetCell:[cells objectAtIndex:(overCellIndex + 1)]]; - } - } - - // Handle old-style dragging based on mouse position - } else { - - // Mouse is over the left side of the cell - if (targetPoint.x < (overCellRect.origin.x + (overCellRect.size.width / 2.0))) { - [self setTargetCell:[cells objectAtIndex:([cells indexOfObject:overCell] - 1)]]; - - // Otherwise the mouse is over the right side of the cell - } else { - [self setTargetCell:[cells objectAtIndex:([cells indexOfObject:overCell] + 1)]]; - } - } - } else { - // non-placeholders - vertical orientation - if (targetPoint.y < (overCellRect.origin.y + (overCellRect.size.height / 2.0))) { - // mouse on top of cell - [self setTargetCell:[cells objectAtIndex:([cells indexOfObject:overCell] - 1)]]; - } else { - // mouse on bottom of cell - [self setTargetCell:[cells objectAtIndex:([cells indexOfObject:overCell] + 1)]]; - } - } - } else { - // out at end - must find proper cell (could be more in overflow menu) - [self setTargetCell:[control lastVisibleTab]]; - } - } - } else { - [self setTargetCell:nil]; - } - - for (i = 0; i < cellCount; i++) { - PSMTabBarCell *cell = [cells objectAtIndex:i]; - NSRect newRect = [cell frame]; - if (![cell isInOverflowMenu]) { - if ([cell isPlaceholder]) { - if (cell == [self targetCell]) { - [cell setCurrentStep:([cell currentStep] + 1)]; - } else { - [cell setCurrentStep:([cell currentStep] - 1)]; - if ([cell currentStep] > 0) { - removeFlag = NO; - } - } - - if ([control orientation] == PSMTabBarHorizontalOrientation) { - newRect.size.width = [[_sineCurveWidths objectAtIndex:[cell currentStep]] integerValue]; - } else { - newRect.size.height = [[_sineCurveWidths objectAtIndex:[cell currentStep]] integerValue]; - } - } - } else { - break; - } - - if ([control orientation] == PSMTabBarHorizontalOrientation) { - newRect.origin.x = position; - position += newRect.size.width; - } else { - newRect.origin.y = position; - position += newRect.size.height; - } - [cell setFrame:newRect]; - if ([cell indicator]) { - [[cell indicator] setFrame:[[control style] indicatorRectForTabCell:cell]]; - } - } - if (removeFlag) { - [_participatingTabBars removeObject:control]; - [self removeAllPlaceholdersFromTabBar:control]; - } -} - -#pragma mark - -#pragma mark Placeholders - -- (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control withDraggedCell:(PSMTabBarCell *)cell -{ - // called upon first drag - must distribute placeholders - [self distributePlaceholdersInTabBar:control]; - - NSMutableArray *cells = [control cells]; - - // replace dragged cell with a placeholder, and clean up surrounding cells - NSInteger cellIndex = [cells indexOfObject:cell]; - PSMTabBarCell *pc = [[[PSMTabBarCell alloc] initPlaceholderWithFrame:[[self draggedCell] frame] expanded:YES inControlView:control] autorelease]; - [cells replaceObjectAtIndex:cellIndex withObject:pc]; - [cells removeObjectAtIndex:(cellIndex + 1)]; - [cells removeObjectAtIndex:(cellIndex - 1)]; - - if (cellIndex - 2 >= 0) { - pc = [cells objectAtIndex:cellIndex - 2]; - [pc setTabState:~[pc tabState] & PSMTab_RightIsSelectedMask]; - } -} - -- (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control -{ - NSUInteger i, numVisibleTabs = [control numberOfVisibleTabs]; - for (i = 0; i < numVisibleTabs; i++) { - PSMTabBarCell *pc = [[[PSMTabBarCell alloc] initPlaceholderWithFrame:[[self draggedCell] frame] expanded:NO inControlView:control] autorelease]; - [[control cells] insertObject:pc atIndex:(2 * i)]; - } - - PSMTabBarCell *pc = [[[PSMTabBarCell alloc] initPlaceholderWithFrame:[[self draggedCell] frame] expanded:NO inControlView:control] autorelease]; - if ([[control cells] count] > (2 * numVisibleTabs)) { - [[control cells] insertObject:pc atIndex:(2 * numVisibleTabs)]; - } else { - [[control cells] addObject:pc]; - } -} - -- (void)removeAllPlaceholdersFromTabBar:(PSMTabBarControl *)control -{ - NSInteger i, cellCount = [[control cells] count]; - for (i = (cellCount - 1); i >= 0; i--) { - PSMTabBarCell *cell = [[control cells] objectAtIndex:i]; - if ([cell isPlaceholder]) { - [NSObject cancelPreviousPerformRequestsWithTarget:cell]; - [control removeTabForCell:cell]; - } - } - // redraw - [control update:NO]; -} - -#pragma mark - -#pragma mark Archiving - -- (void)encodeWithCoder:(NSCoder *)aCoder { - //[super encodeWithCoder:aCoder]; - if ([aCoder allowsKeyedCoding]) { - [aCoder encodeObject:_sourceTabBar forKey:@"sourceTabBar"]; - [aCoder encodeObject:_destinationTabBar forKey:@"destinationTabBar"]; - [aCoder encodeObject:_participatingTabBars forKey:@"participatingTabBars"]; - [aCoder encodeObject:_draggedCell forKey:@"draggedCell"]; - [aCoder encodeInteger:_draggedCellIndex forKey:@"draggedCellIndex"]; - [aCoder encodeBool:_isDragging forKey:@"isDragging"]; - [aCoder encodeObject:_animationTimer forKey:@"animationTimer"]; - [aCoder encodeObject:_sineCurveWidths forKey:@"sineCurveWidths"]; - [aCoder encodePoint:_currentMouseLoc forKey:@"currentMouseLoc"]; - [aCoder encodeObject:_targetCell forKey:@"targetCell"]; - } -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - //self = [super initWithCoder:aDecoder]; - //if (self) { - if ([aDecoder allowsKeyedCoding]) { - _sourceTabBar = [[aDecoder decodeObjectForKey:@"sourceTabBar"] retain]; - _destinationTabBar = [[aDecoder decodeObjectForKey:@"destinationTabBar"] retain]; - _participatingTabBars = [[aDecoder decodeObjectForKey:@"participatingTabBars"] retain]; - _draggedCell = [[aDecoder decodeObjectForKey:@"draggedCell"] retain]; - _draggedCellIndex = [aDecoder decodeIntegerForKey:@"draggedCellIndex"]; - _isDragging = [aDecoder decodeBoolForKey:@"isDragging"]; - _animationTimer = [[aDecoder decodeObjectForKey:@"animationTimer"] retain]; - _sineCurveWidths = [[aDecoder decodeObjectForKey:@"sineCurveWidths"] retain]; - _currentMouseLoc = [aDecoder decodePointForKey:@"currentMouseLoc"]; - _targetCell = [[aDecoder decodeObjectForKey:@"targetCell"] retain]; - } - //} - return self; -} - - -@end diff --git a/Frameworks/PSMTabBar/PSMTabDragView.h b/Frameworks/PSMTabBar/PSMTabDragView.h deleted file mode 100644 index bdf73304b..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragView.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// PSMTabDragView.h -// PSMTabBarControl -// -// Created by Kent Sutherland on 6/17/07. -// Copyright 2007 Kent Sutherland. All rights reserved. -// - -#import - -@interface PSMTabDragView : NSView { - NSImage *_image, *_alternateImage; - CGFloat _alpha; -} -- (void)setFadeValue:(CGFloat)value; -- (NSImage *)image; -- (void)setImage:(NSImage *)image; -- (NSImage *)alternateImage; -- (void)setAlternateImage:(NSImage *)image; -@end diff --git a/Frameworks/PSMTabBar/PSMTabDragView.m b/Frameworks/PSMTabBar/PSMTabDragView.m deleted file mode 100644 index 5cdf07205..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragView.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// PSMTabDragView.m -// PSMTabBarControl -// -// Created by Kent Sutherland on 6/17/07. -// Copyright 2007 Kent Sutherland. All rights reserved. -// - -#import "PSMTabDragView.h" - - -@implementation PSMTabDragView - -- (id)initWithFrame:(NSRect)frame { - if ( (self = [super initWithFrame:frame]) ) { - _alpha = 1.0f; - } - return self; -} - -- (void)dealloc -{ - [_image release]; - [_alternateImage release]; - [super dealloc]; -} - -- (void)drawRect:(NSRect)rect { - //1.0 fade means show the primary image - //0.0 fade means show the secondary image - CGFloat primaryAlpha = _alpha + 0.001f, alternateAlpha = 1.001f - _alpha; - NSRect srcRect; - srcRect.origin = NSZeroPoint; - srcRect.size = [_image size]; - - [_image drawInRect:[self bounds] fromRect:srcRect operation:NSCompositingOperationSourceOver fraction:primaryAlpha]; - - srcRect.size = [_alternateImage size]; - - [_alternateImage drawInRect:[self bounds] fromRect:srcRect operation:NSCompositingOperationSourceOver fraction:alternateAlpha]; -} - -- (void)setFadeValue:(CGFloat)value -{ - _alpha = value; -} - -- (NSImage *)image -{ - return _image; -} - -- (void)setImage:(NSImage *)image -{ - [_image release]; - _image = [image retain]; -} - -- (NSImage *)alternateImage -{ - return _alternateImage; -} - -- (void)setAlternateImage:(NSImage *)image -{ - [_alternateImage release]; - _alternateImage = [image retain]; -} - -@end diff --git a/Frameworks/PSMTabBar/PSMTabDragWindow.h b/Frameworks/PSMTabBar/PSMTabDragWindow.h deleted file mode 100644 index fd26e7496..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragWindow.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// PSMTabDragWindow.h -// PSMTabBarControl -// -// Created by Kent Sutherland on 6/1/06. -// Copyright 2006 Kent Sutherland. All rights reserved. -// - -#import - -@class PSMTabDragView; - -@interface PSMTabDragWindow : NSWindow { - PSMTabDragView *_dragView; -} -+ (PSMTabDragWindow *)dragWindowWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask; - -- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask; -- (PSMTabDragView *)dragView; -@end diff --git a/Frameworks/PSMTabBar/PSMTabDragWindow.m b/Frameworks/PSMTabBar/PSMTabDragWindow.m deleted file mode 100644 index 20f9f08fe..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragWindow.m +++ /dev/null @@ -1,52 +0,0 @@ -// -// PSMTabDragWindow.m -// PSMTabBarControl -// -// Created by Kent Sutherland on 6/1/06. -// Copyright 2006 Kent Sutherland. All rights reserved. -// - -#import "PSMTabDragWindow.h" -#import "PSMTabDragView.h" - -@implementation PSMTabDragWindow - -+ (PSMTabDragWindow *)dragWindowWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask -{ - return [[[PSMTabDragWindow alloc] initWithImage:image styleMask:styleMask] autorelease]; -} - -- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask -{ - NSSize size = [image size]; - - if ( (self = [super initWithContentRect:NSMakeRect(0, 0, size.width, size.height) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO]) ) { - _dragView = [[[PSMTabDragView alloc] initWithFrame:NSMakeRect(0, 0, size.width, size.height)] autorelease]; - [self setContentView:_dragView]; - [self setLevel:NSStatusWindowLevel]; - [self setIgnoresMouseEvents:YES]; - [self setOpaque:NO]; - [self setBackgroundColor:[NSColor clearColor]]; - - [_dragView setImage:image]; - - //Set the size of the window to be the exact size of the drag image - NSRect windowFrame = [self frame]; - windowFrame.origin.y += windowFrame.size.height - size.height; - windowFrame.size = size; - - if (styleMask | NSWindowStyleMaskBorderless) { - windowFrame.size.height += 22; - } - - [self setFrame:windowFrame display:YES]; - } - return self; -} - -- (PSMTabDragView *)dragView -{ - return _dragView; -} - -@end diff --git a/Frameworks/PSMTabBar/PSMTabDragWindowController.h b/Frameworks/PSMTabBar/PSMTabDragWindowController.h deleted file mode 100644 index 380a2babb..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragWindowController.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// PSMTabDragWindowController.h -// PSMTabBarControl -// -// Created by Kent Sutherland on 6/18/07. -// Copyright 2007 Kent Sutherland. All rights reserved. -// - -#import -#import "PSMTabBarControl.h" - -#define kPSMTabDragWindowAlpha 0.75f -#define kPSMTabDragAlphaInterval 0.15f - -@class PSMTabDragView; - -@interface PSMTabDragWindowController : NSWindowController { - PSMTabBarTearOffStyle _tearOffStyle; - PSMTabDragView *_view; - NSAnimation *_animation; - NSTimer *_timer; - - BOOL _showingAlternate; - NSRect _originalWindowFrame; -} -- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask tearOffStyle:(PSMTabBarTearOffStyle)tearOffStyle initialAlpha:(CGFloat)initialAlpha; - -- (NSImage *)image; -- (NSImage *)alternateImage; -- (void)setAlternateImage:(NSImage *)image; -- (BOOL)isAnimating; -- (void)switchImages; -- (void)animateTimer:(NSTimer *)timer; -@end diff --git a/Frameworks/PSMTabBar/PSMTabDragWindowController.m b/Frameworks/PSMTabBar/PSMTabDragWindowController.m deleted file mode 100644 index 75dbb6577..000000000 --- a/Frameworks/PSMTabBar/PSMTabDragWindowController.m +++ /dev/null @@ -1,120 +0,0 @@ -// -// PSMTabDragWindowController.m -// PSMTabBarControl -// -// Created by Kent Sutherland on 6/18/07. -// Copyright 2007 Kent Sutherland. All rights reserved. -// - -#import "PSMTabDragWindowController.h" -#import "PSMTabDragWindow.h" -#import "PSMTabDragView.h" - -@implementation PSMTabDragWindowController - -- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask tearOffStyle:(PSMTabBarTearOffStyle)tearOffStyle initialAlpha:(CGFloat)initialAlpha -{ - PSMTabDragWindow *window = [PSMTabDragWindow dragWindowWithImage:image styleMask:styleMask]; - if ( (self = [super initWithWindow:window]) ) { - _view = [[window dragView] retain]; - _tearOffStyle = tearOffStyle; - - if (tearOffStyle == PSMTabBarTearOffMiniwindow) { - [window setBackgroundColor:[NSColor clearColor]]; - [window setHasShadow:YES]; - } - - [window setAlphaValue:initialAlpha]; - } - return self; -} - -- (void)dealloc -{ - if (_timer) { - [_timer invalidate]; - } - - if (_animation) { - [_animation release]; - } - - [_view release]; - [super dealloc]; -} - -- (NSImage *)image -{ - return [_view image]; -} - -- (NSImage *)alternateImage -{ - return [_view alternateImage]; -} - -- (void)setAlternateImage:(NSImage *)image -{ - [_view setAlternateImage:image]; -} - -- (BOOL)isAnimating -{ - return _animation != nil; -} - -- (void)switchImages -{ - if (_tearOffStyle != PSMTabBarTearOffMiniwindow || ![_view alternateImage]) { - return; - } - - CGFloat progress = 0; - _showingAlternate = !_showingAlternate; - - if (_animation) { - //An animation already exists, get the current progress - progress = 1.0f - [_animation currentProgress]; - [_animation stopAnimation]; - [_animation release]; - } - - //begin animating - _animation = [[NSAnimation alloc] initWithDuration:0.25 animationCurve:NSAnimationEaseInOut]; - [_animation setAnimationBlockingMode:NSAnimationNonblocking]; - [_animation setCurrentProgress:progress]; - [_animation startAnimation]; - - _originalWindowFrame = [[self window] frame]; - - if (_timer) { - [_timer invalidate]; - } - _timer = [NSTimer scheduledTimerWithTimeInterval:1.0f / 30.0f target:self selector:@selector(animateTimer:) userInfo:nil repeats:YES]; -} - -- (void)animateTimer:(NSTimer *)timer -{ - NSRect frame = _originalWindowFrame; - NSImage *currentImage = _showingAlternate ? [_view alternateImage] : [_view image]; - NSSize size = [currentImage size]; - NSPoint mousePoint = [NSEvent mouseLocation]; - CGFloat animationValue = [_animation currentValue]; - - frame.size.width = _originalWindowFrame.size.width + (size.width - _originalWindowFrame.size.width) * animationValue; - frame.size.height = _originalWindowFrame.size.height + (size.height - _originalWindowFrame.size.height) * animationValue; - frame.origin.x = mousePoint.x - (frame.size.width / 2); - frame.origin.y = mousePoint.y - (frame.size.height / 2); - - [_view setFadeValue:_showingAlternate ? 1.0f - animationValue : animationValue]; - [[self window] setFrame:frame display:YES]; - - if (![_animation isAnimating]) { - [_animation release]; - _animation = nil; - [timer invalidate]; - _timer = nil; - } -} - -@end diff --git a/Frameworks/PSMTabBar/PSMTabStyle.h b/Frameworks/PSMTabBar/PSMTabStyle.h deleted file mode 100644 index 0688c8a9d..000000000 --- a/Frameworks/PSMTabBar/PSMTabStyle.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// PSMTabStyle.h -// PSMTabBarControl -// -// Created by John Pannell on 2/17/06. -// Copyright 2006 Positive Spin Media. All rights reserved. -// - -/* - * Protocol to be observed by all style delegate objects. - * These objects handle the drawing responsibilities for PSMTabBarCell; once the control has been assigned a style, the background and cells draw consistent with that style. - * Design pattern and implementation by David Smith, Seth Willits, and Chris Forsythe, all touch up and errors by John P. :-) - */ - -#import "PSMTabBarCell.h" -#import "PSMTabBarControl.h" - -@protocol PSMTabStyle - -// identity -- (NSString *)name; - -// control specific parameters -- (CGFloat)leftMarginForTabBarControl; -- (CGFloat)rightMarginForTabBarControl; -- (CGFloat)topMarginForTabBarControl; -- (void)setOrientation:(PSMTabBarOrientation)value; - -// add tab button -- (NSImage *)addTabButtonImage; -- (NSImage *)addTabButtonPressedImage; -- (NSImage *)addTabButtonRolloverImage; - -// cell specific parameters -- (NSRect)dragRectForTabCell:(PSMTabBarCell *)cell orientation:(PSMTabBarOrientation)orientation; -- (NSRect)closeButtonRectForTabCell:(PSMTabBarCell *)cell withFrame:(NSRect)cellFrame; -- (NSRect)iconRectForTabCell:(PSMTabBarCell *)cell; -- (NSRect)indicatorRectForTabCell:(PSMTabBarCell *)cell; -- (NSRect)objectCounterRectForTabCell:(PSMTabBarCell *)cell; -- (CGFloat)minimumWidthOfTabCell:(PSMTabBarCell *)cell; -- (CGFloat)desiredWidthOfTabCell:(PSMTabBarCell *)cell; -- (CGFloat)tabCellHeight; - -// cell values -- (NSAttributedString *)attributedObjectCountValueForTabCell:(PSMTabBarCell *)cell; -- (NSAttributedString *)attributedStringValueForTabCell:(PSMTabBarCell *)cell; - -// drawing -- (void)drawTabCell:(PSMTabBarCell *)cell; -- (void)drawTabCellForDragImage:(PSMTabBarCell *)cell; -- (void)drawBackgroundInRect:(NSRect)rect; -- (void)drawTabBar:(PSMTabBarControl *)bar inRect:(NSRect)rect; - -@end - -@interface PSMTabBarControl (StyleAccessors) - -- (NSMutableArray *)cells; - -@end diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h deleted file mode 100644 index fec2d2699..000000000 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// $Id: PSMSequelProTabStyle.h 2317 2010-06-15 10:19:41Z avenjamin $ -// -// PSMSequelProTabStyle.h -// sequel-pro -// -// Created by Ben Perry on June 15, 2010 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// More info at - -#import -#import "PSMTabStyle.h" - -@interface PSMSequelProTabStyle : NSObject -{ - NSImage *sequelProCloseButton; - NSImage *sequelProCloseButtonDown; - NSImage *sequelProCloseButtonOver; - NSImage *sequelProCloseDirtyButton; - NSImage *sequelProCloseDirtyButtonDown; - NSImage *sequelProCloseDirtyButtonOver; - NSImage *_addTabButtonImage; - NSImage *_addTabButtonPressedImage; - NSImage *_addTabButtonRolloverImage; - - NSDictionary *_objectCountStringAttributes; - - PSMTabBarOrientation orientation; - PSMTabBarControl *tabBar; -} - -- (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView *)controlView; - -- (void)encodeWithCoder:(NSCoder *)aCoder; -- (id)initWithCoder:(NSCoder *)aDecoder; -@end diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m deleted file mode 100644 index a1a6f7058..000000000 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m +++ /dev/null @@ -1,723 +0,0 @@ -// -// PSMSequelProTabStyle.m -// sequel-pro -// -// Created by Ben Perry on June 15, 2010 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// More info at - -#import "PSMSequelProTabStyle.h" -#import "PSMTabBarCell.h" -#import "PSMTabBarControl.h" -#import "NSBezierPath_AMShading.h" -#import "PSMTabDragAssistant.h" - -#define kPSMSequelProObjectCounterRadius 7.0f -#define kPSMSequelProCounterMinWidth 20 -#define kPSMSequelProTabCornerRadius 0 - -@interface PSMSequelProTabStyle () - -- (NSColor *)_lineColorForTabCellDrawing; -- (void)_drawTabCell:(PSMTabBarCell *)cell withBackgroundColor:(NSColor *)backgroundColor lineColor:(NSColor *)lineColor; -- (BOOL)isInDarkMode; - -@end - -@implementation PSMSequelProTabStyle - -- (NSString *)name -{ - return @"SequelPro"; -} - -#pragma mark - -#pragma mark Creation/Destruction - -- (id) init -{ - if ( (self = [super init]) ) { - NSBundle *bundle = [PSMTabBarControl bundle]; - - sequelProCloseButton = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"SequelProTabClose"]]; - sequelProCloseButtonDown = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"SequelProTabClose_Pressed"]]; - sequelProCloseButtonOver = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"SequelProTabClose_Rollover"]]; - - sequelProCloseDirtyButton = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"SequelProTabDirty"]]; - sequelProCloseDirtyButtonDown = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"SequelProTabDirty_Pressed"]]; - sequelProCloseDirtyButtonOver = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"SequelProTabDirty_Rollover"]]; - - _addTabButtonImage = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"AddTabButton"]]; - _addTabButtonPressedImage = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"AddTabButton"]]; - _addTabButtonRolloverImage = [[NSImage alloc] initByReferencingFile:[bundle pathForImageResource:@"AddTabButton"]]; - - _objectCountStringAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: - [[NSFontManager sharedFontManager] convertFont:[NSFont fontWithName:@"Helvetica" size:11.0f] toHaveTrait:NSBoldFontMask], NSFontAttributeName, - [[NSColor whiteColor] colorWithAlphaComponent:0.85f], NSForegroundColorAttributeName, nil, nil]; - } - return self; -} - -- (void)dealloc -{ - [sequelProCloseButton release]; - [sequelProCloseButtonDown release]; - [sequelProCloseButtonOver release]; - [sequelProCloseDirtyButton release]; - [sequelProCloseDirtyButtonDown release]; - [sequelProCloseDirtyButtonOver release]; - [_addTabButtonImage release]; - [_addTabButtonPressedImage release]; - [_addTabButtonRolloverImage release]; - - [_objectCountStringAttributes release]; - - [super dealloc]; -} - -#pragma mark - -#pragma mark Detect Dark Aqua Mode - -- (BOOL)isInDarkMode -{ - if (@available(macOS 10.14, *)) { - NSAppearance *appearance = [NSAppearance currentAppearance] ?: [NSApp effectiveAppearance]; - NSAppearanceName match = [appearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]]; - - if ([NSAppearanceNameDarkAqua isEqualToString:match]) { - return YES; - } - } - return NO; -} - -#pragma mark - -#pragma mark Control Specific - -- (CGFloat)leftMarginForTabBarControl -{ - return 0.0f; -} - -- (CGFloat)rightMarginForTabBarControl -{ - return 10.0f; // enough to fit plus button -} - -- (CGFloat)topMarginForTabBarControl -{ - return 10.0f; -} - -- (void)setOrientation:(PSMTabBarOrientation)value -{ - // Hard code orientation to horizontal - orientation = PSMTabBarHorizontalOrientation; -} - -#pragma mark - -#pragma mark Add Tab Button - -- (NSImage *)addTabButtonImage -{ - return _addTabButtonImage; -} - -- (NSImage *)addTabButtonPressedImage -{ - return _addTabButtonPressedImage; -} - -- (NSImage *)addTabButtonRolloverImage -{ - return _addTabButtonRolloverImage; -} - -#pragma mark - -#pragma mark Cell Specific - -- (NSRect)dragRectForTabCell:(PSMTabBarCell *)cell orientation:(PSMTabBarOrientation)tabOrientation -{ - NSRect dragRect = [cell frame]; - dragRect.size.width++; - - if ([cell tabState] & PSMTab_SelectedMask) { - if (tabOrientation == PSMTabBarHorizontalOrientation) { - dragRect.origin.x -= 5.0f; - dragRect.size.width += 10.0f; - } else { - dragRect.size.height += 1.0f; - dragRect.origin.y -= 1.0f; - dragRect.origin.x += 2.0f; - dragRect.size.width -= 3.0f; - } - } else if (tabOrientation == PSMTabBarVerticalOrientation) { - dragRect.origin.x--; - } - - return dragRect; -} - -- (NSRect)closeButtonRectForTabCell:(PSMTabBarCell *)cell withFrame:(NSRect)cellFrame -{ - if ([cell hasCloseButton] == NO) { - return NSZeroRect; - } - - NSRect result; - result.size = [sequelProCloseButton size]; - result.origin.x = cellFrame.origin.x + MARGIN_X; - result.origin.y = cellFrame.origin.y + MARGIN_Y + 2.0f; - - return result; -} - -- (NSRect)iconRectForTabCell:(PSMTabBarCell *)cell -{ - NSRect cellFrame = [cell frame]; - - if ([cell hasIcon] == NO) { - return NSZeroRect; - } - - NSRect result; - result.size = NSMakeSize(kPSMTabBarIconWidth, kPSMTabBarIconWidth); - result.origin.x = cellFrame.origin.x + MARGIN_X; - result.origin.y = cellFrame.origin.y + MARGIN_Y; - - if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed]) { - result.origin.x += [sequelProCloseButton size].width + kPSMTabBarCellPadding; - } - - return result; -} - -- (NSRect)indicatorRectForTabCell:(PSMTabBarCell *)cell -{ - NSRect cellFrame = [cell frame]; - - if ([[cell indicator] isHidden]) { - return NSZeroRect; - } - - NSRect result; - result.size = NSMakeSize(kPSMTabBarIndicatorWidth, kPSMTabBarIndicatorWidth); - result.origin.x = cellFrame.origin.x + cellFrame.size.width - MARGIN_X - kPSMTabBarIndicatorWidth; - result.origin.y = cellFrame.origin.y + MARGIN_Y; - - return result; -} - -- (NSRect)objectCounterRectForTabCell:(PSMTabBarCell *)cell -{ - NSRect cellFrame = [cell frame]; - - if ([cell count] == 0) { - return NSZeroRect; - } - - CGFloat countWidth = [[self attributedObjectCountValueForTabCell:cell] size].width; - countWidth += (2 * kPSMSequelProObjectCounterRadius - 6.0f); - if (countWidth < kPSMSequelProCounterMinWidth) { - countWidth = kPSMSequelProCounterMinWidth; - } - - NSRect result; - result.size = NSMakeSize(countWidth, 2 * kPSMSequelProObjectCounterRadius); // temp - result.origin.x = cellFrame.origin.x + cellFrame.size.width - MARGIN_X - result.size.width; - result.origin.y = cellFrame.origin.y + MARGIN_Y + 1.0f; - - if (![[cell indicator] isHidden]) { - result.origin.x -= kPSMTabBarIndicatorWidth + kPSMTabBarCellPadding; - } - - return result; -} - -- (CGFloat)minimumWidthOfTabCell:(PSMTabBarCell *)cell -{ - CGFloat resultWidth = 0.0f; - - // left margin - resultWidth = MARGIN_X; - - // close button? - if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed]) { - resultWidth += [sequelProCloseButton size].width + kPSMTabBarCellPadding; - } - - // icon? - if ([cell hasIcon]) { - resultWidth += kPSMTabBarIconWidth + kPSMTabBarCellPadding; - } - - // the label - resultWidth += kPSMMinimumTitleWidth; - - // object counter? - if ([cell count] > 0) { - resultWidth += [self objectCounterRectForTabCell:cell].size.width + kPSMTabBarCellPadding; - } - - // indicator? - if ([[cell indicator] isHidden] == NO) - resultWidth += kPSMTabBarCellPadding + kPSMTabBarIndicatorWidth; - - // right margin - resultWidth += MARGIN_X; - - return ceilf(resultWidth); -} - -- (CGFloat)desiredWidthOfTabCell:(PSMTabBarCell *)cell -{ - CGFloat resultWidth = 0.0f; - - // left margin - resultWidth = MARGIN_X; - - // close button? - if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed]) - resultWidth += [sequelProCloseButton size].width + kPSMTabBarCellPadding; - - // icon? - if ([cell hasIcon]) { - resultWidth += kPSMTabBarIconWidth + kPSMTabBarCellPadding; - } - - // the label - resultWidth += [[cell attributedStringValue] size].width; - - // object counter? - if ([cell count] > 0) { - resultWidth += [self objectCounterRectForTabCell:cell].size.width + kPSMTabBarCellPadding; - } - - // indicator? - if ([[cell indicator] isHidden] == NO) - resultWidth += kPSMTabBarCellPadding + kPSMTabBarIndicatorWidth; - - // right margin - resultWidth += MARGIN_X; - - return ceilf(resultWidth); -} - -- (CGFloat)tabCellHeight -{ - return kPSMTabBarControlHeight; -} - -#pragma mark - -#pragma mark Cell Values - -- (NSAttributedString *)attributedObjectCountValueForTabCell:(PSMTabBarCell *)cell -{ - NSString *contents = [NSString stringWithFormat:@"%lu", (unsigned long)[cell count]]; - - return [[[NSMutableAttributedString alloc] initWithString:contents attributes:_objectCountStringAttributes] autorelease]; -} - -- (NSAttributedString *)attributedStringValueForTabCell:(PSMTabBarCell *)cell -{ - NSMutableAttributedString *attrStr; - NSString *contents = [cell stringValue]; - attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease]; - NSRange range = NSMakeRange(0, [contents length]); - - // Add font attribute - [attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0f] range:range]; - [attrStr addAttribute:NSForegroundColorAttributeName value:[[NSColor textColor] colorWithAlphaComponent:0.75f] range:range]; - - // Add shadow attribute - NSShadow* textShadow; - textShadow = [[[NSShadow alloc] init] autorelease]; - CGFloat shadowAlpha; - if (([cell state] == NSOnState) || [cell isHighlighted]) { - shadowAlpha = 0.8f; - } else { - shadowAlpha = 0.5f; - } - [textShadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0f alpha:shadowAlpha]]; - [textShadow setShadowOffset:NSMakeSize(0, -1)]; - [textShadow setShadowBlurRadius:1.0f]; - - // Paragraph Style for Truncating Long Text - static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; - if (!TruncatingTailParagraphStyle) { - TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; - [TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment]; - } - [attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range]; - - return attrStr; -} - -#pragma mark - -#pragma mark Drawing - -// Step 1 -- (void)drawTabBar:(PSMTabBarControl *)bar inRect:(NSRect)rect -{ - if (orientation != [bar orientation]) { - orientation = [bar orientation]; - } - - if (tabBar != bar) { - tabBar = bar; - } - - [self drawBackgroundInRect:rect]; - - // no tab view == not connected - if (![bar tabView]) { - NSRect labelRect = rect; - labelRect.size.height -= 4.0f; - labelRect.origin.y += 4.0f; - NSMutableAttributedString *attrStr; - NSString *contents = @"PSMTabBarControl"; - attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease]; - NSRange range = NSMakeRange(0, [contents length]); - [attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0f] range:range]; - NSMutableParagraphStyle *centeredParagraphStyle = nil; - - if (!centeredParagraphStyle) { - centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - [centeredParagraphStyle setAlignment:NSCenterTextAlignment]; - } - [attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range]; - [centeredParagraphStyle release]; - [attrStr drawInRect:labelRect]; - return; - } - - // draw cells - NSEnumerator *e = [[bar cells] objectEnumerator]; - PSMTabBarCell *cell; - while ( (cell = [e nextObject]) ) { - if ([bar isAnimating] || (![cell isInOverflowMenu] && NSIntersectsRect([cell frame], rect))) { - [cell drawWithFrame:[cell frame] inView:bar]; - } - } -} - -// Step 2 -- (void)drawBackgroundInRect:(NSRect)rect -{ - // Draw for our whole bounds; it'll be automatically clipped to fit the appropriate drawing area - rect = [tabBar bounds]; - - // Find active cell - PSMTabBarCell *selectedCell = nil; - - for (PSMTabBarCell *aCell in [tabBar cells]) { - if (aCell.tabState & PSMTab_SelectedMask) { - selectedCell = aCell; - break; - } - } - - [NSGraphicsContext saveGraphicsState]; - [[NSGraphicsContext currentContext] setShouldAntialias:NO]; - - float backgroundCalibratedWhite = 0.73f; - - float lineCalibratedWhite = [[NSColor grayColor] whiteComponent]; - float shadowAlpha = 0.4f; - - // When the window is in the background, tone down the colours - if ((![[tabBar window] isMainWindow] && ![[[tabBar window] attachedSheet] isMainWindow]) || ![NSApp isActive]) { - backgroundCalibratedWhite = 0.86f; - lineCalibratedWhite = 0.49f; - shadowAlpha = 0.3f; - } - - if ([self isInDarkMode]) { - backgroundCalibratedWhite -= 0.55f; - lineCalibratedWhite -= 0.39f; - shadowAlpha -= 0.1f; - } - - // Fill in background of tab bar - if (tabBar.cells.count != 1) { // multiple tabs - fill with background color - [[NSColor colorWithCalibratedWhite:backgroundCalibratedWhite alpha:1.0f] set]; - } else { // When there's only one tab, the tabs are probably hidden, so use the selected cell's highlight colour as our background colour - [[self fillColorForCell:selectedCell] set]; - } - NSRectFill(NSMakeRect(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height)); - - // Draw horizontal line across the top edge - [[NSColor colorWithCalibratedWhite:lineCalibratedWhite alpha:1.0f] set]; - [NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x, rect.origin.y + 0.5f) toPoint:NSMakePoint(rect.origin.x + rect.size.width, rect.origin.y + 0.5f)]; - - // Draw horizontal line across the bottom edge - [NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x, rect.origin.y + rect.size.height - 0.5f) toPoint:NSMakePoint(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height - 0.5f)]; - - [NSGraphicsContext restoreGraphicsState]; -} - -// Step 3 -- (void)drawTabCell:(PSMTabBarCell *)cell -{ - // Don't draw cells when collapsed - if ([tabBar isTabBarHidden]) return; - - NSColor *lineColor = [self _lineColorForTabCellDrawing]; - NSColor *fillColor = [self fillColorForCell:cell]; - - [self _drawTabCell:cell withBackgroundColor:fillColor lineColor:lineColor]; - - [self drawInteriorWithTabCell:cell inView:[cell customControlView]]; -} - -/** - * Same as above, but doesn't draw the left hand (right had of the actual tab) border for the tab drag image. - */ -- (void)drawTabCellForDragImage:(PSMTabBarCell *)cell -{ - NSColor *fillColor = [self fillColorForCell:cell]; - - [self _drawTabCell:cell withBackgroundColor:fillColor lineColor:nil]; - - [self drawInteriorWithTabCell:cell inView:[cell customControlView]]; -} - -// Step 4 -- (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlView -{ - NSRect cellFrame = [cell frame]; - CGFloat insetLabelWidth = 0; - - // close button - if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed] && [cell isHighlighted]) { - - NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame]; - NSImage *closeButton = nil; - - closeButton = [cell isEdited] ? sequelProCloseDirtyButton : sequelProCloseButton; - - if ([cell closeButtonOver]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonOver : sequelProCloseButtonOver; - if ([cell closeButtonPressed]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonDown : sequelProCloseButtonDown; - - // Slightly darken background tabs on mouse over - if ([cell state] == NSOffState) { - NSColor *lineColor = [self _lineColorForTabCellDrawing]; - NSColor *fillColor = [[self fillColorForCell:cell] shadowWithLevel:0.03f]; - - [self _drawTabCell:cell withBackgroundColor:fillColor lineColor:lineColor]; - } - - [closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0f respectFlipped:YES hints:nil]; - } - - // icon - if ([cell hasIcon]) { - NSRect iconRect = [self iconRectForTabCell:cell]; - NSImage *icon = [(id)[[cell representedObject] identifier] icon]; - - // center in available space (in case icon image is smaller than kPSMTabBarIconWidth) - if ([icon size].width < kPSMTabBarIconWidth) { - iconRect.origin.x += (kPSMTabBarIconWidth - [icon size].width)/2.0f; - } - if ([icon size].height < kPSMTabBarIconWidth) { - iconRect.origin.y -= (kPSMTabBarIconWidth - [icon size].height)/2.0f; - } - - [icon drawInRect:iconRect fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0f respectFlipped:YES hints:nil]; - - // scoot label over - insetLabelWidth += iconRect.size.width + kPSMTabBarCellPadding; - } - else { - insetLabelWidth += [sequelProCloseButton size].width + kPSMTabBarCellPadding; - } - - // label rect - NSRect labelRect; - labelRect.origin.x = cellFrame.origin.x + MARGIN_X + insetLabelWidth; - labelRect.size.width = cellFrame.size.width - (labelRect.origin.x - cellFrame.origin.x) - insetLabelWidth - MARGIN_X; - labelRect.size.height = cellFrame.size.height; - labelRect.origin.y = cellFrame.origin.y + MARGIN_Y; - - // object counter - if ([cell count] > 0) { - [[cell countColor] ?: [NSColor colorWithCalibratedWhite:0.3f alpha:0.6f] set]; - NSBezierPath *path = [NSBezierPath bezierPath]; - NSRect myRect = [self objectCounterRectForTabCell:cell]; - [path moveToPoint:NSMakePoint(myRect.origin.x + kPSMSequelProObjectCounterRadius, myRect.origin.y)]; - [path lineToPoint:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMSequelProObjectCounterRadius, myRect.origin.y)]; - [path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMSequelProObjectCounterRadius, myRect.origin.y + kPSMSequelProObjectCounterRadius) radius:kPSMSequelProObjectCounterRadius startAngle:270.0f endAngle:90.0f]; - [path lineToPoint:NSMakePoint(myRect.origin.x + kPSMSequelProObjectCounterRadius, myRect.origin.y + myRect.size.height)]; - [path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + kPSMSequelProObjectCounterRadius, myRect.origin.y + kPSMSequelProObjectCounterRadius) radius:kPSMSequelProObjectCounterRadius startAngle:90.0f endAngle:270.0f]; - [path fill]; - - // draw attributed string centered in area - NSRect counterStringRect; - NSAttributedString *counterString = [self attributedObjectCountValueForTabCell:cell]; - counterStringRect.size = [counterString size]; - counterStringRect.origin.x = myRect.origin.x + ((myRect.size.width - counterStringRect.size.width) / 2.0f) + 0.25f; - counterStringRect.origin.y = myRect.origin.y + ((myRect.size.height - counterStringRect.size.height) / 2.0f) + 0.5f; - [counterString drawInRect:counterStringRect]; - - // shrink label width to make room for object counter - labelRect.size.width -= myRect.size.width + kPSMTabBarCellPadding; - } - - // determine text colour - NSAttributedString *labelString = cell.attributedStringValue; - if (cell.state != NSOnState) { - NSMutableAttributedString *newLabelString = labelString.mutableCopy; - NSColor *textColor = [NSColor darkGrayColor]; - if ([self isInDarkMode]) { - textColor = [cell backgroundColor] ? [NSColor blackColor] : [NSColor lightGrayColor]; - } - - [newLabelString addAttribute:NSForegroundColorAttributeName value:textColor range:NSMakeRange(0, newLabelString.length)]; - labelString = newLabelString.copy; - } - - // draw label - [labelString drawInRect:labelRect]; -} - -- (NSColor *)fillColorForCell:(PSMTabBarCell *)cell -{ - NSColor *fillColor = nil; - - // Set up colours - if (([[tabBar window] isMainWindow] || [[[tabBar window] attachedSheet] isMainWindow]) && [NSApp isActive]) { - if ([cell state] == NSOnState) { //active window, active cell - float tabWhiteComponent = 0.795f; - if (!tabBar.window.toolbar.isVisible) tabWhiteComponent += 0.02f; - if ([self isInDarkMode]) tabWhiteComponent -= 0.55f; - - fillColor = [NSColor colorWithCalibratedWhite:tabWhiteComponent alpha:1.0f]; - - if([cell backgroundColor]) { - fillColor = [self isInDarkMode] ? [[cell backgroundColor] shadowWithLevel:0.25] : [cell backgroundColor];; - } - } else { //active window, background cell - float tabWhiteComponent = 0.68f; - if ([self isInDarkMode]) tabWhiteComponent -= 0.51f; - - fillColor = [NSColor colorWithCalibratedWhite:tabWhiteComponent alpha:1.0f]; - - if([cell backgroundColor]) { - //should be a slightly darker variant of the color - fillColor = [self isInDarkMode] ? [[cell backgroundColor] shadowWithLevel:0.40] : [[cell backgroundColor] shadowWithLevel:0.15]; - - // also desaturate the color - fillColor = [NSColor colorWithCalibratedHue:fillColor.hueComponent saturation:fillColor.saturationComponent * 0.4 brightness:fillColor.brightnessComponent alpha:1.0f]; - } - } - } else { - if ([cell state] == NSOnState) { //background window, active cell - float tabWhiteComponent = 0.957f; - if (!tabBar.window.toolbar.isVisible) tabWhiteComponent += 0.01f; - if ([self isInDarkMode]) tabWhiteComponent -= 0.75f; - - //create a slightly desaturated variant (gray can't be desaturated so we instead make it brighter) - if (cell.backgroundColor) { - NSColor *backgroundRgb = [cell.backgroundColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; - fillColor = [NSColor colorWithCalibratedHue:backgroundRgb.hueComponent saturation:backgroundRgb.saturationComponent brightness:(backgroundRgb.brightnessComponent * 1.28f) alpha:1.0f]; - } else { - fillColor = [NSColor colorWithCalibratedWhite:tabWhiteComponent alpha:1.0f]; - } - - } else { //background window, background cell - float tabWhiteComponent = 0.86f; - if ([self isInDarkMode]) tabWhiteComponent -= 0.7f; - - fillColor = [NSColor colorWithCalibratedWhite:tabWhiteComponent alpha:1.0f]; - - //make it dark first, then desaturate - if (cell.backgroundColor) { - NSColor *dark = [[cell.backgroundColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace] shadowWithLevel:0.15]; - fillColor = [NSColor colorWithCalibratedHue:dark.hueComponent saturation:dark.saturationComponent * 0.15 brightness:(dark.brightnessComponent * 1.28) alpha:1.0f]; - } - } - } - - return fillColor; -} - -#pragma mark - -#pragma mark Archiving - -- (void)encodeWithCoder:(NSCoder *)aCoder -{ -} - -- (id)initWithCoder:(NSCoder *)aDecoder -{ - return [self init]; -} - -#pragma mark - -#pragma mark Private API - -- (void)_drawTabCell:(PSMTabBarCell *)cell withBackgroundColor:(NSColor *)backgroundColor lineColor:(NSColor *)lineColor -{ - NSRect cellFrame = [cell frame]; - - // Setup fill rect - NSRect fillRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y + 1, cellFrame.size.width, cellFrame.size.height - 1.5); - - // Draw - [NSGraphicsContext saveGraphicsState]; - - [backgroundColor set]; - NSRectFill(fillRect); - - if (lineColor) { - - // Stroke left edge - [lineColor setStroke]; - - NSPoint point1 = NSMakePoint(fillRect.origin.x + fillRect.size.width - 0.5, fillRect.origin.y); - NSPoint point2 = NSMakePoint(fillRect.origin.x + fillRect.size.width - 0.5, fillRect.origin.y + fillRect.size.height); - - [NSBezierPath strokeLineFromPoint:point1 toPoint:point2]; - } - - [NSGraphicsContext restoreGraphicsState]; -} - -- (NSColor *)_lineColorForTabCellDrawing -{ - NSColor *lineColor = nil; - - if (([[tabBar window] isMainWindow] || [[[tabBar window] attachedSheet] isMainWindow]) && [NSApp isActive]) { - if ([self isInDarkMode]) { - lineColor = [NSColor colorWithCalibratedWhite:0.29f alpha:.42f]; - } else { - lineColor = [NSColor grayColor]; - } - } - else { - if ([self isInDarkMode]) { - lineColor = [NSColor colorWithCalibratedWhite:0.19f alpha:.42f]; - } else { - lineColor = [NSColor colorWithCalibratedWhite:0.49f alpha:1.0f]; - } - } - - return lineColor; -} - -@end diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj index 434ba0d7d..39d8864bf 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj @@ -357,7 +357,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1620; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "QueryKit" */; compatibilityVersion = "Xcode 3.2"; @@ -365,9 +365,6 @@ hasScannedForEncodings = 1; knownRegions = ( en, - de, - fr, - ja, Base, ); mainGroup = 0867D691FE84028FC02AAC07 /* QueryKit */; @@ -459,8 +456,9 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -474,8 +472,9 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = ""; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Distribution; }; @@ -599,7 +598,7 @@ COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 20096; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; @@ -709,9 +708,10 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -726,9 +726,10 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = ""; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; @@ -757,8 +758,9 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -772,8 +774,9 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = ""; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; @@ -801,8 +804,9 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -816,8 +820,9 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = ""; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Beta; }; diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Frameworks/QueryKit/QueryKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Frameworks/QueryKit/QueryKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme index 2eaaf0fc2..17effca1e 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme @@ -1,6 +1,6 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 5.1.0 CFBundleSignature ???? CFBundleSupportedPlatforms @@ -21,10 +21,8 @@ MacOSX CFBundleVersion - 1 + 20096 ITSAppUsesNonExemptEncryption - LSMinimumSystemVersion - 10.11 diff --git a/Frameworks/QueryKit/Resources/Tests-Info.plist b/Frameworks/QueryKit/Resources/Tests-Info.plist index ddbc4bf77..0ccb951f9 100644 --- a/Frameworks/QueryKit/Resources/Tests-Info.plist +++ b/Frameworks/QueryKit/Resources/Tests-Info.plist @@ -13,10 +13,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.0 + 5.1.0 CFBundleSignature ???? CFBundleVersion - 1 + 20096 diff --git a/Frameworks/QueryKit/Source/QKQuery.h b/Frameworks/QueryKit/Source/QKQuery.h index 3a77a29c3..922a5c7d9 100644 --- a/Frameworks/QueryKit/Source/QKQuery.h +++ b/Frameworks/QueryKit/Source/QKQuery.h @@ -106,8 +106,8 @@ + (QKQuery *)selectQueryFromTable:(NSString *)table; + (QKQuery *)selectQueryFromTable:(NSString *)table database:(NSString *)database; -- (id)initWithTable:(NSString *)table; -- (id)initWithTable:(NSString *)table database:(NSString *)database; +- (instancetype)initWithTable:(NSString *)table; +- (instancetype)initWithTable:(NSString *)table database:(NSString *)database; - (NSString *)query; - (void)clear; diff --git a/Frameworks/QueryKit/Source/QKQuery.m b/Frameworks/QueryKit/Source/QKQuery.m index b3066aea5..fbcd9ce08 100644 --- a/Frameworks/QueryKit/Source/QKQuery.m +++ b/Frameworks/QueryKit/Source/QKQuery.m @@ -56,7 +56,7 @@ - (NSString *)_buildSelectOptions; - (BOOL)_addString:(NSString *)string toArray:(NSMutableArray *)array; @property (readwrite, nonatomic, copy) NSString *identifierQuote; -@property (readwrite, nonatomic, copy) NSMutableString *query; +@property (readwrite, nonatomic, strong) NSMutableString *query; @property (readwrite, nonatomic,strong) NSMutableArray *groupByFields; @property (readwrite, nonatomic,strong) NSMutableArray *orderByFields; @@ -104,17 +104,17 @@ + (QKQuery *)selectQueryFromTable:(NSString *)table database:(NSString *)databas return query; } -- (id)init +- (instancetype)init { return [self initWithTable:nil]; } -- (id)initWithTable:(NSString *)table +- (instancetype)initWithTable:(NSString *)table { return [self initWithTable:table database:nil]; } -- (id)initWithTable:(NSString *)table database:(NSString *)database +- (instancetype)initWithTable:(NSString *)table database:(NSString *)database { if ((self = [super init])) { [self setTable:table]; diff --git a/Frameworks/QueryKit/Source/QKQueryConstruct.h b/Frameworks/QueryKit/Source/QKQueryConstruct.h index 9481a24ba..6085921d0 100644 --- a/Frameworks/QueryKit/Source/QKQueryConstruct.h +++ b/Frameworks/QueryKit/Source/QKQueryConstruct.h @@ -43,7 +43,7 @@ /** * @property identifierQuote The quoute character to use for identifiers. */ -@property(readwrite, retain) NSString *identifierQuote; +@property(readwrite, strong) NSString *identifierQuote; /** * @property useQuotedIdentifier Indicates whether or not identifiers should be quoted. diff --git a/Frameworks/QueryKit/Source/QKQueryConstruct.m b/Frameworks/QueryKit/Source/QKQueryConstruct.m index 9d370aacb..d43465152 100644 --- a/Frameworks/QueryKit/Source/QKQueryConstruct.m +++ b/Frameworks/QueryKit/Source/QKQueryConstruct.m @@ -36,7 +36,7 @@ @implementation QKQueryConstruct #pragma mark - #pragma mark Initialisation -- (id)init +- (instancetype)init { if ((self = [super init])) { [self setUseQuotedIdentifier:YES]; diff --git a/Frameworks/QueryKit/Source/QKQueryOrderBy.h b/Frameworks/QueryKit/Source/QKQueryOrderBy.h index b9dff5579..00bb0d0f0 100644 --- a/Frameworks/QueryKit/Source/QKQueryOrderBy.h +++ b/Frameworks/QueryKit/Source/QKQueryOrderBy.h @@ -44,7 +44,7 @@ /** * @property orderByField */ -@property(readwrite, retain) NSString *orderByField; +@property(readwrite, copy) NSString *orderByField; /** * @property orderByDescending @@ -53,6 +53,6 @@ + (QKQueryOrderBy *)orderByField:(NSString *)field descending:(BOOL)descending; -- (id)initWithField:(NSString *)field descending:(BOOL)descending; +- (instancetype)initWithField:(NSString *)field descending:(BOOL)descending; @end diff --git a/Frameworks/QueryKit/Source/QKQueryOrderBy.m b/Frameworks/QueryKit/Source/QKQueryOrderBy.m index 7f4a4d5cb..6b948d273 100644 --- a/Frameworks/QueryKit/Source/QKQueryOrderBy.m +++ b/Frameworks/QueryKit/Source/QKQueryOrderBy.m @@ -41,12 +41,12 @@ + (QKQueryOrderBy *)orderByField:(NSString *)field descending:(BOOL)descending return [[QKQueryOrderBy alloc] initWithField:field descending:descending]; } -- (id)init +- (instancetype)init { return [self initWithField:nil descending:NO]; } -- (id)initWithField:(NSString *)field descending:(BOOL)descending +- (instancetype)initWithField:(NSString *)field descending:(BOOL)descending { if ((self = [super init])) { [self setOrderByField:field]; diff --git a/Frameworks/QueryKit/Source/QKQueryParameter.h b/Frameworks/QueryKit/Source/QKQueryParameter.h index 45c8211b4..65abe8574 100644 --- a/Frameworks/QueryKit/Source/QKQueryParameter.h +++ b/Frameworks/QueryKit/Source/QKQueryParameter.h @@ -47,6 +47,6 @@ + (QKQueryParameter *)queryParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value; -- (id)initParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value; +- (instancetype)initParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value; @end diff --git a/Frameworks/QueryKit/Source/QKQueryParameter.m b/Frameworks/QueryKit/Source/QKQueryParameter.m index 3ea767642..d65206352 100644 --- a/Frameworks/QueryKit/Source/QKQueryParameter.m +++ b/Frameworks/QueryKit/Source/QKQueryParameter.m @@ -42,7 +42,7 @@ + (QKQueryParameter *)queryParamWithField:(NSString *)field operator:(QKQueryOpe return [[QKQueryParameter alloc] initParamWithField:field operator:op value:value]; } -- (id)initParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value +- (instancetype)initParamWithField:(NSString *)field operator:(QKQueryOperator)op value:(id)value { if ((self = [super init])) { [self setField:field]; diff --git a/Frameworks/QueryKit/Source/QKQueryUpdateParameter.h b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.h index 36b641ba6..8634c31f7 100644 --- a/Frameworks/QueryKit/Source/QKQueryUpdateParameter.h +++ b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.h @@ -39,6 +39,6 @@ + (QKQueryUpdateParameter *)queryUpdateParamWithField:(NSString *)field value:(id)value; -- (id)initUpdateParamWithField:(NSString *)field value:(id)value; +- (instancetype)initUpdateParamWithField:(NSString *)field value:(id)value; @end diff --git a/Frameworks/QueryKit/Source/QKQueryUpdateParameter.m b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.m index 01052b3ea..38e967818 100644 --- a/Frameworks/QueryKit/Source/QKQueryUpdateParameter.m +++ b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.m @@ -39,7 +39,7 @@ + (QKQueryUpdateParameter *)queryUpdateParamWithField:(NSString *)field value:(i return [[QKQueryUpdateParameter alloc] initUpdateParamWithField:field value:value]; } -- (id)initUpdateParamWithField:(NSString *)field value:(id)value +- (instancetype)initUpdateParamWithField:(NSString *)field value:(id)value { if ((self = [super init])) { [self setField:field]; diff --git a/Frameworks/QueryKit/Tests/QKTestCase.h b/Frameworks/QueryKit/Tests/QKTestCase.h index baa4f0508..5bf07fe16 100644 --- a/Frameworks/QueryKit/Tests/QKTestCase.h +++ b/Frameworks/QueryKit/Tests/QKTestCase.h @@ -39,12 +39,12 @@ QKQueryDatabase _database; } -@property (readwrite, retain) QKQuery *query; +@property (readwrite, strong) QKQuery *query; -@property (readwrite, retain) NSString *identifierQuote; +@property (readwrite, copy) NSString *identifierQuote; @property (readwrite, assign) QKQueryDatabase database; -- (id)initWithInvocation:(NSInvocation *)invocation database:(QKQueryDatabase)database identifierQuote:(NSString *)quote; +- (instancetype)initWithInvocation:(NSInvocation *)invocation database:(QKQueryDatabase)database identifierQuote:(NSString *)quote; @end diff --git a/Frameworks/QueryKit/Tests/QKTestCase.m b/Frameworks/QueryKit/Tests/QKTestCase.m index 4573ca01a..f91bf1284 100644 --- a/Frameworks/QueryKit/Tests/QKTestCase.m +++ b/Frameworks/QueryKit/Tests/QKTestCase.m @@ -34,7 +34,7 @@ @implementation QKTestCase @synthesize identifierQuote = _identifierQuote; @synthesize database = _database; -- (id)initWithInvocation:(NSInvocation *)invocation database:(QKQueryDatabase)database identifierQuote:(NSString *)quote { +- (instancetype)initWithInvocation:(NSInvocation *)invocation database:(QKQueryDatabase)database identifierQuote:(NSString *)quote { if ((self = [super initWithInvocation:invocation])) { [self setDatabase:database]; [self setIdentifierQuote:quote]; diff --git a/Frameworks/SPMySQLFramework/LICENSE b/Frameworks/SPMySQLFramework/LICENSE index e429905eb..7e280c108 100644 --- a/Frameworks/SPMySQLFramework/LICENSE +++ b/Frameworks/SPMySQLFramework/LICENSE @@ -25,7 +25,6 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------------------------------ Forked from Sequel Pro (2020): Copyright (c) 2017 Rowan Beentje (rowan.beent.je) and the Sequel Pro team. diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/binary_log_types.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/binary_log_types.h deleted file mode 100644 index b20eacf61..000000000 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/binary_log_types.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -/** - @file binary_log_types.h - - @brief This file contains the field type. - - - @note This file can be imported both from C and C++ code, so the - definitions have to be constructed to support this. -*/ - -#ifndef BINARY_LOG_TYPES_INCLUDED -#define BINARY_LOG_TYPES_INCLUDED - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* - * Constants exported from this package. - */ - -typedef enum enum_field_types { - MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, - MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, - MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, - MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, - MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24, - MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, - MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, - MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR, - MYSQL_TYPE_BIT, - MYSQL_TYPE_TIMESTAMP2, - MYSQL_TYPE_DATETIME2, - MYSQL_TYPE_TIME2, - MYSQL_TYPE_JSON=245, - MYSQL_TYPE_NEWDECIMAL=246, - MYSQL_TYPE_ENUM=247, - MYSQL_TYPE_SET=248, - MYSQL_TYPE_TINY_BLOB=249, - MYSQL_TYPE_MEDIUM_BLOB=250, - MYSQL_TYPE_LONG_BLOB=251, - MYSQL_TYPE_BLOB=252, - MYSQL_TYPE_VAR_STRING=253, - MYSQL_TYPE_STRING=254, - MYSQL_TYPE_GEOMETRY=255 -} enum_field_types; - -#define DATETIME_MAX_DECIMALS 6 - -#ifdef __cplusplus -} -#endif // __cplusplus - -#endif /* BINARY_LOG_TYPES_INCLUDED */ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/errmsg.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/errmsg.h index adfca6321..eb7d45a97 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/errmsg.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/errmsg.h @@ -1,18 +1,19 @@ #ifndef ERRMSG_INCLUDED #define ERRMSG_INCLUDED -/* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -77,10 +78,10 @@ extern const char *client_errors[]; /* Error messages */ #define CR_CANT_READ_CHARSET 2019 #define CR_NET_PACKET_TOO_LARGE 2020 #define CR_EMBEDDED_CONNECTION 2021 -#define CR_PROBE_SLAVE_STATUS 2022 -#define CR_PROBE_SLAVE_HOSTS 2023 -#define CR_PROBE_SLAVE_CONNECT 2024 -#define CR_PROBE_MASTER_CONNECT 2025 +#define CR_PROBE_REPLICA_STATUS 2022 +#define CR_PROBE_REPLICA_HOSTS 2023 +#define CR_PROBE_REPLICA_CONNECT 2024 +#define CR_PROBE_SOURCE_CONNECT 2025 #define CR_SSL_CONNECTION_ERROR 2026 #define CR_MALFORMED_PACKET 2027 #define CR_WRONG_LICENSE 2028 @@ -123,17 +124,25 @@ extern const char *client_errors[]; /* Error messages */ #define CR_INSECURE_API_ERR 2062 #define CR_FILE_NAME_TOO_LONG 2063 #define CR_SSL_FIPS_MODE_ERR 2064 -#define CR_COMPRESSION_NOT_SUPPORTED 2065 +#define CR_DEPRECATED_COMPRESSION_NOT_SUPPORTED 2065 #define CR_COMPRESSION_WRONGLY_CONFIGURED 2066 #define CR_KERBEROS_USER_NOT_FOUND 2067 -#define CR_ERROR_LAST /*Copy last error nr:*/ 2067 +#define CR_LOAD_DATA_LOCAL_INFILE_REJECTED 2068 +#define CR_LOAD_DATA_LOCAL_INFILE_REALPATH_FAIL 2069 +#define CR_DNS_SRV_LOOKUP_FAILED 2070 +#define CR_MANDATORY_TRACKER_NOT_FOUND 2071 +#define CR_INVALID_FACTOR_NO 2072 +#define CR_CANT_GET_SESSION_DATA 2073 +#define CR_INVALID_CLIENT_CHARSET 2074 +#define CR_TLS_SERVER_NOT_FOUND 2075 +#define CR_ERROR_LAST /*Copy last error nr:*/ 2075 /* Add error numbers before CR_ERROR_LAST and change it accordingly. */ /* Visual Studio requires '__inline' for C code */ static inline const char *ER_CLIENT(int client_errno) { if (client_errno >= CR_ERROR_FIRST && client_errno <= CR_ERROR_LAST) return client_errors[client_errno - CR_ERROR_FIRST]; - return client_errors[CR_UNKNOWN_ERROR]; + return client_errors[CR_UNKNOWN_ERROR - CR_ERROR_FIRST]; } #endif /* ERRMSG_INCLUDED */ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/field_types.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/field_types.h index 6dfaf7f5f..73032ad06 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/field_types.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/field_types.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2014, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -48,13 +49,11 @@ extern "C" { /** Column types for MySQL + Note: Keep include/mysql/components/services/bits/stored_program_bits.h in + sync with this */ -enum enum_field_types -#if defined(__cplusplus) && __cplusplus > 201103L - // N2764: Forward enum declarations, added in C++11 - : int -#endif /* __cplusplus */ -{ MYSQL_TYPE_DECIMAL, +enum enum_field_types { + MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, @@ -75,6 +74,8 @@ enum enum_field_types MYSQL_TYPE_DATETIME2, /**< Internal to MySQL. Not used in protocol */ MYSQL_TYPE_TIME2, /**< Internal to MySQL. Not used in protocol */ MYSQL_TYPE_TYPED_ARRAY, /**< Used for replication only */ + MYSQL_TYPE_INVALID = 243, + MYSQL_TYPE_BOOL = 244, /**< Currently just a placeholder */ MYSQL_TYPE_JSON = 245, MYSQL_TYPE_NEWDECIMAL = 246, MYSQL_TYPE_ENUM = 247, @@ -85,7 +86,8 @@ enum enum_field_types MYSQL_TYPE_BLOB = 252, MYSQL_TYPE_VAR_STRING = 253, MYSQL_TYPE_STRING = 254, - MYSQL_TYPE_GEOMETRY = 255 }; + MYSQL_TYPE_GEOMETRY = 255 +}; #ifdef __cplusplus } // extern "C" diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h index d236c93ff..c2de579a2 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h @@ -1,78 +1,418 @@ -/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2020, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - Data structures for mysys/my_alloc.c (root memory allocator) -*/ +/** + * @file include/my_alloc.h + * + * This file follows Google coding style, except for the name MEM_ROOT (which is + * kept for historical reasons). + */ + +#ifndef INCLUDE_MY_ALLOC_H_ +#define INCLUDE_MY_ALLOC_H_ -#ifndef _my_alloc_h -#define _my_alloc_h +#include -#define ALLOC_MAX_BLOCK_TO_DROP 4096 -#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 +#include +#include +#include +#include -/* PSI_memory_key */ +#include "my_compiler.h" +#include "my_dbug.h" +#include "my_inttypes.h" +#include "my_pointer_arithmetic.h" #include "mysql/psi/psi_memory.h" -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct st_used_mem -{ /* struct for once_alloc (block) */ - struct st_used_mem *next; /* Next block in use */ - unsigned int left; /* memory left in block */ - unsigned int size; /* size of block */ -} USED_MEM; - - -typedef struct st_mem_root -{ - USED_MEM *free; /* blocks with free memory in it */ - USED_MEM *used; /* blocks almost without free memory */ - USED_MEM *pre_alloc; /* preallocated block */ - /* if block have less memory it will be put in 'used' list */ - size_t min_malloc; - size_t block_size; /* initial block size */ - unsigned int block_num; /* allocated blocks counter */ - /* - first free block in queue test counter (if it exceed - MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list) +/** + * The MEM_ROOT is a simple arena, where allocations are carved out of + * larger blocks. Using an arena over plain malloc gives you two main + * advantages: + * + * * Allocation is very cheap (only a few CPU cycles on the fast path). + * * You do not need to keep track of which memory you have allocated, + * as it will all be freed when the arena is destroyed. + * + * Thus, if you need to do many small allocations that all are to have + * roughly the same lifetime, the MEM_ROOT is probably a good choice. + * The flip side is that _no_ memory is freed until the arena is destroyed, + * and no destructors are run (although you can run them manually yourself). + * + * + * This specific implementation works by allocating exponentially larger blocks + * each time it needs more memory (generally increasing them by 50%), which + * guarantees O(1) total calls to malloc and free. Only one free block is + * ever used; as soon as there's an allocation that comes in that doesn't fit, + * that block is stored away and never allocated from again. (There's an + * exception for allocations larger than the block size; see #AllocSlow + * for details.) + * + * The MEM_ROOT is thread-compatible but not thread-safe. This means you cannot + * use the same instance from multiple threads at the same time without external + * synchronization, but you can use different MEM_ROOTs concurrently in + * different threads. + * + * For C compatibility reasons, MEM_ROOT is a struct, even though it is + * logically a class and follows the style guide for classes. + */ +struct MEM_ROOT { + private: + struct Block { + Block *prev{nullptr}; /** Previous block; used for freeing. */ + }; + + public: + MEM_ROOT() : MEM_ROOT(0, 512) {} // 0 = PSI_NOT_INSTRUMENTED. + + MEM_ROOT(PSI_memory_key key, size_t block_size) + : m_block_size(block_size), + m_orig_block_size(block_size), + m_psi_key(key) {} + + // MEM_ROOT is movable but not copyable. + MEM_ROOT(const MEM_ROOT &) = delete; + MEM_ROOT(MEM_ROOT &&other) + noexcept + : m_current_block(other.m_current_block), + m_current_free_start(other.m_current_free_start), + m_current_free_end(other.m_current_free_end), + m_block_size(other.m_block_size), + m_orig_block_size(other.m_orig_block_size), + m_max_capacity(other.m_max_capacity), + m_allocated_size(other.m_allocated_size), + m_error_for_capacity_exceeded(other.m_error_for_capacity_exceeded), + m_error_handler(other.m_error_handler), + m_psi_key(other.m_psi_key) { + other.m_current_block = nullptr; + other.m_allocated_size = 0; + other.m_block_size = m_orig_block_size; + other.m_current_free_start = &s_dummy_target; + other.m_current_free_end = &s_dummy_target; + } + + MEM_ROOT &operator=(const MEM_ROOT &) = delete; + MEM_ROOT &operator=(MEM_ROOT &&other) noexcept { + Clear(); + ::new (this) MEM_ROOT(std::move(other)); + return *this; + } + + ~MEM_ROOT() { Clear(); } + + /** + * Allocate memory. Will return nullptr if there's not enough memory, + * or if the maximum capacity is reached. + * + * Note that a zero-length allocation can return _any_ pointer, including + * nullptr or a pointer that has been given out before. The current + * implementation takes some pains to make sure we never return nullptr + * (although it might return a bogus pointer), since there is code that + * assumes nullptr always means “out of memory”, but you should not rely on + * it, as it may change in the future. + * + * The returned pointer will always be 8-aligned. + */ + void *Alloc(size_t length) MY_ATTRIBUTE((malloc)) { + length = ALIGN_SIZE(length); + + // Skip the straight path if simulating OOM; it should always fail. + DBUG_EXECUTE_IF("simulate_out_of_memory", return AllocSlow(length);); + + // Fast path, used in the majority of cases. It would be faster here + // (saving one register due to CSE) to instead test + // + // m_current_free_start + length <= m_current_free_end + // + // but it would invoke undefined behavior, and in particular be prone + // to wraparound on 32-bit platforms. + if (static_cast(m_current_free_end - m_current_free_start) >= + length) { + void *ret = m_current_free_start; + m_current_free_start += length; + return ret; + } + + return AllocSlow(length); + } + + /** + Allocate “num” objects of type T, and default-construct them. + If the constructor throws an exception, behavior is undefined. + + We don't use new[], as it can put extra data in front of the array. + */ + template + T *ArrayAlloc(size_t num, Args &&... args) { + static_assert(alignof(T) <= 8, "MEM_ROOT only returns 8-aligned memory."); + if (num * sizeof(T) < num) { + // Overflow. + return nullptr; + } + T *ret = static_cast(Alloc(num * sizeof(T))); + if (ret == nullptr) { + // Out of memory. + return nullptr; + } + + // Construct all elements. For primitive types like int + // and no arguments (ie., default construction), + // the entire loop will be optimized away. + for (size_t i = 0; i < num; ++i) { + new (&ret[i]) T(std::forward(args)...); + } + + return ret; + } + + /** + * Claim all the allocated memory for the current thread in the performance + * schema. Use when transferring responsibility for a MEM_ROOT from one thread + * to another. + */ + void Claim(bool claim); + + /** + * Deallocate all the RAM used. The MEM_ROOT itself continues to be valid, + * so you can make new calls to Alloc() afterwards. + + * @note + * One can call this function either with a MEM_ROOT initialized with the + * constructor, or with one that's memset() to all zeros. + * It's also safe to call this multiple times with the same mem_root. + */ + void Clear(); + + /** + * Similar to Clear(), but anticipates that the block will be reused for + * further allocations. This means that even though all the data is gone, + * one memory block (typically the largest allocated) will be kept and + * made immediately available for calls to Alloc() without having to go to the + * OS for new memory. This can yield performance gains if you use the same + * MEM_ROOT many times. Also, the block size is not reset. + */ + void ClearForReuse(); + + /** + Whether the constructor has run or not. + + This exists solely to support legacy code that memset()s the MEM_ROOT to + all zeros, which wants to distinguish between that state and a properly + initialized MEM_ROOT. If you do not run the constructor _nor_ do memset(), + you are invoking undefined behavior. + */ + bool inited() const { return m_block_size != 0; } + + /** + * Set maximum capacity for this MEM_ROOT. Whenever the MEM_ROOT has + * allocated more than this (not including overhead), and the free block + * is empty, future allocations will fail. + * + * @param max_capacity Maximum capacity this mem_root can hold + */ + void set_max_capacity(size_t max_capacity) { m_max_capacity = max_capacity; } + + /** + * Return maximum capacity for this MEM_ROOT. + */ + size_t get_max_capacity() const { return m_max_capacity; } + + /** + * Enable/disable error reporting for exceeding the maximum capacity. + * If error reporting is enabled, an error is flagged to indicate that the + * capacity is exceeded. However, allocation will still happen for the + * requested memory. + * + * @param report_error whether the error should be reported + */ + void set_error_for_capacity_exceeded(bool report_error) { + m_error_for_capacity_exceeded = report_error; + } + + /** + * Return whether error is to be reported when + * maximum capacity exceeds for MEM_ROOT. + */ + bool get_error_for_capacity_exceeded() const { + return m_error_for_capacity_exceeded; + } + + /** + * Set the error handler on memory allocation failure (or nullptr for none). + * The error handler is called called whenever my_malloc() failed to allocate + * more memory from the OS (which causes my_alloc() to return nullptr). + */ + void set_error_handler(void (*error_handler)(void)) { + m_error_handler = error_handler; + } + + /** + * Amount of memory we have allocated from the operating system, not including + * overhead. + */ + size_t allocated_size() const { return m_allocated_size; } + + /** + * Set the desired size of the next block to be allocated. Note that future + * allocations + * will grow in size over this, although a Clear() will reset the size again. + */ + void set_block_size(size_t block_size) { + m_block_size = m_orig_block_size = block_size; + } + + private: + /** + * Something to point on that exists solely to never return nullptr + * from Alloc(0). + */ + static char s_dummy_target; + + /** + Allocate a new block of the given length (plus overhead for the block + header). */ - unsigned int first_block_usage; + Block *AllocBlock(size_t length); + + /** Allocate memory that doesn't fit into the current free block. */ + void *AllocSlow(size_t length); + + /** Free all blocks in a linked list, starting at the given block. */ + static void FreeBlocks(Block *start); + + /** The current block we are giving out memory from. nullptr if none. */ + Block *m_current_block = nullptr; - /* - Maximum amount of memory this mem_root can hold. A value of 0 + /** Start (inclusive) of the current free block. */ + char *m_current_free_start = &s_dummy_target; + + /** End (exclusive) of the current free block. */ + char *m_current_free_end = &s_dummy_target; + + /** Size of the _next_ block we intend to allocate. */ + size_t m_block_size; + + /** The original block size the user asked for on construction. */ + size_t m_orig_block_size; + + /** + Maximum amount of memory this MEM_ROOT can hold. A value of 0 implies there is no limit. */ - size_t max_capacity; + size_t m_max_capacity = 0; - /* Allocated size for this mem_root */ + /** + * Total allocated size for this MEM_ROOT. Does not include overhead + * for block headers or malloc overhead, since especially the latter + * is impossible to quantify portably. + */ + size_t m_allocated_size = 0; - size_t allocated_size; + /** If enabled, exceeding the capacity will lead to a my_error() call. */ + bool m_error_for_capacity_exceeded = false; - /* Enable this for error reporting if capacity is exceeded */ - my_bool error_for_capacity_exceeded; + void (*m_error_handler)(void) = nullptr; + + PSI_memory_key m_psi_key = 0; +}; + +// Legacy C thunks. Do not use in new code. +static inline void init_alloc_root(PSI_memory_key key, MEM_ROOT *root, + size_t block_size, size_t) { + ::new (root) MEM_ROOT(key, block_size); +} + +void free_root(MEM_ROOT *root, myf flags); + +/** + * Allocate an object of the given type. Use like this: + * + * Foo *foo = new (mem_root) Foo(); + * + * Note that unlike regular operator new, this will not throw exceptions. + * However, it can return nullptr if the capacity of the MEM_ROOT has been + * reached. This is allowed since it is not a replacement for global operator + * new, and thus isn't used automatically by e.g. standard library containers. + * + * TODO: This syntax is confusing in that it could look like allocating + * a MEM_ROOT using regular placement new. We should make a less ambiguous + * syntax, e.g. new (On(mem_root)) Foo(). + */ +inline void *operator new( + size_t size, MEM_ROOT *mem_root, + const std::nothrow_t &arg MY_ATTRIBUTE((unused)) = std::nothrow) noexcept { + return mem_root->Alloc(size); +} + +inline void *operator new[]( + size_t size, MEM_ROOT *mem_root, + const std::nothrow_t &arg MY_ATTRIBUTE((unused)) = std::nothrow) noexcept { + return mem_root->Alloc(size); +} + +inline void operator delete(void *, MEM_ROOT *, + const std::nothrow_t &) noexcept { + /* never called */ +} + +inline void operator delete[](void *, MEM_ROOT *, + const std::nothrow_t &) noexcept { + /* never called */ +} + +template +inline void destroy(T *ptr) { + if (ptr != nullptr) ptr->~T(); +} + +template +inline void destroy_array(T *ptr, size_t count) { + static_assert(!std::is_pointer::value, + "You're trying to destroy an array of pointers, " + "not an array of objects. This is probably not " + "what you intended."); + if (ptr != nullptr) { + for (size_t i = 0; i < count; ++i) destroy(&ptr[i]); + } +} - void (*error_handler)(void); +/* + * For std::unique_ptr with objects allocated on a MEM_ROOT, you shouldn't use + * Default_deleter; use this deleter instead. + */ +template +class Destroy_only { + public: + void operator()(T *ptr) const { destroy(ptr); } +}; - PSI_memory_key m_psi_key; -} MEM_ROOT; +/** std::unique_ptr, but only destroying. */ +template +using unique_ptr_destroy_only = std::unique_ptr>; -#ifdef __cplusplus +template +unique_ptr_destroy_only make_unique_destroy_only(MEM_ROOT *mem_root, + Args &&... args) { + return unique_ptr_destroy_only(new (mem_root) + T(std::forward(args)...)); } -#endif -#endif +#endif // INCLUDE_MY_ALLOC_H_ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_command.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_command.h index 13b899354..038b5db52 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_command.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_command.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. -This program is also distributed with certain software (including +This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the -separately licensed software that they have included with MySQL. +separately licensed software that they have either included with +the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -56,15 +57,15 @@ enum enum_server_command { COM_FIELD_LIST, /**< Deprecated. See @ref page_protocol_com_field_list */ COM_CREATE_DB, /**< Currently refused by the server. See ::dispatch_command */ COM_DROP_DB, /**< Currently refused by the server. See ::dispatch_command */ - COM_REFRESH, /**< Deprecated. See @ref page_protocol_com_refresh */ - COM_DEPRECATED_1, /**< Deprecated, used to be COM_SHUTDOWN */ - COM_STATISTICS, /**< See @ref page_protocol_com_statistics */ - COM_PROCESS_INFO, /**< Deprecated. See @ref page_protocol_com_process_info */ - COM_CONNECT, /**< Currently refused by the server. */ - COM_PROCESS_KILL, /**< Deprecated. See @ref page_protocol_com_process_kill */ - COM_DEBUG, /**< See @ref page_protocol_com_debug */ - COM_PING, /**< See @ref page_protocol_com_ping */ - COM_TIME, /**< Currently refused by the server. */ + COM_UNUSED_2, /**< Removed, used to be COM_REFRESH. */ + COM_UNUSED_1, /**< Removed, used to be COM_SHUTDOWN */ + COM_STATISTICS, /**< See @ref page_protocol_com_statistics */ + COM_UNUSED_4, /**< Removed, used to be COM_PROCESS_INFO */ + COM_CONNECT, /**< Currently refused by the server. */ + COM_UNUSED_5, /**< Removed, used to be COM_PROCESS_KILL */ + COM_DEBUG, /**< See @ref page_protocol_com_debug */ + COM_PING, /**< See @ref page_protocol_com_ping */ + COM_TIME, /**< Currently refused by the server. */ COM_DELAYED_INSERT, /**< Functionality removed. */ COM_CHANGE_USER, /**< See @ref page_protocol_com_change_user */ COM_BINLOG_DUMP, /**< See @ref page_protocol_com_binlog_dump */ @@ -93,7 +94,9 @@ enum enum_server_command { COM_BINLOG_DUMP_GTID, COM_RESET_CONNECTION, /**< See @ref page_protocol_com_reset_connection */ COM_CLONE, - /* don't forget to update const char *command_name[] in sql_parse.cc */ + COM_SUBSCRIBE_GROUP_REPLICATION_STREAM, + /* don't forget to update std::string Command_names::m_names[] in sql_parse.cc + */ /* Must be last */ COM_END /**< Not a real command. Refused. */ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_compress.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_compress.h index 0fa58835f..6375fc740 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_compress.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_compress.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2019, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h index dfe756fb2..cc625f48f 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -25,21 +26,16 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _list_h_ -#define _list_h_ +#ifndef MY_LIST_INCLUDED +#define MY_LIST_INCLUDED /** @file include/my_list.h */ typedef struct LIST { -#if defined(__cplusplus) && __cplusplus >= 201103L - struct LIST *prev{nullptr}, *next{nullptr}; - void *data{nullptr}; -#else struct LIST *prev, *next; void *data; -#endif } LIST; typedef int (*list_walk_action)(void *, void *); @@ -54,4 +50,4 @@ extern int list_walk(LIST *, list_walk_action action, unsigned char *argument); #define list_rest(a) ((a)->next) -#endif +#endif // MY_LIST_INCLUDED diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h index 1f499e9d9..a72992ffc 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -54,7 +55,7 @@ typedef uint64_t my_ulonglong; #ifndef my_socket_defined #define my_socket_defined -#ifdef _WIN32 +#if defined(_WIN32) && !defined(MYSQL_ABI_CHECK) #include #ifdef WIN32_LEAN_AND_MEAN #include @@ -62,13 +63,13 @@ typedef uint64_t my_ulonglong; #define my_socket SOCKET #else typedef int my_socket; -#endif /* _WIN32 */ +#endif /* _WIN32 && ! MYSQL_ABI_CHECK */ #endif /* my_socket_defined */ // Small extra definition to avoid pulling in my_compiler.h in client code. // IWYU pragma: no_include "my_compiler.h" #ifndef MY_COMPILER_INCLUDED -#if !defined(_WIN32) +#if !defined(_WIN32) || defined(MYSQL_ABI_CHECK) #define STDCALL #else #define STDCALL __stdcall @@ -209,7 +210,11 @@ enum mysql_option { MYSQL_OPT_SSL_FIPS_MODE, MYSQL_OPT_TLS_CIPHERSUITES, MYSQL_OPT_COMPRESSION_ALGORITHMS, - MYSQL_OPT_ZSTD_COMPRESSION_LEVEL + MYSQL_OPT_ZSTD_COMPRESSION_LEVEL, + MYSQL_OPT_LOAD_DATA_LOCAL_DIR, + MYSQL_OPT_USER_PASSWORD, + MYSQL_OPT_SSL_SESSION_DATA, + MYSQL_OPT_TLS_SNI_SERVERNAME }; /** @@ -281,8 +286,8 @@ enum mysql_ssl_fips_mode { typedef struct character_set { unsigned int number; /* character set number */ unsigned int state; /* character set state */ - const char *csname; /* collation name */ - const char *name; /* character set name */ + const char *csname; /* character set name */ + const char *name; /* collation name */ const char *comment; /* comment */ const char *dir; /* character set directory */ unsigned int mbminlen; /* min. length for multibyte strings */ @@ -361,6 +366,22 @@ typedef struct MYSQL_RES { */ #define MYSQL_RPL_SKIP_HEARTBEAT (1 << 17) +/** + Flag to indicate that the heartbeat_event being generated + is using the class Heartbeat_event_v2 +*/ +#define USE_HEARTBEAT_EVENT_V2 (1 << 1) + +/** + Flag to indicate that tagged GTIDS will be skipped in COM_BINLOG_DUMP_GTIDS +*/ +#define MYSQL_RPL_SKIP_TAGGED_GTIDS (1 << 2) + +/** + Tagged GTIDS are supported starting from below version of MySQL +*/ +#define MYSQL_TAGGED_GTIDS_VERSION_SUPPORT 80300 + /** Struct for information about a replication stream. @@ -402,7 +423,7 @@ void STDCALL mysql_server_end(void); /* mysql_server_init/end need to be called when using libmysqld or libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so - you don't need to call it explicitely; but you need to call + you don't need to call it explicitly; but you need to call mysql_server_end() to free memory). The names are a bit misleading (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general names which suit well whether you're using libmysqld or libmysqlclient. We @@ -452,6 +473,10 @@ bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca, const char *capath, const char *cipher); const char *STDCALL mysql_get_ssl_cipher(MYSQL *mysql); +bool STDCALL mysql_get_ssl_session_reused(MYSQL *mysql); +void *STDCALL mysql_get_ssl_session_data(MYSQL *mysql, unsigned int n_ticket, + unsigned int *out_len); +bool STDCALL mysql_free_ssl_session_data(MYSQL *mysql, void *data); bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db); MYSQL *STDCALL mysql_real_connect(MYSQL *mysql, const char *host, @@ -555,6 +580,7 @@ void STDCALL myodbc_remove_escape(MYSQL *mysql, char *name); unsigned int STDCALL mysql_thread_safe(void); bool STDCALL mysql_read_query_result(MYSQL *mysql); int STDCALL mysql_reset_connection(MYSQL *mysql); +enum net_async_status STDCALL mysql_reset_connection_nonblocking(MYSQL *mysql); int STDCALL mysql_binlog_open(MYSQL *mysql, MYSQL_RPL *rpl); int STDCALL mysql_binlog_fetch(MYSQL *mysql, MYSQL_RPL *rpl); @@ -602,7 +628,7 @@ enum enum_mysql_stmt_state { length - On input: in case when lengths of input values are different for each execute, you can set this to - point at a variable containining value length. This + point at a variable containing value length. This way the value length can be different in each execute. If length is not NULL, buffer_length is not used. Note, length can even point at buffer_length if @@ -729,6 +755,9 @@ enum enum_stmt_attr_type { STMT_ATTR_PREFETCH_ROWS }; +bool STDCALL mysql_bind_param(MYSQL *mysql, unsigned n_params, + MYSQL_BIND *binds, const char **names); + MYSQL_STMT *STDCALL mysql_stmt_init(MYSQL *mysql); int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length); @@ -745,6 +774,8 @@ bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *attr); bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bnd); +bool STDCALL mysql_stmt_bind_named_param(MYSQL_STMT *stmt, MYSQL_BIND *binds, + unsigned n_params, const char **names); bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bnd); bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt); bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt); @@ -785,6 +816,14 @@ void STDCALL mysql_reset_server_public_key(void); #define HAVE_MYSQL_REAL_CONNECT +MYSQL *STDCALL mysql_real_connect_dns_srv(MYSQL *mysql, + const char *dns_srv_name, + const char *user, const char *passwd, + const char *db, + unsigned long client_flag); + +enum connect_stage STDCALL mysql_get_connect_nonblocking_stage(MYSQL *mysql); + #ifdef __cplusplus } #endif diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/client_plugin.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/client_plugin.h index f759d831f..87b011d05 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/client_plugin.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/client_plugin.h @@ -1,16 +1,17 @@ #ifndef MYSQL_CLIENT_PLUGIN_INCLUDED -/* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -45,24 +46,28 @@ for functions. */ -#undef MYSQL_PLUGIN_EXPORT - #if defined(_MSC_VER) -#if defined(MYSQL_DYNAMIC_PLUGIN) +#if defined(MYSQL_DYNAMIC_CLIENT_PLUGIN) #ifdef __cplusplus -#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport) +#define MYSQL_CLIENT_PLUGIN_EXPORT extern "C" __declspec(dllexport) #else -#define MYSQL_PLUGIN_EXPORT __declspec(dllexport) +#define MYSQL_CLIENT_PLUGIN_EXPORT __declspec(dllexport) #endif -#else /* MYSQL_DYNAMIC_PLUGIN */ +#else /* MYSQL_DYNAMIC_CLIENT_PLUGIN */ #ifdef __cplusplus -#define MYSQL_PLUGIN_EXPORT extern "C" +#define MYSQL_CLIENT_PLUGIN_EXPORT extern "C" #else -#define MYSQL_PLUGIN_EXPORT +#define MYSQL_CLIENT_PLUGIN_EXPORT #endif -#endif /*MYSQL_DYNAMIC_PLUGIN */ +#endif /*MYSQL_DYNAMIC_CLIENT_PLUGIN */ #else /*_MSC_VER */ -#define MYSQL_PLUGIN_EXPORT + +#if defined(MYSQL_DYNAMIC_CLIENT_PLUGIN) +#define MYSQL_CLIENT_PLUGIN_EXPORT MY_ATTRIBUTE((visibility("default"))) +#else +#define MYSQL_CLIENT_PLUGIN_EXPORT +#endif + #endif #ifdef __cplusplus @@ -74,34 +79,37 @@ extern "C" { #define MYSQL_CLIENT_reserved2 1 #define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2 #define MYSQL_CLIENT_TRACE_PLUGIN 3 +#define MYSQL_CLIENT_TELEMETRY_PLUGIN 4 -#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0101 -#define MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION 0x0100 +#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0200 +#define MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION 0x0200 +#define MYSQL_CLIENT_TELEMETRY_PLUGIN_INTERFACE_VERSION 0x0200 -#define MYSQL_CLIENT_MAX_PLUGINS 4 +#define MYSQL_CLIENT_MAX_PLUGINS 5 #define MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE "Oracle Corporation" -#define mysql_declare_client_plugin(X) \ - MYSQL_PLUGIN_EXPORT st_mysql_client_plugin_##X \ - _mysql_client_plugin_declaration_ = { \ - MYSQL_CLIENT_##X##_PLUGIN, \ +#define mysql_declare_client_plugin(X) \ + MYSQL_CLIENT_PLUGIN_EXPORT st_mysql_client_plugin_##X \ + _mysql_client_plugin_declaration_ = { \ + MYSQL_CLIENT_##X##_PLUGIN, \ MYSQL_CLIENT_##X##_PLUGIN_INTERFACE_VERSION, #define mysql_end_client_plugin } /* generic plugin header structure */ -#define MYSQL_CLIENT_PLUGIN_HEADER \ - int type; \ - unsigned int interface_version; \ - const char *name; \ - const char *author; \ - const char *desc; \ - unsigned int version[3]; \ - const char *license; \ - void *mysql_api; \ - int (*init)(char *, size_t, int, va_list); \ - int (*deinit)(void); \ - int (*options)(const char *option, const void *); +#define MYSQL_CLIENT_PLUGIN_HEADER \ + int type; \ + unsigned int interface_version; \ + const char *name; \ + const char *author; \ + const char *desc; \ + unsigned int version[3]; \ + const char *license; \ + void *mysql_api; \ + int (*init)(char *, size_t, int, va_list); \ + int (*deinit)(void); \ + int (*options)(const char *option, const void *); \ + int (*get_options)(const char *option, void *); struct st_mysql_client_plugin { MYSQL_CLIENT_PLUGIN_HEADER @@ -208,6 +216,21 @@ struct st_mysql_client_plugin *mysql_client_register_plugin( int mysql_plugin_options(struct st_mysql_client_plugin *plugin, const char *option, const void *value); +/** + get plugin options + + Can be used to get options from a plugin. + This function may be called multiple times to get several options + + @param plugin an st_mysql_client_plugin structure + @param option a string which specifies the option to get + @param[out] value value for the option. + + @retval 0 on success, 1 in case of failure +**/ +int mysql_plugin_get_option(struct st_mysql_client_plugin *plugin, + const char *option, void *value); + #ifdef __cplusplus } #endif diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/plugin_auth_common.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/plugin_auth_common.h index e57155e5e..18a88c8d9 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/plugin_auth_common.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/plugin_auth_common.h @@ -1,16 +1,17 @@ #ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED -/* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -94,7 +95,12 @@ or not. */ #define CR_OK_HANDSHAKE_COMPLETE -2 - +/** + Authentication was successful with limited operations. + It means that the both client and server side plugins decided to allow + authentication with very limited operations ALTER USER to do registration. +*/ +#define CR_OK_AUTH_IN_SANDBOX_MODE -3 /** Flag to be passed back to server from authentication plugins via authenticated_as when proxy mapping should be done by the server. @@ -105,7 +111,7 @@ authenticated_as when proxy mapping should be done by the server. We need HANDLE definition if on Windows. Define WIN32_LEAN_AND_MEAN (if not already done) to minimize amount of imported declarations. */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(MYSQL_ABI_CHECK) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif @@ -121,7 +127,7 @@ struct MYSQL_PLUGIN_VIO_INFO { MYSQL_VIO_MEMORY } protocol; int socket; /**< it's set, if the protocol is SOCKET or TCP */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(MYSQL_ABI_CHECK) HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */ #endif }; @@ -171,7 +177,7 @@ typedef struct MYSQL_PLUGIN_VIO { int *result); /** Non blocking version of write_packet. Sends data available in pkt of length - pkt_len to server in asynchrnous way. + pkt_len to server in asynchronous way. */ enum net_async_status (*write_packet_nonblocking)( struct MYSQL_PLUGIN_VIO *vio, const unsigned char *pkt, int pkt_len, diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_base.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_base.h index 94cb5c9f5..b198056e3 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_base.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_base.h @@ -1,44 +1,57 @@ -/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2020, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MYSQL_PSI_BASE_H #define MYSQL_PSI_BASE_H -#ifdef __cplusplus -extern "C" { -#endif +#include "my_psi_config.h" /** - @file mysql/psi/psi_base.h + @file include/mysql/psi/psi_base.h Performance schema instrumentation interface. - @defgroup Instrumentation_interface Instrumentation Interface - @ingroup Performance_schema + @defgroup instrumentation_interface Instrumentation Interface + @ingroup performance_schema @{ + + @defgroup psi_api Instrumentation Programming Interface + @{ + @} + + @defgroup psi_abi Instrumentation Binary Interface + @{ */ -#define PSI_INSTRUMENT_ME 0 +static constexpr unsigned PSI_INSTRUMENT_ME = 0; -#define PSI_NOT_INSTRUMENTED 0 +#define PSI_DOCUMENT_ME "" + +static constexpr unsigned PSI_NOT_INSTRUMENTED = 0; /** - Global flag. - This flag indicate that an instrumentation point is a global variable, - or a singleton. + Singleton flag. + This flag indicate that an instrumentation point is a singleton. */ -#define PSI_FLAG_GLOBAL (1 << 0) +#define PSI_FLAG_SINGLETON (1 << 0) /** Mutable flag. @@ -47,6 +60,11 @@ extern "C" { */ #define PSI_FLAG_MUTABLE (1 << 1) +/** + Per Thread flag. + This flag indicates the instrumented object is per thread. + Reserved for future use. +*/ #define PSI_FLAG_THREAD (1 << 2) /** @@ -60,7 +78,7 @@ extern "C" { Shared Exclusive flag. Indicates that rwlock support the shared exclusive state. */ -#define PSI_RWLOCK_FLAG_SX (1 << 4) +#define PSI_FLAG_RWLOCK_SX (1 << 4) /** Transferable flag. @@ -70,86 +88,53 @@ extern "C" { #define PSI_FLAG_TRANSFER (1 << 5) /** - Volatility flag. - This flag indicate that an instrumented object - has a volatility (life cycle) comparable - to the volatility of a session. + User flag. + This flag indicate that an instrumented object exists on a + user or foreground thread. If not set, then the object + exists on a system or background thread. */ -#define PSI_FLAG_VOLATILITY_SESSION (1 << 6) - -#ifdef HAVE_PSI_INTERFACE +#define PSI_FLAG_USER (1 << 6) /** - @def PSI_VERSION_1 - Performance Schema Interface number for version 1. - This version is supported. + Global stat only flag. + This flag indicates statistics for the instrument + are aggregated globally only. + No per thread / account / user / host aggregations + are available. */ -#define PSI_VERSION_1 1 +#define PSI_FLAG_ONLY_GLOBAL_STAT (1 << 7) /** - @def PSI_VERSION_2 - Performance Schema Interface number for version 2. - This version is not implemented, it's a placeholder. + Priority lock flag. + Indicates that rwlock support the priority lock scheduling. */ -#define PSI_VERSION_2 2 +#define PSI_FLAG_RWLOCK_PR (1 << 8) /** - @def PSI_CURRENT_VERSION - Performance Schema Interface number for the most recent version. - The most current version is @c PSI_VERSION_1 + System thread flag. + Indicates that the instrumented object exists on a system thread. */ -#define PSI_CURRENT_VERSION 1 +#define PSI_FLAG_THREAD_SYSTEM (1 << 9) -/** - @def USE_PSI_1 - Define USE_PSI_1 to use the interface version 1. -*/ +#define PSI_VOLATILITY_UNKNOWN 0 +#define PSI_VOLATILITY_PERMANENT 1 +#define PSI_VOLATILITY_PROVISIONING 2 +#define PSI_VOLATILITY_DDL 3 +#define PSI_VOLATILITY_CACHE 4 +#define PSI_VOLATILITY_SESSION 5 +#define PSI_VOLATILITY_TRANSACTION 6 +#define PSI_VOLATILITY_QUERY 7 +#define PSI_VOLATILITY_INTRA_QUERY 8 -/** - @def USE_PSI_2 - Define USE_PSI_2 to use the interface version 2. -*/ +#define PSI_COUNT_VOLATILITY 9 -/** - @def HAVE_PSI_1 - Define HAVE_PSI_1 if the interface version 1 needs to be compiled in. -*/ +struct PSI_placeholder { + int m_placeholder; +}; /** - @def HAVE_PSI_2 - Define HAVE_PSI_2 if the interface version 2 needs to be compiled in. -*/ - -#ifndef USE_PSI_2 -#ifndef USE_PSI_1 -#define USE_PSI_1 -#endif -#endif - -#ifdef USE_PSI_1 -#define HAVE_PSI_1 -#endif - -#ifdef USE_PSI_2 -#define HAVE_PSI_2 -#endif - -/* - Allow to override PSI_XXX_CALL at compile time - with more efficient implementations, if available. - If nothing better is available, - make a dynamic call using the PSI_server function pointer. + @} (end of group psi_abi) + @} (end of group instrumentation_interface) */ -#define PSI_DYNAMIC_CALL(M) PSI_server->M - -#endif /* HAVE_PSI_INTERFACE */ - -/** @} */ - -#ifdef __cplusplus -} -#endif - #endif /* MYSQL_PSI_BASE_H */ - diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_memory.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_memory.h index 725b3ed77..2e5221871 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_memory.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/psi/psi_memory.h @@ -1,46 +1,53 @@ -/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MYSQL_PSI_MEMORY_H #define MYSQL_PSI_MEMORY_H -#include "psi_base.h" - -#ifdef __cplusplus -extern "C" { -#endif +#include "my_psi_config.h" // IWYU pragma: keep +#include "my_sharedlib.h" +#include "mysql/components/services/psi_memory_bits.h" + +/* + MAINTAINER: + Note that this file is part of the public API, + because mysql.h exports + struct MEM_ROOT + See + - PSI_memory_key MEM_ROOT::m_psi_key + - include/mysql.h.pp +*/ /** - @file mysql/psi/psi_memory.h + @file include/mysql/psi/psi_memory.h Performance schema instrumentation interface. +*/ - @defgroup Instrumentation_interface Instrumentation Interface - @ingroup Performance_schema +/** + @defgroup psi_abi_memory Memory Instrumentation (ABI) + @ingroup psi_abi @{ */ -#ifdef HAVE_PSI_INTERFACE -#ifndef DISABLE_ALL_PSI -#ifndef DISABLE_PSI_MEMORY -#define HAVE_PSI_MEMORY_INTERFACE -#endif /* DISABLE_PSI_MEMORY */ -#endif /* DISABLE_ALL_PSI */ -#endif /* HAVE_PSI_INTERFACE */ - -struct PSI_thread; - /** Instrumented memory key. To instrument memory, a memory key must be obtained using @c register_memory. @@ -48,108 +55,68 @@ struct PSI_thread; */ typedef unsigned int PSI_memory_key; -#ifdef HAVE_PSI_1 - /** - @defgroup Group_PSI_v1 Application Binary Interface, version 1 - @ingroup Instrumentation_interface - @{ + @def PSI_MEMORY_VERSION_1 + Performance Schema Memory Interface number for version 1. + This version is abandoned. */ +#define PSI_MEMORY_VERSION_1 1 /** - Memory instrument information. - @since PSI_VERSION_1 - This structure is used to register instrumented memory. + @def PSI_MEMORY_VERSION_2 + Performance Schema Memory Interface number for version 2. + This version is supported. */ -struct PSI_memory_info_v1 -{ - /** Pointer to the key assigned to the registered memory. */ - PSI_memory_key *m_key; - /** The name of the memory instrument to register. */ - const char *m_name; - /** - The flags of the socket instrument to register. - @sa PSI_FLAG_GLOBAL - */ - int m_flags; -}; -typedef struct PSI_memory_info_v1 PSI_memory_info_v1; +#define PSI_MEMORY_VERSION_2 2 /** - Memory registration API. - @param category a category name (typically a plugin name) - @param info an array of memory info to register - @param count the size of the info array + @def PSI_CURRENT_MEMORY_VERSION + Performance Schema Memory Interface number for the most recent version. + The most current version is @c PSI_MEMORY_VERSION_2 */ -typedef void (*register_memory_v1_t) - (const char *category, struct PSI_memory_info_v1 *info, int count); +#define PSI_CURRENT_MEMORY_VERSION 2 -/** - Instrument memory allocation. - @param key the memory instrument key - @param size the size of memory allocated - @param[out] owner the memory owner - @return the effective memory instrument key -*/ -typedef PSI_memory_key (*memory_alloc_v1_t) - (PSI_memory_key key, size_t size, struct PSI_thread ** owner); +struct PSI_thread; -/** - Instrument memory re allocation. - @param key the memory instrument key - @param old_size the size of memory previously allocated - @param new_size the size of memory re allocated - @param[in, out] owner the memory owner - @return the effective memory instrument key -*/ -typedef PSI_memory_key (*memory_realloc_v1_t) - (PSI_memory_key key, size_t old_size, size_t new_size, struct PSI_thread ** owner); +/** Entry point for the performance schema interface. */ +struct PSI_memory_bootstrap { + /** + ABI interface finder. + Calling this method with an interface version number returns either + an instance of the ABI for this version, or NULL. + @sa PSI_MEMORY_VERSION_1 + @sa PSI_MEMORY_VERSION_2 + @sa PSI_CURRENT_MEMORY_VERSION + */ + void *(*get_interface)(int version); +}; +typedef struct PSI_memory_bootstrap PSI_memory_bootstrap; -/** - Instrument memory claim. - @param key the memory instrument key - @param size the size of memory allocated - @param[in, out] owner the memory owner - @return the effective memory instrument key -*/ -typedef PSI_memory_key (*memory_claim_v1_t) - (PSI_memory_key key, size_t size, struct PSI_thread ** owner); +#ifdef HAVE_PSI_MEMORY_INTERFACE /** - Instrument memory free. - @param key the memory instrument key - @param size the size of memory allocated - @param owner the memory owner + Performance Schema Memory Interface, version 2. + @since PSI_MEMORY_VERSION_2 */ -typedef void (*memory_free_v1_t) - (PSI_memory_key key, size_t size, struct PSI_thread * owner); - -/** @} (end of group Group_PSI_v1) */ - -#endif /* HAVE_PSI_1 */ - -#ifdef HAVE_PSI_2 -struct PSI_memory_info_v2 -{ - int placeholder; +struct PSI_memory_service_v2 { + /** @sa register_memory_v1_t. */ + register_memory_v1_t register_memory; + /** @sa memory_alloc_v1_t. */ + memory_alloc_v1_t memory_alloc; + /** @sa memory_realloc_v1_t. */ + memory_realloc_v1_t memory_realloc; + /** @sa memory_claim_v2_t. */ + memory_claim_v2_t memory_claim; + /** @sa memory_free_v1_t. */ + memory_free_v1_t memory_free; }; -#endif /* HAVE_PSI_2 */ +typedef struct PSI_memory_service_v2 PSI_memory_service_t; -#ifdef USE_PSI_1 -typedef struct PSI_memory_info_v1 PSI_memory_info; -#endif +extern MYSQL_PLUGIN_IMPORT PSI_memory_service_t *psi_memory_service; -#ifdef USE_PSI_2 -typedef struct PSI_memory_info_v2 PSI_memory_info; -#endif - -/** @} (end of group Instrumentation_interface) */ - -#ifdef __cplusplus -} -#endif +#endif /* HAVE_PSI_MEMORY_INTERFACE */ +/** @} (end of group psi_abi_memory) */ #endif /* MYSQL_PSI_MEMORY_H */ - diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/udf_registration_types.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/udf_registration_types.h index a9bf6b744..5ab1425de 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/udf_registration_types.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql/udf_registration_types.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2017, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. -This program is also distributed with certain software (including +This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the -separately licensed software that they have included with MySQL. +separately licensed software that they have either included with +the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h index ad6b58794..505da5ffb 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the @@ -47,7 +48,7 @@ */ #ifndef my_socket_defined #include "my_io.h" -#include "mysql/components/services/my_io_bits.h" +#include "mysql/components/services/bits/my_io_bits.h" #endif #ifndef MYSQL_ABI_CHECK @@ -73,6 +74,17 @@ #define SERVER_VERSION_LENGTH 60 #define SQLSTATE_LENGTH 5 +/* + In FIDO terminology, relying party is the server where required services are + running. Relying party ID is unique name given to server. +*/ +#define RELYING_PARTY_ID_LENGTH 255 + +/* Length of random salt sent during fido registration */ +#define CHALLENGE_LENGTH 32 + +/* Maximum authentication factors server supports */ +#define MAX_AUTH_FACTORS 3 /** Maximum length of comments @@ -115,7 +127,7 @@ */ #define SCRAMBLE_LENGTH 20 #define AUTH_PLUGIN_DATA_PART_1_LENGTH 8 -/** length of password stored in the db: new passwords are preceeded with '*'*/ +/** length of password stored in the db: new passwords are preceded with '*'*/ #define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH * 2 + 1) /** @@ -178,12 +190,12 @@ #define EXPLICIT_NULL_FLAG \ (1 << 27) /**< Field is explicitly specified as \ NULL by the user */ -#define FIELD_IS_MARKED \ - (1 << 28) /**< Intern: field is marked, \ - general purpose */ +/* 1 << 28 is unused. */ /** Field will not be loaded in secondary engine. */ #define NOT_SECONDARY_FLAG (1 << 29) +/** Field is explicitly marked as invisible by the user. */ +#define FIELD_IS_INVISIBLE (1 << 30) /** @}*/ @@ -203,19 +215,25 @@ @{ */ -#define REFRESH_GRANT 1 /**< Refresh grant tables, FLUSH PRIVILEGES */ -#define REFRESH_LOG 2 /**< Start on new log file, FLUSH LOGS */ -#define REFRESH_TABLES 4 /**< close all tables, FLUSH TABLES */ -#define REFRESH_HOSTS 8 /**< Flush host cache, FLUSH HOSTS */ -#define REFRESH_STATUS 16 /**< Flush status variables, FLUSH STATUS */ -#define REFRESH_THREADS 32 /**< Flush thread cache */ -#define REFRESH_SLAVE \ - 64 /**< Reset master info and restart slave \ - thread, RESET SLAVE */ -#define REFRESH_MASTER \ - 128 /**< Remove all bin logs in the index \ - and truncate the index, RESET MASTER */ -#define REFRESH_ERROR_LOG 256 /**< Rotate only the erorr log */ +#define REFRESH_GRANT 1 /**< Refresh grant tables, FLUSH PRIVILEGES */ +#define REFRESH_LOG 2 /**< Start on new log file, FLUSH LOGS */ +#define REFRESH_TABLES 4 /**< close all tables, FLUSH TABLES */ +#define UNUSED_8 \ + 8 /**< Previously REFRESH_HOSTS but not used anymore. Use TRUNCATE TABLE \ + performance_schema.host_cache instead */ +#define REFRESH_STATUS 16 /**< Flush status variables, FLUSH STATUS */ +#define UNUSED_32 32 /**< Removed. Used to be flush thread cache */ +#define REFRESH_REPLICA \ + 64 /**< Reset source info and restart replica \ + thread, RESET REPLICA */ + +#define REFRESH_SOURCE \ + 128 /**< Remove all bin logs in the index \ + and truncate the index. Also resets \ + GTID information. Command: \ + RESET BINARY LOGS AND GTIDS */ + +#define REFRESH_ERROR_LOG 256 /**< Rotate only the error log */ #define REFRESH_ENGINE_LOG 512 /**< Flush all storage engine logs */ #define REFRESH_BINARY_LOG 1024 /**< Flush the binary log */ #define REFRESH_RELAY_LOG 2048 /**< Flush the relay log */ @@ -228,7 +246,9 @@ @sa REFRESH_READ_LOCK, handle_reload_request, close_cached_tables */ #define REFRESH_FAST 32768 -#define REFRESH_USER_RESOURCES 0x80000L /** FLISH RESOUCES. @sa ::reset_mqh */ +#define REFRESH_USER_RESOURCES \ + 0x80000L /** FLUSH RESOURCES. @sa ::reset_mqh \ + */ #define REFRESH_FOR_EXPORT 0x100000L /** FLUSH TABLES ... FOR EXPORT */ #define REFRESH_OPTIMIZER_COSTS 0x200000L /** FLUSH OPTIMIZER_COSTS */ #define REFRESH_PERSIST 0x400000L /** RESET PERSIST */ @@ -306,7 +326,8 @@ @sa send_client_reply_packet() */ #define CLIENT_CONNECT_WITH_DB 8 -#define CLIENT_NO_SCHEMA 16 /**< Don't allow database.table.column */ +#define CLIENT_NO_SCHEMA \ + 16 /**< DEPRECATED: Don't allow database.table.column */ /** Compression protocol supported. @@ -670,15 +691,6 @@ */ #define CLIENT_DEPRECATE_EOF (1UL << 24) -/** - Verify server certificate. - - Client only flag. - - @deprecated in favor of --ssl-mode. -*/ -#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) - /** The client can handle optional metadata information in the resultset. */ @@ -703,11 +715,54 @@ */ #define CLIENT_ZSTD_COMPRESSION_ALGORITHM (1UL << 26) +/** + Support optional extension for query parameters into the @ref + page_protocol_com_query and @ref page_protocol_com_stmt_execute packets. + + Server + ------ + + Expects an optional part containing the query parameter set(s). Executes the + query for each set of parameters or returns an error if more than 1 set of + parameters is sent and the server can't execute it. + + Client + ------ + + Can send the optional part containing the query parameter set(s). +*/ +#define CLIENT_QUERY_ATTRIBUTES (1UL << 27) + +/** + Support Multi factor authentication. + + Server + ------ + Server sends AuthNextFactor packet after every nth factor authentication + method succeeds, except the last factor authentication. + + Client + ------ + Client reads AuthNextFactor packet sent by server and initiates next factor + authentication method. +*/ +#define MULTI_FACTOR_AUTHENTICATION (1UL << 28) + /** This flag will be reserved to extend the 32bit capabilities structure to 64bits. */ #define CLIENT_CAPABILITY_EXTENSION (1UL << 29) + +/** + Verify server certificate. + + Client only flag. + + @deprecated in favor of --ssl-mode. +*/ +#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) + /** Don't reset the options after an unsuccessful connect @@ -723,7 +778,7 @@ /** a compatibility alias for CLIENT_COMPRESS */ #define CAN_CLIENT_COMPRESS CLIENT_COMPRESS -/** Gather all possible capabilites (flags) supported by the server */ +/** Gather all possible capabilities (flags) supported by the server */ #define CLIENT_ALL_FLAGS \ (CLIENT_LONG_PASSWORD | CLIENT_FOUND_ROWS | CLIENT_LONG_FLAG | \ CLIENT_CONNECT_WITH_DB | CLIENT_NO_SCHEMA | CLIENT_COMPRESS | CLIENT_ODBC | \ @@ -736,7 +791,8 @@ CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | \ CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS | CLIENT_SESSION_TRACK | \ CLIENT_DEPRECATE_EOF | CLIENT_OPTIONAL_RESULTSET_METADATA | \ - CLIENT_ZSTD_COMPRESSION_ALGORITHM) + CLIENT_ZSTD_COMPRESSION_ALGORITHM | CLIENT_QUERY_ATTRIBUTES | \ + MULTI_FACTOR_AUTHENTICATION) /** Switch off from ::CLIENT_ALL_FLAGS the flags that are optional and @@ -840,13 +896,21 @@ struct Vio; #define MYSQL_VIO struct Vio * #endif -#define MAX_TINYINT_WIDTH 3 /**< Max width for a TINY w.o. sign */ -#define MAX_SMALLINT_WIDTH 5 /**< Max width for a SHORT w.o. sign */ -#define MAX_MEDIUMINT_WIDTH 8 /**< Max width for a INT24 w.o. sign */ -#define MAX_INT_WIDTH 10 /**< Max width for a LONG w.o. sign */ -#define MAX_BIGINT_WIDTH 20 /**< Max width for a LONGLONG */ -#define MAX_CHAR_WIDTH 255 /**< Max length for a CHAR colum */ -#define MAX_BLOB_WIDTH 16777216 /**< Default width for blob */ +#define MAX_TINYINT_WIDTH 3 /**< Max width for a TINY w.o. sign */ +#define MAX_SMALLINT_WIDTH 5 /**< Max width for a SHORT w.o. sign */ +#define MAX_MEDIUMINT_WIDTH 8 /**< Max width for a INT24 w.o. sign */ +#define MAX_INT_WIDTH 10 /**< Max width for a LONG w.o. sign */ +#define MAX_BIGINT_WIDTH 20 /**< Max width for a LONGLONG */ +/// Max width for a CHAR column, in number of characters +#define MAX_CHAR_WIDTH 255 +/// Default width for blob in bytes @todo - align this with sizes from field.h +#define MAX_BLOB_WIDTH 16777216 + +#define NET_ERROR_UNSET 0 /**< No error has occurred yet */ +#define NET_ERROR_SOCKET_RECOVERABLE 1 /**< Socket still usable */ +#define NET_ERROR_SOCKET_UNUSABLE 2 /**< Do not use the socket */ +#define NET_ERROR_SOCKET_NOT_READABLE 3 /**< Try write and close socket */ +#define NET_ERROR_SOCKET_NOT_WRITABLE 4 /**< Try read and close socket */ typedef struct NET { MYSQL_VIO vio; @@ -965,11 +1029,29 @@ enum enum_resultset_metadata { RESULTSET_METADATA_FULL = 1 }; +#if defined(__clang__) +// disable -Wdocumentation to workaround +// https://bugs.llvm.org/show_bug.cgi?id=38905 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdocumentation" +#endif +/** + The flags used in COM_STMT_EXECUTE. + @sa @ref Protocol_classic::parse_packet, @ref mysql_int_serialize_param_data +*/ +#if defined(__clang__) +#pragma clang diagnostic pop +#endif enum enum_cursor_type { CURSOR_TYPE_NO_CURSOR = 0, CURSOR_TYPE_READ_ONLY = 1, CURSOR_TYPE_FOR_UPDATE = 2, - CURSOR_TYPE_SCROLLABLE = 4 + CURSOR_TYPE_SCROLLABLE = 4, + /** + On when the client will send the parameter count + even for 0 parameters. + */ + PARAMETER_COUNT_AVAILABLE = 8 }; /** options for ::mysql_options() */ @@ -1011,7 +1093,7 @@ bool my_net_init(struct NET *net, MYSQL_VIO vio); void my_net_local_init(struct NET *net); void net_end(struct NET *net); void net_clear(struct NET *net, bool check_buffer); -void net_claim_memory_ownership(struct NET *net); +void net_claim_memory_ownership(struct NET *net, bool claim); bool net_realloc(struct NET *net, size_t length); bool net_flush(struct NET *net); bool my_net_write(struct NET *net, const unsigned char *packet, size_t len); @@ -1044,31 +1126,7 @@ struct rand_struct { /* Prototypes to password functions */ -/* - These functions are used for authentication by client and server and - implemented in sql/password.c -*/ - -void randominit(struct rand_struct *, unsigned long seed1, unsigned long seed2); -double my_rnd(struct rand_struct *); -void create_random_string(char *to, unsigned int length, - struct rand_struct *rand_st); - -void hash_password(unsigned long *to, const char *password, - unsigned int password_len); -void make_scrambled_password_323(char *to, const char *password); -void scramble_323(char *to, const char *message, const char *password); -bool check_scramble_323(const unsigned char *reply, const char *message, - unsigned long *salt); -void get_salt_from_password_323(unsigned long *res, const char *password); -void make_password_from_salt_323(char *to, const unsigned long *salt); - -void make_scrambled_password(char *to, const char *password); -void scramble(char *to, const char *message, const char *password); -bool check_scramble(const unsigned char *reply, const char *message, - const unsigned char *hash_stage2); -void get_salt_from_password(unsigned char *res, const char *password); -void make_password_from_salt(char *to, const unsigned char *hash_stage2); +/* used in both client and server */ char *octet2hex(char *to, const char *str, unsigned int len); /* end of password.c */ @@ -1090,15 +1148,8 @@ const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); /* Some other useful functions */ -// Need to be extern "C" for the time being, due to memcached. -#ifdef __cplusplus -extern "C" { -#endif bool my_thread_init(void); void my_thread_end(void); -#ifdef __cplusplus -} -#endif #ifdef STDCALL unsigned long STDCALL net_field_length(unsigned char **packet); @@ -1109,8 +1160,146 @@ uint64_t net_field_length_ll(unsigned char **packet); unsigned char *net_store_length(unsigned char *pkg, unsigned long long length); unsigned int net_length_size(unsigned long long num); unsigned int net_field_length_size(const unsigned char *pos); +uint64_t net_length_size_including_self(uint64_t length_without_self); #define NULL_LENGTH ((unsigned long)~0) /**< For ::net_store_length() */ #define MYSQL_STMT_HEADER 4 #define MYSQL_LONG_DATA_HEADER 6 + +/* clang-format off */ +/** + Describes the current state of Asynchronous connection phase state machine + + @startuml + [*] --> CONNECT_STAGE_INVALID + [*] --> CONNECT_STAGE_NOT_STARTED + + CONNECT_STAGE_NOT_STARTED --> CONNECT_STAGE_NET_BEGIN_CONNECT + CONNECT_STAGE_NOT_STARTED --> CONNECT_STAGE_COMPLETE + + CONNECT_STAGE_NET_BEGIN_CONNECT --> CONNECT_STAGE_NET_WAIT_CONNECT + CONNECT_STAGE_NET_BEGIN_CONNECT --> CONNECT_STAGE_NET_COMPLETE_CONNECT + CONNECT_STAGE_NET_BEGIN_CONNECT --> STATE_MACHINE_FAILED + + CONNECT_STAGE_NET_WAIT_CONNECT --> CONNECT_STAGE_NET_COMPLETE_CONNECT + CONNECT_STAGE_NET_WAIT_CONNECT --> STATE_MACHINE_FAILED + + CONNECT_STAGE_NET_COMPLETE_CONNECT --> STATE_MACHINE_FAILED + CONNECT_STAGE_NET_COMPLETE_CONNECT --> CONNECT_STAGE_READ_GREETING + + CONNECT_STAGE_READ_GREETING --> STATE_MACHINE_FAILED + CONNECT_STAGE_READ_GREETING --> CONNECT_STAGE_PARSE_HANDSHAKE + + CONNECT_STAGE_PARSE_HANDSHAKE --> STATE_MACHINE_FAILED + CONNECT_STAGE_PARSE_HANDSHAKE --> CONNECT_STAGE_ESTABLISH_SSL + + CONNECT_STAGE_ESTABLISH_SSL --> STATE_MACHINE_FAILED + CONNECT_STAGE_ESTABLISH_SSL --> CONNECT_STAGE_AUTHENTICATE + + CONNECT_STAGE_AUTHENTICATE --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTHENTICATE --> CONNECT_STAGE_AUTH_BEGIN + + CONNECT_STAGE_AUTH_BEGIN --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_BEGIN --> CONNECT_STAGE_AUTH_RUN_FIRST_AUTHENTICATE_USER + + CONNECT_STAGE_AUTH_RUN_FIRST_AUTHENTICATE_USER --> CONNECT_STAGE_AUTH_HANDLE_FIRST_AUTHENTICATE_USER + + CONNECT_STAGE_AUTH_HANDLE_FIRST_AUTHENTICATE_USER --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_HANDLE_FIRST_AUTHENTICATE_USER --> CONNECT_STAGE_AUTH_READ_CHANGE_USER_RESULT + + CONNECT_STAGE_AUTH_READ_CHANGE_USER_RESULT --> CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUEST + + CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUEST --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUEST --> CONNECT_STAGE_AUTH_RUN_SECOND_AUTHENTICATE_USER + CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUEST --> CONNECT_STAGE_AUTH_INIT_MULTI_AUTH + CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUEST --> CONNECT_STAGE_AUTH_FINISH_AUTH + + CONNECT_STAGE_AUTH_RUN_SECOND_AUTHENTICATE_USER --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_RUN_SECOND_AUTHENTICATE_USER --> CONNECT_STAGE_AUTH_HANDLE_SECOND_AUTHENTICATE_USER + + CONNECT_STAGE_AUTH_HANDLE_SECOND_AUTHENTICATE_USER --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_HANDLE_SECOND_AUTHENTICATE_USER --> CONNECT_STAGE_AUTH_INIT_MULTI_AUTH + CONNECT_STAGE_AUTH_HANDLE_SECOND_AUTHENTICATE_USER --> CONNECT_STAGE_AUTH_FINISH_AUTH + + CONNECT_STAGE_AUTH_INIT_MULTI_AUTH --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_INIT_MULTI_AUTH --> CONNECT_STAGE_AUTH_DO_MULTI_PLUGIN_AUTH + + CONNECT_STAGE_AUTH_DO_MULTI_PLUGIN_AUTH --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_DO_MULTI_PLUGIN_AUTH --> CONNECT_STAGE_AUTH_HANDLE_MULTI_AUTH_RESPONSE + + CONNECT_STAGE_AUTH_HANDLE_MULTI_AUTH_RESPONSE --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_HANDLE_MULTI_AUTH_RESPONSE --> CONNECT_STAGE_AUTH_INIT_MULTI_AUTH + CONNECT_STAGE_AUTH_HANDLE_MULTI_AUTH_RESPONSE --> CONNECT_STAGE_AUTH_FINISH_AUTH + + CONNECT_STAGE_AUTH_FINISH_AUTH --> STATE_MACHINE_FAILED + CONNECT_STAGE_AUTH_FINISH_AUTH --> CONNECT_STAGE_PREP_SELECT_DATABASE + + CONNECT_STAGE_PREP_SELECT_DATABASE --> CONNECT_STAGE_COMPLETE + CONNECT_STAGE_PREP_SELECT_DATABASE --> CONNECT_STAGE_PREP_INIT_COMMANDS + + CONNECT_STAGE_PREP_INIT_COMMANDS --> CONNECT_STAGE_COMPLETE + CONNECT_STAGE_PREP_INIT_COMMANDS --> CONNECT_STAGE_SEND_ONE_INIT_COMMAND + + CONNECT_STAGE_SEND_ONE_INIT_COMMAND --> CONNECT_STAGE_SEND_ONE_INIT_COMMAND + CONNECT_STAGE_SEND_ONE_INIT_COMMAND --> STATE_MACHINE_FAILED + CONNECT_STAGE_SEND_ONE_INIT_COMMAND --> CONNECT_STAGE_COMPLETE + + STATE_MACHINE_FAILED --> [*] + CONNECT_STAGE_COMPLETE --> [*] + CONNECT_STAGE_INVALID --> [*] + @enduml +*/ +/* clang-format on */ +enum connect_stage { + /** MYSQL not valid or an unknown state */ + CONNECT_STAGE_INVALID = 0, + /** not connected */ + CONNECT_STAGE_NOT_STARTED, + /** begin connection to the server */ + CONNECT_STAGE_NET_BEGIN_CONNECT, + /** wait for connection to be established */ + CONNECT_STAGE_NET_WAIT_CONNECT, + /** init the local data structures post connect */ + CONNECT_STAGE_NET_COMPLETE_CONNECT, + /** read the first packet */ + CONNECT_STAGE_READ_GREETING, + /** parse the first packet */ + CONNECT_STAGE_PARSE_HANDSHAKE, + /** tls establishment */ + CONNECT_STAGE_ESTABLISH_SSL, + /** authentication phase */ + CONNECT_STAGE_AUTHENTICATE, + /** determine the plugin to use */ + CONNECT_STAGE_AUTH_BEGIN, + /** run first auth plugin */ + CONNECT_STAGE_AUTH_RUN_FIRST_AUTHENTICATE_USER, + /** handle the result of the first auth plugin run */ + CONNECT_STAGE_AUTH_HANDLE_FIRST_AUTHENTICATE_USER, + /** read the implied changed user auth, if any */ + CONNECT_STAGE_AUTH_READ_CHANGE_USER_RESULT, + /** Check if server asked to use a different authentication plugin */ + CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUEST, + /** Start the authentication process again with the plugin which + server asked for */ + CONNECT_STAGE_AUTH_RUN_SECOND_AUTHENTICATE_USER, + /** Start multi factor authentication */ + CONNECT_STAGE_AUTH_INIT_MULTI_AUTH, + /** Final cleanup */ + CONNECT_STAGE_AUTH_FINISH_AUTH, + /** Now read the results of the second plugin run */ + CONNECT_STAGE_AUTH_HANDLE_SECOND_AUTHENTICATE_USER, + /** Invoke client plugins multi-auth authentication method */ + CONNECT_STAGE_AUTH_DO_MULTI_PLUGIN_AUTH, + /** Handle response from client plugins authentication method */ + CONNECT_STAGE_AUTH_HANDLE_MULTI_AUTH_RESPONSE, + /** Authenticated, set initial database if specified */ + CONNECT_STAGE_PREP_SELECT_DATABASE, + /** Prepare to send a sequence of init commands. */ + CONNECT_STAGE_PREP_INIT_COMMANDS, + /** Send an init command. This is called once per init command until + they've all been run (or a failure occurs) */ + CONNECT_STAGE_SEND_ONE_INIT_COMMAND, + /** Connected or no async connect in progress */ + CONNECT_STAGE_COMPLETE +}; #endif diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_time.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_time.h index 9146838e9..e4892d472 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_time.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_time.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h index db9443452..c6365f1cc 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h @@ -9,20 +9,21 @@ #define _mysql_version_h #define PROTOCOL_VERSION 10 -#define MYSQL_SERVER_VERSION "8.0.20" -#define MYSQL_BASE_VERSION "mysqld-8.0" +#define MYSQL_SERVER_VERSION "8.4.4" +#define MYSQL_BASE_VERSION "mysqld-8.4" #define MYSQL_SERVER_SUFFIX_DEF "" -#define MYSQL_VERSION_ID 80020 +#define MYSQL_VERSION_ID 80404 +#define MYSQL_VERSION_MATURITY "LTS" #define MYSQL_PORT 3306 #define MYSQL_ADMIN_PORT 33062 #define MYSQL_PORT_DEFAULT 0 #define MYSQL_UNIX_ADDR "/tmp/mysql.sock" #define MYSQL_CONFIG_NAME "my" #define MYSQL_PERSIST_CONFIG_NAME "mysqld-auto" -#define MYSQL_COMPILATION_COMMENT "MySQL Community - GPL" -#define MYSQL_COMPILATION_COMMENT_SERVER "MySQL Community Server - GPL" -#define LIBMYSQL_VERSION "8.0.20" -#define LIBMYSQL_VERSION_ID 80020 +#define MYSQL_COMPILATION_COMMENT "Source distribution" +#define MYSQL_COMPILATION_COMMENT_SERVER "Source distribution" +#define LIBMYSQL_VERSION "8.4.4" +#define LIBMYSQL_VERSION_ID 80404 #ifndef LICENSE #define LICENSE GPL diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqld_error.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqld_error.h index 92be9e6b9..b4d9c0400 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqld_error.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqld_error.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,10 +25,10 @@ #ifndef MYSQLD_ERROR_INCLUDED #define MYSQLD_ERROR_INCLUDED -static const int errmsg_section_start[] = { 1000, 3000, 3500, 10000 }; -static const int errmsg_section_size[] = { 888, 227, 466, 3585 }; +static const int errmsg_section_start[] = { 1000, 3000, 3500, 6000, 10000, 15000 }; +static const int errmsg_section_size[] = { 888, 239, 667, 141, 4078, 147 }; -static const int total_error_count = 5166; +static const int total_error_count = 6160; //#define OBSOLETE_ER_HASHCHK 1000 //#define OBSOLETE_ER_NISAMCHK 1001 @@ -217,9 +218,9 @@ static const int total_error_count = 5166; //#define OBSOLETE_ER_DUMP_NOT_IMPLEMENTED 1185 //#define OBSOLETE_ER_FLUSH_MASTER_BINLOG_CLOSED 1186 //#define OBSOLETE_ER_INDEX_REBUILD 1187 -#define ER_MASTER 1188 -#define ER_MASTER_NET_READ 1189 -#define ER_MASTER_NET_WRITE 1190 +#define ER_SOURCE 1188 +#define ER_SOURCE_NET_READ 1189 +#define ER_SOURCE_NET_WRITE 1190 #define ER_FT_MATCHING_KEY_NOT_FOUND 1191 #define ER_LOCK_OR_ACTIVE_TRANSACTION 1192 #define ER_UNKNOWN_SYSTEM_VARIABLE 1193 @@ -228,10 +229,10 @@ static const int total_error_count = 5166; #define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196 #define ER_TRANS_CACHE_FULL 1197 //#define OBSOLETE_ER_SLAVE_MUST_STOP 1198 -#define ER_SLAVE_NOT_RUNNING 1199 -#define ER_BAD_SLAVE 1200 -#define ER_MASTER_INFO 1201 -#define ER_SLAVE_THREAD 1202 +#define ER_REPLICA_NOT_RUNNING 1199 +#define ER_BAD_REPLICA 1200 +#define ER_CONNECTION_METADATA 1201 +#define ER_REPLICA_THREAD 1202 #define ER_TOO_MANY_USER_CONNECTIONS 1203 #define ER_SET_CONSTANTS_ONLY 1204 #define ER_LOCK_WAIT_TIMEOUT 1205 @@ -247,7 +248,7 @@ static const int total_error_count = 5166; #define ER_CANNOT_ADD_FOREIGN 1215 #define ER_NO_REFERENCED_ROW 1216 #define ER_ROW_IS_REFERENCED 1217 -#define ER_CONNECT_TO_MASTER 1218 +#define ER_CONNECT_TO_SOURCE 1218 //#define OBSOLETE_ER_QUERY_ON_MASTER 1219 #define ER_ERROR_WHEN_EXECUTING_COMMAND 1220 #define ER_WRONG_USAGE 1221 @@ -265,8 +266,8 @@ static const int total_error_count = 5166; #define ER_VAR_CANT_BE_READ 1233 #define ER_CANT_USE_OPTION_HERE 1234 #define ER_NOT_SUPPORTED_YET 1235 -#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236 -#define ER_SLAVE_IGNORED_TABLE 1237 +#define ER_SOURCE_FATAL_ERROR_READING_BINLOG 1236 +#define ER_REPLICA_IGNORED_TABLE 1237 #define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238 #define ER_WRONG_FK_DEF 1239 #define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240 @@ -303,11 +304,11 @@ static const int total_error_count = 5166; #define ER_CANT_AGGREGATE_NCOLLATIONS 1271 #define ER_VARIABLE_IS_NOT_STRUCT 1272 #define ER_UNKNOWN_COLLATION 1273 -#define ER_SLAVE_IGNORED_SSL_PARAMS 1274 +#define ER_REPLICA_IGNORED_SSL_PARAMS 1274 //#define OBSOLETE_ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275 #define ER_WARN_FIELD_RESOLVED 1276 -#define ER_BAD_SLAVE_UNTIL_COND 1277 -#define ER_MISSING_SKIP_SLAVE 1278 +#define ER_BAD_REPLICA_UNTIL_COND 1277 +#define ER_MISSING_SKIP_REPLICA 1278 #define ER_UNTIL_COND_IGNORED 1279 #define ER_WRONG_NAME_FOR_INDEX 1280 #define ER_WRONG_NAME_FOR_CATALOG 1281 @@ -639,21 +640,21 @@ static const int total_error_count = 5166; //#define OBSOLETE_ER_CANT_CREATE_SROUTINE 1607 //#define OBSOLETE_ER_NEVER_USED 1608 #define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609 -#define ER_SLAVE_CORRUPT_EVENT 1610 +#define ER_REPLICA_CORRUPT_EVENT 1610 //#define OBSOLETE_ER_LOAD_DATA_INVALID_COLUMN_UNUSED 1611 #define ER_LOG_PURGE_NO_FILE 1612 #define ER_XA_RBTIMEOUT 1613 #define ER_XA_RBDEADLOCK 1614 #define ER_NEED_REPREPARE 1615 //#define OBSOLETE_ER_DELAYED_NOT_SUPPORTED 1616 -#define WARN_NO_MASTER_INFO 1617 +#define WARN_NO_CONNECTION_METADATA 1617 #define WARN_OPTION_IGNORED 1618 #define ER_PLUGIN_DELETE_BUILTIN 1619 #define WARN_PLUGIN_BUSY 1620 #define ER_VARIABLE_IS_READONLY 1621 #define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622 //#define OBSOLETE_ER_SLAVE_HEARTBEAT_FAILURE 1623 -#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624 +#define ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE 1624 #define ER_NDB_REPLICATION_SCHEMA_ERROR 1625 #define ER_CONFLICT_FN_PARSE_ERROR 1626 #define ER_EXCEPTIONS_WRITE_ERROR 1627 @@ -679,7 +680,7 @@ static const int total_error_count = 5166; #define WARN_COND_ITEM_TRUNCATED 1647 #define ER_COND_ITEM_TOO_LONG 1648 #define ER_UNKNOWN_LOCALE 1649 -#define ER_SLAVE_IGNORE_SERVER_IDS 1650 +#define ER_REPLICA_IGNORE_SERVER_IDS 1650 //#define OBSOLETE_ER_QUERY_CACHE_DISABLED 1651 #define ER_SAME_NAME_PARTITION_FIELD 1652 #define ER_PARTITION_COLUMN_LIST_ERROR 1653 @@ -707,7 +708,7 @@ static const int total_error_count = 5166; #define ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS 1675 #define ER_MESSAGE_AND_STATEMENT 1676 //#define OBSOLETE_ER_SLAVE_CONVERSION_FAILED 1677 -#define ER_SLAVE_CANT_CREATE_CONVERSION 1678 +#define ER_REPLICA_CANT_CREATE_CONVERSION 1678 #define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT 1679 #define ER_PATH_LENGTH 1680 #define ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT 1681 @@ -720,7 +721,7 @@ static const int total_error_count = 5166; #define ER_TOO_LONG_INDEX_COMMENT 1688 #define ER_LOCK_ABORTED 1689 #define ER_DATA_OUT_OF_RANGE 1690 -#define ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691 +//#define OBSOLETE_ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691 #define ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1692 #define ER_BINLOG_UNSAFE_MIXED_STATEMENT 1693 #define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN 1694 @@ -728,12 +729,12 @@ static const int total_error_count = 5166; #define ER_FAILED_READ_FROM_PAR_FILE 1696 #define ER_VALUES_IS_NOT_INT_TYPE_ERROR 1697 #define ER_ACCESS_DENIED_NO_PASSWORD_ERROR 1698 -#define ER_SET_PASSWORD_AUTH_PLUGIN 1699 +//#define OBSOLETE_ER_SET_PASSWORD_AUTH_PLUGIN 1699 //#define OBSOLETE_ER_GRANT_PLUGIN_USER_EXISTS 1700 #define ER_TRUNCATE_ILLEGAL_FK 1701 #define ER_PLUGIN_IS_PERMANENT 1702 -#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN 1703 -#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX 1704 +#define ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN 1703 +#define ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX 1704 #define ER_STMT_CACHE_FULL 1705 #define ER_MULTI_UPDATE_KEY_CONFLICT 1706 #define ER_TABLE_NEEDS_REBUILD 1707 @@ -758,7 +759,7 @@ static const int total_error_count = 5166; #define ER_UNSUPPORTED_ENGINE 1726 #define ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST 1727 #define ER_CANNOT_LOAD_FROM_TABLE_V2 1728 -#define ER_MASTER_DELAY_VALUE_OUT_OF_RANGE 1729 +#define ER_SOURCE_DELAY_VALUE_OUT_OF_RANGE 1729 #define ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT 1730 #define ER_PARTITION_EXCHANGE_DIFFERENT_OPTION 1731 #define ER_PARTITION_EXCHANGE_PART_TABLE 1732 @@ -782,17 +783,17 @@ static const int total_error_count = 5166; #define ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE 1750 #define ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE 1751 #define ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE 1752 -#define ER_MTS_FEATURE_IS_NOT_SUPPORTED 1753 -#define ER_MTS_UPDATED_DBS_GREATER_MAX 1754 -#define ER_MTS_CANT_PARALLEL 1755 -#define ER_MTS_INCONSISTENT_DATA 1756 +#define ER_MTA_FEATURE_IS_NOT_SUPPORTED 1753 +#define ER_MTA_UPDATED_DBS_GREATER_MAX 1754 +#define ER_MTA_CANT_PARALLEL 1755 +#define ER_MTA_INCONSISTENT_DATA 1756 #define ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING 1757 #define ER_DA_INVALID_CONDITION_NUMBER 1758 #define ER_INSECURE_PLAIN_TEXT 1759 -#define ER_INSECURE_CHANGE_MASTER 1760 +#define ER_INSECURE_CHANGE_SOURCE 1760 #define ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO 1761 #define ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO 1762 -#define ER_SQLTHREAD_WITH_SECURE_SLAVE 1763 +#define ER_SQLTHREAD_WITH_SECURE_REPLICA 1763 #define ER_TABLE_HAS_NO_FT 1764 #define ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER 1765 #define ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION 1766 @@ -805,7 +806,7 @@ static const int total_error_count = 5166; #define ER_MALFORMED_GTID_SET_ENCODING 1773 #define ER_MALFORMED_GTID_SPECIFICATION 1774 #define ER_GNO_EXHAUSTED 1775 -#define ER_BAD_SLAVE_AUTO_POSITION 1776 +#define ER_BAD_REPLICA_AUTO_POSITION 1776 #define ER_AUTO_POSITION_REQUIRES_GTID_MODE_NOT_OFF 1777 #define ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1778 #define ER_GTID_MODE_ON_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON 1779 @@ -818,12 +819,12 @@ static const int total_error_count = 5166; #define ER_GTID_UNSAFE_CREATE_SELECT 1786 //#define OBSOLETE_ER_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRANSACTION 1787 #define ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME 1788 -#define ER_MASTER_HAS_PURGED_REQUIRED_GTIDS 1789 +#define ER_SOURCE_HAS_PURGED_REQUIRED_GTIDS 1789 #define ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID 1790 #define ER_UNKNOWN_EXPLAIN_FORMAT 1791 #define ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION 1792 #define ER_TOO_LONG_TABLE_PARTITION_COMMENT 1793 -#define ER_SLAVE_CONFIGURATION 1794 +#define ER_REPLICA_CONFIGURATION 1794 #define ER_INNODB_FT_LIMIT 1795 #define ER_INNODB_NO_FT_TEMP_TABLE 1796 #define ER_INNODB_FT_WRONG_DOCID_COLUMN 1797 @@ -831,11 +832,11 @@ static const int total_error_count = 5166; #define ER_INNODB_ONLINE_LOG_TOO_BIG 1799 #define ER_UNKNOWN_ALTER_ALGORITHM 1800 #define ER_UNKNOWN_ALTER_LOCK 1801 -#define ER_MTS_CHANGE_MASTER_CANT_RUN_WITH_GAPS 1802 -#define ER_MTS_RECOVERY_FAILURE 1803 -#define ER_MTS_RESET_WORKERS 1804 +#define ER_MTA_CHANGE_SOURCE_CANT_RUN_WITH_GAPS 1802 +#define ER_MTA_RECOVERY_FAILURE 1803 +#define ER_MTA_RESET_WORKERS 1804 #define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2 1805 -#define ER_SLAVE_SILENT_RETRY_TRANSACTION 1806 +#define ER_REPLICA_SILENT_RETRY_TRANSACTION 1806 #define ER_DISCARD_FK_CHECKS_RUNNING 1807 #define ER_TABLE_SCHEMA_MISMATCH 1808 #define ER_TABLE_IN_SYSTEM_TABLESPACE 1809 @@ -887,25 +888,25 @@ static const int total_error_count = 5166; #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS 1855 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS 1856 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS 1857 -#define ER_SQL_SLAVE_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE 1858 +//#define OBSOLETE_ER_SQL_REPLICA_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE 1858 #define ER_DUP_UNKNOWN_IN_INDEX 1859 #define ER_IDENT_CAUSES_TOO_LONG_PATH 1860 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL 1861 #define ER_MUST_CHANGE_PASSWORD_LOGIN 1862 #define ER_ROW_IN_WRONG_PARTITION 1863 -#define ER_MTS_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX 1864 +#define ER_MTA_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX 1864 //#define OBSOLETE_ER_INNODB_NO_FT_USES_PARSER 1865 #define ER_BINLOG_LOGICAL_CORRUPTION 1866 #define ER_WARN_PURGE_LOG_IN_USE 1867 #define ER_WARN_PURGE_LOG_IS_ACTIVE 1868 #define ER_AUTO_INCREMENT_CONFLICT 1869 #define WARN_ON_BLOCKHOLE_IN_RBR 1870 -#define ER_SLAVE_MI_INIT_REPOSITORY 1871 -#define ER_SLAVE_RLI_INIT_REPOSITORY 1872 +#define ER_REPLICA_CM_INIT_REPOSITORY 1871 +#define ER_REPLICA_AM_INIT_REPOSITORY 1872 #define ER_ACCESS_DENIED_CHANGE_USER_ERROR 1873 #define ER_INNODB_READ_ONLY 1874 -#define ER_STOP_SLAVE_SQL_THREAD_TIMEOUT 1875 -#define ER_STOP_SLAVE_IO_THREAD_TIMEOUT 1876 +#define ER_STOP_REPLICA_SQL_THREAD_TIMEOUT 1875 +#define ER_STOP_REPLICA_IO_THREAD_TIMEOUT 1876 #define ER_TABLE_CORRUPT 1877 #define ER_TEMP_FILE_WRITE_FAILURE 1878 #define ER_INNODB_FT_AUX_NOT_HEX_ID 1879 @@ -914,11 +915,11 @@ static const int total_error_count = 5166; #define ER_AES_INVALID_IV 1882 #define ER_PLUGIN_CANNOT_BE_UNINSTALLED 1883 #define ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_ASSIGNED_GTID 1884 -#define ER_SLAVE_HAS_MORE_GTIDS_THAN_MASTER 1885 +#define ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE 1885 #define ER_MISSING_KEY 1886 #define WARN_NAMED_PIPE_ACCESS_EVERYONE 1887 #define ER_FILE_CORRUPT 3000 -#define ER_ERROR_ON_MASTER 3001 +#define ER_ERROR_ON_SOURCE 3001 //#define OBSOLETE_ER_INCONSISTENT_ERROR 3002 #define ER_STORAGE_ENGINE_NOT_LOADED 3003 #define ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER 3004 @@ -934,21 +935,21 @@ static const int total_error_count = 5166; #define ER_MISSING_HA_CREATE_OPTION 3014 #define ER_ENGINE_OUT_OF_MEMORY 3015 #define ER_PASSWORD_EXPIRE_ANONYMOUS_USER 3016 -#define ER_SLAVE_SQL_THREAD_MUST_STOP 3017 +#define ER_REPLICA_SQL_THREAD_MUST_STOP 3017 #define ER_NO_FT_MATERIALIZED_SUBQUERY 3018 #define ER_INNODB_UNDO_LOG_FULL 3019 #define ER_INVALID_ARGUMENT_FOR_LOGARITHM 3020 -#define ER_SLAVE_CHANNEL_IO_THREAD_MUST_STOP 3021 +#define ER_REPLICA_CHANNEL_IO_THREAD_MUST_STOP 3021 #define ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO 3022 -#define ER_WARN_ONLY_MASTER_LOG_FILE_NO_POS 3023 +#define ER_WARN_ONLY_SOURCE_LOG_FILE_NO_POS 3023 #define ER_QUERY_TIMEOUT 3024 #define ER_NON_RO_SELECT_DISABLE_TIMER 3025 #define ER_DUP_LIST_ENTRY 3026 //#define OBSOLETE_ER_SQL_MODE_NO_EFFECT 3027 #define ER_AGGREGATE_ORDER_FOR_UNION 3028 #define ER_AGGREGATE_ORDER_NON_AGG_QUERY 3029 -#define ER_SLAVE_WORKER_STOPPED_PREVIOUS_THD_ERROR 3030 -#define ER_DONT_SUPPORT_SLAVE_PRESERVE_COMMIT_ORDER 3031 +#define ER_REPLICA_WORKER_STOPPED_PREVIOUS_THD_ERROR 3030 +#define ER_DONT_SUPPORT_REPLICA_PRESERVE_COMMIT_ORDER 3031 #define ER_SERVER_OFFLINE_MODE 3032 #define ER_GIS_DIFFERENT_SRIDS 3033 #define ER_GIS_UNSUPPORTED_ARGUMENT 3034 @@ -973,7 +974,7 @@ static const int total_error_count = 5166; #define ER_STD_RUNTIME_ERROR 3053 #define ER_STD_UNKNOWN_EXCEPTION 3054 #define ER_GIS_DATA_WRONG_ENDIANESS 3055 -#define ER_CHANGE_MASTER_PASSWORD_LENGTH 3056 +#define ER_CHANGE_SOURCE_PASSWORD_LENGTH 3056 #define ER_USER_LOCK_WRONG_NAME 3057 #define ER_USER_LOCK_DEADLOCK 3058 #define ER_REPLACE_INACCESSIBLE_ROWS 3059 @@ -991,19 +992,19 @@ static const int total_error_count = 5166; #define ER_INVALID_GEOJSON_WRONG_TYPE 3071 #define ER_INVALID_GEOJSON_UNSPECIFIED 3072 #define ER_DIMENSION_UNSUPPORTED 3073 -#define ER_SLAVE_CHANNEL_DOES_NOT_EXIST 3074 +#define ER_REPLICA_CHANNEL_DOES_NOT_EXIST 3074 //#define OBSOLETE_ER_SLAVE_MULTIPLE_CHANNELS_HOST_PORT 3075 -#define ER_SLAVE_CHANNEL_NAME_INVALID_OR_TOO_LONG 3076 -#define ER_SLAVE_NEW_CHANNEL_WRONG_REPOSITORY 3077 +#define ER_REPLICA_CHANNEL_NAME_INVALID_OR_TOO_LONG 3076 +#define ER_REPLICA_NEW_CHANNEL_WRONG_REPOSITORY 3077 //#define OBSOLETE_ER_SLAVE_CHANNEL_DELETE 3078 -#define ER_SLAVE_MULTIPLE_CHANNELS_CMD 3079 -#define ER_SLAVE_MAX_CHANNELS_EXCEEDED 3080 -#define ER_SLAVE_CHANNEL_MUST_STOP 3081 -#define ER_SLAVE_CHANNEL_NOT_RUNNING 3082 -#define ER_SLAVE_CHANNEL_WAS_RUNNING 3083 -#define ER_SLAVE_CHANNEL_WAS_NOT_RUNNING 3084 -#define ER_SLAVE_CHANNEL_SQL_THREAD_MUST_STOP 3085 -#define ER_SLAVE_CHANNEL_SQL_SKIP_COUNTER 3086 +#define ER_REPLICA_MULTIPLE_CHANNELS_CMD 3079 +#define ER_REPLICA_MAX_CHANNELS_EXCEEDED 3080 +#define ER_REPLICA_CHANNEL_MUST_STOP 3081 +#define ER_REPLICA_CHANNEL_NOT_RUNNING 3082 +#define ER_REPLICA_CHANNEL_WAS_RUNNING 3083 +#define ER_REPLICA_CHANNEL_WAS_NOT_RUNNING 3084 +#define ER_REPLICA_CHANNEL_SQL_THREAD_MUST_STOP 3085 +#define ER_REPLICA_CHANNEL_SQL_SKIP_COUNTER 3086 #define ER_WRONG_FIELD_WITH_GROUP_V2 3087 #define ER_MIX_OF_GROUP_FUNC_AND_FIELDS_V2 3088 #define ER_WARN_DEPRECATED_SYSVAR_UPDATE 3089 @@ -1056,7 +1057,7 @@ static const int total_error_count = 5166; #define ER_VTOKEN_PLUGIN_TOKEN_MISMATCH 3136 #define ER_VTOKEN_PLUGIN_TOKEN_NOT_FOUND 3137 #define ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID 3138 -#define ER_SLAVE_CHANNEL_OPERATION_NOT_ALLOWED 3139 +#define ER_REPLICA_CHANNEL_OPERATION_NOT_ALLOWED 3139 #define ER_INVALID_JSON_TEXT 3140 #define ER_INVALID_JSON_TEXT_IN_PARAM 3141 #define ER_INVALID_JSON_BINARY_DATA 3142 @@ -1107,7 +1108,7 @@ static const int total_error_count = 5166; #define ER_UNSUPPORTED_ALTER_ENCRYPTION_INPLACE 3187 #define ER_KEYRING_UDF_KEYRING_SERVICE_ERROR 3188 #define ER_USER_COLUMN_OLD_LENGTH 3189 -#define ER_CANT_RESET_MASTER 3190 +#define ER_CANT_RESET_SOURCE 3190 #define ER_GROUP_REPLICATION_MAX_GROUP_SIZE 3191 #define ER_CANNOT_ADD_FOREIGN_BASE_COL_STORED 3192 #define ER_TABLE_REFERENCED 3193 @@ -1144,6 +1145,18 @@ static const int total_error_count = 5166; //#define OBSOLETE_ER_AUDIT_LOG_USER_NAME_INVALID_CHARACTER 3224 //#define OBSOLETE_ER_AUDIT_LOG_HOST_NAME_INVALID_CHARACTER 3225 #define OBSOLETE_WARN_DEPRECATED_MAXDB_SQL_MODE_FOR_TIMESTAMP 3226 +//#define OBSOLETE_ER_XA_REPLICATION_FILTERS 3227 +//#define OBSOLETE_ER_CANT_OPEN_ERROR_LOG 3228 +//#define OBSOLETE_ER_GROUPING_ON_TIMESTAMP_IN_DST 3229 +//#define OBSOLETE_ER_CANT_START_SERVER_NAMED_PIPE 3230 +#define ER_WRITE_SET_EXCEEDS_LIMIT 3231 +//#define OBSOLETE_ER_DEPRECATED_TLS_VERSION_SESSION_57 3232 +//#define OBSOLETE_ER_WARN_DEPRECATED_TLS_VERSION_57 3233 +//#define OBSOLETE_ER_WARN_WRONG_NATIVE_TABLE_STRUCTURE 3234 +#define ER_AES_INVALID_KDF_NAME 3235 +#define ER_AES_INVALID_KDF_ITERATIONS 3236 +#define WARN_AES_KEY_SIZE 3237 +#define ER_AES_INVALID_KDF_OPTION_SIZE 3238 #define ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE 3500 #define ER_ACL_OPERATION_FAILED 3501 #define ER_UNSUPPORTED_INDEX_ALGORITHM 3502 @@ -1211,7 +1224,7 @@ static const int total_error_count = 5166; #define ER_DUPLICATE_OPTION_KEY 3564 #define ER_WARN_SRS_NOT_FOUND_AXIS_ORDER 3565 #define ER_NO_ACCESS_TO_NATIVE_FCT 3566 -#define ER_RESET_MASTER_TO_VALUE_OUT_OF_RANGE 3567 +#define ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE 3567 #define ER_UNRESOLVED_TABLE_LOCK 3568 #define ER_DUPLICATE_TABLE_LOCK 3569 #define ER_BINLOG_UNSAFE_SKIP_LOCKED 3570 @@ -1290,7 +1303,7 @@ static const int total_error_count = 5166; #define ER_WRONG_SRID_FOR_COLUMN 3643 #define ER_CANNOT_ALTER_SRID_DUE_TO_INDEX 3644 #define ER_WARN_BINLOG_PARTIAL_UPDATES_DISABLED 3645 -#define ER_WARN_BINLOG_V1_ROW_EVENTS_DISABLED 3646 +//#define OBSOLETE_ER_WARN_BINLOG_V1_ROW_EVENTS_DISABLED 3646 #define ER_WARN_BINLOG_PARTIAL_UPDATES_SUGGESTS_PARTIAL_IMAGES 3647 #define ER_COULD_NOT_APPLY_JSON_DIFF 3648 #define ER_CORRUPTED_JSON_DIFF 3649 @@ -1327,7 +1340,7 @@ static const int total_error_count = 5166; #define ER_SCHEMA_DIR_CREATE_FAILED 3680 #define ER_SCHEMA_DIR_UNKNOWN 3681 #define ER_ONLY_IMPLEMENTED_FOR_SRID_0_AND_4326 3682 -#define ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER 3683 +//#define OBSOLETE_ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER 3683 #define ER_REGEXP_BUFFER_OVERFLOW 3684 #define ER_REGEXP_ILLEGAL_ARGUMENT 3685 #define ER_REGEXP_INDEX_OUTOFBOUNDS_ERROR 3686 @@ -1369,7 +1382,7 @@ static const int total_error_count = 5166; #define ER_UNABLE_TO_COLLECT_LOG_STATUS 3722 #define ER_RESERVED_TABLESPACE_NAME 3723 #define ER_UNABLE_TO_SET_OPTION 3724 -#define ER_SLAVE_POSSIBLY_DIVERGED_AFTER_DDL 3725 +#define ER_REPLICA_POSSIBLY_DIVERGED_AFTER_DDL 3725 #define ER_SRS_NOT_GEOGRAPHIC 3726 #define ER_POLYGON_TOO_LARGE 3727 #define ER_SPATIAL_UNIQUE_INDEX 3728 @@ -1501,7 +1514,7 @@ static const int total_error_count = 5166; #define ER_CANNOT_CONVERT_STRING 3854 #define ER_DEPENDENT_BY_PARTITION_FUNC 3855 #define ER_WARN_DEPRECATED_FLOAT_AUTO_INCREMENT 3856 -#define ER_RPL_CANT_STOP_SLAVE_WHILE_LOCKED_BACKUP 3857 +#define ER_RPL_CANT_STOP_REPLICA_WHILE_LOCKED_BACKUP 3857 #define ER_WARN_DEPRECATED_FLOAT_DIGITS 3858 #define ER_WARN_DEPRECATED_FLOAT_UNSIGNED 3859 #define ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH 3860 @@ -1564,11 +1577,11 @@ static const int total_error_count = 5166; #define ER_SYSVAR_CHANGE_DURING_QUERY 3917 #define ER_GLOBSTAT_CHANGE_DURING_QUERY 3918 #define ER_GRP_RPL_MESSAGE_SERVICE_INIT_FAILURE 3919 -#define ER_CHANGE_MASTER_WRONG_COMPRESSION_ALGORITHM_CLIENT 3920 -#define ER_CHANGE_MASTER_WRONG_COMPRESSION_LEVEL_CLIENT 3921 +#define ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_CLIENT 3920 +#define ER_CHANGE_SOURCE_WRONG_COMPRESSION_LEVEL_CLIENT 3921 #define ER_WRONG_COMPRESSION_ALGORITHM_CLIENT 3922 #define ER_WRONG_COMPRESSION_LEVEL_CLIENT 3923 -#define ER_CHANGE_MASTER_WRONG_COMPRESSION_ALGORITHM_LIST_CLIENT 3924 +#define ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_LIST_CLIENT 3924 #define ER_CLIENT_PRIVILEGE_CHECKS_USER_CANNOT_BE_ANONYMOUS 3925 #define ER_CLIENT_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST 3926 #define ER_CLIENT_PRIVILEGE_CHECKS_USER_CORRUPT 3927 @@ -1610,6 +1623,348 @@ static const int total_error_count = 5166; #define ER_WARN_DEPRECATED_VALUES_FUNCTION_ALWAYS_NULL 3963 #define ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS 3964 #define ER_WARN_DEPRECATED_FOUND_ROWS 3965 +#define ER_MISSING_JSON_VALUE 3966 +#define ER_MULTIPLE_JSON_VALUES 3967 +#define ER_HOSTNAME_TOO_LONG 3968 +//#define OBSOLETE_ER_WARN_CLIENT_DEPRECATED_PARTITION_PREFIX_KEY 3969 +#define ER_GROUP_REPLICATION_USER_EMPTY_MSG 3970 +#define ER_GROUP_REPLICATION_USER_MANDATORY_MSG 3971 +#define ER_GROUP_REPLICATION_PASSWORD_LENGTH 3972 +#define ER_SUBQUERY_TRANSFORM_REJECTED 3973 +#define ER_DA_GRP_RPL_RECOVERY_ENDPOINT_FORMAT 3974 +#define ER_DA_GRP_RPL_RECOVERY_ENDPOINT_INVALID 3975 +#define ER_WRONG_VALUE_FOR_VAR_PLUS_ACTIONABLE_PART 3976 +#define ER_STATEMENT_NOT_ALLOWED_AFTER_START_TRANSACTION 3977 +#define ER_FOREIGN_KEY_WITH_ATOMIC_CREATE_SELECT 3978 +#define ER_NOT_ALLOWED_WITH_START_TRANSACTION 3979 +#define ER_INVALID_JSON_ATTRIBUTE 3980 +#define ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED 3981 +#define ER_INVALID_USER_ATTRIBUTE_JSON 3982 +#define ER_INNODB_REDO_DISABLED 3983 +#define ER_INNODB_REDO_ARCHIVING_ENABLED 3984 +#define ER_MDL_OUT_OF_RESOURCES 3985 +#define ER_IMPLICIT_COMPARISON_FOR_JSON 3986 +#define ER_FUNCTION_DOES_NOT_SUPPORT_CHARACTER_SET 3987 +#define ER_IMPOSSIBLE_STRING_CONVERSION 3988 +#define ER_SCHEMA_READ_ONLY 3989 +#define ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF 3990 +#define ER_RPL_ASYNC_RECONNECT_AUTO_POSITION_OFF 3991 +#define ER_DISABLE_GTID_MODE_REQUIRES_ASYNC_RECONNECT_OFF 3992 +#define ER_DISABLE_AUTO_POSITION_REQUIRES_ASYNC_RECONNECT_OFF 3993 +#define ER_INVALID_PARAMETER_USE 3994 +#define ER_CHARACTER_SET_MISMATCH 3995 +#define ER_WARN_VAR_VALUE_CHANGE_NOT_SUPPORTED 3996 +#define ER_INVALID_TIME_ZONE_INTERVAL 3997 +#define ER_INVALID_CAST 3998 +#define ER_HYPERGRAPH_NOT_SUPPORTED_YET 3999 +#define ER_WARN_HYPERGRAPH_EXPERIMENTAL 4000 +#define ER_DA_NO_ERROR_LOG_PARSER_CONFIGURED 4001 +#define ER_DA_ERROR_LOG_TABLE_DISABLED 4002 +#define ER_DA_ERROR_LOG_MULTIPLE_FILTERS 4003 +#define ER_DA_CANT_OPEN_ERROR_LOG 4004 +#define ER_USER_REFERENCED_AS_DEFINER 4005 +#define ER_CANNOT_USER_REFERENCED_AS_DEFINER 4006 +#define ER_REGEX_NUMBER_TOO_BIG 4007 +#define ER_SPVAR_NONINTEGER_TYPE 4008 +#define WARN_UNSUPPORTED_ACL_TABLES_READ 4009 +#define ER_BINLOG_UNSAFE_ACL_TABLE_READ_IN_DML_DDL 4010 +#define ER_STOP_REPLICA_MONITOR_IO_THREAD_TIMEOUT 4011 +#define ER_STARTING_REPLICA_MONITOR_IO_THREAD 4012 +#define ER_CANT_USE_ANONYMOUS_TO_GTID_WITH_GTID_MODE_NOT_ON 4013 +#define ER_CANT_COMBINE_ANONYMOUS_TO_GTID_AND_AUTOPOSITION 4014 +#define ER_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_REQUIRES_GTID_MODE_ON 4015 +#define ER_SQL_REPLICA_SKIP_COUNTER_USED_WITH_GTID_MODE_ON 4016 +#define ER_USING_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_AS_LOCAL_OR_UUID 4017 +//#define OBSOLETE_ER_SET_GTID_TO_ANON_AND_WAIT_UNTIL_SQL_THD_AFTER_GTIDS 4018 +#define ER_CANT_SET_SQL_AFTER_OR_BEFORE_GTIDS_WITH_ANONYMOUS_TO_GTID 4019 +#define ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME 4020 +#define ER_CANT_USE_SAME_UUID_AS_GROUP_NAME 4021 +#define ER_GRP_RPL_RECOVERY_CHANNEL_STILL_RUNNING 4022 +#define ER_INNODB_INVALID_AUTOEXTEND_SIZE_VALUE 4023 +#define ER_INNODB_INCOMPATIBLE_WITH_TABLESPACE 4024 +#define ER_INNODB_AUTOEXTEND_SIZE_OUT_OF_RANGE 4025 +#define ER_CANNOT_USE_AUTOEXTEND_SIZE_CLAUSE 4026 +#define ER_ROLE_GRANTED_TO_ITSELF 4027 +#define ER_TABLE_MUST_HAVE_A_VISIBLE_COLUMN 4028 +#define ER_INNODB_COMPRESSION_FAILURE 4029 +#define ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE 4030 +#define ER_CLIENT_INTERACTION_TIMEOUT 4031 +#define ER_INVALID_CAST_TO_GEOMETRY 4032 +#define ER_INVALID_CAST_POLYGON_RING_DIRECTION 4033 +#define ER_GIS_DIFFERENT_SRIDS_AGGREGATION 4034 +#define ER_RELOAD_KEYRING_FAILURE 4035 +#define ER_SDI_GET_KEYS_INVALID_TABLESPACE 4036 +#define ER_CHANGE_RPL_SRC_WRONG_COMPRESSION_ALGORITHM_SIZE 4037 +//#define OBSOLETE_ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL_CLI 4038 +#define ER_CANT_USE_SAME_UUID_AS_VIEW_CHANGE_UUID 4039 +#define ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID 4040 +#define ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE 4041 +#define ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS 4042 +#define ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE 4043 +#define ER_KERBEROS_CREATE_USER 4044 +#define ER_INSTALL_PLUGIN_CONFLICT_CLIENT 4045 +#define ER_DA_ERROR_LOG_COMPONENT_FLUSH_FAILED 4046 +#define ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED 4047 +#define ER_INVALID_ASSIGNMENT_TARGET 4048 +#define ER_OPERATION_NOT_ALLOWED_ON_GR_SECONDARY 4049 +#define ER_GRP_RPL_FAILOVER_CHANNEL_STATUS_PROPAGATION 4050 +#define ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON 4051 +#define ER_INVALID_MFA_PLUGIN_SPECIFIED 4052 +#define ER_IDENTIFIED_BY_UNSUPPORTED 4053 +#define ER_INVALID_PLUGIN_FOR_REGISTRATION 4054 +#define ER_PLUGIN_REQUIRES_REGISTRATION 4055 +#define ER_MFA_METHOD_EXISTS 4056 +#define ER_MFA_METHOD_NOT_EXISTS 4057 +#define ER_AUTHENTICATION_POLICY_MISMATCH 4058 +#define ER_PLUGIN_REGISTRATION_DONE 4059 +#define ER_INVALID_USER_FOR_REGISTRATION 4060 +#define ER_USER_REGISTRATION_FAILED 4061 +#define ER_MFA_METHODS_INVALID_ORDER 4062 +#define ER_MFA_METHODS_IDENTICAL 4063 +#define ER_INVALID_MFA_OPERATIONS_FOR_PASSWORDLESS_USER 4064 +#define ER_CHANGE_REPLICATION_SOURCE_NO_OPTIONS_FOR_GTID_ONLY 4065 +#define ER_CHANGE_REP_SOURCE_CANT_DISABLE_REQ_ROW_FORMAT_WITH_GTID_ONLY 4066 +#define ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POSITION_WITH_GTID_ONLY 4067 +#define ER_CHANGE_REP_SOURCE_CANT_DISABLE_GTID_ONLY_WITHOUT_POSITIONS 4068 +#define ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POS_WITHOUT_POSITIONS 4069 +#define ER_CHANGE_REP_SOURCE_GR_CHANNEL_WITH_GTID_MODE_NOT_ON 4070 +#define ER_CANT_USE_GTID_ONLY_WITH_GTID_MODE_NOT_ON 4071 +#define ER_WARN_C_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS 4072 +#define ER_DA_SSL_FIPS_MODE_ERROR 4073 +#define ER_VALUE_OUT_OF_RANGE 4074 +#define ER_FULLTEXT_WITH_ROLLUP 4075 +#define ER_REGEXP_MISSING_RESOURCE 4076 +#define ER_WARN_REGEXP_USING_DEFAULT 4077 +#define ER_REGEXP_MISSING_FILE 4078 +#define ER_WARN_DEPRECATED_COLLATION 4079 +#define ER_CONCURRENT_PROCEDURE_USAGE 4080 +#define ER_DA_GLOBAL_CONN_LIMIT 4081 +#define ER_DA_CONN_LIMIT 4082 +#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE_INSTANT 4083 +#define ER_WARN_SF_UDF_NAME_COLLISION 4084 +#define ER_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK 4085 +#define ER_TOO_MANY_WINDOWS 4086 +#define ER_MYSQLBACKUP_CLIENT_MSG 4087 +#define ER_COMMENT_CONTAINS_INVALID_STRING 4088 +#define ER_DEFINITION_CONTAINS_INVALID_STRING 4089 +#define ER_CANT_EXECUTE_COMMAND_WITH_ASSIGNED_GTID_NEXT 4090 +#define ER_XA_TEMP_TABLE 4091 +#define ER_INNODB_MAX_ROW_VERSION 4092 +//#define OBSOLETE_ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE 4093 +#define ER_OPERATION_NOT_ALLOWED_WHILE_PRIMARY_CHANGE_IS_RUNNING 4094 +#define ER_WARN_DEPRECATED_DATETIME_DELIMITER 4095 +#define ER_WARN_DEPRECATED_SUPERFLUOUS_DELIMITER 4096 +#define ER_CANNOT_PERSIST_SENSITIVE_VARIABLES 4097 +#define ER_WARN_CANNOT_SECURELY_PERSIST_SENSITIVE_VARIABLES 4098 +#define ER_WARN_TRG_ALREADY_EXISTS 4099 +#define ER_IF_NOT_EXISTS_UNSUPPORTED_TRG_EXISTS_ON_DIFFERENT_TABLE 4100 +#define ER_IF_NOT_EXISTS_UNSUPPORTED_UDF_NATIVE_FCT_NAME_COLLISION 4101 +#define ER_SET_PASSWORD_AUTH_PLUGIN_ERROR 4102 +//#define OBSOLETE_ER_REDUCED_DBLWR_FILE_CORRUPTED 4103 +//#define OBSOLETE_ER_REDUCED_DBLWR_PAGE_FOUND 4104 +#define ER_SRS_INVALID_LATITUDE_OF_ORIGIN 4105 +#define ER_SRS_INVALID_LONGITUDE_OF_ORIGIN 4106 +#define ER_SRS_UNUSED_PROJ_PARAMETER_PRESENT 4107 +#define ER_GIPK_COLUMN_EXISTS 4108 +#define ER_GIPK_FAILED_AUTOINC_COLUMN_EXISTS 4109 +#define ER_GIPK_COLUMN_ALTER_NOT_ALLOWED 4110 +#define ER_DROP_PK_COLUMN_TO_DROP_GIPK 4111 +#define ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR 4112 +//#define OBSOLETE_ER_DA_EXPIRE_LOGS_DAYS_IGNORED 4113 +#define ER_CTE_RECURSIVE_NOT_UNION 4114 +#define ER_COMMAND_BACKEND_FAILED_TO_FETCH_SECURITY_CTX 4115 +#define ER_COMMAND_SERVICE_BACKEND_FAILED 4116 +#define ER_CLIENT_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS 4117 +#define ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE 4118 +#define ER_WARN_DEPRECATED_IDENT 4119 +#define ER_INTERSECT_ALL_MAX_DUPLICATES_EXCEEDED 4120 +#define ER_TP_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT 4121 +#define ER_BAD_TIMESTAMP_FORMAT 4122 +#define ER_SHAPE_PRIDICTION_UDF 4123 +#define ER_SRS_INVALID_HEIGHT 4124 +#define ER_SRS_INVALID_SCALING 4125 +#define ER_SRS_INVALID_ZONE_WIDTH 4126 +#define ER_SRS_INVALID_LATITUDE_POLAR_STERE_VAR_A 4127 +#define ER_WARN_DEPRECATED_CLIENT_NO_SCHEMA_OPTION 4128 +#define ER_TABLE_NOT_EMPTY 4129 +#define ER_TABLE_NO_PRIMARY_KEY 4130 +#define ER_TABLE_IN_SHARED_TABLESPACE 4131 +#define ER_INDEX_OTHER_THAN_PK 4132 +#define ER_LOAD_BULK_DATA_UNSORTED 4133 +#define ER_BULK_EXECUTOR_ERROR 4134 +#define ER_BULK_READER_LIBCURL_INIT_FAILED 4135 +#define ER_BULK_READER_LIBCURL_ERROR 4136 +#define ER_BULK_READER_SERVER_ERROR 4137 +#define ER_BULK_READER_COMMUNICATION_ERROR 4138 +#define ER_BULK_LOAD_DATA_FAILED 4139 +#define ER_BULK_LOADER_COLUMN_TOO_BIG_FOR_LEFTOVER_BUFFER 4140 +#define ER_BULK_LOADER_COMPONENT_ERROR 4141 +#define ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE 4142 +#define ER_BULK_PARSER_MISSING_ENCLOSED_BY 4143 +#define ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED 4144 +#define ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED 4145 +#define ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT 4146 +#define ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR 4147 +#define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY 4148 +#define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE 4149 +#define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR 4150 +#define ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE 4151 +#define ER_LOAD_BULK_DATA_FAILED 4152 +#define ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD 4153 +#define ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL 4154 +#define ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR 4155 +#define ER_CANT_CHANGE_SYS_VAR_IN_READ_ONLY_MODE 4156 +#define ER_INNODB_INSTANT_ADD_DROP_NOT_SUPPORTED_MAX_SIZE 4157 +#define ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_FIELDS 4158 +#define ER_CANT_SET_PERSISTED 4159 +#define ER_INSTALL_COMPONENT_SET_NULL_VALUE 4160 +#define ER_INSTALL_COMPONENT_SET_UNUSED_VALUE 4161 +#define ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS 4162 +#define ER_USER_LOCK_OVERLONG_NAME 4163 +#define ER_WARN_NO_SPACE_VERSION_COMMENT 4164 +#define ER_VALIDATE_PASSWORD_INSUFFICIENT_CHANGED_CHARACTERS 4165 +#define ER_WARN_DEPRECATED_WITH_NOTE 4166 +#define ER_LANGUAGE_COMPONENT 6000 +#define ER_LANGUAGE_COMPONENT_NOT_AVAILABLE 6001 +#define ER_LANGUAGE_COMPONENT_UNSUPPORTED_LANGUAGE 6002 +#define ER_LANGUAGE_COMPONENT_CANNOT_UNINSTALL 6003 +#define ER_SP_NO_ALTER_LANGUAGE 6004 +#define ER_EXPLAIN_INTO_ANALYZE_NOT_SUPPORTED 6005 +#define ER_EXPLAIN_INTO_IMPLICIT_FORMAT_NOT_SUPPORTED 6006 +#define ER_EXPLAIN_INTO_FORMAT_NOT_SUPPORTED 6007 +#define ER_NULL_CANT_BE_PERSISTED_FOR_READONLY 6008 +#define ER_EXPLAIN_INTO_FOR_CONNECTION_NOT_SUPPORTED 6009 +#define ER_INNODB_IMPORT_WRONG_DROPPED_ENUM_LENGTH 6010 +#define ER_INNODB_IMPORT_WRONG_NUMBER_OF_INDEXES_ZERO 6011 +#define ER_INNODB_IMPORT_WRONG_NUMBER_OF_INDEXES_TOO_HIGH 6012 +#define ER_INNODB_IMPORT_DROP_COL_METADATA_MISMATCH 6013 +#define ER_INNODB_IMPORT_ENUM_NULL_TERMINATOR_MISSING 6014 +#define ER_SIMULATED_INJECTION_ERROR 6015 +#define ER_WARN_DEPRECATED_DYNAMIC_PRIV_IN_GRANT 6016 +#define ER_BULK_MULTI_READER_OPEN_FILE_FAILED 6017 +#define ER_BULK_MULTI_READER_READ_FILE_FAILED 6018 +#define ER_BULK_MERGE_INVALID_CHUNK 6019 +#define ER_BULK_MERGE_NOT_ALL_CHUNKS_CONSUMED 6020 +#define ER_BULK_WRITER_LIBCURL_INIT_FAILED 6021 +#define ER_BULK_WRITER_LIBCURL_ERROR 6022 +#define ER_BULK_SORTING_LOADER_WRITE 6023 +#define ER_BULK_SORTING_LOADER_WAIT 6024 +#define ER_BULK_READER_OPEN_FILE_FAILED 6025 +#define ER_BULK_LOAD_TABLE_HAS_INSTANT_COLS 6026 +#define ER_BULK_LOAD_RESOURCE 6027 +#define ER_BULK_LOAD_SECONDARY_ENGINE 6028 +#define ER_BULK_READER_ERROR 6029 +#define ER_BULK_READER_FILE_DOESNT_EXIST 6030 +#define ER_BULK_READER_COULDNT_RESOLVE_HOST 6031 +#define ER_START_REPLICA_CHANNEL_INVALID_CONFIGURATION 6032 +#define ER_CANNOT_EXECUTE_IN_PRIMARY 6033 +#define ER_TOO_MANY_GROUP_BY_MODIFIER_BRANCHES 6034 +#define ER_WARN_DEPRECATED_ENGINE_SYNTAX_NO_REPLACEMENT 6035 +#define ER_QUALIFY_WITHOUT_WINDOW_FUNCTION 6036 +#define ER_SUPPORTED_ONLY_WITH_HYPERGRAPH 6037 +#define ER_SPECIFIC_ACCESS_DENIED 6038 +#define ER_CANT_SET_GTID_NEXT_TO_AUTOMATIC_TAGGED_WHEN_GTID_MODE_IS_OFF 6039 +#define ER_GTID_NEXT_TAG_GTID_MODE_OFF 6040 +#define ER_LH_COL_NOT_NULLABLE 6041 +#define ER_LH_WARN_COL_MISSING_NOT_NULLABLE 6042 +#define ER_LH_COL_IS_EMPTY 6043 +#define ER_LH_COL_IS_EMPTY_WARN 6044 +#define ER_LH_BAD_VALUE 6045 +#define ER_LH_DECIMAL_UNKNOWN_ERR 6046 +#define ER_LH_DECIMAL_OOM_ERR 6047 +#define ER_LH_WARN_DECIMAL_ROUNDING 6048 +#define ER_LH_DECIMAL_PRECISION_EXCEEDS_SCHEMA 6049 +#define ER_LH_EXCEEDS_MIN 6050 +#define ER_LH_EXCEEDS_MAX 6051 +#define ER_LH_WARN_EXCEEDS_MIN_TRUNCATING 6052 +#define ER_LH_WARN_EXCEEDS_MAX_TRUNCATING 6053 +#define ER_LH_REAL_IS_NAN 6054 +#define ER_LH_OUT_OF_RANGE 6055 +#define ER_LH_DATETIME_FORMAT 6056 +#define ER_LH_WARN_TRUNCATED 6057 +#define ER_LH_CANNOT_CONVERT_STRING 6058 +#define ER_LH_RESOURCE_PRINCIPAL_ERR 6059 +#define ER_LH_AWS_AUTH_ERR 6060 +#define ER_LH_CSV_PARSING_ERR 6061 +#define ER_LH_COLUMN_MISMATCH_ERR 6062 +#define ER_LH_COLUMN_MAX_ERR 6063 +#define ER_LH_CHARSET_UNSUPPORTED 6064 +#define ER_LH_PARQUET_DECIMAL_CONVERSION_ERR 6065 +#define ER_LH_STRING_TOO_LONG 6066 +#define ER_LH_RESOURCE_PRINCIPAL_BUCKET_ERR 6067 +#define ER_LH_NO_FILES_FOUND 6068 +#define ER_LH_EMPTY_FILE 6069 +#define ER_LH_DUPLICATE_FILE 6070 +#define ER_LH_AVRO_SCHEMA_DEPTH_EXCEEDS_MAX 6071 +#define ER_LH_AVRO_HEADER_MISMATCH 6072 +#define ER_LH_AVRO_ENUM_CANNOT_CONVERT_CHARSET 6073 +#define ER_LH_AVRO_ENUM_MISMATCH 6074 +#define ER_LH_AVRO_TYPE_CANNOT_CONVERT 6075 +#define ER_LH_AVRO_FILE_ENDS_UNEXPECTEDLY 6076 +#define ER_LH_AVRO_FILE_DATA_CORRUPT 6077 +#define ER_LH_AVRO_INVALID_UNION 6078 +#define ER_LH_AVRO_INVALID_BLOCK_SIZE 6079 +#define ER_LH_AVRO_INVALID_BLOCK_RECORD_COUNT 6080 +#define ER_LH_FORMAT_HEADER_NO_MAGIC_BYTES 6081 +#define ER_LH_AVRO_HEADER_METADATA_ERR 6082 +#define ER_LH_AVRO_HEADER_NO_SCHEMA 6083 +#define ER_LH_AVRO_NO_CODEC_IN_HEADER 6084 +#define ER_LH_AVRO_INVALID_NAME_IN_SCHEMA 6085 +#define ER_LH_AVRO_DECODING_ERR 6086 +#define ER_LH_PARQUET_NON_UTF8_FILE_ENC 6087 +#define ER_LH_PARQUET_SCHEMA_MISMATCH 6088 +#define ER_LH_PARQUET_ROW_GROUP_SIZE_EXCEEDS_MAX 6089 +#define ER_LH_PARQUET_CANNOT_LOCATE_OFFSET 6090 +#define ER_LH_PARQUET_TYPE_CANNOT_CONVERT 6091 +#define ER_LH_PARQUET_CANNOT_LOCATE_SCHEMA 6092 +#define ER_LH_INFER_SCHEMA_MISMATCH 6093 +#define ER_LH_OOM 6094 +#define ER_LH_WARN_INFER_SKIPPED_LINES 6095 +#define ER_LH_WARN_INFER_SKIPPED_FILES 6096 +#define ER_LH_INFER_FILE_HAS_NO_DATA 6097 +#define ER_LH_INFER_NO_DATA 6098 +#define ER_LH_INFER_NO_FILES 6099 +#define ER_LH_WARN_INFER_USE_DEFAULT_COL_NAMES 6100 +#define ER_LH_PARQUET_CANNOT_READ_HEADER 6101 +#define ER_LH_INFER_WARN_GOT_EXCEPTION 6102 +#define ER_LH_AVRO_CANNOT_PARSE_HEADER 6103 +#define ER_LH_PARQUET_CANT_OPEN_FILE 6104 +#define ER_LH_TOO_LARGE_VALUE_ERR 6105 +#define ER_LH_TOO_LARGE_ROW_ERR 6106 +#define ER_TABLESAMPLE_PERCENTAGE 6107 +#define ER_TABLESAMPLE_ONLY_ON_BASE_TABLES 6108 +//#define OBSOLETE_ER_PARAMETER_INDEX_OUT_OF_RANGE 6109 +#define ER_RESULT_SIZE_LIMIT_EXCEEDED 6110 +#define ER_LANGUAGE_COMPONENT_INTERNAL 6111 +#define ER_LANGUAGE_COMPONENT_CONCURRENCY_LIMIT 6112 +#define ER_LANGUAGE_COMPONENT_RUNTIME 6113 +#define ER_LANGUAGE_COMPONENT_TIMEZONE 6114 +#define ER_LANGUAGE_COMPONENT_KEYWORD 6115 +#define ER_LANGUAGE_COMPONENT_SET_SYSTEM_VARIABLE 6116 +#define ER_LANGUAGE_COMPONENT_UNSUPPORTED_TYPE 6117 +#define ER_LANGUAGE_COMPONENT_CONVERSION 6118 +#define ER_WARN_SP_STATEMENT_PARTIALLY_EXECUTED 6119 +#define ER_STMT_EXECUTION_NOT_ALLOWED_WITHIN_SP_OR_TRG_OR_UDF 6120 +#define ER_LH_JSON_PARSING 6121 +#define ER_ENGINE_CANNOT_BE_DEFAULT 6122 +#define ER_PARTITION_PREFIX_KEY_NOT_SUPPORTED 6123 +#define ER_WARN_DEPRECATED_NON_STANDARD_KEY 6124 +#define ER_FK_NO_UNIQUE_INDEX_PARENT 6125 +#define ER_ACCESS_DENIED_NO_PROXY_GRANT 6126 +#define ER_ACCESS_DENIED_NO_PROXY 6127 +#define ER_LH_USER_DATA_ACCESS_FAILED 6128 +#define ER_BULK_READER_ZSTD_ERROR 6129 +#define ER_BULK_PARSER_ERROR 6130 +#define ER_LH_INVALID_JSON_FILE_FORMAT_SCHEMA 6131 +#define ER_LH_INFER_JSON_INVALID_SCHEMA 6132 +#define ER_LH_JSON_FILE_FORMAT_WARN_INFER_SCHEMA 6133 +#define ER_NON_SCALAR_USED_AS_KEY 6134 +#define ER_INCOMPATIBLE_TYPE_AGG 6135 +#define ER_DATA_INCOMPATIBLE_WITH_VECTOR 6136 +#define ER_EXCEEDS_VECTOR_MAX_DIMENSIONS 6137 +#define ER_TO_VECTOR_CONVERSION 6138 +#define ER_EXTERNAL_UNSUPPORTED_INDEX_ALGORITHM 6139 +#define ER_TP_CANNOT_DISABLE_MTL_WITH_DL 6140 #define ER_PARSER_TRACE 10000 #define ER_BOOTSTRAP_CANT_THREAD 10001 #define ER_TRIGGER_INVALID_VALUE 10002 @@ -1624,7 +1979,7 @@ static const int total_error_count = 5166; #define ER_LOG_SLOW_CANNOT_OPEN 10011 #define ER_LOG_GENERAL_CANNOT_OPEN 10012 #define ER_LOG_CANNOT_WRITE 10013 -#define ER_RPL_ZOMBIE_ENCOUNTERED 10014 +//#define OBSOLETE_ER_RPL_ZOMBIE_ENCOUNTERED 10014 #define ER_RPL_GTID_TABLE_CANNOT_OPEN 10015 #define ER_SYSTEM_SCHEMA_NOT_FOUND 10016 #define ER_DD_INIT_UPGRADE_FAILED 10017 @@ -1632,7 +1987,7 @@ static const int total_error_count = 5166; #define ER_DD_VIEW_CANT_ALLOC_CHARSET 10019 #define ER_DD_INIT_FAILED 10020 #define ER_DD_UPDATING_PLUGIN_MD_FAILED 10021 -#define ER_DD_POPULATING_TABLES_FAILED 10022 +//#define OBSOLETE_ER_DD_POPULATING_TABLES_FAILED 10022 #define ER_DD_VIEW_CANT_CREATE 10023 #define ER_DD_METADATA_NOT_FOUND 10024 #define ER_DD_CACHE_NOT_EMPTY_AT_SHUTDOWN 10025 @@ -1727,7 +2082,7 @@ static const int total_error_count = 5166; #define ER_FUTURE_DATE 10114 #define ER_UNSUPPORTED_DATE 10115 #define ER_STARTING_AS 10116 -#define ER_SHUTTING_DOWN_SLAVE_THREADS 10117 +#define ER_SHUTTING_DOWN_REPLICA_THREADS 10117 #define ER_DISCONNECTING_REMAINING_CLIENTS 10118 #define ER_ABORTING 10119 #define ER_BINLOG_END 10120 @@ -1787,7 +2142,7 @@ static const int total_error_count = 5166; #define ER_CANT_CHOWN_DATADIR 10174 #define ER_CANT_SET_UP_PERSISTED_VALUES 10175 #define ER_CANT_SAVE_GTIDS 10176 -#define ER_AUTH_CANT_SET_DEFAULT_PLUGIN 10177 +//#define OBSOLETE_ER_AUTH_CANT_SET_DEFAULT_PLUGIN 10177 #define ER_CANT_JOIN_SHUTDOWN_THREAD 10178 #define ER_CANT_HASH_DO_AND_IGNORE_RULES 10179 #define ER_CANT_OPEN_CA 10180 @@ -1823,7 +2178,7 @@ static const int total_error_count = 5166; #define ER_SR_INVALID_CONTEXT 10210 #define ER_READING_TABLE_FAILED 10211 #define ER_DES_FILE_WRONG_KEY 10212 -#define ER_CANT_SET_PERSISTED 10213 +//#define OBSOLETE_ER_CANT_SET_PERSISTED 10213 #define ER_JSON_PARSE_ERROR 10214 #define ER_CONFIG_OPTION_WITHOUT_GROUP 10215 #define ER_VALGRIND_DO_QUICK_LEAK_CHECK 10216 @@ -1836,9 +2191,9 @@ static const int total_error_count = 5166; #define ER_UDF_CANT_OPEN_FUNCTION_TABLE 10223 #define ER_XA_RECOVER_FOUND_TRX_IN_SE 10224 #define ER_XA_RECOVER_FOUND_XA_TRX 10225 -#define ER_XA_IGNORING_XID 10226 -#define ER_XA_COMMITTING_XID 10227 -#define ER_XA_ROLLING_BACK_XID 10228 +//#define OBSOLETE_ER_XA_IGNORING_XID 10226 +//#define OBSOLETE_ER_XA_COMMITTING_XID 10227 +//#define OBSOLETE_ER_XA_ROLLING_BACK_XID 10228 #define ER_XA_STARTING_RECOVERY 10229 #define ER_XA_NO_MULTI_2PC_HEURISTIC_RECOVER 10230 #define ER_XA_RECOVER_EXPLANATION 10231 @@ -1949,7 +2304,7 @@ static const int total_error_count = 5166; #define ER_DD_FRM_EXISTS_FOR_TABLE 10336 #define ER_DD_CREATED_FOR_UPGRADE 10337 #define ER_ERRMSG_CANT_FIND_FILE 10338 -#define ER_ERRMSG_LOADING_55_STYLE 10339 +//#define OBSOLETE_ER_ERRMSG_LOADING_55_STYLE 10339 #define ER_ERRMSG_MISSING_IN_FILE 10340 #define ER_ERRMSG_OOM 10341 #define ER_ERRMSG_CANT_READ 10342 @@ -1985,12 +2340,12 @@ static const int total_error_count = 5166; #define ER_TZ_CANT_BUILD_MKTIME_MAP 10372 #define ER_TZ_OOM_WHILE_LOADING_TIME_ZONE 10373 #define ER_TZ_OOM_WHILE_SETTING_TIME_ZONE 10374 -#define ER_SLAVE_SQL_THREAD_STOPPED_UNTIL_CONDITION_BAD 10375 -#define ER_SLAVE_SQL_THREAD_STOPPED_UNTIL_POSITION_REACHED 10376 -#define ER_SLAVE_SQL_THREAD_STOPPED_BEFORE_GTIDS_ALREADY_APPLIED 10377 -#define ER_SLAVE_SQL_THREAD_STOPPED_BEFORE_GTIDS_REACHED 10378 -#define ER_SLAVE_SQL_THREAD_STOPPED_AFTER_GTIDS_REACHED 10379 -#define ER_SLAVE_SQL_THREAD_STOPPED_GAP_TRX_PROCESSED 10380 +#define ER_REPLICA_SQL_THREAD_STOPPED_UNTIL_CONDITION_BAD 10375 +#define ER_REPLICA_SQL_THREAD_STOPPED_UNTIL_POSITION_REACHED 10376 +#define ER_REPLICA_SQL_THREAD_STOPPED_BEFORE_GTIDS_ALREADY_APPLIED 10377 +#define ER_REPLICA_SQL_THREAD_STOPPED_BEFORE_GTIDS_REACHED 10378 +#define ER_REPLICA_SQL_THREAD_STOPPED_AFTER_GTIDS_REACHED 10379 +#define ER_REPLICA_SQL_THREAD_STOPPED_GAP_TRX_PROCESSED 10380 #define ER_GROUP_REPLICATION_PLUGIN_NOT_INSTALLED 10381 #define ER_GTID_ALREADY_ADDED_BY_USER 10382 #define ER_FAILED_TO_DELETE_FROM_GTID_EXECUTED_TABLE 10383 @@ -2022,23 +2377,23 @@ static const int total_error_count = 5166; #define ER_RPL_WORKER_ID_IS 10409 #define ER_RPL_INCONSISTENT_TIMESTAMPS_IN_TRX 10410 #define ER_RPL_INCONSISTENT_SEQUENCE_NO_IN_TRX 10411 -#define ER_RPL_CHANNELS_REQUIRE_TABLES_AS_INFO_REPOSITORIES 10412 +//#define OBSOLETE_ER_RPL_CHANNELS_REQUIRE_TABLES_AS_INFO_REPOSITORIES 10412 #define ER_RPL_CHANNELS_REQUIRE_NON_ZERO_SERVER_ID 10413 -#define ER_RPL_REPO_SHOULD_BE_TABLE 10414 -#define ER_RPL_ERROR_CREATING_MASTER_INFO 10415 -#define ER_RPL_ERROR_CHANGING_MASTER_INFO_REPO_TYPE 10416 -#define ER_RPL_CHANGING_RELAY_LOG_INFO_REPO_TYPE_FAILED_DUE_TO_GAPS 10417 -#define ER_RPL_ERROR_CREATING_RELAY_LOG_INFO 10418 -#define ER_RPL_ERROR_CHANGING_RELAY_LOG_INFO_REPO_TYPE 10419 -#define ER_RPL_FAILED_TO_DELETE_FROM_SLAVE_WORKERS_INFO_REPOSITORY 10420 -#define ER_RPL_FAILED_TO_RESET_STATE_IN_SLAVE_INFO_REPOSITORY 10421 -#define ER_RPL_ERROR_CHECKING_REPOSITORY 10422 -#define ER_RPL_SLAVE_GENERIC_MESSAGE 10423 -#define ER_RPL_SLAVE_COULD_NOT_CREATE_CHANNEL_LIST 10424 +//#define OBSOLETE_ER_RPL_REPO_SHOULD_BE_TABLE 10414 +#define ER_RPL_ERROR_CREATING_CONNECTION_METADATA 10415 +//#define OBSOLETE_ER_RPL_ERROR_CHANGING_CONNECTION_METADATA_REPO_TYPE 10416 +//#define OBSOLETE_ER_RPL_CHANGING_AM_TYPE_FAILED_DUE_TO_GAPS 10417 +#define ER_RPL_ERROR_CREATING_APPLIER_METADATA 10418 +//#define OBSOLETE_ER_RPL_ERROR_CHANGING_APPLIER_METADATA_REPO_TYPE 10419 +#define ER_RPL_FAILED_TO_DELETE_FROM_REPLICA_WORKERS_INFO_REPOSITORY 10420 +#define ER_RPL_FAILED_TO_RESET_STATE_IN_REPLICA_INFO_REPOSITORY 10421 +//#define OBSOLETE_ER_RPL_ERROR_CHECKING_REPOSITORY 10422 +#define ER_RPL_REPLICA_GENERIC_MESSAGE 10423 +#define ER_RPL_REPLICA_COULD_NOT_CREATE_CHANNEL_LIST 10424 #define ER_RPL_MULTISOURCE_REQUIRES_TABLE_TYPE_REPOSITORIES 10425 -#define ER_RPL_SLAVE_FAILED_TO_INIT_A_MASTER_INFO_STRUCTURE 10426 -#define ER_RPL_SLAVE_FAILED_TO_INIT_MASTER_INFO_STRUCTURE 10427 -#define ER_RPL_SLAVE_FAILED_TO_CREATE_CHANNEL_FROM_MASTER_INFO 10428 +#define ER_RPL_REPLICA_FAILED_TO_INIT_A_CONNECTION_METADATA_STRUCTURE 10426 +#define ER_RPL_REPLICA_FAILED_TO_INIT_CONNECTION_METADATA_STRUCTURE 10427 +#define ER_RPL_REPLICA_FAILED_TO_CREATE_CHANNEL_FROM_CONNECTION_METADATA 10428 #define ER_RPL_FAILED_TO_CREATE_NEW_INFO_FILE 10429 #define ER_RPL_FAILED_TO_CREATE_CACHE_FOR_INFO_FILE 10430 #define ER_RPL_FAILED_TO_OPEN_INFO_FILE 10431 @@ -2073,9 +2428,9 @@ static const int total_error_count = 5166; #define ER_INIT_DATADIR_EXISTS_AND_NOT_WRITABLE_WONT_INITIALIZE 10460 #define ER_INIT_CREATING_DD 10461 #define ER_RPL_BINLOG_STARTING_DUMP 10462 -#define ER_RPL_BINLOG_MASTER_SENDS_HEARTBEAT 10463 +#define ER_RPL_BINLOG_SOURCE_SENDS_HEARTBEAT 10463 #define ER_RPL_BINLOG_SKIPPING_REMAINING_HEARTBEAT_INFO 10464 -#define ER_RPL_BINLOG_MASTER_USES_CHECKSUM_AND_SLAVE_CANT 10465 +#define ER_RPL_BINLOG_SOURCE_USES_CHECKSUM_AND_REPLICA_CANT 10465 //#define OBSOLETE_ER_NDB_QUERY_FAILED 10466 #define ER_KILLING_THREAD 10467 #define ER_DETACHING_SESSION_LEFT_BY_PLUGIN 10468 @@ -2139,85 +2494,85 @@ static const int total_error_count = 5166; #define ER_TC_HEURISTIC_RECOVERY_MODE 10526 #define ER_TC_HEURISTIC_RECOVERY_FAILED 10527 #define ER_TC_RESTART_WITHOUT_TC_HEURISTIC_RECOVER 10528 -#define ER_RPL_SLAVE_FAILED_TO_CREATE_OR_RECOVER_INFO_REPOSITORIES 10529 -#define ER_RPL_SLAVE_AUTO_POSITION_IS_1_AND_GTID_MODE_IS_OFF 10530 -#define ER_RPL_SLAVE_CANT_START_SLAVE_FOR_CHANNEL 10531 -#define ER_RPL_SLAVE_CANT_STOP_SLAVE_FOR_CHANNEL 10532 -#define ER_RPL_RECOVERY_NO_ROTATE_EVENT_FROM_MASTER 10533 +#define ER_RPL_REPLICA_FAILED_TO_CREATE_OR_RECOVER_INFO_REPOSITORIES 10529 +#define ER_RPL_REPLICA_AUTO_POSITION_IS_1_AND_GTID_MODE_IS_OFF 10530 +#define ER_RPL_REPLICA_CANT_START_REPLICA_FOR_CHANNEL 10531 +#define ER_RPL_REPLICA_CANT_STOP_REPLICA_FOR_CHANNEL 10532 +#define ER_RPL_RECOVERY_NO_ROTATE_EVENT_FROM_SOURCE 10533 #define ER_RPL_RECOVERY_ERROR_READ_RELAY_LOG 10534 //#define OBSOLETE_ER_RPL_RECOVERY_ERROR_FREEING_IO_CACHE 10535 #define ER_RPL_RECOVERY_SKIPPED_GROUP_REPLICATION_CHANNEL 10536 #define ER_RPL_RECOVERY_ERROR 10537 #define ER_RPL_RECOVERY_IO_ERROR_READING_RELAY_LOG_INDEX 10538 -#define ER_RPL_RECOVERY_FILE_MASTER_POS_INFO 10539 +#define ER_RPL_RECOVERY_FILE_SOURCE_POS_INFO 10539 #define ER_RPL_RECOVERY_REPLICATE_SAME_SERVER_ID_REQUIRES_POSITION 10540 -#define ER_RPL_MTS_RECOVERY_STARTING_COORDINATOR 10541 -#define ER_RPL_MTS_RECOVERY_FAILED_TO_START_COORDINATOR 10542 -#define ER_RPL_MTS_AUTOMATIC_RECOVERY_FAILED 10543 -#define ER_RPL_MTS_RECOVERY_CANT_OPEN_RELAY_LOG 10544 -#define ER_RPL_MTS_RECOVERY_SUCCESSFUL 10545 +#define ER_RPL_MTA_RECOVERY_STARTING_COORDINATOR 10541 +#define ER_RPL_MTA_RECOVERY_FAILED_TO_START_COORDINATOR 10542 +#define ER_RPL_MTA_AUTOMATIC_RECOVERY_FAILED 10543 +#define ER_RPL_MTA_RECOVERY_CANT_OPEN_RELAY_LOG 10544 +#define ER_RPL_MTA_RECOVERY_SUCCESSFUL 10545 #define ER_RPL_SERVER_ID_MISSING 10546 -#define ER_RPL_CANT_CREATE_SLAVE_THREAD 10547 -#define ER_RPL_SLAVE_IO_THREAD_WAS_KILLED 10548 -#define ER_RPL_SLAVE_MASTER_UUID_HAS_CHANGED 10549 -#define ER_RPL_SLAVE_USES_CHECKSUM_AND_MASTER_PRE_50 10550 -#define ER_RPL_SLAVE_SECONDS_BEHIND_MASTER_DUBIOUS 10551 -#define ER_RPL_SLAVE_CANT_FLUSH_MASTER_INFO_FILE 10552 -#define ER_RPL_SLAVE_REPORT_HOST_TOO_LONG 10553 -#define ER_RPL_SLAVE_REPORT_USER_TOO_LONG 10554 -#define ER_RPL_SLAVE_REPORT_PASSWORD_TOO_LONG 10555 -#define ER_RPL_SLAVE_ERROR_RETRYING 10556 -#define ER_RPL_SLAVE_ERROR_READING_FROM_SERVER 10557 -#define ER_RPL_SLAVE_DUMP_THREAD_KILLED_BY_MASTER 10558 -#define ER_RPL_MTS_STATISTICS 10559 -#define ER_RPL_MTS_RECOVERY_COMPLETE 10560 -#define ER_RPL_SLAVE_CANT_INIT_RELAY_LOG_POSITION 10561 -#define ER_RPL_SLAVE_CONNECTED_TO_MASTER_REPLICATION_STARTED 10562 -#define ER_RPL_SLAVE_IO_THREAD_KILLED 10563 -#define ER_RPL_SLAVE_IO_THREAD_CANT_REGISTER_ON_MASTER 10564 -#define ER_RPL_SLAVE_FORCING_TO_RECONNECT_IO_THREAD 10565 -#define ER_RPL_SLAVE_ERROR_REQUESTING_BINLOG_DUMP 10566 -#define ER_RPL_LOG_ENTRY_EXCEEDS_SLAVE_MAX_ALLOWED_PACKET 10567 -#define ER_RPL_SLAVE_STOPPING_AS_MASTER_OOM 10568 -#define ER_RPL_SLAVE_IO_THREAD_ABORTED_WAITING_FOR_RELAY_LOG_SPACE 10569 -#define ER_RPL_SLAVE_IO_THREAD_EXITING 10570 -#define ER_RPL_SLAVE_CANT_INITIALIZE_SLAVE_WORKER 10571 -#define ER_RPL_MTS_GROUP_RECOVERY_RELAY_LOG_INFO_FOR_WORKER 10572 +#define ER_RPL_CANT_CREATE_REPLICA_THREAD 10547 +#define ER_RPL_REPLICA_IO_THREAD_WAS_KILLED 10548 +//#define OBSOLETE_ER_RPL_REPLICA_SOURCE_UUID_HAS_CHANGED 10549 +#define ER_RPL_REPLICA_USES_CHECKSUM_AND_SOURCE_PRE_50 10550 +#define ER_RPL_REPLICA_SECONDS_BEHIND_SOURCE_DUBIOUS 10551 +#define ER_RPL_REPLICA_CANT_FLUSH_CONNECTION_METADATA_REPOS 10552 +#define ER_RPL_REPLICA_REPORT_HOST_TOO_LONG 10553 +#define ER_RPL_REPLICA_REPORT_USER_TOO_LONG 10554 +#define ER_RPL_REPLICA_REPORT_PASSWORD_TOO_LONG 10555 +#define ER_RPL_REPLICA_ERROR_RETRYING 10556 +#define ER_RPL_REPLICA_ERROR_READING_FROM_SERVER 10557 +#define ER_RPL_REPLICA_DUMP_THREAD_KILLED_BY_SOURCE 10558 +#define ER_RPL_MTA_STATISTICS 10559 +#define ER_RPL_MTA_RECOVERY_COMPLETE 10560 +#define ER_RPL_REPLICA_CANT_INIT_RELAY_LOG_POSITION 10561 +//#define OBSOLETE_ER_RPL_REPLICA_CONNECTED_TO_SOURCE_REPLICATION_STARTED 10562 +#define ER_RPL_REPLICA_IO_THREAD_KILLED 10563 +#define ER_RPL_REPLICA_IO_THREAD_CANT_REGISTER_ON_SOURCE 10564 +#define ER_RPL_REPLICA_FORCING_TO_RECONNECT_IO_THREAD 10565 +#define ER_RPL_REPLICA_ERROR_REQUESTING_BINLOG_DUMP 10566 +#define ER_RPL_LOG_ENTRY_EXCEEDS_REPLICA_MAX_ALLOWED_PACKET 10567 +#define ER_RPL_REPLICA_STOPPING_AS_SOURCE_OOM 10568 +#define ER_RPL_REPLICA_IO_THREAD_ABORTED_WAITING_FOR_RELAY_LOG_SPACE 10569 +#define ER_RPL_REPLICA_IO_THREAD_EXITING 10570 +#define ER_RPL_REPLICA_CANT_INITIALIZE_REPLICA_WORKER 10571 +#define ER_RPL_MTA_GROUP_RECOVERY_APPLIER_METADATA_FOR_WORKER 10572 #define ER_RPL_ERROR_LOOKING_FOR_LOG 10573 -#define ER_RPL_MTS_GROUP_RECOVERY_RELAY_LOG_INFO 10574 +#define ER_RPL_MTA_GROUP_RECOVERY_APPLIER_METADATA 10574 #define ER_RPL_CANT_FIND_FOLLOWUP_FILE 10575 -#define ER_RPL_MTS_CHECKPOINT_PERIOD_DIFFERS_FROM_CNT 10576 -#define ER_RPL_SLAVE_WORKER_THREAD_CREATION_FAILED 10577 -#define ER_RPL_SLAVE_WORKER_THREAD_CREATION_FAILED_WITH_ERRNO 10578 -#define ER_RPL_SLAVE_FAILED_TO_INIT_PARTITIONS_HASH 10579 +#define ER_RPL_MTA_CHECKPOINT_PERIOD_DIFFERS_FROM_CNT 10576 +#define ER_RPL_REPLICA_WORKER_THREAD_CREATION_FAILED 10577 +#define ER_RPL_REPLICA_WORKER_THREAD_CREATION_FAILED_WITH_ERRNO 10578 +#define ER_RPL_REPLICA_FAILED_TO_INIT_PARTITIONS_HASH 10579 //#define OBSOLETE_ER_RPL_SLAVE_NDB_TABLES_NOT_AVAILABLE 10580 -#define ER_RPL_SLAVE_SQL_THREAD_STARTING 10581 -#define ER_RPL_SLAVE_SKIP_COUNTER_EXECUTED 10582 -#define ER_RPL_SLAVE_ADDITIONAL_ERROR_INFO_FROM_DA 10583 -#define ER_RPL_SLAVE_ERROR_INFO_FROM_DA 10584 -#define ER_RPL_SLAVE_ERROR_LOADING_USER_DEFINED_LIBRARY 10585 -#define ER_RPL_SLAVE_ERROR_RUNNING_QUERY 10586 -#define ER_RPL_SLAVE_SQL_THREAD_EXITING 10587 -#define ER_RPL_SLAVE_READ_INVALID_EVENT_FROM_MASTER 10588 -#define ER_RPL_SLAVE_QUEUE_EVENT_FAILED_INVALID_CONFIGURATION 10589 -#define ER_RPL_SLAVE_IO_THREAD_DETECTED_UNEXPECTED_EVENT_SEQUENCE 10590 -#define ER_RPL_SLAVE_CANT_USE_CHARSET 10591 -#define ER_RPL_SLAVE_CONNECTED_TO_MASTER_REPLICATION_RESUMED 10592 -#define ER_RPL_SLAVE_NEXT_LOG_IS_ACTIVE 10593 -#define ER_RPL_SLAVE_NEXT_LOG_IS_INACTIVE 10594 -#define ER_RPL_SLAVE_SQL_THREAD_IO_ERROR_READING_EVENT 10595 -#define ER_RPL_SLAVE_ERROR_READING_RELAY_LOG_EVENTS 10596 -#define ER_SLAVE_CHANGE_MASTER_TO_EXECUTED 10597 -#define ER_RPL_SLAVE_NEW_MASTER_INFO_NEEDS_REPOS_TYPE_OTHER_THAN_FILE 10598 +#define ER_RPL_REPLICA_SQL_THREAD_STARTING 10581 +#define ER_RPL_REPLICA_SKIP_COUNTER_EXECUTED 10582 +#define ER_RPL_REPLICA_ADDITIONAL_ERROR_INFO_FROM_DA 10583 +#define ER_RPL_REPLICA_ERROR_INFO_FROM_DA 10584 +#define ER_RPL_REPLICA_ERROR_LOADING_USER_DEFINED_LIBRARY 10585 +#define ER_RPL_REPLICA_ERROR_RUNNING_QUERY 10586 +#define ER_RPL_REPLICA_SQL_THREAD_EXITING 10587 +#define ER_RPL_REPLICA_READ_INVALID_EVENT_FROM_SOURCE 10588 +#define ER_RPL_REPLICA_QUEUE_EVENT_FAILED_INVALID_CONFIGURATION 10589 +#define ER_RPL_REPLICA_IO_THREAD_DETECTED_UNEXPECTED_EVENT_SEQUENCE 10590 +#define ER_RPL_REPLICA_CANT_USE_CHARSET 10591 +#define ER_RPL_REPLICA_CONNECTED_TO_SOURCE_REPLICATION_RESUMED 10592 +#define ER_RPL_REPLICA_NEXT_LOG_IS_ACTIVE 10593 +#define ER_RPL_REPLICA_NEXT_LOG_IS_INACTIVE 10594 +#define ER_RPL_REPLICA_SQL_THREAD_IO_ERROR_READING_EVENT 10595 +#define ER_RPL_REPLICA_ERROR_READING_RELAY_LOG_EVENTS 10596 +#define ER_REPLICA_CHANGE_SOURCE_TO_EXECUTED 10597 +#define ER_RPL_REPLICA_NEW_C_M_NEEDS_REPOS_TYPE_OTHER_THAN_FILE 10598 #define ER_RPL_FAILED_TO_STAT_LOG_IN_INDEX 10599 #define ER_RPL_LOG_NOT_FOUND_WHILE_COUNTING_RELAY_LOG_SPACE 10600 -#define ER_SLAVE_CANT_USE_TEMPDIR 10601 +#define ER_REPLICA_CANT_USE_TEMPDIR 10601 #define ER_RPL_RELAY_LOG_NEEDS_FILE_NOT_DIRECTORY 10602 #define ER_RPL_RELAY_LOG_INDEX_NEEDS_FILE_NOT_DIRECTORY 10603 #define ER_RPL_PLEASE_USE_OPTION_RELAY_LOG 10604 #define ER_RPL_OPEN_INDEX_FILE_FAILED 10605 -#define ER_RPL_CANT_INITIALIZE_GTID_SETS_IN_RLI_INIT_INFO 10606 -#define ER_RPL_CANT_OPEN_LOG_IN_RLI_INIT_INFO 10607 +#define ER_RPL_CANT_INITIALIZE_GTID_SETS_IN_AM_INIT_INFO 10606 +#define ER_RPL_CANT_OPEN_LOG_IN_AM_INIT_INFO 10607 #define ER_RPL_ERROR_WRITING_RELAY_LOG_CONFIGURATION 10608 //#define OBSOLETE_ER_NDB_OOM_GET_NDB_BLOBS_VALUE 10609 //#define OBSOLETE_ER_NDB_THREAD_TIMED_OUT 10610 @@ -2327,20 +2682,20 @@ static const int total_error_count = 5166; #define ER_WRONG_COUNT_FOR_ORIGIN 10714 #define ER_WRONG_COUNT_FOR_KEY 10715 #define ER_WRONG_COUNT_OF_ELEMENTS 10716 -#define ER_RPL_ERROR_READING_SLAVE_WORKER_CONFIGURATION 10717 +#define ER_RPL_ERROR_READING_REPLICA_WORKER_CONFIGURATION 10717 //#define OBSOLETE_ER_RPL_ERROR_WRITING_SLAVE_WORKER_CONFIGURATION 10718 #define ER_RPL_FAILED_TO_OPEN_RELAY_LOG 10719 #define ER_RPL_WORKER_CANT_READ_RELAY_LOG 10720 #define ER_RPL_WORKER_CANT_FIND_NEXT_RELAY_LOG 10721 -#define ER_RPL_MTS_SLAVE_COORDINATOR_HAS_WAITED 10722 +#define ER_RPL_MTA_REPLICA_COORDINATOR_HAS_WAITED 10722 #define ER_BINLOG_FAILED_TO_WRITE_DROP_FOR_TEMP_TABLES 10723 #define ER_BINLOG_OOM_WRITING_DELETE_WHILE_OPENING_HEAP_TABLE 10724 #define ER_FAILED_TO_REPAIR_TABLE 10725 #define ER_FAILED_TO_REMOVE_TEMP_TABLE 10726 #define ER_SYSTEM_TABLE_NOT_TRANSACTIONAL 10727 -#define ER_RPL_ERROR_WRITING_MASTER_CONFIGURATION 10728 -#define ER_RPL_ERROR_READING_MASTER_CONFIGURATION 10729 -#define ER_RPL_SSL_INFO_IN_MASTER_INFO_IGNORED 10730 +#define ER_RPL_ERROR_WRITING_SOURCE_CONFIGURATION 10728 +#define ER_RPL_ERROR_READING_SOURCE_CONFIGURATION 10729 +#define ER_RPL_SSL_INFO_IN_CONNECTION_METADATA_IGNORED 10730 #define ER_PLUGIN_FAILED_DEINITIALIZATION 10731 #define ER_PLUGIN_HAS_NONZERO_REFCOUNT_AFTER_DEINITIALIZATION 10732 #define ER_PLUGIN_SHUTTING_DOWN_PLUGIN 10733 @@ -2429,7 +2784,7 @@ static const int total_error_count = 5166; #define ER_BINLOG_CANT_OPEN_FOR_LOGGING 10816 #define ER_BINLOG_FAILED_TO_SYNC_INDEX_FILE 10817 #define ER_BINLOG_ERROR_READING_GTIDS_FROM_RELAY_LOG 10818 -#define ER_BINLOG_EVENTS_READ_FROM_RELAY_LOG_INFO 10819 +#define ER_BINLOG_EVENTS_READ_FROM_APPLIER_METADATA 10819 #define ER_BINLOG_ERROR_READING_GTIDS_FROM_BINARY_LOG 10820 #define ER_BINLOG_EVENTS_READ_FROM_BINLOG_INFO 10821 #define ER_BINLOG_CANT_GENERATE_NEW_FILE_NAME 10822 @@ -2463,7 +2818,7 @@ static const int total_error_count = 5166; #define ER_BINLOG_CANT_DELETE_LOG_FILE_DOES_INDEX_MATCH_FILES 10850 #define ER_BINLOG_CANT_DELETE_FILE_AND_READ_BINLOG_INDEX 10851 #define ER_BINLOG_FAILED_TO_DELETE_LOG_FILE 10852 -#define ER_BINLOG_LOGGING_INCIDENT_TO_STOP_SLAVES 10853 +#define ER_BINLOG_LOGGING_INCIDENT_TO_STOP_REPLICAS 10853 #define ER_BINLOG_CANT_FIND_LOG_IN_INDEX 10854 #define ER_BINLOG_RECOVERING_AFTER_CRASH_USING 10855 #define ER_BINLOG_CANT_OPEN_CRASHED_BINLOG 10856 @@ -2473,7 +2828,7 @@ static const int total_error_count = 5166; #define ER_BINLOG_FAILED_TO_RUN_AFTER_SYNC_HOOK 10860 #define ER_TURNING_LOGGING_OFF_FOR_THE_DURATION 10861 #define ER_BINLOG_FAILED_TO_RUN_AFTER_FLUSH_HOOK 10862 -#define ER_BINLOG_CRASH_RECOVERY_FAILED 10863 +//#define OBSOLETE_ER_BINLOG_CRASH_RECOVERY_FAILED 10863 #define ER_BINLOG_WARNING_SUPPRESSED 10864 #define ER_NDB_LOG_ENTRY 10865 #define ER_NDB_LOG_ENTRY_WITH_PREFIX 10866 @@ -2505,11 +2860,11 @@ static const int total_error_count = 5166; #define ER_AUDIT_CANT_ABORT_EVENT 10892 #define ER_AUDIT_WARNING 10893 //#define OBSOLETE_ER_NDB_NUMBER_OF_CHANNELS 10894 -//#define OBSOLETE_ER_NDB_SLAVE_PARALLEL_WORKERS 10895 +//#define OBSOLETE_ER_NDB_REPLICA_PARALLEL_WORKERS 10895 //#define OBSOLETE_ER_NDB_DISTRIBUTING_ERR 10896 -#define ER_RPL_SLAVE_INSECURE_CHANGE_MASTER 10897 +#define ER_RPL_REPLICA_INSECURE_CHANGE_SOURCE 10897 //#define OBSOLETE_ER_RPL_SLAVE_FLUSH_RELAY_LOGS_NOT_ALLOWED 10898 -#define ER_RPL_SLAVE_INCORRECT_CHANNEL 10899 +#define ER_RPL_REPLICA_INCORRECT_CHANNEL 10899 #define ER_FAILED_TO_FIND_DL_ENTRY 10900 #define ER_FAILED_TO_OPEN_SHARED_LIBRARY 10901 #define ER_THREAD_PRIORITY_IGNORED 10902 @@ -2538,7 +2893,7 @@ static const int total_error_count = 5166; #define ER_ACCESS_DENIED_ERROR_WITHOUT_PASSWORD 10925 #define ER_ACCESS_DENIED_ERROR_WITH_PASSWORD 10926 #define ER_ACCESS_DENIED_FOR_USER_ACCOUNT_LOCKED 10927 -#define ER_MUST_CHANGE_EXPIRED_PASSWORD 10928 +//#define OBSOLETE_ER_MUST_CHANGE_EXPIRED_PASSWORD 10928 #define ER_SYSTEM_TABLES_NOT_SUPPORTED_BY_STORAGE_ENGINE 10929 //#define OBSOLETE_ER_FILESORT_TERMINATED 10930 #define ER_SERVER_STARTUP_MSG 10931 @@ -2565,16 +2920,16 @@ static const int total_error_count = 5166; #define ER_PRIVILEGE_SYSTEM_INIT_FAILED 10952 #define ER_CANNOT_SET_LOG_ERROR_SERVICES 10953 #define ER_PERFSCHEMA_TABLES_INIT_FAILED 10954 -#define ER_TX_EXTRACTION_ALGORITHM_FOR_BINLOG_TX_DEPEDENCY_TRACKING 10955 -#define ER_INVALID_REPLICATION_TIMESTAMPS 10956 -#define ER_RPL_TIMESTAMPS_RETURNED_TO_NORMAL 10957 +//#define OBSOLETE_ER_TX_EXTRACTION_ALGORITHM_FOR_BINLOG_TX_DEPEDENCY 10955 +//#define OBSOLETE_ER_INVALID_REPLICATION_TIMESTAMPS 10956 +//#define OBSOLETE_ER_RPL_TIMESTAMPS_RETURNED_TO_NORMAL 10957 #define ER_BINLOG_FILE_OPEN_FAILED 10958 #define ER_BINLOG_EVENT_WRITE_TO_STMT_CACHE_FAILED 10959 -#define ER_SLAVE_RELAY_LOG_TRUNCATE_INFO 10960 -#define ER_SLAVE_RELAY_LOG_PURGE_FAILED 10961 -#define ER_RPL_SLAVE_FILTER_CREATE_FAILED 10962 -#define ER_RPL_SLAVE_GLOBAL_FILTERS_COPY_FAILED 10963 -#define ER_RPL_SLAVE_RESET_FILTER_OPTIONS 10964 +#define ER_REPLICA_RELAY_LOG_TRUNCATE_INFO 10960 +#define ER_REPLICA_RELAY_LOG_PURGE_FAILED 10961 +#define ER_RPL_REPLICA_FILTER_CREATE_FAILED 10962 +#define ER_RPL_REPLICA_GLOBAL_FILTERS_COPY_FAILED 10963 +#define ER_RPL_REPLICA_RESET_FILTER_OPTIONS 10964 #define ER_MISSING_GRANT_SYSTEM_TABLE 10965 #define ER_MISSING_ACL_SYSTEM_TABLE 10966 #define ER_ANONYMOUS_AUTH_ID_NOT_ALLOWED_IN_MANDATORY_ROLES 10967 @@ -2635,11 +2990,11 @@ static const int total_error_count = 5166; #define ER_ROW_DATA_TOO_BIG_TO_WRITE_IN_BINLOG 11022 #define ER_FAILED_TO_CONSTRUCT_DROP_EVENT_QUERY 11023 #define ER_FAILED_TO_BINLOG_DROP_EVENT 11024 -#define ER_FAILED_TO_START_SLAVE_THREAD 11025 +#define ER_FAILED_TO_START_REPLICA_THREAD 11025 #define ER_RPL_IO_THREAD_KILLED 11026 -#define ER_SLAVE_RECONNECT_FAILED 11027 -#define ER_SLAVE_KILLED_AFTER_RECONNECT 11028 -#define ER_SLAVE_NOT_STARTED_ON_SOME_CHANNELS 11029 +#define ER_REPLICA_RECONNECT_FAILED 11027 +#define ER_REPLICA_KILLED_AFTER_RECONNECT 11028 +#define ER_REPLICA_NOT_STARTED_ON_SOME_CHANNELS 11029 #define ER_FAILED_TO_ADD_RPL_FILTER 11030 #define ER_PER_CHANNEL_RPL_FILTER_CONF_FOR_GRP_RPL 11031 #define ER_RPL_FILTERS_NOT_ATTACHED_TO_CHANNEL 11032 @@ -2669,7 +3024,7 @@ static const int total_error_count = 5166; #define ER_INNODB_INVALID_MONITOR_COUNTER_NAME 11056 #define ER_WIN_LOAD_LIBRARY_FAILED 11057 #define ER_PARTITION_HANDLER_ADMIN_MSG 11058 -#define ER_RPL_RLI_INIT_INFO_MSG 11059 +#define ER_RPL_AM_INIT_INFO_MSG 11059 #define ER_DD_UPGRADE_TABLE_INTACT_ERROR 11060 #define ER_SERVER_INIT_COMPILED_IN_COMMANDS 11061 #define ER_MYISAM_CHECK_METHOD_ERROR 11062 @@ -2689,7 +3044,7 @@ static const int total_error_count = 5166; #define ER_RES_GRP_INVALID_VCPU_ID 11076 #define ER_ERROR_DURING_FLUSH_LOG_COMMIT_PHASE 11077 #define ER_DROP_DATABASE_FAILED_RMDIR_MANUALLY 11078 -#define ER_EXPIRE_LOGS_DAYS_IGNORED 11079 +//#define OBSOLETE_ER_EXPIRE_LOGS_DAYS_IGNORED 11079 #define ER_BINLOG_MALFORMED_OR_OLD_RELAY_LOG 11080 #define ER_DD_UPGRADE_VIEW_COLUMN_NAME_TOO_LONG 11081 #define ER_TABLE_NEEDS_DUMP_UPGRADE 11082 @@ -2716,7 +3071,7 @@ static const int total_error_count = 5166; #define ER_THREAD_POOL_MAX_UNUSED_THREADS_INVALID 11103 #define ER_THREAD_POOL_CON_HANDLER_INIT_FAILED 11104 #define ER_THREAD_POOL_INIT_FAILED 11105 -#define ER_THREAD_POOL_PLUGIN_STARTED 11106 +//#define OBSOLETE_ER_THREAD_POOL_PLUGIN_STARTED 11106 #define ER_THREAD_POOL_CANNOT_SET_THREAD_SPECIFIC_DATA 11107 #define ER_THREAD_POOL_FAILED_TO_CREATE_CONNECT_HANDLER_THD 11108 #define ER_THREAD_POOL_FAILED_TO_CREATE_THD_AND_AUTH_CONN 11109 @@ -2752,13 +3107,13 @@ static const int total_error_count = 5166; #define ER_SEMISYNC_REPLY_BINLOG_FILE_TOO_LARGE 11139 #define ER_SEMISYNC_SERVER_REPLY 11140 #define ER_SEMISYNC_FUNCTION_CALLED_TWICE 11141 -#define ER_SEMISYNC_RPL_ENABLED_ON_MASTER 11142 -#define ER_SEMISYNC_MASTER_OOM 11143 -#define ER_SEMISYNC_DISABLED_ON_MASTER 11144 +#define ER_SEMISYNC_RPL_ENABLED_ON_SOURCE 11142 +#define ER_SEMISYNC_SOURCE_OOM 11143 +#define ER_SEMISYNC_DISABLED_ON_SOURCE 11144 #define ER_SEMISYNC_FORCED_SHUTDOWN 11145 -#define ER_SEMISYNC_MASTER_GOT_REPLY_AT_POS 11146 -#define ER_SEMISYNC_MASTER_SIGNAL_ALL_WAITING_THREADS 11147 -#define ER_SEMISYNC_MASTER_TRX_WAIT_POS 11148 +#define ER_SEMISYNC_SOURCE_GOT_REPLY_AT_POS 11146 +#define ER_SEMISYNC_SOURCE_SIGNAL_ALL_WAITING_THREADS 11147 +#define ER_SEMISYNC_SOURCE_TRX_WAIT_POS 11148 #define ER_SEMISYNC_BINLOG_REPLY_IS_AHEAD 11149 #define ER_SEMISYNC_MOVE_BACK_WAIT_POS 11150 #define ER_SEMISYNC_INIT_WAIT_POS 11151 @@ -2771,31 +3126,31 @@ static const int total_error_count = 5166; #define ER_SEMISYNC_SYNC_HEADER_UPDATE_INFO 11158 #define ER_SEMISYNC_FAILED_TO_INSERT_TRX_NODE 11159 #define ER_SEMISYNC_TRX_SKIPPED_AT_POS 11160 -#define ER_SEMISYNC_MASTER_FAILED_ON_NET_FLUSH 11161 +#define ER_SEMISYNC_SOURCE_FAILED_ON_NET_FLUSH 11161 #define ER_SEMISYNC_RECEIVED_ACK_IS_SMALLER 11162 #define ER_SEMISYNC_ADD_ACK_TO_SLOT 11163 -#define ER_SEMISYNC_UPDATE_EXISTING_SLAVE_ACK 11164 +#define ER_SEMISYNC_UPDATE_EXISTING_REPLICA_ACK 11164 #define ER_SEMISYNC_FAILED_TO_START_ACK_RECEIVER_THD 11165 #define ER_SEMISYNC_STARTING_ACK_RECEIVER_THD 11166 #define ER_SEMISYNC_FAILED_TO_WAIT_ON_DUMP_SOCKET 11167 #define ER_SEMISYNC_STOPPING_ACK_RECEIVER_THREAD 11168 -#define ER_SEMISYNC_FAILED_REGISTER_SLAVE_TO_RECEIVER 11169 -#define ER_SEMISYNC_START_BINLOG_DUMP_TO_SLAVE 11170 -#define ER_SEMISYNC_STOP_BINLOG_DUMP_TO_SLAVE 11171 +#define ER_SEMISYNC_FAILED_REGISTER_REPLICA_TO_RECEIVER 11169 +#define ER_SEMISYNC_START_BINLOG_DUMP_TO_REPLICA 11170 +#define ER_SEMISYNC_STOP_BINLOG_DUMP_TO_REPLICA 11171 #define ER_SEMISYNC_UNREGISTER_TRX_OBSERVER_FAILED 11172 #define ER_SEMISYNC_UNREGISTER_BINLOG_STORAGE_OBSERVER_FAILED 11173 #define ER_SEMISYNC_UNREGISTER_BINLOG_TRANSMIT_OBSERVER_FAILED 11174 #define ER_SEMISYNC_UNREGISTERED_REPLICATOR 11175 #define ER_SEMISYNC_SOCKET_FD_TOO_LARGE 11176 -#define ER_SEMISYNC_SLAVE_REPLY 11177 +#define ER_SEMISYNC_REPLICA_REPLY 11177 #define ER_SEMISYNC_MISSING_MAGIC_NO_FOR_SEMISYNC_PKT 11178 -#define ER_SEMISYNC_SLAVE_START 11179 -#define ER_SEMISYNC_SLAVE_REPLY_WITH_BINLOG_INFO 11180 -#define ER_SEMISYNC_SLAVE_NET_FLUSH_REPLY_FAILED 11181 -#define ER_SEMISYNC_SLAVE_SEND_REPLY_FAILED 11182 -#define ER_SEMISYNC_EXECUTION_FAILED_ON_MASTER 11183 -#define ER_SEMISYNC_NOT_SUPPORTED_BY_MASTER 11184 -#define ER_SEMISYNC_SLAVE_SET_FAILED 11185 +#define ER_SEMISYNC_REPLICA_START 11179 +#define ER_SEMISYNC_REPLICA_REPLY_WITH_BINLOG_INFO 11180 +#define ER_SEMISYNC_REPLICA_NET_FLUSH_REPLY_FAILED 11181 +#define ER_SEMISYNC_REPLICA_SEND_REPLY_FAILED 11182 +#define ER_SEMISYNC_EXECUTION_FAILED_ON_SOURCE 11183 +#define ER_SEMISYNC_NOT_SUPPORTED_BY_SOURCE 11184 +#define ER_SEMISYNC_REPLICA_SET_FAILED 11185 #define ER_SEMISYNC_FAILED_TO_STOP_ACK_RECEIVER_THD 11186 #define ER_FIREWALL_FAILED_TO_READ_FIREWALL_TABLES 11187 #define ER_FIREWALL_FAILED_TO_REG_DYNAMIC_PRIVILEGES 11188 @@ -2827,8 +3182,8 @@ static const int total_error_count = 5166; #define ER_AUDIT_LOG_JSON_READER_BUF_TOO_SMALL 11214 #define ER_AUDIT_LOG_JSON_READER_FAILED_TO_OPEN_FILE 11215 #define ER_AUDIT_LOG_JSON_READER_FILE_PARSING_ERROR 11216 -#define ER_AUDIT_LOG_FILTER_INVALID_COLUMN_COUNT 11217 -#define ER_AUDIT_LOG_FILTER_INVALID_COLUMN_DEFINITION 11218 +//#define OBSOLETE_ER_AUDIT_LOG_FILTER_INVALID_COLUMN_COUNT 11217 +//#define OBSOLETE_ER_AUDIT_LOG_FILTER_INVALID_COLUMN_DEFINITION 11218 #define ER_AUDIT_LOG_FILTER_FAILED_TO_STORE_TABLE_FLDS 11219 #define ER_AUDIT_LOG_FILTER_FAILED_TO_UPDATE_TABLE 11220 #define ER_AUDIT_LOG_FILTER_FAILED_TO_INSERT_INTO_TABLE 11221 @@ -2872,7 +3227,7 @@ static const int total_error_count = 5166; #define ER_SYS_VAR_COMPONENT_FAILED_TO_PARSE_VARIABLE_OPTIONS 11259 #define ER_SYS_VAR_COMPONENT_FAILED_TO_MAKE_VARIABLE_PERSISTENT 11260 #define ER_COMPONENT_FILTER_CONFUSED 11261 -#define ER_STOP_SLAVE_IO_THREAD_DISK_SPACE 11262 +#define ER_STOP_REPLICA_IO_THREAD_DISK_SPACE 11262 #define ER_LOG_FILE_CANNOT_OPEN 11263 //#define OBSOLETE_ER_UNABLE_TO_COLLECT_LOG_STATUS 11264 //#define OBSOLETE_ER_DEPRECATED_UTF8_ALIAS 11265 @@ -2964,10 +3319,10 @@ static const int total_error_count = 5166; #define ER_XPLUGIN_FAILED_TO_RESET_IPV6_V6ONLY_FLAG 11351 #define ER_KEYRING_INVALID_KEY_TYPE 11352 #define ER_KEYRING_INVALID_KEY_LENGTH 11353 -#define ER_KEYRING_FAILED_TO_CREATE_KEYRING_DIR 11354 -#define ER_KEYRING_FILE_INIT_FAILED 11355 -#define ER_KEYRING_INTERNAL_EXCEPTION_FAILED_FILE_INIT 11356 -#define ER_KEYRING_FAILED_TO_GENERATE_KEY 11357 +//#define OBSOLETE_ER_KEYRING_FAILED_TO_CREATE_KEYRING_DIR 11354 +//#define OBSOLETE_ER_KEYRING_FILE_INIT_FAILED 11355 +//#define OBSOLETE_ER_KEYRING_INTERNAL_EXCEPTION_FAILED_FILE_INIT 11356 +//#define OBSOLETE_ER_KEYRING_FAILED_TO_GENERATE_KEY 11357 #define ER_KEYRING_CHECK_KEY_FAILED_DUE_TO_INVALID_KEY 11358 #define ER_KEYRING_CHECK_KEY_FAILED_DUE_TO_EMPTY_KEY_ID 11359 #define ER_KEYRING_OPERATION_FAILED_DUE_TO_INTERNAL_ERROR 11360 @@ -2979,7 +3334,7 @@ static const int total_error_count = 5166; #define ER_KEYRING_FAILED_TO_REMOVE_FILE 11366 #define ER_KEYRING_FAILED_TO_TRUNCATE_FILE 11367 #define ER_KEYRING_UNKNOWN_ERROR 11368 -#define ER_KEYRING_FAILED_TO_SET_KEYRING_FILE_DATA 11369 +//#define OBSOLETE_ER_KEYRING_FAILED_TO_SET_KEYRING_FILE_DATA 11369 #define ER_KEYRING_FILE_IO_ERROR 11370 #define ER_KEYRING_FAILED_TO_LOAD_KEYRING_CONTENT 11371 #define ER_KEYRING_FAILED_TO_FLUSH_KEYS_TO_KEYRING 11372 @@ -3012,19 +3367,19 @@ static const int total_error_count = 5166; #define ER_KEYRING_OKV_FAILED_TO_SET_CERTIFICATE_FILE 11399 #define ER_KEYRING_OKV_FAILED_TO_SET_KEY_FILE 11400 #define ER_KEYRING_OKV_KEY_MISMATCH 11401 -#define ER_KEYRING_ENCRYPTED_FILE_INCORRECT_KEYRING_FILE 11402 -#define ER_KEYRING_ENCRYPTED_FILE_DECRYPTION_FAILED 11403 -#define ER_KEYRING_ENCRYPTED_FILE_FOUND_MALFORMED_BACKUP_FILE 11404 -#define ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_RESTORE_KEYRING 11405 -#define ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_FLUSH_KEYRING 11406 -#define ER_KEYRING_ENCRYPTED_FILE_ENCRYPTION_FAILED 11407 -#define ER_KEYRING_ENCRYPTED_FILE_INVALID_KEYRING_DIR 11408 -#define ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_CREATE_KEYRING_DIR 11409 -#define ER_KEYRING_ENCRYPTED_FILE_PASSWORD_IS_INVALID 11410 -#define ER_KEYRING_ENCRYPTED_FILE_PASSWORD_IS_TOO_LONG 11411 -#define ER_KEYRING_ENCRYPTED_FILE_INIT_FAILURE 11412 -#define ER_KEYRING_ENCRYPTED_FILE_INIT_FAILED_DUE_TO_INTERNAL_ERROR 11413 -#define ER_KEYRING_ENCRYPTED_FILE_GEN_KEY_FAILED_DUE_TO_INTERNAL_ERROR 11414 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_INCORRECT_KEYRING_FILE 11402 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_DECRYPTION_FAILED 11403 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_FOUND_MALFORMED_BACKUP_FILE 11404 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_RESTORE_KEYRING 11405 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_FLUSH_KEYRING 11406 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_ENCRYPTION_FAILED 11407 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_INVALID_KEYRING_DIR 11408 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_CREATE_KEYRING_DIR 11409 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_PASSWORD_IS_INVALID 11410 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_PASSWORD_IS_TOO_LONG 11411 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_INIT_FAILURE 11412 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_INIT_FAILED_INTERNAL_ERROR 11413 +//#define OBSOLETE_ER_KEYRING_ENCRYPTED_FILE_GEN_KEY_FAILED_INTERNAL_ERROR 11414 #define ER_KEYRING_AWS_FAILED_TO_SET_CMK_ID 11415 #define ER_KEYRING_AWS_FAILED_TO_SET_REGION 11416 #define ER_KEYRING_AWS_FAILED_TO_OPEN_CONF_FILE 11417 @@ -3057,7 +3412,7 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_APPLIER_THD_KILLED 11444 #define ER_GRP_RPL_EVENT_HANDLING_ERROR 11445 #define ER_GRP_RPL_ERROR_GTID_EXECUTION_INFO 11446 -#define ER_GRP_RPL_CERTIFICATE_SIZE_ERROR 11447 +//#define OBSOLETE_ER_GRP_RPL_CERTIFICATE_SIZE_ERROR 11447 #define ER_GRP_RPL_CREATE_APPLIER_CACHE_ERROR 11448 #define ER_GRP_RPL_UNBLOCK_WAITING_THD 11449 #define ER_GRP_RPL_APPLIER_PIPELINE_NOT_DISPOSED 11450 @@ -3065,8 +3420,8 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_APPLIER_EXECUTION_FATAL_ERROR 11452 #define ER_GRP_RPL_ERROR_STOPPING_CHANNELS 11453 #define ER_GRP_RPL_ERROR_SENDING_SINGLE_PRIMARY_MSSG 11454 -#define ER_GRP_RPL_UPDATE_TRANS_SNAPSHOT_VER_ERROR 11455 -#define ER_GRP_RPL_SIDNO_FETCH_ERROR 11456 +//#define OBSOLETE_ER_GRP_RPL_UPDATE_TRANS_SNAPSHOT_VER_ERROR 11455 +//#define OBSOLETE_ER_GRP_RPL_SIDNO_FETCH_ERROR 11456 #define ER_GRP_RPL_BROADCAST_COMMIT_TRANS_MSSG_FAILED 11457 #define ER_GRP_RPL_GROUP_NAME_PARSE_ERROR 11458 #define ER_GRP_RPL_ADD_GRPSID_TO_GRPGTIDSID_MAP_ERROR 11459 @@ -3080,13 +3435,13 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_CERTIFICATION_INITIALIZATION_FAILURE 11467 #define ER_GRP_RPL_UPDATE_LAST_CONFLICT_FREE_TRANS_ERROR 11468 #define ER_GRP_RPL_UPDATE_TRANS_SNAPSHOT_REF_VER_ERROR 11469 -#define ER_GRP_RPL_FETCH_TRANS_SIDNO_ERROR 11470 -#define ER_GRP_RPL_ERROR_VERIFYING_SIDNO 11471 +//#define OBSOLETE_ER_GRP_RPL_FETCH_TRANS_SIDNO_ERROR 11470 +//#define OBSOLETE_ER_GRP_RPL_ERROR_VERIFYING_SIDNO 11471 #define ER_GRP_RPL_CANT_GENERATE_GTID 11472 #define ER_GRP_RPL_INVALID_GTID_SET 11473 #define ER_GRP_RPL_UPDATE_GTID_SET_ERROR 11474 #define ER_GRP_RPL_RECEIVED_SET_MISSING_GTIDS 11475 -#define ER_GRP_RPL_SKIP_COMPUTATION_TRANS_COMMITTED 11476 +//#define OBSOLETE_ER_GRP_RPL_SKIP_COMPUTATION_TRANS_COMMITTED 11476 #define ER_GRP_RPL_NULL_PACKET 11477 #define ER_GRP_RPL_CANT_READ_GTID 11478 #define ER_GRP_RPL_PROCESS_GTID_SET_ERROR 11479 @@ -3127,7 +3482,7 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_EXCEEDS_AUTO_INC_VALUE 11514 #define ER_GRP_RPL_DATA_NOT_PROVIDED_BY_MEM 11515 #define ER_GRP_RPL_MEMBER_ALREADY_EXISTS 11516 -#define ER_GRP_RPL_GRP_CHANGE_INFO_EXTRACT_ERROR 11517 +//#define OBSOLETE_ER_GRP_RPL_GRP_CHANGE_INFO_EXTRACT_ERROR 11517 #define ER_GRP_RPL_GTID_EXECUTED_EXTRACT_ERROR 11518 #define ER_GRP_RPL_GTID_SET_EXTRACT_ERROR 11519 #define ER_GRP_RPL_START_FAILED 11520 @@ -3147,10 +3502,10 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_APPLIER_THD_START_ERROR 11534 #define ER_GRP_RPL_APPLIER_THD_STOP_ERROR 11535 #define ER_GRP_RPL_FETCH_TRANS_DATA_FAILED 11536 -#define ER_GRP_RPL_SLAVE_IO_THD_PRIMARY_UNKNOWN 11537 +#define ER_GRP_RPL_REPLICA_IO_THD_PRIMARY_UNKNOWN 11537 #define ER_GRP_RPL_SALVE_IO_THD_ON_SECONDARY_MEMBER 11538 -#define ER_GRP_RPL_SLAVE_SQL_THD_PRIMARY_UNKNOWN 11539 -#define ER_GRP_RPL_SLAVE_SQL_THD_ON_SECONDARY_MEMBER 11540 +#define ER_GRP_RPL_REPLICA_SQL_THD_PRIMARY_UNKNOWN 11539 +#define ER_GRP_RPL_REPLICA_SQL_THD_ON_SECONDARY_MEMBER 11540 #define ER_GRP_RPL_NEEDS_INNODB_TABLE 11541 #define ER_GRP_RPL_PRIMARY_KEY_NOT_DEFINED 11542 #define ER_GRP_RPL_FK_WITH_CASCADE_UNSUPPORTED 11543 @@ -3170,8 +3525,8 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_ADD_GTID_INFO_WITH_REMOTE_GTID_FAILED 11557 #define ER_GRP_RPL_ADD_GTID_INFO_WITHOUT_REMOTE_GTID_FAILED 11558 #define ER_GRP_RPL_FETCH_VIEW_CHANGE_LOG_EVENT_FAILED 11559 -#define ER_GRP_RPL_CONTACT_WITH_SRV_FAILED 11560 -#define ER_GRP_RPL_SRV_WAIT_TIME_OUT 11561 +//#define OBSOLETE_ER_GRP_RPL_CONTACT_WITH_SRV_FAILED 11560 +//#define OBSOLETE_ER_GRP_RPL_SRV_WAIT_TIME_OUT 11561 #define ER_GRP_RPL_FETCH_LOG_EVENT_FAILED 11562 #define ER_GRP_RPL_START_GRP_RPL_FAILED 11563 #define ER_GRP_RPL_CONN_INTERNAL_PLUGIN_FAIL 11564 @@ -3206,8 +3561,8 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_OOM_FAILED_TO_GENERATE_IDENTIFICATION_HASH 11593 #define ER_GRP_RPL_WRITE_IDENT_HASH_BASE64_ENCODING_FAILED 11594 #define ER_GRP_RPL_INVALID_BINLOG_FORMAT 11595 -#define ER_GRP_RPL_BINLOG_CHECKSUM_SET 11596 -#define ER_GRP_RPL_TRANS_WRITE_SET_EXTRACTION_NOT_SET 11597 +//#define OBSOLETE_ER_GRP_RPL_BINLOG_CHECKSUM_SET 11596 +//#define OBSOLETE_ER_GRP_RPL_TRANS_WRITE_SET_EXTRACTION_NOT_SET 11597 #define ER_GRP_RPL_UNSUPPORTED_TRANS_ISOLATION 11598 #define ER_GRP_RPL_CANNOT_EXECUTE_TRANS_WHILE_STOPPING 11599 #define ER_GRP_RPL_CANNOT_EXECUTE_TRANS_WHILE_RECOVERING 11600 @@ -3229,7 +3584,7 @@ static const int total_error_count = 5166; //#define OBSOLETE_ER_GRP_RPL_REINIT_OF_INTERNAL_CACHE_FOR_WRITE_FAILED 11616 //#define OBSOLETE_ER_GRP_RPL_FAILED_TO_CREATE_COMMIT_CACHE 11617 //#define OBSOLETE_ER_GRP_RPL_REINIT_OF_COMMIT_CACHE_FOR_WRITE_FAILED 11618 -#define ER_GRP_RPL_PREV_REC_SESSION_RUNNING 11619 +//#define OBSOLETE_ER_GRP_RPL_PREV_REC_SESSION_RUNNING 11619 #define ER_GRP_RPL_FATAL_REC_PROCESS 11620 //#define OBSOLETE_ER_GRP_RPL_WHILE_STOPPING_REP_CHANNEL 11621 #define ER_GRP_RPL_UNABLE_TO_EVALUATE_APPLIER_STATUS 11622 @@ -3237,12 +3592,12 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_CERTIFICATION_REC_PROCESS 11624 #define ER_GRP_RPL_UNABLE_TO_ENSURE_EXECUTION_REC 11625 #define ER_GRP_RPL_WHILE_SENDING_MSG_REC 11626 -#define ER_GRP_RPL_READ_UNABLE_FOR_SUPER_READ_ONLY 11627 +//#define OBSOLETE_ER_GRP_RPL_READ_UNABLE_FOR_SUPER_READ_ONLY 11627 #define ER_GRP_RPL_READ_UNABLE_FOR_READ_ONLY_SUPER_READ_ONLY 11628 #define ER_GRP_RPL_UNABLE_TO_RESET_SERVER_READ_MODE 11629 #define ER_GRP_RPL_UNABLE_TO_CERTIFY_PLUGIN_TRANS 11630 #define ER_GRP_RPL_UNBLOCK_CERTIFIED_TRANS 11631 -#define ER_GRP_RPL_SERVER_WORKING_AS_SECONDARY 11632 +//#define OBSOLETE_ER_GRP_RPL_SERVER_WORKING_AS_SECONDARY 11632 #define ER_GRP_RPL_FAILED_TO_START_WITH_INVALID_SERVER_ID 11633 #define ER_GRP_RPL_FORCE_MEMBERS_MUST_BE_EMPTY 11634 #define ER_GRP_RPL_PLUGIN_STRUCT_INIT_NOT_POSSIBLE_ON_SERVER_START 11635 @@ -3287,12 +3642,12 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_UNABLE_TO_INIT_COMMUNICATION_ENGINE 11674 #define ER_GRP_RPL_BINLOG_DISABLED 11675 #define ER_GRP_RPL_GTID_MODE_OFF 11676 -#define ER_GRP_RPL_LOG_SLAVE_UPDATES_NOT_SET 11677 -#define ER_GRP_RPL_INVALID_TRANS_WRITE_SET_EXTRACTION_VALUE 11678 -#define ER_GRP_RPL_RELAY_LOG_INFO_REPO_MUST_BE_TABLE 11679 -#define ER_GRP_RPL_MASTER_INFO_REPO_MUST_BE_TABLE 11680 +#define ER_GRP_RPL_LOG_REPLICA_UPDATES_NOT_SET 11677 +//#define OBSOLETE_ER_GRP_RPL_INVALID_TRANS_WRITE_SET_EXTRACTION_VALUE 11678 +#define ER_GRP_RPL_APPLIER_METADATA_REPO_MUST_BE_TABLE 11679 +#define ER_GRP_RPL_CONNECTION_METADATA_REPO_MUST_BE_TABLE 11680 #define ER_GRP_RPL_INCORRECT_TYPE_SET_FOR_PARALLEL_APPLIER 11681 -#define ER_GRP_RPL_SLAVE_PRESERVE_COMMIT_ORDER_NOT_SET 11682 +#define ER_GRP_RPL_REPLICA_PRESERVE_COMMIT_ORDER_NOT_SET 11682 #define ER_GRP_RPL_SINGLE_PRIM_MODE_NOT_ALLOWED_WITH_UPDATE_EVERYWHERE 11683 #define ER_GRP_RPL_MODULE_TERMINATE_ERROR 11684 #define ER_GRP_RPL_GRP_NAME_OPTION_MANDATORY 11685 @@ -3302,8 +3657,8 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_FLOW_CTRL_MIN_RECOVERY_QUOTA_GREATER_THAN_MAX_QUOTA 11689 #define ER_GRP_RPL_FLOW_CTRL_MAX_QUOTA_SMALLER_THAN_MIN_QUOTAS 11690 #define ER_GRP_RPL_INVALID_SSL_RECOVERY_STRING 11691 -#define ER_GRP_RPL_SUPPORTS_ONLY_ONE_FORCE_MEMBERS_SET 11692 -#define ER_GRP_RPL_FORCE_MEMBERS_SET_UPDATE_NOT_ALLOWED 11693 +//#define OBSOLETE_ER_GRP_RPL_SUPPORTS_ONLY_ONE_FORCE_MEMBERS_SET 11692 +//#define OBSOLETE_ER_GRP_RPL_FORCE_MEMBERS_SET_UPDATE_NOT_ALLOWED 11693 #define ER_GRP_RPL_GRP_COMMUNICATION_INIT_WITH_CONF 11694 #define ER_GRP_RPL_UNKNOWN_GRP_RPL_APPLIER_PIPELINE_REQUESTED 11695 #define ER_GRP_RPL_FAILED_TO_BOOTSTRAP_EVENT_HANDLING_INFRASTRUCTURE 11696 @@ -3346,10 +3701,10 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_PIPELINE_REINIT_FAILED_READ 11733 //#define OBSOLETE_ER_GRP_RPL_STOP_REP_CHANNEL 11734 #define ER_GRP_RPL_GCS_GR_ERROR_MSG 11735 -#define ER_GRP_RPL_SLAVE_IO_THREAD_UNBLOCKED 11736 -#define ER_GRP_RPL_SLAVE_IO_THREAD_ERROR_OUT 11737 -#define ER_GRP_RPL_SLAVE_APPLIER_THREAD_UNBLOCKED 11738 -#define ER_GRP_RPL_SLAVE_APPLIER_THREAD_ERROR_OUT 11739 +#define ER_GRP_RPL_REPLICA_IO_THREAD_UNBLOCKED 11736 +#define ER_GRP_RPL_REPLICA_IO_THREAD_ERROR_OUT 11737 +#define ER_GRP_RPL_REPLICA_APPLIER_THREAD_UNBLOCKED 11738 +#define ER_GRP_RPL_REPLICA_APPLIER_THREAD_ERROR_OUT 11739 #define ER_LDAP_AUTH_FAILED_TO_CREATE_OR_GET_CONNECTION 11740 #define ER_LDAP_AUTH_DEINIT_FAILED 11741 #define ER_LDAP_AUTH_SKIPPING_USER_GROUP_SEARCH 11742 @@ -3366,7 +3721,7 @@ static const int total_error_count = 5166; #define ER_LDAP_AUTH_FAILED_TO_WRITE_PACKET 11753 #define ER_LDAP_AUTH_SETTING_USERNAME 11754 #define ER_LDAP_AUTH_USER_AUTH_DATA 11755 -#define ER_LDAP_AUTH_INFO_FOR_USER 11756 +//#define OBSOLETE_ER_LDAP_AUTH_INFO_FOR_USER 11756 #define ER_LDAP_AUTH_USER_GROUP_SEARCH_INFO 11757 #define ER_LDAP_AUTH_GRP_SEARCH_SPECIAL_HDL 11758 #define ER_LDAP_AUTH_GRP_IS_FULL_DN 11759 @@ -3466,7 +3821,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_28 11853 #define ER_IB_MSG_29 11854 #define ER_IB_MSG_30 11855 -#define ER_IB_MSG_31 11856 +//#define OBSOLETE_ER_IB_MSG_31 11856 #define ER_IB_MSG_32 11857 #define ER_IB_MSG_33 11858 #define ER_IB_MSG_34 11859 @@ -3616,12 +3971,12 @@ static const int total_error_count = 5166; #define ER_IB_MSG_178 12003 #define ER_IB_MSG_179 12004 #define ER_IB_MSG_180 12005 -#define ER_IB_MSG_181 12006 +#define ER_IB_LONG_AHI_DISABLE_WAIT 12006 #define ER_IB_MSG_182 12007 #define ER_IB_MSG_183 12008 #define ER_IB_MSG_184 12009 -#define ER_IB_MSG_185 12010 -#define ER_IB_MSG_186 12011 +//#define OBSOLETE_ER_IB_MSG_185 12010 +//#define OBSOLETE_ER_IB_MSG_186 12011 #define ER_IB_MSG_187 12012 #define ER_IB_MSG_188 12013 #define ER_IB_MSG_189 12014 @@ -3662,8 +4017,8 @@ static const int total_error_count = 5166; #define ER_IB_MSG_224 12049 #define ER_IB_MSG_225 12050 #define ER_IB_MSG_226 12051 -#define ER_IB_MSG_227 12052 -#define ER_IB_MSG_228 12053 +//#define OBSOLETE_ER_IB_MSG_227 12052 +//#define OBSOLETE_ER_IB_MSG_228 12053 #define ER_IB_MSG_229 12054 #define ER_IB_MSG_230 12055 #define ER_IB_MSG_231 12056 @@ -3709,19 +4064,19 @@ static const int total_error_count = 5166; #define ER_IB_MSG_271 12096 #define ER_IB_MSG_272 12097 #define ER_IB_MSG_273 12098 -#define ER_IB_MSG_274 12099 -#define ER_IB_MSG_275 12100 -#define ER_IB_MSG_276 12101 -#define ER_IB_MSG_277 12102 +//#define OBSOLETE_ER_IB_MSG_274 12099 +//#define OBSOLETE_ER_IB_MSG_275 12100 +//#define OBSOLETE_ER_IB_MSG_276 12101 +//#define OBSOLETE_ER_IB_MSG_277 12102 #define ER_IB_MSG_278 12103 -#define ER_IB_MSG_279 12104 +//#define OBSOLETE_ER_IB_MSG_279 12104 #define ER_IB_MSG_280 12105 #define ER_IB_MSG_281 12106 #define ER_IB_MSG_282 12107 #define ER_IB_MSG_283 12108 #define ER_IB_MSG_284 12109 #define ER_IB_MSG_285 12110 -#define ER_IB_MSG_286 12111 +#define ER_IB_WARN_ACCESSING_NONEXISTINC_SPACE 12111 #define ER_IB_MSG_287 12112 #define ER_IB_MSG_288 12113 #define ER_IB_MSG_289 12114 @@ -3762,7 +4117,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_324 12149 #define ER_IB_MSG_325 12150 #define ER_IB_MSG_326 12151 -#define ER_IB_MSG_327 12152 +//#define OBSOLETE_ER_IB_MSG_327 12152 #define ER_IB_MSG_328 12153 #define ER_IB_MSG_329 12154 #define ER_IB_MSG_330 12155 @@ -3787,8 +4142,8 @@ static const int total_error_count = 5166; #define ER_IB_MSG_349 12174 #define ER_IB_MSG_350 12175 //#define OBSOLETE_ER_IB_MSG_351 12176 -#define ER_IB_MSG_352 12177 -#define ER_IB_MSG_353 12178 +#define ER_IB_MSG_UNPROTECTED_LOCATION_ALLOWED 12177 +//#define OBSOLETE_ER_IB_MSG_353 12178 #define ER_IB_MSG_354 12179 #define ER_IB_MSG_355 12180 #define ER_IB_MSG_356 12181 @@ -3823,8 +4178,8 @@ static const int total_error_count = 5166; #define ER_IB_MSG_385 12210 #define ER_IB_MSG_386 12211 #define ER_IB_MSG_387 12212 -#define ER_IB_MSG_388 12213 -#define ER_IB_MSG_389 12214 +#define ER_IB_MSG_GENERAL_TABLESPACE_UNDER_DATADIR 12213 +#define ER_IB_MSG_IMPLICIT_TABLESPACE_IN_DATADIR 12214 #define ER_IB_MSG_390 12215 #define ER_IB_MSG_391 12216 #define ER_IB_MSG_392 12217 @@ -3879,7 +4234,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_441 12266 #define ER_IB_MSG_442 12267 #define ER_IB_MSG_443 12268 -#define ER_IB_MSG_444 12269 +//#define OBSOLETE_ER_IB_MSG_444 12269 #define ER_IB_MSG_445 12270 #define ER_IB_MSG_446 12271 #define ER_IB_MSG_447 12272 @@ -3970,14 +4325,14 @@ static const int total_error_count = 5166; #define ER_IB_MSG_532 12357 #define ER_IB_MSG_533 12358 #define ER_IB_MSG_534 12359 -#define ER_IB_MSG_535 12360 -#define ER_IB_MSG_536 12361 +//#define OBSOLETE_ER_IB_MSG_535 12360 +//#define OBSOLETE_ER_IB_MSG_536 12361 #define ER_IB_MSG_537 12362 #define ER_IB_MSG_538 12363 #define ER_IB_MSG_539 12364 #define ER_IB_MSG_540 12365 #define ER_IB_MSG_541 12366 -#define ER_IB_MSG_542 12367 +//#define OBSOLETE_ER_IB_MSG_542 12367 #define ER_IB_MSG_543 12368 #define ER_IB_MSG_544 12369 #define ER_IB_MSG_545 12370 @@ -4000,7 +4355,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_562 12387 #define ER_IB_MSG_563 12388 #define ER_IB_MSG_564 12389 -#define ER_IB_MSG_565 12390 +#define ER_IB_MSG_INVALID_LOCATION_FOR_TABLE 12390 #define ER_IB_MSG_566 12391 #define ER_IB_MSG_567 12392 #define ER_IB_MSG_568 12393 @@ -4045,7 +4400,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_607 12432 #define ER_IB_MSG_608 12433 #define ER_IB_MSG_609 12434 -#define ER_IB_MSG_610 12435 +//#define OBSOLETE_ER_IB_MSG_610 12435 #define ER_IB_MSG_611 12436 #define ER_IB_MSG_612 12437 #define ER_IB_MSG_613 12438 @@ -4053,14 +4408,14 @@ static const int total_error_count = 5166; #define ER_IB_MSG_615 12440 #define ER_IB_MSG_616 12441 #define ER_IB_MSG_617 12442 -#define ER_IB_MSG_618 12443 +//#define OBSOLETE_ER_IB_MSG_618 12443 #define ER_IB_MSG_619 12444 -#define ER_IB_MSG_620 12445 -#define ER_IB_MSG_621 12446 -#define ER_IB_MSG_622 12447 +#define ER_IB_MSG_IBUF_CURSOR_RESTORATION_FAILED 12445 +//#define OBSOLETE_ER_IB_MSG_621 12446 +#define ER_IB_MSG_IBUF_FAILED_TO_RESTORE_POSITION 12447 #define ER_IB_MSG_623 12448 #define ER_IB_MSG_624 12449 -#define ER_IB_MSG_625 12450 +//#define OBSOLETE_ER_IB_MSG_625 12450 #define ER_IB_MSG_626 12451 #define ER_IB_MSG_627 12452 #define ER_IB_MSG_628 12453 @@ -4075,8 +4430,8 @@ static const int total_error_count = 5166; #define ER_IB_MSG_637 12462 #define ER_IB_MSG_638 12463 #define ER_IB_MSG_639 12464 -#define ER_IB_MSG_640 12465 -#define ER_IB_MSG_641 12466 +//#define OBSOLETE_ER_IB_MSG_640 12465 +//#define OBSOLETE_ER_IB_MSG_641 12466 #define ER_IB_MSG_642 12467 #define ER_IB_MSG_643 12468 #define ER_IB_MSG_644 12469 @@ -4133,15 +4488,15 @@ static const int total_error_count = 5166; #define ER_IB_MSG_695 12520 #define ER_IB_MSG_696 12521 #define ER_IB_MSG_697 12522 -#define ER_IB_MSG_698 12523 +#define ER_IB_MSG_LOG_CORRUPT 12523 #define ER_IB_MSG_699 12524 -#define ER_IB_MSG_700 12525 -#define ER_IB_MSG_701 12526 +#define ER_IB_MSG_LOG_FORMAT_OLD_AND_LOG_CORRUPTED 12525 +#define ER_IB_MSG_LOG_FORMAT_OLD_AND_NO_CLEAN_SHUTDOWN 12526 //#define OBSOLETE_ER_IB_MSG_702 12527 //#define OBSOLETE_ER_IB_MSG_703 12528 -#define ER_IB_MSG_704 12529 -#define ER_IB_MSG_705 12530 -#define ER_IB_MSG_706 12531 +#define ER_IB_MSG_LOG_FORMAT_BEFORE_8_0_30 12529 +#define ER_IB_MSG_LOG_FILE_FORMAT_UNKNOWN 12530 +#define ER_IB_MSG_RECOVERY_CHECKPOINT_NOT_FOUND 12531 #define ER_IB_MSG_707 12532 #define ER_IB_MSG_708 12533 #define ER_IB_MSG_709 12534 @@ -4152,11 +4507,11 @@ static const int total_error_count = 5166; #define ER_IB_MSG_714 12539 #define ER_IB_MSG_715 12540 #define ER_IB_MSG_716 12541 -#define ER_IB_MSG_717 12542 +//#define OBSOLETE_ER_IB_MSG_717 12542 #define ER_IB_MSG_718 12543 #define ER_IB_MSG_719 12544 #define ER_IB_MSG_720 12545 -#define ER_IB_MSG_721 12546 +#define ER_IB_MSG_RECOVERY_SKIPPED_IN_READ_ONLY_MODE 12546 #define ER_IB_MSG_722 12547 #define ER_IB_MSG_723 12548 #define ER_IB_MSG_724 12549 @@ -4164,14 +4519,14 @@ static const int total_error_count = 5166; #define ER_IB_MSG_726 12551 #define ER_IB_MSG_727 12552 #define ER_IB_MSG_728 12553 -#define ER_IB_MSG_729 12554 -#define ER_IB_MSG_730 12555 -#define ER_IB_MSG_731 12556 -#define ER_IB_MSG_732 12557 -#define ER_IB_MSG_733 12558 -#define ER_IB_MSG_734 12559 -#define ER_IB_MSG_735 12560 -#define ER_IB_MSG_736 12561 +#define ER_IB_MSG_LOG_FILES_CREATED_BY_MEB_AND_READ_ONLY_MODE 12554 +#define ER_IB_MSG_LOG_FILES_CREATED_BY_MEB 12555 +#define ER_IB_MSG_LOG_FILES_CREATED_BY_CLONE 12556 +#define ER_IB_MSG_LOG_FORMAT_OLD 12557 +//#define OBSOLETE_ER_IB_MSG_LOG_FORMAT_NOT_SUPPORTED 12558 +#define ER_IB_MSG_RECOVERY_CHECKPOINT_FROM_BEFORE_CLEAN_SHUTDOWN 12559 +#define ER_IB_MSG_RECOVERY_IS_NEEDED 12560 +#define ER_IB_MSG_RECOVERY_IN_READ_ONLY 12561 #define ER_IB_MSG_737 12562 #define ER_IB_MSG_738 12563 #define ER_IB_MSG_739 12564 @@ -4235,7 +4590,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_797 12622 #define ER_IB_MSG_798 12623 #define ER_IB_MSG_799 12624 -#define ER_IB_MSG_800 12625 +//#define OBSOLETE_ER_IB_MSG_800 12625 #define ER_IB_MSG_801 12626 #define ER_IB_MSG_802 12627 #define ER_IB_MSG_803 12628 @@ -4278,10 +4633,10 @@ static const int total_error_count = 5166; #define ER_IB_MSG_840 12665 #define ER_IB_MSG_841 12666 #define ER_IB_MSG_842 12667 -#define ER_IB_MSG_843 12668 +#define ER_IB_MSG_CANT_ENCRYPT_REDO_LOG_DATA 12668 #define ER_IB_MSG_844 12669 #define ER_IB_MSG_845 12670 -#define ER_IB_MSG_846 12671 +#define ER_IB_MSG_CANT_DECRYPT_REDO_LOG 12671 #define ER_IB_MSG_847 12672 #define ER_IB_MSG_848 12673 #define ER_IB_MSG_849 12674 @@ -4382,7 +4737,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_944 12769 #define ER_IB_MSG_945 12770 #define ER_IB_MSG_946 12771 -#define ER_IB_MSG_947 12772 +#define ER_IB_IMPORT_INDEX_METADATA_READ_FAILED 12772 #define ER_IB_MSG_948 12773 #define ER_IB_MSG_949 12774 #define ER_IB_MSG_950 12775 @@ -4449,7 +4804,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1011 12836 #define ER_IB_MSG_1012 12837 #define ER_IB_MSG_1013 12838 -#define ER_IB_MSG_1014 12839 +#define ER_IB_IMPORT_START_CFG_NAME 12839 #define ER_IB_MSG_1015 12840 #define ER_IB_MSG_1016 12841 #define ER_IB_MSG_1017 12842 @@ -4496,15 +4851,15 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1058 12883 #define ER_IB_MSG_1059 12884 #define ER_IB_MSG_1060 12885 -#define ER_IB_MSG_1061 12886 -#define ER_IB_MSG_1062 12887 -#define ER_IB_MSG_1063 12888 -#define ER_IB_MSG_1064 12889 +#define ER_IB_MSG_LOG_FILE_OS_CREATE_FAILED 12886 +#define ER_IB_MSG_FILE_RESIZE 12887 +#define ER_IB_MSG_LOG_FILE_RESIZE_FAILED 12888 +#define ER_IB_MSG_LOG_FILES_CREATE_AND_READ_ONLY_MODE 12889 #define ER_IB_MSG_1065 12890 -#define ER_IB_MSG_1066 12891 -#define ER_IB_MSG_1067 12892 -#define ER_IB_MSG_1068 12893 -#define ER_IB_MSG_1069 12894 +#define ER_IB_MSG_LOG_FILE_PREPARE_ON_CREATE_FAILED 12891 +//#define OBSOLETE_ER_IB_MSG_1067 12892 +#define ER_IB_MSG_LOG_FILES_INITIALIZED 12893 +#define ER_IB_MSG_LOG_FILE_OPEN_FAILED 12894 #define ER_IB_MSG_1070 12895 #define ER_IB_MSG_1071 12896 #define ER_IB_MSG_1072 12897 @@ -4519,7 +4874,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1081 12906 #define ER_IB_MSG_1082 12907 #define ER_IB_MSG_1083 12908 -#define ER_IB_MSG_1084 12909 +#define ER_IB_MSG_CANNOT_OPEN_57_UNDO 12909 #define ER_IB_MSG_1085 12910 #define ER_IB_MSG_1086 12911 #define ER_IB_MSG_1087 12912 @@ -4541,7 +4896,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1103 12928 #define ER_IB_MSG_1104 12929 #define ER_IB_MSG_1105 12930 -#define ER_IB_MSG_1106 12931 +#define ER_IB_MSG_BUF_PENDING_IO 12931 #define ER_IB_MSG_1107 12932 #define ER_IB_MSG_1108 12933 #define ER_IB_MSG_1109 12934 @@ -4553,7 +4908,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1115 12940 #define ER_IB_MSG_1116 12941 #define ER_IB_MSG_1117 12942 -#define ER_IB_MSG_1118 12943 +//#define OBSOLETE_ER_IB_MSG_1118 12943 #define ER_IB_MSG_1119 12944 #define ER_IB_MSG_1120 12945 #define ER_IB_MSG_1121 12946 @@ -4570,15 +4925,15 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1132 12957 #define ER_IB_MSG_1133 12958 #define ER_IB_MSG_1134 12959 -#define ER_IB_MSG_1135 12960 -#define ER_IB_MSG_1136 12961 -#define ER_IB_MSG_1137 12962 -#define ER_IB_MSG_1138 12963 +#define ER_IB_MSG_DATA_DIRECTORY_NOT_INITIALIZED_OR_CORRUPTED 12960 +#define ER_IB_MSG_LOG_FILES_INVALID_SET 12961 +#define ER_IB_MSG_LOG_FILE_SIZE_INVALID 12962 +#define ER_IB_MSG_LOG_FILES_DIFFERENT_SIZES 12963 #define ER_IB_MSG_1139 12964 -#define ER_IB_MSG_1140 12965 -#define ER_IB_MSG_1141 12966 +#define ER_IB_MSG_RECOVERY_CORRUPT 12965 +//#define OBSOLETE_ER_IB_MSG_LOG_FILES_RESIZE_ON_START_IN_READ_ONLY_MODE 12966 #define ER_IB_MSG_1142 12967 -#define ER_IB_MSG_1143 12968 +#define ER_IB_MSG_LOG_FILES_REWRITING 12968 #define ER_IB_MSG_1144 12969 #define ER_IB_MSG_1145 12970 #define ER_IB_MSG_1146 12971 @@ -4588,7 +4943,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1150 12975 #define ER_IB_MSG_1151 12976 #define ER_IB_MSG_1152 12977 -#define ER_IB_MSG_1153 12978 +//#define OBSOLETE_ER_IB_MSG_1153 12978 #define ER_IB_MSG_1154 12979 #define ER_IB_MSG_1155 12980 #define ER_IB_MSG_1156 12981 @@ -4601,17 +4956,17 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1163 12988 #define ER_IB_MSG_1164 12989 #define ER_IB_MSG_1165 12990 -#define ER_IB_MSG_1166 12991 -#define ER_IB_MSG_1167 12992 -#define ER_IB_MSG_1168 12993 -#define ER_IB_MSG_1169 12994 -#define ER_IB_MSG_1170 12995 -#define ER_IB_MSG_1171 12996 -#define ER_IB_MSG_1172 12997 -#define ER_IB_MSG_1173 12998 -#define ER_IB_MSG_1174 12999 -#define ER_IB_MSG_1175 13000 -#define ER_IB_MSG_1176 13001 +#define ER_IB_MSG_UNDO_TRUNCATE_FAIL_TO_READ_LOG_FILE 12991 +#define ER_IB_MSG_UNDO_MARKED_FOR_TRUNCATE 12992 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_MDL 12993 +#define ER_IB_MSG_UNDO_TRUNCATE_START 12994 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_DDL_LOG_START 12995 +#define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_LOG_CREATE 12996 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_TRUNCATE 12997 +#define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_FAILURE 12998 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_STATE_UPDATE 12999 +#define ER_IB_MSG_UNDO_TRUNCATE_COMPLETE 13000 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_TRUNCATE_DONE 13001 #define ER_IB_MSG_1177 13002 #define ER_IB_MSG_1178 13003 #define ER_IB_MSG_1179 13004 @@ -4619,13 +4974,13 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1181 13006 #define ER_IB_MSG_1182 13007 #define ER_IB_MSG_1183 13008 -#define ER_IB_MSG_1184 13009 +#define ER_IB_ERR_ACCESSING_OUT_OF_BOUND_FIELD_IN_INDEX 13009 #define ER_IB_MSG_1185 13010 #define ER_IB_MSG_1186 13011 #define ER_IB_MSG_1187 13012 #define ER_IB_MSG_1188 13013 #define ER_IB_MSG_1189 13014 -#define ER_IB_MSG_1190 13015 +#define ER_IB_MSG_TRX_RECOVERY_ROLLBACK_COMPLETED 13015 #define ER_IB_MSG_1191 13016 #define ER_IB_MSG_1192 13017 #define ER_IB_MSG_1193 13018 @@ -4651,7 +5006,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1213 13038 #define ER_IB_MSG_1214 13039 #define ER_IB_MSG_1215 13040 -#define ER_IB_MSG_1216 13041 +#define ER_IB_MSG_LOG_FILES_RESIZE_ON_START 13041 #define ER_IB_MSG_1217 13042 #define ER_IB_MSG_1218 13043 #define ER_IB_MSG_1219 13044 @@ -4667,19 +5022,19 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1229 13054 //#define OBSOLETE_ER_IB_MSG_1230 13055 #define ER_IB_MSG_1231 13056 -#define ER_IB_MSG_1232 13057 +//#define OBSOLETE_ER_IB_MSG_1232 13057 #define ER_IB_MSG_1233 13058 -#define ER_IB_MSG_1234 13059 +#define ER_IB_MSG_LOG_WRITER_OUT_OF_SPACE 13059 #define ER_IB_MSG_1235 13060 -#define ER_IB_MSG_1236 13061 -#define ER_IB_MSG_1237 13062 +#define ER_IB_MSG_LOG_WRITER_ABORTS_LOG_ARCHIVER 13061 +#define ER_IB_MSG_LOG_WRITER_WAITING_FOR_ARCHIVER 13062 #define ER_IB_MSG_1238 13063 #define ER_IB_MSG_1239 13064 -#define ER_IB_MSG_1240 13065 +//#define OBSOLETE_ER_IB_MSG_1240 13065 #define ER_IB_MSG_1241 13066 -#define ER_IB_MSG_1242 13067 -#define ER_IB_MSG_1243 13068 -#define ER_IB_MSG_1244 13069 +#define ER_IB_MSG_LOG_FILES_CANNOT_ENCRYPT_IN_READ_ONLY 13067 +#define ER_IB_MSG_LOG_FILES_ENCRYPTION_INIT_FAILED 13068 +//#define OBSOLETE_ER_IB_MSG_1244 13069 #define ER_IB_MSG_1245 13070 #define ER_IB_MSG_1246 13071 #define ER_IB_MSG_1247 13072 @@ -4687,7 +5042,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1249 13074 #define ER_IB_MSG_1250 13075 #define ER_IB_MSG_1251 13076 -#define ER_IB_MSG_1252 13077 +#define ER_IB_MSG_BUF_PENDING_IO_ON_SHUTDOWN 13077 #define ER_IB_MSG_1253 13078 //#define OBSOLETE_ER_IB_MSG_1254 13079 #define ER_IB_MSG_1255 13080 @@ -4699,20 +5054,20 @@ static const int total_error_count = 5166; #define ER_IB_MSG_1261 13086 #define ER_IB_MSG_1262 13087 #define ER_IB_MSG_1263 13088 -#define ER_IB_MSG_1264 13089 -#define ER_IB_MSG_1265 13090 +#define ER_IB_MSG_LOG_FILE_HEADER_INVALID_CHECKSUM 13089 +#define ER_IB_MSG_LOG_FORMAT_BEFORE_5_7_9 13090 #define ER_IB_MSG_1266 13091 -#define ER_IB_MSG_1267 13092 +#define ER_IB_MSG_LOG_PARAMS_CONCURRENCY_MARGIN_UNSAFE 13092 #define ER_IB_MSG_1268 13093 #define ER_IB_MSG_1269 13094 -#define ER_IB_MSG_1270 13095 -#define ER_RPL_SLAVE_SQL_THREAD_STOP_CMD_EXEC_TIMEOUT 13096 -#define ER_RPL_SLAVE_IO_THREAD_STOP_CMD_EXEC_TIMEOUT 13097 +#define ER_IB_MSG_THREAD_CONCURRENCY_CHANGED 13095 +#define ER_RPL_REPLICA_SQL_THREAD_STOP_CMD_EXEC_TIMEOUT 13096 +#define ER_RPL_REPLICA_IO_THREAD_STOP_CMD_EXEC_TIMEOUT 13097 #define ER_RPL_GTID_UNSAFE_STMT_ON_NON_TRANS_TABLE 13098 #define ER_RPL_GTID_UNSAFE_STMT_CREATE_SELECT 13099 //#define OBSOLETE_ER_RPL_GTID_UNSAFE_STMT_ON_TEMPORARY_TABLE 13100 #define ER_BINLOG_ROW_VALUE_OPTION_IGNORED 13101 -#define ER_BINLOG_USE_V1_ROW_EVENTS_IGNORED 13102 +//#define OBSOLETE_ER_BINLOG_USE_V1_ROW_EVENTS_IGNORED 13102 #define ER_BINLOG_ROW_VALUE_OPTION_USED_ONLY_FOR_AFTER_IMAGES 13103 #define ER_CONNECTION_ABORTED 13104 #define ER_NORMAL_SERVER_SHUTDOWN 13105 @@ -4724,20 +5079,20 @@ static const int total_error_count = 5166; #define ER_COMPONENT_FILTER_WRONG_VALUE 13111 #define ER_XPLUGIN_FAILED_TO_STOP_SERVICES 13112 #define ER_INCONSISTENT_ERROR 13113 -#define ER_SERVER_MASTER_FATAL_ERROR_READING_BINLOG 13114 +#define ER_SERVER_SOURCE_FATAL_ERROR_READING_BINLOG 13114 #define ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE 13115 -#define ER_SLAVE_CREATE_EVENT_FAILURE 13116 -#define ER_SLAVE_FATAL_ERROR 13117 -#define ER_SLAVE_HEARTBEAT_FAILURE 13118 -#define ER_SLAVE_INCIDENT 13119 -#define ER_SLAVE_MASTER_COM_FAILURE 13120 -#define ER_SLAVE_RELAY_LOG_READ_FAILURE 13121 -#define ER_SLAVE_RELAY_LOG_WRITE_FAILURE 13122 -#define ER_SERVER_SLAVE_MI_INIT_REPOSITORY 13123 -#define ER_SERVER_SLAVE_RLI_INIT_REPOSITORY 13124 +#define ER_REPLICA_CREATE_EVENT_FAILURE 13116 +#define ER_REPLICA_FATAL_ERROR 13117 +#define ER_REPLICA_HEARTBEAT_FAILURE 13118 +#define ER_REPLICA_INCIDENT 13119 +#define ER_REPLICA_SOURCE_COM_FAILURE 13120 +#define ER_REPLICA_RELAY_LOG_READ_FAILURE 13121 +#define ER_REPLICA_RELAY_LOG_WRITE_FAILURE 13122 +#define ER_SERVER_REPLICA_CM_INIT_REPOSITORY 13123 +#define ER_SERVER_REPLICA_AM_INIT_REPOSITORY 13124 #define ER_SERVER_NET_PACKET_TOO_LARGE 13125 #define ER_SERVER_NO_SYSTEM_TABLE_ACCESS 13126 -#define ER_SERVER_UNKNOWN_ERROR 13127 +//#define OBSOLETE_ER_SERVER_UNKNOWN_ERROR 13127 #define ER_SERVER_UNKNOWN_SYSTEM_VARIABLE 13128 #define ER_SERVER_NO_SESSION_TO_SEND_TO 13129 #define ER_SERVER_NEW_ABORTING_CONNECTION 13130 @@ -4755,9 +5110,9 @@ static const int total_error_count = 5166; #define ER_SERVER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2 13142 #define ER_SERVER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2 13143 #define ER_SERVER_ACL_TABLE_ERROR 13144 -#define ER_SERVER_SLAVE_INIT_QUERY_FAILED 13145 -#define ER_SERVER_SLAVE_CONVERSION_FAILED 13146 -#define ER_SERVER_SLAVE_IGNORED_TABLE 13147 +#define ER_SERVER_REPLICA_INIT_QUERY_FAILED 13145 +#define ER_SERVER_REPLICA_CONVERSION_FAILED 13146 +#define ER_SERVER_REPLICA_IGNORED_TABLE 13147 #define ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION 13148 #define ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON 13149 #define ER_CANT_REPLICATE_GTID_WITH_GTID_MODE_OFF 13150 @@ -4778,7 +5133,7 @@ static const int total_error_count = 5166; #define ER_AUDIT_LOG_JSON_USER_NAME_CANNOT_BE_EMPTY 13165 #define ER_AUDIT_LOG_USER_FIRST_CHARACTER_MUST_BE_ALPHANUMERIC 13166 #define ER_AUDIT_LOG_JSON_FILTER_DOES_NOT_EXIST 13167 -#define ER_IB_MSG_1271 13168 +//#define OBSOLETE_ER_IB_MSG_1271 13168 #define ER_STARTING_INIT 13169 #define ER_ENDING_INIT 13170 #define ER_IB_MSG_1272 13171 @@ -4861,7 +5216,7 @@ static const int total_error_count = 5166; //#define OBSOLETE_ER_COLUMN_CHANGE_SIZE 13248 #define ER_WARN_REMOVED_SQL_MODE 13249 #define ER_IB_MSG_FAILED_TO_ALLOCATE_WAIT 13250 -#define ER_IB_MSG_NUM_POOLS 13251 +//#define OBSOLETE_ER_IB_MSG_NUM_POOLS 13251 #define ER_IB_MSG_USING_UNDO_SPACE 13252 #define ER_IB_MSG_FAIL_TO_SAVE_SPACE_STATE 13253 #define ER_IB_MSG_MAX_UNDO_SPACES_REACHED 13254 @@ -4872,13 +5227,13 @@ static const int total_error_count = 5166; #define ER_IB_MSG_SDI_Z_UNKNOWN_ERROR 13259 #define ER_IB_MSG_FOUND_WRONG_UNDO_SPACE 13260 #define ER_IB_MSG_NOT_END_WITH_IBU 13261 -#define ER_IB_MSG_UNDO_TRUNC_EMPTY_FILE 13262 -#define ER_IB_MSG_UNDO_TRUNC_BEFOR_DD_UPDATE 13263 -#define ER_IB_MSG_UNDO_TRUNC_BEFORE_UNDO_LOGGING 13264 -#define ER_IB_MSG_UNDO_TRUNK_BEFORE_RSEG 13265 +//#define OBSOLETE_ER_IB_MSG_UNDO_TRUNCATE_EMPTY_FILE 13262 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_DD_UPDATE 13263 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_UNDO_LOGGING 13264 +//#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_RSEG 13265 #define ER_IB_MSG_FAILED_TO_FINISH_TRUNCATE 13266 #define ER_IB_MSG_DEPRECATED_INNODB_UNDO_TABLESPACES 13267 -#define ER_IB_MSG_DIR_DOES_NOT_EXIST 13268 +#define ER_IB_MSG_WRONG_TABLESPACE_DIR 13268 #define ER_IB_MSG_LOCK_FREE_HASH_USAGE_STATS 13269 #define ER_CLONE_DONOR_TRACE 13270 #define ER_CLONE_PROTOCOL_TRACE 13271 @@ -5011,8 +5366,8 @@ static const int total_error_count = 5166; #define ER_IB_MSG_DDL_LOG_FAIL_POST_DDL 13398 #define ER_SERVER_BINLOG_UNSAFE_SYSTEM_FUNCTION 13399 #define ER_SERVER_UPGRADE_HELP_TABLE_STATUS 13400 -#define ER_GRP_RPL_SRV_GTID_WAIT_ERROR 13401 -#define ER_GRP_DELAYED_VCLE_LOGGING 13402 +//#define OBSOLETE_ER_GRP_RPL_SRV_GTID_WAIT_ERROR 13401 +//#define OBSOLETE_ER_GRP_DELAYED_VCLE_LOGGING 13402 //#define OBSOLETE_ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER 13403 #define ER_BINLOG_UNABLE_TO_ROTATE_GTID_TABLE_READONLY 13404 #define ER_NETWORK_NAMESPACES_NOT_SUPPORTED 13405 @@ -5024,7 +5379,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_TOO_LONG_PATH 13411 #define ER_IB_RECV_FIRST_REC_GROUP_INVALID 13412 #define ER_DD_UPGRADE_COMPLETED 13413 -#define ER_SSL_SERVER_CERT_VERIFY_FAILED 13414 +//#define OBSOLETE_ER_SSL_SERVER_CERT_VERIFY_FAILED 13414 #define ER_PERSIST_OPTION_USER_TRUNCATED 13415 #define ER_PERSIST_OPTION_HOST_TRUNCATED 13416 #define ER_NET_WAIT_ERROR 13417 @@ -5084,7 +5439,7 @@ static const int total_error_count = 5166; #define ER_GRP_RPL_RECOVERY_STRAT_CHOICE 13471 #define ER_GRP_RPL_RECOVERY_STRAT_FALLBACK 13472 #define ER_GRP_RPL_RECOVERY_STRAT_NO_FALLBACK 13473 -#define ER_GRP_RPL_SLAVE_THREAD_ERROR_ON_CLONE 13474 +#define ER_GRP_RPL_REPLICA_THREAD_ERROR_ON_CLONE 13474 #define ER_UNKNOWN_TABLE_IN_UPGRADE 13475 #define ER_IDENT_CAUSES_TOO_LONG_PATH_IN_UPGRADE 13476 #define ER_XA_CANT_CREATE_MDL_BACKUP 13477 @@ -5107,20 +5462,20 @@ static const int total_error_count = 5166; #define ER_WARN_LOG_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST 13494 #define ER_WARN_LOG_PRIVILEGE_CHECKS_USER_CORRUPT 13495 #define ER_WARN_LOG_PRIVILEGE_CHECKS_USER_NEEDS_RPL_APPLIER_PRIV 13496 -#define ER_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS 13497 -#define ER_RPL_SLAVE_SQL_THREAD_STARTING_WITH_PRIVILEGE_CHECKS 13498 +#define ER_OBSOLETE_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS 13497 +#define ER_RPL_REPLICA_SQL_THREAD_STARTING_WITH_PRIVILEGE_CHECKS 13498 #define ER_AUDIT_LOG_CANNOT_GENERATE_PASSWORD 13499 #define ER_INIT_FAILED_TO_GENERATE_ROOT_PASSWORD 13500 #define ER_PLUGIN_LOAD_OPTIONS_IGNORED 13501 #define ER_WARN_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES 13502 #define ER_IB_MSG_SKIP_HIDDEN_DIR 13503 -#define ER_WARN_RPL_RECOVERY_NO_ROTATE_EVENT_FROM_MASTER_EOF 13504 +#define ER_WARN_RPL_RECOVERY_NO_ROTATE_EVENT_FROM_SOURCE_EOF 13504 #define ER_IB_LOB_ROLLBACK_INDEX_LEN 13505 #define ER_CANT_PROCESS_EXPRESSION_FOR_GENERATED_COLUMN_TO_DD 13506 -#define ER_RPL_SLAVE_QUEUE_EVENT_FAILED_INVALID_NON_ROW_FORMAT 13507 -#define ER_RPL_SLAVE_APPLY_LOG_EVENT_FAILED_INVALID_NON_ROW_FORMAT 13508 +#define ER_RPL_REPLICA_QUEUE_EVENT_FAILED_INVALID_NON_ROW_FORMAT 13507 +#define ER_OBSOLETE_REQUIRE_ROW_FORMAT_VIOLATION 13508 #define ER_LOG_PRIV_CHECKS_REQUIRE_ROW_FORMAT_NOT_SET 13509 -#define ER_RPL_SLAVE_SQL_THREAD_DETECTED_UNEXPECTED_EVENT_SEQUENCE 13510 +#define ER_RPL_REPLICA_SQL_THREAD_DETECTED_UNEXPECTED_EVENT_SEQUENCE 13510 #define ER_IB_MSG_UPGRADE_PARTITION_FILE 13511 #define ER_IB_MSG_DOWNGRADE_PARTITION_FILE 13512 #define ER_IB_MSG_UPGRADE_PARTITION_FILE_IMPORT 13513 @@ -5137,7 +5492,7 @@ static const int total_error_count = 5166; #define ER_IB_MSG_DICT_PARTITION_NOT_FOUND 13524 #define ER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK 13525 #define ER_INNODB_OUT_OF_RESOURCES 13526 -#define ER_DD_UPGRADE_FOUND_PREPARED_XA_TRANSACTION 13527 +//#define OBSOLETE_ER_DD_UPGRADE_FOUND_PREPARED_XA_TRANSACTION 13527 #define ER_MIGRATE_TABLE_TO_DD_OOM 13528 #define ER_RPL_RELAY_LOG_RECOVERY_INFO_AFTER_CLONE 13529 #define ER_IB_MSG_57_UNDO_SPACE_DELETE_FAIL 13530 @@ -5146,8 +5501,8 @@ static const int total_error_count = 5166; #define ER_IB_MSG_DBLWR_1287 13533 #define ER_IB_MSG_DBLWR_1288 13534 #define ER_IB_MSG_DBLWR_1290 13535 -#define ER_IB_MSG_DBLWR_1291 13536 -#define ER_IB_MSG_DBLWR_1292 13537 +#define ER_IB_MSG_BAD_DBLWR_FILE_NAME 13536 +//#define OBSOLETE_ER_IB_MSG_DBLWR_1292 13537 #define ER_IB_MSG_DBLWR_1293 13538 #define ER_IB_MSG_DBLWR_1294 13539 #define ER_IB_MSG_DBLWR_1295 13540 @@ -5171,10 +5526,10 @@ static const int total_error_count = 5166; #define ER_IB_MSG_DBLWR_1316 13558 #define ER_IB_MSG_DBLWR_1317 13559 #define ER_IB_MSG_DBLWR_1318 13560 -#define ER_IB_MSG_DBLWR_1319 13561 +#define ER_IB_MSG_DBLWR_LOAD_WRONG_SIZE 13561 #define ER_IB_MSG_DBLWR_1320 13562 #define ER_IB_MSG_DBLWR_1321 13563 -#define ER_IB_MSG_DBLWR_1322 13564 +#define ER_IB_MSG_DBLWR_OPEN_OR_CREATE_WRONG_SIZE 13564 #define ER_IB_MSG_DBLWR_1323 13565 #define ER_IB_MSG_DBLWR_1324 13566 #define ER_IB_MSG_DBLWR_1325 13567 @@ -5185,7 +5540,7 @@ static const int total_error_count = 5166; #define ER_NDBINFO_UPGRADING_SCHEMA 13572 #define ER_NDBINFO_NOT_UPGRADING_SCHEMA 13573 #define ER_NDBINFO_UPGRADING_SCHEMA_FAIL 13574 -#define ER_IB_MSG_CREATE_LOG_FILE 13575 +//#define OBSOLETE_ER_IB_MSG_CREATE_LOG_FILE 13575 #define ER_IB_MSG_INNODB_START_INITIALIZE 13576 #define ER_IB_MSG_INNODB_END_INITIALIZE 13577 #define ER_IB_MSG_PAGE_ARCH_NO_RESET_POINTS 13578 @@ -5195,12 +5550,652 @@ static const int total_error_count = 5166; #define ER_IB_ERR_PAGE_ARCH_INVALID_FORMAT 13582 #define ER_INVALID_XPLUGIN_SOCKET_SAME_AS_SERVER 13583 #define ER_INNODB_UNABLE_TO_ACQUIRE_DD_OBJECT 13584 -static const int obsolete_error_count = 468; +//#define OBSOLETE_ER_WARN_LOG_DEPRECATED_PARTITION_PREFIX_KEY 13585 +#define ER_IB_MSG_UNDO_TRUNCATE_TOO_OFTEN 13586 +#define ER_GRP_RPL_IS_STARTING 13587 +#define ER_IB_MSG_INVALID_LOCATION_FOR_TABLESPACE 13588 +#define ER_IB_MSG_INVALID_LOCATION_WRONG_DB 13589 +#define ER_IB_MSG_CANNOT_FIND_DD_UNDO_SPACE 13590 +#define ER_GRP_RPL_RECOVERY_ENDPOINT_FORMAT 13591 +#define ER_GRP_RPL_RECOVERY_ENDPOINT_INVALID 13592 +#define ER_GRP_RPL_RECOVERY_ENDPOINT_INVALID_DONOR_ENDPOINT 13593 +#define ER_GRP_RPL_RECOVERY_ENDPOINT_INTERFACES_IPS 13594 +#define ER_WARN_TLS_CHANNEL_INITIALIZATION_ERROR 13595 +#define ER_XPLUGIN_FAILED_TO_VALIDATE_ADDRESS 13596 +#define ER_XPLUGIN_FAILED_TO_BIND_INTERFACE_ADDRESS 13597 +#define ER_IB_ERR_RECOVERY_REDO_DISABLED 13598 +#define ER_IB_WRN_FAST_SHUTDOWN_REDO_DISABLED 13599 +#define ER_IB_WRN_REDO_DISABLED 13600 +#define ER_IB_WRN_REDO_ENABLED 13601 +#define ER_TLS_CONFIGURED_FOR_CHANNEL 13602 +#define ER_TLS_CONFIGURATION_REUSED 13603 +#define ER_IB_TABLESPACE_PATH_VALIDATION_SKIPPED 13604 +#define ER_IB_CANNOT_UPGRADE_WITH_DISCARDED_TABLESPACES 13605 +#define ER_USERNAME_TRUNKATED 13606 +#define ER_HOSTNAME_TRUNKATED 13607 +#define ER_IB_MSG_TRX_RECOVERY_ROLLBACK_NOT_COMPLETED 13608 +#define ER_AUTHCACHE_ROLE_EDGES_IGNORED_EMPTY_NAME 13609 +#define ER_AUTHCACHE_ROLE_EDGES_UNKNOWN_AUTHORIZATION_ID 13610 +#define ER_AUTHCACHE_DEFAULT_ROLES_IGNORED_EMPTY_NAME 13611 +#define ER_AUTHCACHE_DEFAULT_ROLES_UNKNOWN_AUTHORIZATION_ID 13612 +#define ER_IB_ERR_DDL_LOG_INSERT_FAILURE 13613 +#define ER_IB_LOCK_VALIDATE_LATCH_ORDER_VIOLATION 13614 +#define ER_IB_RELOCK_LATCH_ORDER_VIOLATION 13615 +//#define OBSOLETE_ER_IB_MSG_1352 13616 +//#define OBSOLETE_ER_IB_MSG_1353 13617 +//#define OBSOLETE_ER_IB_MSG_1354 13618 +//#define OBSOLETE_ER_IB_MSG_1355 13619 +//#define OBSOLETE_ER_IB_MSG_1356 13620 +#define ER_IB_MSG_1357 13621 +#define ER_IB_MSG_1358 13622 +#define ER_IB_MSG_1359 13623 +#define ER_IB_FAILED_TO_DELETE_TABLESPACE_FILE 13624 +#define ER_IB_UNABLE_TO_EXPAND_TEMPORARY_TABLESPACE_POOL 13625 +#define ER_IB_TMP_TABLESPACE_CANNOT_CREATE_DIRECTORY 13626 +#define ER_IB_MSG_SCANNING_TEMP_TABLESPACE_DIR 13627 +#define ER_IB_ERR_TEMP_TABLESPACE_DIR_DOESNT_EXIST 13628 +#define ER_IB_ERR_TEMP_TABLESPACE_DIR_EMPTY 13629 +#define ER_IB_ERR_TEMP_TABLESPACE_DIR_CONTAINS_SEMICOLON 13630 +#define ER_IB_ERR_TEMP_TABLESPACE_DIR_SUBDIR_OF_DATADIR 13631 +#define ER_IB_ERR_SCHED_SETAFFNINITY_FAILED 13632 +#define ER_IB_ERR_UNKNOWN_PAGE_FETCH_MODE 13633 +#define ER_IB_ERR_LOG_PARSING_BUFFER_OVERFLOW 13634 +#define ER_IB_ERR_NOT_ENOUGH_MEMORY_FOR_PARSE_BUFFER 13635 +#define ER_IB_MSG_1372 13636 +#define ER_IB_MSG_1373 13637 +#define ER_IB_MSG_1374 13638 +#define ER_IB_MSG_1375 13639 +#define ER_IB_ERR_ZLIB_UNCOMPRESS_FAILED 13640 +#define ER_IB_ERR_ZLIB_BUF_ERROR 13641 +#define ER_IB_ERR_ZLIB_MEM_ERROR 13642 +#define ER_IB_ERR_ZLIB_DATA_ERROR 13643 +#define ER_IB_ERR_ZLIB_UNKNOWN_ERROR 13644 +#define ER_IB_MSG_1381 13645 +#define ER_IB_ERR_INDEX_RECORDS_WRONG_ORDER 13646 +#define ER_IB_ERR_INDEX_DUPLICATE_KEY 13647 +#define ER_IB_ERR_FOUND_N_DUPLICATE_KEYS 13648 +#define ER_IB_ERR_FOUND_N_RECORDS_WRONG_ORDER 13649 +#define ER_IB_ERR_PARALLEL_READ_OOM 13650 +#define ER_IB_MSG_UNDO_MARKED_ACTIVE 13651 +#define ER_IB_MSG_UNDO_ALTERED_ACTIVE 13652 +#define ER_IB_MSG_UNDO_ALTERED_INACTIVE 13653 +#define ER_IB_MSG_UNDO_MARKED_EMPTY 13654 +#define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_CLONE 13655 +#define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_MDL 13656 +#define ER_IB_MSG_INJECT_CRASH 13657 +#define ER_IB_MSG_INJECT_FAILURE 13658 +#define ER_GRP_RPL_TIMEOUT_RECEIVED_VC_LEAVE_ON_REJOIN 13659 +#define ER_RPL_ASYNC_RECONNECT_FAIL_NO_SOURCE 13660 +#define ER_UDF_REGISTER_SERVICE_ERROR 13661 +#define ER_UDF_REGISTER_ERROR 13662 +#define ER_UDF_UNREGISTER_ERROR 13663 +#define ER_EMPTY_PRIVILEGE_NAME_IGNORED 13664 +#define ER_IB_MSG_INCORRECT_SIZE 13665 +#define ER_TMPDIR_PATH_TOO_LONG 13666 +#define ER_ERROR_LOG_DESTINATION_NOT_A_FILE 13667 +#define ER_NO_ERROR_LOG_PARSER_CONFIGURED 13668 +#define ER_UPGRADE_NONEXISTENT_SCHEMA 13669 +#define ER_IB_MSG_CREATED_UNDO_SPACE 13670 +#define ER_IB_MSG_DROPPED_UNDO_SPACE 13671 +#define ER_IB_MSG_MASTER_KEY_ROTATED 13672 +#define ER_IB_DBLWR_DECOMPRESS_FAILED 13673 +#define ER_IB_DBLWR_DECRYPT_FAILED 13674 +#define ER_IB_DBLWR_KEY_MISSING 13675 +#define ER_INNODB_IO_WRITE_ERROR_RETRYING 13676 +#define ER_INNODB_IO_WRITE_FAILED 13677 +#define ER_LOG_COMPONENT_CANNOT_INIT 13678 +#define ER_RPL_ASYNC_CHANNEL_CANT_CONNECT 13679 +#define ER_RPL_ASYNC_SENDER_ADDED 13680 +#define ER_RPL_ASYNC_SENDER_REMOVED 13681 +#define ER_RPL_ASYNC_CHANNEL_STOPPED_QUORUM_LOST 13682 +#define ER_RPL_ASYNC_CHANNEL_CANT_CONNECT_NO_QUORUM 13683 +//#define OBSOLETE_ER_RPL_ASYNC_EXECUTING_QUERY 13684 +#define ER_RPL_REPLICA_MONITOR_IO_THREAD_EXITING 13685 +#define ER_RPL_ASYNC_MANAGED_NAME_REMOVED 13686 +#define ER_RPL_ASYNC_MANAGED_NAME_ADDED 13687 +#define ER_RPL_ASYNC_READ_FAILOVER_TABLE 13688 +#define ER_RPL_REPLICA_MONITOR_IO_THREAD_RECONNECT_CHANNEL 13689 +#define ER_REPLICA_ANON_TO_GTID_IS_LOCAL_OR_UUID_AND_GTID_MODE_NOT_ON 13690 +#define ER_REPLICA_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME 13691 +#define ER_GRP_RPL_GRP_NAME_IS_SAME_AS_ANONYMOUS_TO_GTID_UUID 13692 +#define ER_WARN_GTID_THRESHOLD_BREACH 13693 +#define ER_HEALTH_INFO 13694 +#define ER_HEALTH_WARNING 13695 +#define ER_HEALTH_ERROR 13696 +#define ER_HEALTH_WARNING_DISK_USAGE_LEVEL_1 13697 +#define ER_HEALTH_WARNING_DISK_USAGE_LEVEL_2 13698 +#define ER_HEALTH_WARNING_DISK_USAGE_LEVEL_3 13699 +#define ER_IB_INNODB_TBSP_OUT_OF_SPACE 13700 +#define ER_GRP_RPL_APPLIER_CHANNEL_STILL_RUNNING 13701 +#define ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF_CHANNEL 13702 +#define ER_FIREWALL_SERVICES_NOT_ACQUIRED 13703 +#define ER_FIREWALL_UDF_REGISTER_FAILED 13704 +#define ER_FIREWALL_PFS_TABLE_REGISTER_FAILED 13705 +#define ER_IB_MSG_STATS_SAMPLING_TOO_LARGE 13706 +#define ER_AUDIT_LOG_FILE_PRUNE_FAILED 13707 +#define ER_AUDIT_LOG_FILE_AUTO_PRUNED 13708 +#define ER_COMPONENTS_INFRASTRUCTURE_MANIFEST_INIT 13709 +#define ER_COMPONENTS_INFRASTRUCTURE_MANIFEST_DEINIT 13710 +#define ER_WARN_COMPONENTS_INFRASTRUCTURE_MANIFEST_NOT_RO 13711 +#define ER_WARN_NO_KEYRING_COMPONENT_SERVICE_FOUND 13712 +#define ER_NOTE_KEYRING_COMPONENT_INITIALIZED 13713 +#define ER_KEYRING_COMPONENT_NOT_INITIALIZED 13714 +#define ER_KEYRING_COMPONENT_EXCEPTION 13715 +#define ER_KEYRING_COMPONENT_MEMORY_ALLOCATION_ERROR 13716 +#define ER_NOTE_KEYRING_COMPONENT_AES_INVALID_MODE_BLOCK_SIZE 13717 +#define ER_NOTE_KEYRING_COMPONENT_AES_DATA_IDENTIFIER_EMPTY 13718 +#define ER_NOTE_KEYRING_COMPONENT_AES_INVALID_KEY 13719 +#define ER_NOTE_KEYRING_COMPONENT_AES_OPERATION_ERROR 13720 +#define ER_NOTE_KEYRING_COMPONENT_READ_DATA_NOT_FOUND 13721 +#define ER_NOTE_KEYRING_COMPONENT_WRITE_MAXIMUM_DATA_LENGTH 13722 +#define ER_NOTE_KEYRING_COMPONENT_STORE_FAILED 13723 +#define ER_NOTE_KEYRING_COMPONENT_REMOVE_FAILED 13724 +#define ER_NOTE_KEYRING_COMPONENT_GENERATE_FAILED 13725 +#define ER_NOTE_KEYRING_COMPONENT_KEYS_METADATA_ITERATOR_FETCH_FAILED 13726 +#define ER_NOTE_KEYRING_COMPONENT_METADATA_ITERATOR_INVALID_OUT_PARAM 13727 +#define ER_IB_WRN_FAILED_TO_ACQUIRE_SERVICE 13728 +#define ER_IB_WRN_OLD_GEOMETRY_TYPE 13729 +#define ER_NET_WAIT_ERROR2 13730 +#define ER_GRP_RPL_MEMBER_ACTION_TRIGGERED 13731 +#define ER_GRP_RPL_MEMBER_ACTION_FAILURE_IGNORE 13732 +#define ER_GRP_RPL_MEMBER_ACTION_FAILURE 13733 +#define ER_GRP_RPL_MEMBER_ACTION_PARSE_ON_RECEIVE 13734 +#define ER_GRP_RPL_MEMBER_ACTION_UPDATE_ACTIONS 13735 +#define ER_GRP_RPL_MEMBER_ACTION_GET_EXCHANGEABLE_DATA 13736 +#define ER_GRP_RPL_MEMBER_ACTION_DEFAULT_CONFIGURATION 13737 +#define ER_GRP_RPL_MEMBER_ACTION_UNABLE_TO_SET_DEFAULT_CONFIGURATION 13738 +#define ER_GRP_RPL_MEMBER_ACTION_PARSE_ON_MEMBER_JOIN 13739 +#define ER_GRP_RPL_MEMBER_ACTION_UPDATE_ACTIONS_ON_MEMBER_JOIN 13740 +#define ER_GRP_RPL_MEMBER_ACTION_INVALID_ACTIONS_ON_MEMBER_JOIN 13741 +#define ER_GRP_RPL_MEMBER_ACTION_ENABLED 13742 +#define ER_GRP_RPL_MEMBER_ACTION_DISABLED 13743 +#define ER_GRP_RPL_MEMBER_ACTIONS_RESET 13744 +//#define OBSOLETE_ER_DEPRECATED_TLS_VERSION_SESSION 13745 +//#define OBSOLETE_ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL 13746 +#define ER_FIREWALL_DEPRECATED_USER_PROFILE 13747 +#define ER_GRP_RPL_VIEW_CHANGE_UUID_INVALID 13748 +#define ER_GRP_RPL_VIEW_CHANGE_UUID_SAME_AS_GROUP_NAME 13749 +#define ER_GRP_RPL_GROUP_NAME_SAME_AS_VIEW_CHANGE_UUID 13750 +#define ER_GRP_RPL_VIEW_CHANGE_UUID_IS_SAME_AS_ANONYMOUS_TO_GTID_UUID 13751 +#define ER_GRP_RPL_GRP_VIEW_CHANGE_UUID_IS_INCOMPATIBLE_WITH_SERVER_UUID 13752 +#define ER_GRP_RPL_VIEW_CHANGE_UUID_DIFF_FROM_GRP 13753 +#define ER_WARN_REPLICA_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID 13754 +#define ER_GRP_RPL_FAILED_TO_PARSE_THE_VIEW_CHANGE_UUID 13755 +#define ER_GRP_RPL_FAILED_TO_GENERATE_SIDNO_FOR_VIEW_CHANGE_UUID 13756 +#define ER_GRP_RPL_VIEW_CHANGE_UUID_PARSE_ERROR 13757 +#define ER_GRP_RPL_UPDATE_GRPGTID_VIEW_CHANGE_UUID_EXECUTED_ERROR 13758 +#define ER_GRP_RPL_ADD_VIEW_CHANGE_UUID_TO_GRP_SID_MAP_ERROR 13759 +#define ER_GRP_RPL_DONOR_VIEW_CHANGE_UUID_TRANS_INFO_ERROR 13760 +#define ER_WARN_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE 13761 +#define ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS_LOG 13762 +#define ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE_LOG 13763 +#define ER_PLUGIN_INVALID_TABLE_DEFINITION 13764 +#define ER_AUTH_KERBEROS_LOGGER_GENERIC_MSG 13765 +#define ER_INSTALL_PLUGIN_CONFLICT_LOG 13766 +#define ER_DEPRECATED_PERSISTED_VARIABLE_WITH_ALIAS 13767 +#define ER_LOG_COMPONENT_FLUSH_FAILED 13768 +#define ER_IB_MSG_REENCRYPTED_TABLESPACE_KEY 13769 +#define ER_IB_MSG_REENCRYPTED_GENERAL_TABLESPACE_KEY 13770 +#define ER_IB_ERR_PAGE_ARCH_DBLWR_INIT_FAILED 13771 +#define ER_IB_MSG_RECOVERY_NO_SPACE_IN_REDO_LOG__SKIP_IBUF_MERGES 13772 +#define ER_IB_MSG_RECOVERY_NO_SPACE_IN_REDO_LOG__UNEXPECTED 13773 +#define ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON_LOG 13774 +#define ER_PREPARE_FOR_PRIMARY_ENGINE 13775 +#define ER_IB_MSG_PAR_RSEG_INIT_COMPLETE_MSG 13776 +#define ER_IB_MSG_PAR_RSEG_INIT_TIME_MSG 13777 +#define ER_DDL_MSG_1 13778 +#define ER_MTR_MSG_1 13779 +#define ER_GRP_RPL_MYSQL_NETWORK_PROVIDER_CLIENT_ERROR_CONN_ERR 13780 +#define ER_GRP_RPL_MYSQL_NETWORK_PROVIDER_CLIENT_ERROR_COMMAND_ERR 13781 +#define ER_GRP_RPL_FAILOVER_CONF_GET_EXCHANGEABLE_DATA 13782 +#define ER_GRP_RPL_FAILOVER_CONF_DEFAULT_CONFIGURATION 13783 +#define ER_GRP_RPL_FAILOVER_CONF_UNABLE_TO_SET_DEFAULT_CONFIGURATION 13784 +#define ER_GRP_RPL_FAILOVER_CONF_PARSE_ON_MEMBER_JOIN 13785 +#define ER_GRP_RPL_FAILOVER_CONF_CHANNEL_DOES_NOT_EXIST 13786 +#define ER_GRP_RPL_FAILOVER_REGISTER_MESSAGE_LISTENER_SERVICE 13787 +#define ER_GRP_RPL_FAILOVER_PRIMARY_WITHOUT_MAJORITY 13788 +#define ER_GRP_RPL_FAILOVER_PRIMARY_BACK_TO_MAJORITY 13789 +#define ER_RPL_INCREMENTING_MEMBER_ACTION_VERSION 13790 +#define ER_GRP_RPL_REPLICA_THREAD_ERROR_ON_SECONDARY_MEMBER 13791 +#define ER_IB_MSG_CLONE_DDL_NTFN 13792 +#define ER_IB_MSG_CLONE_DDL_APPLY 13793 +#define ER_IB_MSG_CLONE_DDL_INVALIDATE 13794 +#define ER_IB_MSG_UNDO_ENCRYPTION_INFO_LOADED 13795 +#define ER_IB_WRN_ENCRYPTION_INFO_SIZE_MISMATCH 13796 +#define ER_INVALID_AUTHENTICATION_POLICY 13797 +#define ER_AUTHENTICATION_PLUGIN_REGISTRATION_FAILED 13798 +#define ER_AUTHENTICATION_PLUGIN_REGISTRATION_INSUFFICIENT_BUFFER 13799 +#define ER_AUTHENTICATION_PLUGIN_AUTH_DATA_CORRUPT 13800 +#define ER_AUTHENTICATION_PLUGIN_SIGNATURE_CORRUPT 13801 +#define ER_AUTHENTICATION_PLUGIN_VERIFY_SIGNATURE_FAILED 13802 +#define ER_AUTHENTICATION_PLUGIN_OOM 13803 +#define ER_AUTHENTICATION_PLUGIN_LOG 13804 +#define ER_WARN_REPLICA_GTID_ONLY_AND_GTID_MODE_NOT_ON 13805 +#define ER_WARN_L_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS 13806 +#define ER_RPL_CANNOT_OPEN_RELAY_LOG 13807 +#define ER_AUTHENTICATION_OCI_PLUGIN_NOT_INITIALIZED 13808 +#define ER_AUTHENTICATION_OCI_PRIVATE_KEY_ERROR 13809 +#define ER_AUTHENTICATION_OCI_DOWNLOAD_PUBLIC_KEY 13810 +#define ER_AUTHENTICATION_OCI_IMDS 13811 +#define ER_AUTHENTICATION_OCI_IAM 13812 +#define ER_AUTHENTICATION_OCI_INVALID_AUTHENTICATION_STRING 13813 +#define ER_AUTHENTICATION_OCI_NO_MATCHING_GROUPS 13814 +#define ER_AUTHENTICATION_OCI_NO_GROUPS_FOUND 13815 +#define ER_AUTHENTICATION_OCI_NONCE 13816 +#define ER_HEALTH_WARNING_MEMORY_USAGE_LEVEL_1 13817 +#define ER_HEALTH_WARNING_MEMORY_USAGE_LEVEL_2 13818 +#define ER_HEALTH_WARNING_MEMORY_USAGE_LEVEL_3 13819 +#define ER_GRP_RPL_SET_SINGLE_CONSENSUS_LEADER 13820 +#define ER_GRP_RPL_ERROR_SET_SINGLE_CONSENSUS_LEADER 13821 +#define ER_GRP_RPL_SET_MULTI_CONSENSUS_LEADER 13822 +#define ER_GRP_RPL_ERROR_SET_MULTI_CONSENSUS_LEADER 13823 +#define ER_GRP_RPL_PAXOS_SINGLE_LEADER_DIFF_FROM_GRP 13824 +#define ER_MFA_USER_ATTRIBUTES_CORRUPT 13825 +#define ER_MFA_PLUGIN_NOT_LOADED 13826 +#define ER_WARN_DEPRECATED_CHARSET_OPTION 13827 +#define ER_WARN_DEPRECATED_COLLATION_OPTION 13828 +#define ER_REGEXP_MISSING_ICU_DATADIR 13829 +#define ER_IB_WARN_MANY_NON_LRU_FILES_OPENED 13830 +#define ER_IB_MSG_TRYING_TO_OPEN_FILE_FOR_LONG_TIME 13831 +#define ER_GLOBAL_CONN_LIMIT 13832 +#define ER_CONN_LIMIT 13833 +#define ER_WARN_AUDIT_LOG_DISABLED 13834 +#define ER_INVALID_TLS_VERSION 13835 +#define ER_RPL_RELAY_LOG_RECOVERY_GTID_ONLY 13836 +#define ER_KEYRING_OKV_STANDBY_SERVER_COUNT_EXCEEDED 13837 +#define ER_WARN_MIGRATION_EMPTY_SOURCE_KEYRING 13838 +#define ER_WARN_CANNOT_PERSIST_SENSITIVE_VARIABLES 13839 +#define ER_CANNOT_INTERPRET_PERSISTED_SENSITIVE_VARIABLES 13840 +#define ER_PERSISTED_VARIABLES_KEYRING_SUPPORT_REQUIRED 13841 +#define ER_PERSISTED_VARIABLES_MASTER_KEY_NOT_FOUND 13842 +#define ER_PERSISTED_VARIABLES_MASTER_KEY_CANNOT_BE_GENERATED 13843 +#define ER_PERSISTED_VARIABLES_ENCRYPTION_FAILED 13844 +#define ER_PERSISTED_VARIABLES_DECRYPTION_FAILED 13845 +#define ER_PERSISTED_VARIABLES_LACK_KEYRING_SUPPORT 13846 +#define ER_MY_MALLOC_USING_JEMALLOC 13847 +#define ER_MY_MALLOC_USING_STD_MALLOC 13848 +#define ER_MY_MALLOC_LOADLIBRARY_FAILED 13849 +#define ER_MY_MALLOC_GETPROCADDRESS_FAILED 13850 +#define ER_ACCOUNT_WITH_EXPIRED_PASSWORD 13851 +#define ER_THREAD_POOL_PLUGIN_STARTED 13852 +#define ER_THREAD_POOL_DEDICATED_LISTENERS_INVALID 13853 +#define ER_IB_DBLWR_BYTES_INFO 13854 +#define ER_IB_RDBLWR_BYTES_INFO 13855 +#define ER_IB_MSG_LOG_FILE_IS_EMPTY 13856 +#define ER_IB_MSG_LOG_FILE_TOO_SMALL 13857 +#define ER_IB_MSG_LOG_FILE_TOO_BIG 13858 +#define ER_IB_MSG_LOG_FILE_HEADER_READ_FAILED 13859 +#define ER_IB_MSG_LOG_INIT_DIR_NOT_EMPTY_WONT_INITIALIZE 13860 +#define ER_IB_MSG_LOG_INIT_DIR_LIST_FAILED 13861 +#define ER_IB_MSG_LOG_INIT_DIR_MISSING_SUBDIR 13862 +#define ER_IB_MSG_LOG_FILES_CREATED_BY_CLONE_AND_READ_ONLY_MODE 13863 +#define ER_IB_MSG_LOG_WRITER_WRITE_FAILED 13864 +#define ER_IB_MSG_LOG_WRITER_WAIT_ON_NEW_LOG_FILE 13865 +#define ER_IB_MSG_RECOVERY_CHECKPOINT_OUTSIDE_LOG_FILE 13866 +#define ER_IB_MSG_LOG_WRITER_ENTERED_EXTRA_MARGIN 13867 +#define ER_IB_MSG_LOG_WRITER_EXITED_EXTRA_MARGIN 13868 +#define ER_IB_MSG_LOG_PARAMS_FILE_SIZE_UNUSED 13869 +#define ER_IB_MSG_LOG_PARAMS_N_FILES_UNUSED 13870 +#define ER_IB_MSG_LOG_UPGRADE_FORCED_RECV 13871 +#define ER_IB_MSG_LOG_UPGRADE_IN_READ_ONLY_MODE 13872 +#define ER_IB_MSG_LOG_UPGRADE_CLONED_DB 13873 +#define ER_IB_MSG_LOG_UPGRADE_UNINITIALIZED_FILES 13874 +#define ER_IB_MSG_LOG_UPGRADE_CORRUPTION__UNEXPECTED 13875 +//#define OBSOLETE_ER_IB_MSG_LOG_UPGRADE_NON_PERSISTED_DD_METADATA 13876 +//#define OBSOLETE_ER_IB_MSG_LOG_UPGRADE_FLUSH_FAILED__UNEXPECTED 13877 +//#define OBSOLETE_ER_IB_MSG_LOG_FILES_RESIZE_ON_START_FAILED__UNEXPECTED 13878 +#define ER_IB_MSG_LOG_FILE_FOREIGN_UUID 13879 +#define ER_IB_MSG_LOG_FILE_INVALID_START_LSN 13880 +#define ER_IB_MSG_LOG_FILE_INVALID_LSN_RANGES 13881 +#define ER_IB_MSG_LOG_FILE_MISSING_FOR_ID 13882 +#define ER_IB_MSG_LOG_CHECKPOINT_FOUND 13883 +#define ER_IB_MSG_LOG_FILES_CAPACITY_CHANGED 13884 +#define ER_IB_MSG_LOG_FILES_RESIZE_REQUESTED 13885 +#define ER_IB_MSG_LOG_FILES_RESIZE_CANCELLED 13886 +#define ER_IB_MSG_LOG_FILES_RESIZE_FINISHED 13887 +#define ER_IB_MSG_LOG_FILES_UPGRADE 13888 +#define ER_IB_MSG_LOG_FILE_MARK_CURRENT_AS_INCOMPLETE 13889 +#define ER_IB_MSG_LOG_FILE_REMOVE_FAILED 13890 +#define ER_IB_MSG_LOG_FILE_RENAME_ON_CREATE_FAILED 13891 +#define ER_IB_MSG_LOG_FILES_CREATED_BY_UNKNOWN_CREATOR 13892 +#define ER_IB_MSG_LOG_FILES_FOUND_MISSING 13893 +#define ER_IB_MSG_LOG_FILE_FORMAT_TOO_NEW 13894 +#define ER_IB_MSG_LOG_FILE_FORMAT_TOO_OLD 13895 +#define ER_IB_MSG_LOG_FILE_DIFFERENT_FORMATS 13896 +#define ER_IB_MSG_LOG_PRE_8_0_30_MISSING_FILE0 13897 +#define ER_IB_MSG_LOG_PFS_ACQUIRE_SERVICES_FAILED 13898 +#define ER_IB_MSG_LOG_PFS_CREATE_TABLES_FAILED 13899 +#define ER_IB_MSG_LOG_FILE_TRUNCATE 13900 +#define ER_IB_MSG_LOG_FILE_UNUSED_RESIZE_FAILED 13901 +#define ER_IB_MSG_LOG_FILE_UNUSED_REMOVE_FAILED 13902 +#define ER_IB_MSG_LOG_FILE_UNUSED_RENAME_FAILED 13903 +#define ER_IB_MSG_LOG_FILE_UNUSED_MARK_AS_IN_USE_FAILED 13904 +#define ER_IB_MSG_LOG_FILE_MARK_AS_UNUSED_FAILED 13905 +#define ER_IB_MSG_LOG_PARAMS_DEDICATED_SERVER_IGNORED 13906 +#define ER_IB_MSG_LOG_PARAMS_LEGACY_USAGE 13907 +#define ER_GRP_RPL_FAILED_TO_LOG_VIEW_CHANGE 13908 +#define ER_BINLOG_CRASH_RECOVERY_MALFORMED_LOG 13909 +#define ER_BINLOG_CRASH_RECOVERY_ERROR_RETURNED_SE 13910 +#define ER_BINLOG_CRASH_RECOVERY_ENGINE_RESULTS 13911 +#define ER_BINLOG_CRASH_RECOVERY_COMMIT_FAILED 13912 +#define ER_BINLOG_CRASH_RECOVERY_ROLLBACK_FAILED 13913 +#define ER_BINLOG_CRASH_RECOVERY_PREPARE_FAILED 13914 +#define ER_COMPONENT_EE_SYS_VAR_REGISTRATION_FAILURE 13915 +#define ER_COMPONENT_EE_SYS_VAR_DEREGISTRATION_FAILURE 13916 +#define ER_COMPONENT_EE_FUNCTION_REGISTRATION_FAILURE 13917 +#define ER_COMPONENT_EE_FUNCTION_DEREGISTRATION_FAILURE 13918 +#define ER_COMPONENT_EE_FUNCTION_INVALID_ARGUMENTS 13919 +#define ER_COMPONENT_EE_FUNCTION_INVALID_ALGORITHM 13920 +#define ER_COMPONENT_EE_FUNCTION_KEY_LENGTH_OUT_OF_RANGE 13921 +#define ER_COMPONENT_EE_FUNCTION_PRIVATE_KEY_GENERATION_FAILURE 13922 +#define ER_COMPONENT_EE_FUNCTION_PUBLIC_KEY_GENERATION_FAILURE 13923 +#define ER_COMPONENT_EE_DATA_LENGTH_OUT_OF_RAGE 13924 +#define ER_COMPONENT_EE_DATA_ENCRYPTION_ERROR 13925 +#define ER_COMPONENT_EE_DATA_DECRYPTION_ERROR 13926 +#define ER_COMPONENT_EE_DATA_SIGN_ERROR 13927 +#define ER_COMPONENT_EE_OPENSSL_ERROR 13928 +#define ER_COMPONENT_EE_INSUFFICIENT_LENGTH 13929 +#define ER_SYSTEMD_NOTIFY_DEBUG 13930 +#define ER_TMP_SESSION_FOR_VAR 13931 +#define ER_BUILD_ID 13932 +#define ER_THREAD_POOL_CANNOT_REGISTER_DYNAMIC_PRIVILEGE 13933 +#define ER_IB_MSG_LOG_WRITER_WAIT_ON_CONSUMER 13934 +#define ER_CONDITIONAL_DEBUG 13935 +#define ER_IB_MSG_PARSE_OLD_REDO_INDEX_VERSION 13936 +//#define OBSOLETE_ER_RES_GRP_FAILED_TO_SWITCH_RESOURCE_GROUP 13937 +//#define OBSOLETE_ER_RES_GRP_SWITCH_FAILED_COULD_NOT_ACQUIRE_GLOBAL_LOCK 13938 +//#define OBSOLETE_ER_RES_GRP_SWITCH_FAILED_COULD_NOT_ACQUIRE_LOCK 13939 +//#define OBSOLETE_ER_RES_GRP_SWITCH_FAILED_UNABLE_TO_APPLY_RES_GRP 13940 +#define ER_IB_MSG_CLEAR_INSTANT_DROP_COLUMN_METADATA 13941 +#define ER_COMPONENT_KEYRING_OCI_OPEN_KEY_FILE 13942 +#define ER_COMPONENT_KEYRING_OCI_CREATE_PRIVATE_KEY 13943 +#define ER_COMPONENT_KEYRING_OCI_READ_KEY_FILE 13944 +#define ER_NOTE_COMPONENT_KEYRING_OCI_MISSING_NAME_OR_TYPE 13945 +#define ER_WARN_COMPONENT_KEYRING_OCI_DUPLICATE_KEY 13946 +#define ER_KEYRING_OCI_PARSE_JSON 13947 +#define ER_KEYRING_OCI_INVALID_JSON 13948 +#define ER_KEYRING_OCI_HTTP_REQUEST 13949 +#define ER_THREAD_POOL_SYSVAR_CHANGE 13950 +#define ER_STACK_BACKTRACE 13951 +#define ER_IB_MSG_BUF_POOL_RESIZE_COMPLETE_CUR_CODE 13952 +#define ER_IB_MSG_BUF_POOL_RESIZE_PROGRESS_UPDATE 13953 +#define ER_IB_MSG_BUF_POOL_RESIZE_CODE_STATUS 13954 +#define ER_THREAD_POOL_QUERY_THREADS_PER_GROUP_INVALID 13955 +#define ER_THREAD_POOL_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT 13956 +#define ER_IB_MSG_INVALID_PAGE_TYPE 13957 +#define ER_IB_PARALLEL_READER_WORKER_INFO 13958 +#define ER_IB_BULK_LOAD_SUBTREE_INFO 13959 +#define ER_IB_BULK_FLUSHER_INFO 13960 +#define ER_IB_BUFFER_POOL_OVERUSE 13961 +#define ER_IB_BUFFER_POOL_FULL 13962 +#define ER_IB_DUPLICATE_KEY 13963 +#define ER_REPLICATION_INCOMPATIBLE_TABLE_WITH_GIPK 13964 +#define ER_BULK_EXECUTOR_INFO 13965 +#define ER_BULK_LOADER_INFO 13966 +#define ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE_LOG 13967 +#define ER_BULK_READER_INFO 13968 +#define ER_BULK_READER_LIBCURL_INIT_FAILED_LOG 13969 +#define ER_BULK_READER_LIBCURL_ERROR_LOG 13970 +#define ER_BULK_READER_SERVER_ERROR_LOG 13971 +#define ER_BULK_READER_COMMUNICATION_ERROR_LOG 13972 +#define ER_BULK_PARSER_MISSING_ENCLOSED_BY_LOG 13973 +#define ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED_LOG 13974 +#define ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED_LOG 13975 +#define ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT_LOG 13976 +#define ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR_LOG 13977 +#define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY_LOG 13978 +#define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE_LOG 13979 +#define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR_LOG 13980 +#define ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE_LOG 13981 +#define ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD_LOG 13982 +#define ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL_LOG 13983 +#define ER_IB_BULK_LOAD_THREAD_FAIL 13984 +#define ER_IB_BULK_LOAD_MERGE_FAIL 13985 +#define ER_IB_LOAD_BULK_CONCURRENCY_REDUCED 13986 +#define ER_PLUGIN_EXCEPTION_OPERATION_FAILED 13987 +#define ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR_IN_REPO 13988 +#define ER_CHECK_TABLE_INSTANT_VERSION_BIT_SET 13989 +#define ER_GRP_RPL_PAXOS_SINGLE_LEADER_DIFF_FROM_OLD_GRP 13990 +#define ER_IB_WRN_IGNORE_REDO_LOG_CAPACITY 13991 +#define ER_IB_PRIMARY_KEY_IS_INSTANT 13992 +#define ER_THREAD_POOL_IDLE_CONNECTION_CLOSED 13993 +#define ER_IB_HIDDEN_NAME_CONFLICT 13994 +#define ER_IB_DICT_INVALID_COLUMN_POSITION 13995 +#define ER_IB_DICT_LOG_TABLE_INFO 13996 +#define ER_RPL_ASYNC_NEXT_FAILOVER_CHANNEL_SELECTED 13997 +#define ER_RPL_REPLICA_SOURCE_UUID_HAS_NOT_CHANGED 13998 +#define ER_RPL_REPLICA_SOURCE_UUID_HAS_CHANGED_HOST_PORT_UNCHANGED 13999 +#define ER_RPL_REPLICA_SOURCE_UUID_HOST_PORT_HAS_CHANGED 14000 +#define ER_RPL_REPLICA_CONNECTED_TO_SOURCE_RPL_STARTED_FILE_BASED 14001 +#define ER_RPL_REPLICA_CONNECTED_TO_SOURCE_RPL_STARTED_GTID_BASED 14002 +#define ER_IB_INDEX_LOADER_DONE 14003 +#define ER_IB_INDEX_BUILDER_DONE 14004 +#define ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS_OPTION 14005 +#define ER_IB_INDEX_BUILDER_INIT 14006 +#define ER_IB_SELECT_COUNT_STAR 14007 +#define ER_IB_INDEX_LOG_VERSION_MISMATCH 14008 +#define ER_WARN_COMPONENTS_INFRASTRUCTURE_MANIFEST_MULTIPLE_KEYRING 14009 +#define ER_GRP_RPL_HAS_STARTED 14010 +#define ER_CHECK_TABLE_MIN_REC_FLAG_SET 14011 +#define ER_CHECK_TABLE_MIN_REC_FLAG_NOT_SET 14012 +#define ER_NOTE_COMPONENT_SLOT_REGISTRATION_SUCCESS 14013 +#define ER_NOTE_COMPONENT_SLOT_DEREGISTRATION_SUCCESS 14014 +#define ER_WARN_CANNOT_FREE_COMPONENT_DATA_DEALLOCATION_FAILED 14015 +#define ER_IB_RESURRECT_TRX_INSERT 14016 +#define ER_IB_RESURRECT_TRX_UPDATE 14017 +#define ER_IB_RESURRECT_IDENTIFY_TABLE_TO_LOCK 14018 +#define ER_IB_RESURRECT_ACQUIRE_TABLE_LOCK 14019 +#define ER_IB_RESURRECT_RECORD_PROGRESS 14020 +#define ER_IB_RESURRECT_RECORD_COMPLETE 14021 +#define ER_IB_RESURRECT_TRX_INSERT_COMPLETE 14022 +#define ER_IB_RESURRECT_TRX_UPDATE_COMPLETE 14023 +#define ER_AUTHENTICATION_OCI_INVALID_TOKEN 14024 +#define ER_AUTHENTICATION_OCI_TOKEN_DETAILS_MISMATCH 14025 +#define ER_AUTHENTICATION_OCI_TOKEN_NOT_VERIFIED 14026 +#define ER_AUTHENTICATION_OCI_DOWNLOAD_IDDP_PUBLIC_KEY 14027 +//#define OBSOLETE_ER_AUTHENTICATION_OCI_NO_MATCHING_GROUPS_IN_TOKEN 14028 +#define ER_SYS_VAR_REGISTRATION 14029 +#define ER_SYS_VAR_DEREGISTRATION 14030 +#define ER_UDF_REGISTRATION 14031 +#define ER_UDF_DEREGISTRATION 14032 +#define ER_PRIVILEGE_REGISTRATION 14033 +#define ER_PRIVILEGE_DEREGISTRATION 14034 +#define ER_UDF_EXEC_FAILURE 14035 +#define ER_UDF_EXEC_FAILURE_REASON 14036 +#define ER_COMPONENT_SERVICE_CALL 14037 +#define ER_COMPONENT_SERVICE_CALL_RESULT 14038 +#define ER_COMPONENT_LOCK 14039 +#define ER_COMPONENT_UNLOCK 14040 +#define ER_COMPONENT_MASKING_OTHER_ERROR 14041 +#define ER_COMPONENT_MASKING_ABI 14042 +#define ER_COMPONENT_MASKING_ABI_REASON 14043 +#define ER_COMPONENT_MASKING_RANDOM_CREATE 14044 +#define ER_COMPONENT_MASKING_RANDOM_CREATE_REASON 14045 +#define ER_COMPONENT_MASKING_CANNOT_ACCESS_TABLE 14046 +#define ER_REDUCED_DBLWR_FILE_CORRUPTED 14047 +#define ER_REDUCED_DBLWR_PAGE_FOUND 14048 +#define ER_CONN_INIT_CONNECT_IGNORED_MFA 14049 +#define ER_SECONDARY_ENGINE_DDL_FAILED 14050 +#define ER_THREAD_POOL_CONNECTION_REPORT 14051 +#define ER_WARN_SCHEDULED_TASK_RUN_FAILED 14052 +#define ER_AUDIT_LOG_INVALID_FLUSH_INTERVAL_VALUE 14053 +#define ER_LOG_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK 14054 +#define ER_CONVERT_MULTI_VALUE 14055 +#define ER_IB_DDL_CONVERT_HEAP_NOT_FOUND 14056 +#define ER_SERVER_DOWNGRADE_FROM_VERSION 14057 +#define ER_BEYOND_SERVER_DOWNGRADE_THRESHOLD 14058 +#define ER_BEYOND_SERVER_UPGRADE_THRESHOLD 14059 +#define ER_INVALID_SERVER_UPGRADE_NOT_LTS 14060 +#define ER_INVALID_SERVER_DOWNGRADE_NOT_PATCH 14061 +#define ER_FAILED_GET_DD_PROPERTY 14062 +#define ER_FAILED_SET_DD_PROPERTY 14063 +#define ER_SERVER_DOWNGRADE_STATUS 14064 +#define ER_INFORMATION_SCHEMA_VERSION_CHANGE 14065 +#define ER_PERFORMANCE_SCHEMA_VERSION_CHANGE 14066 +#define ER_WARN_DEPRECATED_OR_BLOCKED_CIPHER 14067 +#define ER_IB_MSG_DDL_FAIL_NO_BUILDER 14068 +#define ER_GRP_RPL_MEMBER_INFO_DOES_NOT_EXIST 14069 +#define ER_USAGE_DEPRECATION_COUNTER 14070 +#define ER_WAITING_FOR_NO_CONNECTIONS 14071 +#define ER_WAITING_FOR_NO_THDS 14072 +#define ER_IB_INDEX_PART_TOO_LONG 14073 +//#define OBSOLETE_ER_DD_UPDATE_DATADIR_FLAG_FAIL 14074 +//#define OBSOLETE_ER_IB_MSG_FIL_STATE_MOVED_PREV_OR_HAS_DATADIR 14075 +//#define OBSOLETE_ER_RPL_KILL_OLD_DUMP_THREAD_ENCOUNTERED 14076 +//#define OBSOLETE_ER_RPL_MTA_ALLOW_COMMIT_OUT_OF_ORDER 14077 +#define ER_LANGUAGE_COMPONENT_INFO 15000 +#define ER_LANGUAGE_COMPONENT_WARNING 15001 +#define ER_LANGUAGE_COMPONENT_ERROR 15002 +#define ER_IB_BULK_FLUSHER_PUNCH_HOLE 15003 +#define ER_GRP_RPL_CONN_KILLED 15004 +#define ER_WARN_CANT_OPEN_CERTIFICATE 15005 +#define ER_FAILED_TO_VALIDATE_CERTIFICATES_SERVER_EXIT 15006 +#define ER_WARN_CA_CERT_VERIFY_FAILED 15007 +#define ER_WARN_FAILED_TO_SETUP_TLS 15008 +#define ER_TLS_LIBRARY_ERROR_INTERNAL 15009 +#define ER_SERVER_CERT_VERIFY_FAILED 15010 +#define ER_WARN_CERTIFICATE_ERROR_STRING 15011 +#define ER_TELEMETRY_INFO 15012 +#define ER_TELEMETRY_WARNING 15013 +#define ER_TELEMETRY_ERROR 15014 +#define ER_SRV_START 15015 +#define ER_SRV_END 15016 +#define ER_SRV_INIT_START 15017 +#define ER_SRV_INIT_END 15018 +#define ER_PLUGINS_SHUTDOWN_START 15019 +#define ER_PLUGINS_SHUTDOWN_END 15020 +#define ER_COMPONENTS_INFRASTRUCTURE_SHUTDOWN_START 15021 +#define ER_COMPONENTS_INFRASTRUCTURE_SHUTDOWN_END 15022 +#define ER_CONNECTIONS_SHUTDOWN_START 15023 +#define ER_CONNECTIONS_SHUTDOWN_END 15024 +#define ER_THREAD_STILL_ALIVE 15025 +#define ER_NUM_THREADS_STILL_ALIVE 15026 +#define ER_GRP_RPL_MYSQL_NETWORK_PROVIDER_SERVER_ERROR_COMMAND_ERR 15027 +#define ER_COMPONENT_KEYRING_OCI_INVALID_CONFIG_VAR 15028 +#define ER_WARN_OPTION_RESET_AND_IGNORED_DURING_INITIALIZE 15029 +#define ER_FIREWALL_SCHEDULER_REGISTER_FAILED 15030 +#define ER_FIREWALL_INVALID_RELOAD_INTERVAL_VALUE 15031 +#define ER_WARN_DEPRECATED_DYNAMIC_PRIV_FOR_USER 15032 +#define ER_BULK_MULTI_READER_INFO 15033 +#define ER_BULK_MERGE_LOADER_INFO 15034 +#define ER_BULK_SORTING_LOADER_INFO 15035 +#define ER_BULK_WRITER_INFO 15036 +#define ER_BULK_WRITER_LIBCURL_INIT_FAILED_LOG 15037 +#define ER_BULK_WRITER_LIBCURL_ERROR_LOG 15038 +#define ER_IB_WRONG_PAGE_ID 15039 +#define ER_IB_FIXED_PAGE_ID 15040 +#define ER_IB_WRONG_PAGEID_AFTER_SYNC_READ 15041 +#define ER_IB_SYNC_READ_FAILED 15042 +#define ER_START_REPLICA_CHANNEL_INVALID_CONFIGURATION_LOG 15043 +#define ER_GROUP_REPLICATION_CERTIFIER_MESSAGE_LARGE 15044 +#define ER_GROUP_REPLICATION_METADATA_SENDER_IS_REMOTE 15045 +#define ER_GROUP_REPLICATION_METADATA_SENDER 15046 +#define ER_GROUP_REPLICATION_ERROR_COMPRESS_INITIALIZE 15047 +#define ER_GROUP_REPLICATION_COMPRESS_PROCESS 15048 +#define ER_GROUP_REPLICATION_UNKOWN_COMPRESSION_TYPE 15049 +#define ER_GROUP_REPLICATION_COMPRESS_EXCEEDS_MAX_SIZE 15050 +#define ER_GROUP_REPLICATION_COMPRESS_OUT_OF_MEMORY 15051 +#define ER_GROUP_REPLICATION_ERROR_DECOMPRESS_INITIALIZE 15052 +#define ER_GROUP_REPLICATION_DECOMPRESS_EXCEEDS_MAX_SIZE 15053 +#define ER_GROUP_REPLICATION_DECOMPRESS_OUT_OF_MEMORY 15054 +#define ER_GROUP_REPLICATION_DECOMPRESS_TRUNCATED 15055 +#define ER_GROUP_REPLICATION_DECOMPRESS_CORRUPTED 15056 +#define ER_GROUP_REPLICATION_DECOMPRESS_END 15057 +#define ER_GROUP_REPLICATION_DECOMPRESS_PROCESS 15058 +#define ER_GRP_RPL_VCLE_NOT_BEING_LOGGED 15059 +#define ER_GROUP_REPLICATION_METADATA_PROTOBUF_PARSING 15060 +#define ER_GROUP_REPLICATION_PROTOBUF_SERIALIZING_ERROR 15061 +#define ER_GROUP_REPLICATION_ERROR_RECEIVED_WAITING_METADATA 15062 +#define ER_GROUP_REPLICATION_TIMEOUT_ERROR_FETCHING_METADATA 15063 +#define ER_GROUP_REPLICATION_METADATA_PAYLOAD_EMPTY 15064 +#define ER_GROUP_REPLICATION_METADATA_MESSAGE_PAYLOAD_EMPTY 15065 +#define ER_GROUP_REPLICATION_METADATA_READ_GTID_EXECUTED 15066 +#define ER_GROUP_REPLICATION_METADATA_PAYLOAD_DECODING 15067 +#define ER_GROUP_REPLICATION_METADATA_SEND_ERROR 15068 +#define ER_GROUP_REPLICATION_METADATA_SAVE_RECOVERY_COPY 15069 +#define ER_GROUP_REPLICATION_METADATA_CERT_INFO_ERROR_PROCESSING 15070 +#define ER_GROUP_REPLICATION_METADATA_CERT_INFO_PACKET_EMPTY 15071 +#define ER_GROUP_REPLICATION_METADATA_ERROR_ON_SEND_ERROR_MESSAGE 15072 +#define ER_GROUP_REPLICATION_METADATA_SET_IN_RECOVERY_FAILED 15073 +#define ER_GROUP_REPLICATION_CERTIFICATION_MODULE_FAILURE 15074 +#define ER_GROUP_REPLICATION_METADATA_INITIALIZATION_FAILURE 15075 +#define ER_GROUP_REPLICATION_METADATA_MEMORY_ALLOC 15076 +#define ER_GROUP_REPLICATION_RECOVERY_SKIPPED_GTID_PRESENT 15077 +#define ER_GROUP_REPLICATION_RECOVERY_FETCHING_GTID_EXECUTED_SET 15078 +#define ER_GROUP_REPLICATION_RECOVERY_ERROR_ADD_GTID_EXECUTED 15079 +#define ER_GROUP_REPLICATION_RECOVERY_METADATA_SENDER_NOT_FOUND 15080 +#define ER_GROUP_REPLICATION_METADATA_CERT_INFO_PACKET_COUNT_ERROR 15081 +#define ER_GROUP_REPLICATION_METADATA_CERT_INFO_ENCODING_ERROR 15082 +#define ER_GROUP_REPLICATION_METADATA_NO_VALID_DONOR 15083 +#define ER_GROUP_REPLICATION_NO_CERTIFICATION_DONOR_AVAILABLE 15084 +#define ER_GROUP_REPLICATION_RECOVERY_STOPPED_GTID_PRESENT 15085 +#define ER_RPL_ASYNC_CHECK_CONNECTION_ERROR 15086 +#define ER_RPL_ASYNC_MONITOR_IO_THD_FETCH_GROUP_MAJORITY_ERROR 15087 +#define ER_RPL_ASYNC_REPLICA_IO_THD_FETCH_GROUP_MAJORITY_ERROR 15088 +#define ER_RPL_ASYNC_GET_GROUP_MEMBERSHIP_DETAILS_ERROR 15089 +#define ER_IB_ERR_CORRUPT_TABLESPACE_UNRECOVERABLE 15090 +#define ER_IB_BULK_LOAD_STATS_WARN 15091 +#define ER_COMPONENT_MASKING_INVALID_FLUSH_INTERVAL_VALUE 15092 +#define ER_COMPONENT_MASKING_VAR_REGISTRATION_FAILURE 15093 +#define ER_COMPONENT_MASKING_NOTIFICATION_REGISTRATION_FAILURE 15094 +#define ER_GRP_RPL_MSG_DECODING_FAILED 15095 +#define ER_GRP_RPL_APPLIER_ERROR_PACKET_RECEIVED 15096 +#define ER_LANGUAGE_COMPONENT_INSTALL_ERROR 15097 +#define ER_WARN_LANGUAGE_COMPONENT_CANNOT_UNINSTALL 15098 +#define ER_LANGUAGE_COMPONENT_SERVER_ERROR 15099 +#define ER_LANGUAGE_COMPONENT_INTERNAL_ERROR 15100 +#define ER_LANGUAGE_COMPONENT_VM_API_FUNCTION_ERROR 15101 +#define ER_LANGUAGE_COMPONENT_VM_INTERNAL_ERROR 15102 +#define ER_WARN_LANGUAGE_COMPONENT_RESOURCE_LIMIT 15103 +#define ER_BLOCKED_CIPHER 15104 +#define ER_KEYRING_COMPONENT_KEYRING_FILE_NAME_EMPTY 15105 +#define ER_KEYRING_COMPONENT_KEYRING_FILE_READ_FAILED 15106 +#define ER_KEYRING_COMPONENT_KEYRING_FILE_DECRYPT_FAILED 15107 +#define ER_KEYRING_COMPONENT_KEYRING_FILE_INVALID_FORMAT 15108 +#define ER_KEYRING_COMPONENT_KEYRING_FILE_JSON_EXTRACT_FAILED 15109 +#define ER_KEYRING_COMPONENT_KEYRING_FILE_KEY_EXTRACT_FAILED 15110 +#define ER_NOTE_KEYRING_COMPONENT_NOT_INITIALIZED 15111 +#define ER_NOTE_KEYRING_COMPONENT_EMPTY_DATA_ID 15112 +#define ER_NOTE_KEYRING_COMPONENT_KEYS_METADATA_ITERATOR_INIT_FAILED 15113 +#define ER_NOTE_KEYRING_COMPONENT_KEY_READ_ITERATOR_INIT_FAILED 15114 +#define ER_NOTE_KEYRING_COMPONENT_KEY_READ_ITERATOR_FETCH_FAILED 15115 +#define ER_BACKGROUND_HISTOGRAM_UPDATE 15116 +#define ER_IB_MSG_SUBMIT_DETAILED_BUG_REPORT 15117 +#define ER_AUTO_INCREMENT_NOT_SUPPORTED_FOR_FLOAT_DOUBLE 15118 +#define ER_SERVER_DOWNGRADE_SYS_SCHEMA 15119 +#define ER_SERVER_DOWNGRADE_HELP_TABLE_STATUS 15120 +#define ER_KEYRING_MIGRATE_SKIPPED_KEY 15121 +#define ER_KEYRING_MIGRATE_MEMORY_DEALLOCATION_FAILED 15122 +#define ER_LOG_CLIENT_INTERACTION_TIMEOUT 15123 +#define ER_GRP_RPL_PREEMPTIVE_GARBAGE_COLLECTION_DIFF_FROM_GRP 15124 +#define ER_IB_LONG_ROLLBACK_FULL 15125 +#define ER_IB_LONG_ROLLBACK 15126 +#define ER_INVALID_FILE_FORMAT 15127 +#define ER_LOG_SANITIZATION 15128 +#define ER_WARN_LOG_DEPRECATED_NON_STANDARD_KEY 15129 +#define ER_THREAD_POOL_MTL_DISABLE 15130 +#define ER_THREAD_POOL_MTL_REENABLE 15131 +#define ER_LOG_PARTITION_PREFIX_KEY_NOT_SUPPORTED 15132 +#define ER_LDAP_AUTH_INFO_USER_MAP 15133 +#define ER_ACCESS_DENIED_NO_PROXY_GRANT_WITH_NAME 15134 +#define ER_ACCESS_DENIED_NO_PROXY_WITH_NAME 15135 +#define ER_GRP_RPL_RECOVERY_WAIT_APPLIER_BACKLOG_START 15136 +#define ER_GRP_RPL_RECOVERY_WAIT_APPLIER_BACKLOG_FINISH 15137 +#define ER_BULK_READER_ZSTD_ERROR_LOG 15138 +#define ER_SECONDARY_ENGINE_DDL_TRACK_PROGRESS 15139 +#define ER_IB_MSG_INNODB_FLUSH_METHOD 15140 +#define ER_BULK_SCANNER_INFO 15141 +#define ER_LOG_DEPRECATE_NON_COMPOSABLE_MULTIPLE_ENGINE 15142 +#define ER_DD_UPDATE_DATADIR_FLAG_FAIL 15143 +#define ER_IB_MSG_FIL_STATE_MOVED_PREV 15144 +#define ER_RPL_KILL_OLD_DUMP_THREAD_ENCOUNTERED 15145 +#define ER_RPL_MTA_ALLOW_COMMIT_OUT_OF_ORDER 15146 +static const int obsolete_error_count = 621; static const int pfs_no_error_stat_count = 2; -static const int pfs_session_error_stat_count = 1440; +static const int pfs_session_error_stat_count = 1774; -static const int pfs_global_error_stat_count = 3256; +static const int pfs_global_error_stat_count = 3763; #endif diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_ername.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_ername.h index bb64bf16c..cc65a00f5 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_ername.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_ername.h @@ -1,17 +1,18 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, * as published by the Free Software Foundation. * - * This program is also distributed with certain software (including + * This program is designed to work with certain software (including * but not limited to OpenSSL) that is licensed under separate terms, * as designated in a particular file or component or in included license * documentation. The authors of MySQL hereby grant you an additional * permission to link the program and your derivative works with the - * separately licensed software that they have included with MySQL. - * + * separately licensed software that they have either included with + * the program or referenced in the documentation. + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -26,74 +27,74 @@ #include "mysqlx_error.h" - {"ER_X_BAD_MESSAGE", ER_X_BAD_MESSAGE, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITIES_PREPARE_FAILED", ER_X_CAPABILITIES_PREPARE_FAILED, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITY_NOT_FOUND", ER_X_CAPABILITY_NOT_FOUND, "", NULL, NULL, 0 }, - {"ER_X_INVALID_PROTOCOL_DATA", ER_X_INVALID_PROTOCOL_DATA, "", NULL, NULL, 0 }, - {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_VALUE_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_VALUE_LENGTH, "", NULL, NULL, 0 }, - {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_KEY_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_KEY_LENGTH, "", NULL, NULL, 0 }, - {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_EMPTY_KEY", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_EMPTY_KEY, "", NULL, NULL, 0 }, - {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_LENGTH, "", NULL, NULL, 0 }, - {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_TYPE", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_TYPE, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITY_SET_NOT_ALLOWED", ER_X_CAPABILITY_SET_NOT_ALLOWED, "", NULL, NULL, 0 }, - {"ER_X_SERVICE_ERROR", ER_X_SERVICE_ERROR, "", NULL, NULL, 0 }, - {"ER_X_SESSION", ER_X_SESSION, "", NULL, NULL, 0 }, - {"ER_X_INVALID_ARGUMENT", ER_X_INVALID_ARGUMENT, "", NULL, NULL, 0 }, - {"ER_X_MISSING_ARGUMENT", ER_X_MISSING_ARGUMENT, "", NULL, NULL, 0 }, - {"ER_X_BAD_INSERT_DATA", ER_X_BAD_INSERT_DATA, "", NULL, NULL, 0 }, - {"ER_X_CMD_NUM_ARGUMENTS", ER_X_CMD_NUM_ARGUMENTS, "", NULL, NULL, 0 }, - {"ER_X_CMD_ARGUMENT_TYPE", ER_X_CMD_ARGUMENT_TYPE, "", NULL, NULL, 0 }, - {"ER_X_CMD_ARGUMENT_VALUE", ER_X_CMD_ARGUMENT_VALUE, "", NULL, NULL, 0 }, - {"ER_X_BAD_UPSERT_DATA", ER_X_BAD_UPSERT_DATA, "", NULL, NULL, 0 }, - {"ER_X_DUPLICATED_CAPABILITIES", ER_X_DUPLICATED_CAPABILITIES, "", NULL, NULL, 0 }, - {"ER_X_CMD_ARGUMENT_OBJECT_EMPTY", ER_X_CMD_ARGUMENT_OBJECT_EMPTY, "", NULL, NULL, 0 }, - {"ER_X_CMD_INVALID_ARGUMENT", ER_X_CMD_INVALID_ARGUMENT, "", NULL, NULL, 0 }, - {"ER_X_BAD_UPDATE_DATA", ER_X_BAD_UPDATE_DATA, "", NULL, NULL, 0 }, - {"ER_X_BAD_TYPE_OF_UPDATE", ER_X_BAD_TYPE_OF_UPDATE, "", NULL, NULL, 0 }, - {"ER_X_BAD_COLUMN_TO_UPDATE", ER_X_BAD_COLUMN_TO_UPDATE, "", NULL, NULL, 0 }, - {"ER_X_BAD_MEMBER_TO_UPDATE", ER_X_BAD_MEMBER_TO_UPDATE, "", NULL, NULL, 0 }, - {"ER_X_BAD_STATEMENT_ID", ER_X_BAD_STATEMENT_ID, "", NULL, NULL, 0 }, - {"ER_X_BAD_CURSOR_ID", ER_X_BAD_CURSOR_ID, "", NULL, NULL, 0 }, - {"ER_X_BAD_SCHEMA", ER_X_BAD_SCHEMA, "", NULL, NULL, 0 }, - {"ER_X_BAD_TABLE", ER_X_BAD_TABLE, "", NULL, NULL, 0 }, - {"ER_X_BAD_PROJECTION", ER_X_BAD_PROJECTION, "", NULL, NULL, 0 }, - {"ER_X_DOC_ID_MISSING", ER_X_DOC_ID_MISSING, "", NULL, NULL, 0 }, - {"ER_X_DUPLICATE_ENTRY", ER_X_DUPLICATE_ENTRY, "", NULL, NULL, 0 }, - {"ER_X_DOC_REQUIRED_FIELD_MISSING", ER_X_DOC_REQUIRED_FIELD_MISSING, "", NULL, NULL, 0 }, - {"ER_X_PROJ_BAD_KEY_NAME", ER_X_PROJ_BAD_KEY_NAME, "", NULL, NULL, 0 }, - {"ER_X_BAD_DOC_PATH", ER_X_BAD_DOC_PATH, "", NULL, NULL, 0 }, - {"ER_X_CURSOR_EXISTS", ER_X_CURSOR_EXISTS, "", NULL, NULL, 0 }, - {"ER_X_CURSOR_REACHED_EOF", ER_X_CURSOR_REACHED_EOF, "", NULL, NULL, 0 }, - {"ER_X_PREPARED_STATMENT_CAN_HAVE_ONE_CURSOR", ER_X_PREPARED_STATMENT_CAN_HAVE_ONE_CURSOR, "", NULL, NULL, 0 }, - {"ER_X_PREPARED_EXECUTE_ARGUMENT_NOT_SUPPORTED", ER_X_PREPARED_EXECUTE_ARGUMENT_NOT_SUPPORTED, "", NULL, NULL, 0 }, - {"ER_X_PREPARED_EXECUTE_ARGUMENT_CONSISTENCY", ER_X_PREPARED_EXECUTE_ARGUMENT_CONSISTENCY, "", NULL, NULL, 0 }, - {"ER_X_EXPR_BAD_OPERATOR", ER_X_EXPR_BAD_OPERATOR, "", NULL, NULL, 0 }, - {"ER_X_EXPR_BAD_NUM_ARGS", ER_X_EXPR_BAD_NUM_ARGS, "", NULL, NULL, 0 }, - {"ER_X_EXPR_MISSING_ARG", ER_X_EXPR_MISSING_ARG, "", NULL, NULL, 0 }, - {"ER_X_EXPR_BAD_TYPE_VALUE", ER_X_EXPR_BAD_TYPE_VALUE, "", NULL, NULL, 0 }, - {"ER_X_EXPR_BAD_VALUE", ER_X_EXPR_BAD_VALUE, "", NULL, NULL, 0 }, - {"ER_X_INVALID_COLLECTION", ER_X_INVALID_COLLECTION, "", NULL, NULL, 0 }, - {"ER_X_INVALID_ADMIN_COMMAND", ER_X_INVALID_ADMIN_COMMAND, "", NULL, NULL, 0 }, - {"ER_X_EXPECT_NOT_OPEN", ER_X_EXPECT_NOT_OPEN, "", NULL, NULL, 0 }, - {"ER_X_EXPECT_NO_ERROR_FAILED", ER_X_EXPECT_NO_ERROR_FAILED, "", NULL, NULL, 0 }, - {"ER_X_EXPECT_BAD_CONDITION", ER_X_EXPECT_BAD_CONDITION, "", NULL, NULL, 0 }, - {"ER_X_EXPECT_BAD_CONDITION_VALUE", ER_X_EXPECT_BAD_CONDITION_VALUE, "", NULL, NULL, 0 }, - {"ER_X_INVALID_NAMESPACE", ER_X_INVALID_NAMESPACE, "", NULL, NULL, 0 }, - {"ER_X_BAD_NOTICE", ER_X_BAD_NOTICE, "", NULL, NULL, 0 }, - {"ER_X_CANNOT_DISABLE_NOTICE", ER_X_CANNOT_DISABLE_NOTICE, "", NULL, NULL, 0 }, - {"ER_X_BAD_CONFIGURATION", ER_X_BAD_CONFIGURATION, "", NULL, NULL, 0 }, - {"ER_X_MYSQLX_ACCOUNT_MISSING_PERMISSIONS", ER_X_MYSQLX_ACCOUNT_MISSING_PERMISSIONS, "", NULL, NULL, 0 }, - {"ER_X_EXPECT_FIELD_EXISTS_FAILED", ER_X_EXPECT_FIELD_EXISTS_FAILED, "", NULL, NULL, 0 }, - {"ER_X_BAD_LOCKING", ER_X_BAD_LOCKING, "", NULL, NULL, 0 }, - {"ER_X_FRAME_COMPRESSION_DISABLED", ER_X_FRAME_COMPRESSION_DISABLED, "", NULL, NULL, 0 }, - {"ER_X_DECOMPRESSION_FAILED", ER_X_DECOMPRESSION_FAILED, "", NULL, NULL, 0 }, - {"ER_X_BAD_COMPRESSED_FRAME", ER_X_BAD_COMPRESSED_FRAME, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITY_COMPRESSION_INVALID_ALGORITHM", ER_X_CAPABILITY_COMPRESSION_INVALID_ALGORITHM, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITY_COMPRESSION_INVALID_SERVER_STYLE", ER_X_CAPABILITY_COMPRESSION_INVALID_SERVER_STYLE, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITY_COMPRESSION_INVALID_CLIENT_STYLE", ER_X_CAPABILITY_COMPRESSION_INVALID_CLIENT_STYLE, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITY_COMPRESSION_INVALID_OPTION", ER_X_CAPABILITY_COMPRESSION_INVALID_OPTION, "", NULL, NULL, 0 }, - {"ER_X_CAPABILITY_COMPRESSION_MISSING_REQUIRED_FIELDS", ER_X_CAPABILITY_COMPRESSION_MISSING_REQUIRED_FIELDS, "", NULL, NULL, 0 }, - {"ER_X_DOCUMENT_DOESNT_MATCH_EXPECTED_SCHEMA", ER_X_DOCUMENT_DOESNT_MATCH_EXPECTED_SCHEMA, "", NULL, NULL, 0 }, - {"ER_X_COLLECTION_OPTION_DOESNT_EXISTS", ER_X_COLLECTION_OPTION_DOESNT_EXISTS, "", NULL, NULL, 0 }, - {"ER_X_INVALID_VALIDATION_SCHEMA", ER_X_INVALID_VALIDATION_SCHEMA, "", NULL, NULL, 0 }, + {"ER_X_BAD_MESSAGE", ER_X_BAD_MESSAGE, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITIES_PREPARE_FAILED", ER_X_CAPABILITIES_PREPARE_FAILED, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITY_NOT_FOUND", ER_X_CAPABILITY_NOT_FOUND, "", nullptr, nullptr, 0 }, + {"ER_X_INVALID_PROTOCOL_DATA", ER_X_INVALID_PROTOCOL_DATA, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_VALUE_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_VALUE_LENGTH, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_KEY_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_KEY_LENGTH, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_EMPTY_KEY", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_EMPTY_KEY, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_LENGTH, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_TYPE", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_TYPE, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITY_SET_NOT_ALLOWED", ER_X_CAPABILITY_SET_NOT_ALLOWED, "", nullptr, nullptr, 0 }, + {"ER_X_SERVICE_ERROR", ER_X_SERVICE_ERROR, "", nullptr, nullptr, 0 }, + {"ER_X_SESSION", ER_X_SESSION, "", nullptr, nullptr, 0 }, + {"ER_X_INVALID_ARGUMENT", ER_X_INVALID_ARGUMENT, "", nullptr, nullptr, 0 }, + {"ER_X_MISSING_ARGUMENT", ER_X_MISSING_ARGUMENT, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_INSERT_DATA", ER_X_BAD_INSERT_DATA, "", nullptr, nullptr, 0 }, + {"ER_X_CMD_NUM_ARGUMENTS", ER_X_CMD_NUM_ARGUMENTS, "", nullptr, nullptr, 0 }, + {"ER_X_CMD_ARGUMENT_TYPE", ER_X_CMD_ARGUMENT_TYPE, "", nullptr, nullptr, 0 }, + {"ER_X_CMD_ARGUMENT_VALUE", ER_X_CMD_ARGUMENT_VALUE, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_UPSERT_DATA", ER_X_BAD_UPSERT_DATA, "", nullptr, nullptr, 0 }, + {"ER_X_DUPLICATED_CAPABILITIES", ER_X_DUPLICATED_CAPABILITIES, "", nullptr, nullptr, 0 }, + {"ER_X_CMD_ARGUMENT_OBJECT_EMPTY", ER_X_CMD_ARGUMENT_OBJECT_EMPTY, "", nullptr, nullptr, 0 }, + {"ER_X_CMD_INVALID_ARGUMENT", ER_X_CMD_INVALID_ARGUMENT, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_UPDATE_DATA", ER_X_BAD_UPDATE_DATA, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_TYPE_OF_UPDATE", ER_X_BAD_TYPE_OF_UPDATE, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_COLUMN_TO_UPDATE", ER_X_BAD_COLUMN_TO_UPDATE, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_MEMBER_TO_UPDATE", ER_X_BAD_MEMBER_TO_UPDATE, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_STATEMENT_ID", ER_X_BAD_STATEMENT_ID, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_CURSOR_ID", ER_X_BAD_CURSOR_ID, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_SCHEMA", ER_X_BAD_SCHEMA, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_TABLE", ER_X_BAD_TABLE, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_PROJECTION", ER_X_BAD_PROJECTION, "", nullptr, nullptr, 0 }, + {"ER_X_DOC_ID_MISSING", ER_X_DOC_ID_MISSING, "", nullptr, nullptr, 0 }, + {"ER_X_DUPLICATE_ENTRY", ER_X_DUPLICATE_ENTRY, "", nullptr, nullptr, 0 }, + {"ER_X_DOC_REQUIRED_FIELD_MISSING", ER_X_DOC_REQUIRED_FIELD_MISSING, "", nullptr, nullptr, 0 }, + {"ER_X_PROJ_BAD_KEY_NAME", ER_X_PROJ_BAD_KEY_NAME, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_DOC_PATH", ER_X_BAD_DOC_PATH, "", nullptr, nullptr, 0 }, + {"ER_X_CURSOR_EXISTS", ER_X_CURSOR_EXISTS, "", nullptr, nullptr, 0 }, + {"ER_X_CURSOR_REACHED_EOF", ER_X_CURSOR_REACHED_EOF, "", nullptr, nullptr, 0 }, + {"ER_X_PREPARED_STATMENT_CAN_HAVE_ONE_CURSOR", ER_X_PREPARED_STATMENT_CAN_HAVE_ONE_CURSOR, "", nullptr, nullptr, 0 }, + {"ER_X_PREPARED_EXECUTE_ARGUMENT_NOT_SUPPORTED", ER_X_PREPARED_EXECUTE_ARGUMENT_NOT_SUPPORTED, "", nullptr, nullptr, 0 }, + {"ER_X_PREPARED_EXECUTE_ARGUMENT_CONSISTENCY", ER_X_PREPARED_EXECUTE_ARGUMENT_CONSISTENCY, "", nullptr, nullptr, 0 }, + {"ER_X_EXPR_BAD_OPERATOR", ER_X_EXPR_BAD_OPERATOR, "", nullptr, nullptr, 0 }, + {"ER_X_EXPR_BAD_NUM_ARGS", ER_X_EXPR_BAD_NUM_ARGS, "", nullptr, nullptr, 0 }, + {"ER_X_EXPR_MISSING_ARG", ER_X_EXPR_MISSING_ARG, "", nullptr, nullptr, 0 }, + {"ER_X_EXPR_BAD_TYPE_VALUE", ER_X_EXPR_BAD_TYPE_VALUE, "", nullptr, nullptr, 0 }, + {"ER_X_EXPR_BAD_VALUE", ER_X_EXPR_BAD_VALUE, "", nullptr, nullptr, 0 }, + {"ER_X_INVALID_COLLECTION", ER_X_INVALID_COLLECTION, "", nullptr, nullptr, 0 }, + {"ER_X_INVALID_ADMIN_COMMAND", ER_X_INVALID_ADMIN_COMMAND, "", nullptr, nullptr, 0 }, + {"ER_X_EXPECT_NOT_OPEN", ER_X_EXPECT_NOT_OPEN, "", nullptr, nullptr, 0 }, + {"ER_X_EXPECT_NO_ERROR_FAILED", ER_X_EXPECT_NO_ERROR_FAILED, "", nullptr, nullptr, 0 }, + {"ER_X_EXPECT_BAD_CONDITION", ER_X_EXPECT_BAD_CONDITION, "", nullptr, nullptr, 0 }, + {"ER_X_EXPECT_BAD_CONDITION_VALUE", ER_X_EXPECT_BAD_CONDITION_VALUE, "", nullptr, nullptr, 0 }, + {"ER_X_INVALID_NAMESPACE", ER_X_INVALID_NAMESPACE, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_NOTICE", ER_X_BAD_NOTICE, "", nullptr, nullptr, 0 }, + {"ER_X_CANNOT_DISABLE_NOTICE", ER_X_CANNOT_DISABLE_NOTICE, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_CONFIGURATION", ER_X_BAD_CONFIGURATION, "", nullptr, nullptr, 0 }, + {"ER_X_MYSQLX_ACCOUNT_MISSING_PERMISSIONS", ER_X_MYSQLX_ACCOUNT_MISSING_PERMISSIONS, "", nullptr, nullptr, 0 }, + {"ER_X_EXPECT_FIELD_EXISTS_FAILED", ER_X_EXPECT_FIELD_EXISTS_FAILED, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_LOCKING", ER_X_BAD_LOCKING, "", nullptr, nullptr, 0 }, + {"ER_X_FRAME_COMPRESSION_DISABLED", ER_X_FRAME_COMPRESSION_DISABLED, "", nullptr, nullptr, 0 }, + {"ER_X_DECOMPRESSION_FAILED", ER_X_DECOMPRESSION_FAILED, "", nullptr, nullptr, 0 }, + {"ER_X_BAD_COMPRESSED_FRAME", ER_X_BAD_COMPRESSED_FRAME, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITY_COMPRESSION_INVALID_ALGORITHM", ER_X_CAPABILITY_COMPRESSION_INVALID_ALGORITHM, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITY_COMPRESSION_INVALID_SERVER_STYLE", ER_X_CAPABILITY_COMPRESSION_INVALID_SERVER_STYLE, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITY_COMPRESSION_INVALID_CLIENT_STYLE", ER_X_CAPABILITY_COMPRESSION_INVALID_CLIENT_STYLE, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITY_COMPRESSION_INVALID_OPTION", ER_X_CAPABILITY_COMPRESSION_INVALID_OPTION, "", nullptr, nullptr, 0 }, + {"ER_X_CAPABILITY_COMPRESSION_MISSING_REQUIRED_FIELDS", ER_X_CAPABILITY_COMPRESSION_MISSING_REQUIRED_FIELDS, "", nullptr, nullptr, 0 }, + {"ER_X_DOCUMENT_DOESNT_MATCH_EXPECTED_SCHEMA", ER_X_DOCUMENT_DOESNT_MATCH_EXPECTED_SCHEMA, "", nullptr, nullptr, 0 }, + {"ER_X_COLLECTION_OPTION_DOESNT_EXISTS", ER_X_COLLECTION_OPTION_DOESNT_EXISTS, "", nullptr, nullptr, 0 }, + {"ER_X_INVALID_VALIDATION_SCHEMA", ER_X_INVALID_VALIDATION_SCHEMA, "", nullptr, nullptr, 0 }, diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_error.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_error.h index 3cb049bd4..7c86519ff 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_error.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_error.h @@ -1,15 +1,16 @@ -/* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2015, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. - This program is also distributed with certain software (including + This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the - separately licensed software that they have included with MySQL. + separately licensed software that they have either included with + the program or referenced in the documentation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_version.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_version.h index 773b2cd6e..26bbec5ac 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_version.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysqlx_version.h @@ -1,17 +1,18 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, * as published by the Free Software Foundation. * - * This program is also distributed with certain software (including + * This program is designed to work with certain software (including * but not limited to OpenSSL) that is licensed under separate terms, * as designated in a particular file or component or in included license * documentation. The authors of MySQL hereby grant you an additional * permission to link the program and your derivative works with the - * separately licensed software that they have included with MySQL. - * + * separately licensed software that they have either included with + * the program or referenced in the documentation. + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h index 919dd69d6..44749cba1 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h @@ -1,54 +1,66 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2020, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _typelib_h #define _typelib_h -#include "my_alloc.h" +/** + @file include/typelib.h +*/ + +#include "my_inttypes.h" + +struct MEM_ROOT; -typedef struct st_typelib { /* Different types saved here */ - unsigned int count; /* How many types */ - const char *name; /* Name of typelib */ - const char **type_names; - unsigned int *type_lengths; -} TYPELIB; +struct TYPELIB { /* Different types saved here */ + size_t count{0}; /* How many types */ + const char *name{nullptr}; /* Name of typelib */ + const char **type_names{nullptr}; + unsigned int *type_lengths{nullptr}; +}; -extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position); +extern uint64_t find_typeset(const char *x, TYPELIB *typelib, + int *error_position); extern int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option); -#define FIND_TYPE_BASIC 0 +#define FIND_TYPE_BASIC 0 /** makes @c find_type() require the whole name, no prefix */ -#define FIND_TYPE_NO_PREFIX (1 << 0) +#define FIND_TYPE_NO_PREFIX (1 << 0) /** always implicitely on, so unused, but old code may pass it */ -#define FIND_TYPE_NO_OVERWRITE (1 << 1) +#define FIND_TYPE_NO_OVERWRITE (1 << 1) /** makes @c find_type() accept a number */ -#define FIND_TYPE_ALLOW_NUMBER (1 << 2) +#define FIND_TYPE_ALLOW_NUMBER (1 << 2) /** makes @c find_type() treat ',' as terminator */ -#define FIND_TYPE_COMMA_TERM (1 << 3) +#define FIND_TYPE_COMMA_TERM (1 << 3) extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags); -extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); -extern const char *get_type(TYPELIB *typelib,unsigned int nr); +extern const char *get_type(TYPELIB *typelib, unsigned int nr); extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); extern TYPELIB sql_protocol_typelib; -my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name, - my_ulonglong cur_set, my_ulonglong default_set, - const char *str, unsigned int length, - char **err_pos, unsigned int *err_len); +uint64_t find_set_from_flags(const TYPELIB *lib, int default_name, + uint64_t cur_set, uint64_t default_set, + const char *str, unsigned int length, + const char **err_pos, unsigned int *err_len); #endif /* _typelib_h */ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libcrypto.1.1.dylib b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libcrypto.1.1.dylib deleted file mode 100755 index 17a33d747..000000000 Binary files a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libcrypto.1.1.dylib and /dev/null differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libcrypto.3.dylib b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libcrypto.3.dylib new file mode 100644 index 000000000..223bbf6ea Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libcrypto.3.dylib differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.a b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.24.dylib old mode 100644 new mode 100755 similarity index 50% rename from Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.a rename to Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.24.dylib index e5adc1508..1a4b610a4 Binary files a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.a and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.24.dylib differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libssl.1.1.dylib b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libssl.1.1.dylib deleted file mode 100755 index f5c8d2136..000000000 Binary files a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libssl.1.1.dylib and /dev/null differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libssl.3.dylib b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libssl.3.dylib new file mode 100644 index 000000000..83ff18f17 Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libssl.3.dylib differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_ldap_sasl_client.so b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_ldap_sasl_client.so new file mode 100755 index 000000000..e5d338bb9 Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_ldap_sasl_client.so differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_oci_client.so b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_oci_client.so new file mode 100755 index 000000000..e1283a314 Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_oci_client.so differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_webauthn_client.so b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_webauthn_client.so new file mode 100755 index 000000000..f0abad6ea Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/authentication_webauthn_client.so differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_ldap_sasl_client.so b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_ldap_sasl_client.so new file mode 100755 index 000000000..f4c3e717d Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_ldap_sasl_client.so differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_oci_client.so b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_oci_client.so new file mode 100755 index 000000000..133dba23f Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_oci_client.so differ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_webauthn_client.so b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_webauthn_client.so new file mode 100755 index 000000000..c22931e55 Binary files /dev/null and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/authentication_webauthn_client.so differ diff --git a/Frameworks/SPMySQLFramework/Resources/Info.plist b/Frameworks/SPMySQLFramework/Resources/Info.plist index 5fe91ff1f..2cbe9aa09 100644 --- a/Frameworks/SPMySQLFramework/Resources/Info.plist +++ b/Frameworks/SPMySQLFramework/Resources/Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 5.1.0 CFBundleSignature SPDT CFBundleSupportedPlatforms @@ -21,10 +21,8 @@ MacOSX CFBundleVersion - 1 + 20096 ITSAppUsesNonExemptEncryption - LSMinimumSystemVersion - 10.11 diff --git a/Frameworks/SPMySQLFramework/SPMySQL Unit Tests/Info.plist b/Frameworks/SPMySQLFramework/SPMySQL Unit Tests/Info.plist index d894f336c..f047fa9b2 100644 --- a/Frameworks/SPMySQLFramework/SPMySQL Unit Tests/Info.plist +++ b/Frameworks/SPMySQLFramework/SPMySQL Unit Tests/Info.plist @@ -15,13 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 5.1.0 CFBundleSignature ???? CFBundleVersion - 1 - LSMinimumSystemVersion - 10.11 + 20096 CFBundleSupportedPlatforms MacOSX diff --git a/Frameworks/SPMySQLFramework/SPMySQL Unit Tests/SPMySQLGeometryDataTests.m b/Frameworks/SPMySQLFramework/SPMySQL Unit Tests/SPMySQLGeometryDataTests.m new file mode 100644 index 000000000..d4adbef4b --- /dev/null +++ b/Frameworks/SPMySQLFramework/SPMySQL Unit Tests/SPMySQLGeometryDataTests.m @@ -0,0 +1,125 @@ +// +// SPMySQLGeometryDataTests.m +// SPMySQLFramework +// +// Created by Luis Aguiniga on 11.06.2022 +// + +#import +#import "SPMySQLGeometryData.h" +#include + +@interface SPMySQLGeometryDataTests : XCTestCase + +@end + +// C - Helper Functions - Declerations +static void initialize_point(void *buffer, uint32_t srid, double x, double y); + +@implementation SPMySQLGeometryDataTests + +- (void)test_PointWithSrid4326_MySQL_5 { + uint8_t buffer[32] = {0}; + + // Simulate MySQL 5.5+ < 8 behavior for SRID 4326: + // + // mysql> select + // -> HEX(ST_GeomFromText('POINT(10 20)', 4326)) as `Point_4326`, + // -> ST_AsText(ST_GeomFromText('POINT(10 20)', 4326)) as `AsText_4326`; + // +----------------------------------------------------+--------------+ + // | Point_4326 | AsText_4326 | + // +----------------------------------------------------+--------------+ + // | E6100000010100000000000000000024400000000000003440 | POINT(10 20) | + // +----------------------------------------------------+--------------+ + // + // buffer breakdown: + // [ SRID ] [ByteOrder] [WKB Type] [ X ] [ Y ] + // [ 4326 ] [ 1 ] [ 1 ] [ 10 ] [ 20 ] + // E6100000 01 01000000 0000000000002440 0000000000003440 + initialize_point(buffer, 4326, 10.0, 20.0); + + SPMySQLGeometryData *mysql5 = [SPMySQLGeometryData dataWithBytes:(const void *)buffer length: 25 version: 5]; + NSString *result = [mysql5 wktString]; + XCTAssertTrue([@"POINT(10 20),4326" isEqual: result]); +} + +- (void)test_PointWithSrid4326_MySQL_8 { + uint8_t buffer[32] = {0}; + + // Simulate MySQL 8 behavior for SRID 4326: + // + // mysql> select + // -> HEX(ST_GeomFromText('POINT(10 20)', 4326)) as `Point_4326`, + // -> ST_AsText(ST_GeomFromText('POINT(10 20)', 4326)) as `AsText_4326`; + // +----------------------------------------------------+--------------+ + // | Point_4326 | AsText_4326 | + // +----------------------------------------------------+--------------+ + // | E6100000010100000000000000000034400000000000002440 | POINT(10 20) | + // +----------------------------------------------------+--------------+ + // + // buffer breakdown: + // [ SRID ] [ByteOrder] [WKB Type] [ Y ] [ X ] + // [ 4326 ] [ 1 ] [ 1 ] [ 20 ] [ 10 ] + // E6100000 01 01000000 0000000000003440 0000000000002440 + // Note: while we use POINT(10 20) in both examples, MySQL 8 swaps X Y values in storage so we swap them here to simulate that: + initialize_point(buffer, 4326, 20.0, 10.0); + + // Pre-Fix (version 5 approach swaps coordinates): + SPMySQLGeometryData *mysql5 = [SPMySQLGeometryData dataWithBytes:(const void *)buffer length: 25 version: 5]; + NSString *result5 = [mysql5 wktString]; + XCTAssertTrue([@"POINT(20 10),4326" isEqual: result5]); + + // Post Fix (version 8 recognizes swap and corrects for it based on SRID): + SPMySQLGeometryData *mysql8 = [SPMySQLGeometryData dataWithBytes:(const void *)buffer length: 25 version: 8]; + NSString *result8 = [mysql8 wktString]; + XCTAssertTrue([@"POINT(10 20),4326" isEqual: result8]); +} + +- (void)test_PointWithSrid0_MySQL_5_and_8 { + uint8_t buffer[32] = {0}; + + // Simulate MySQL 5.5 & 8 behavior for SRID 0: + // + // mysql> select + // -> HEX(ST_GeomFromText('POINT(10 20)')) as `Point`, + // -> ST_AsText(ST_GeomFromText('POINT(10 20)')) as `AsText`; + // +----------------------------------------------------+--------------+ + // | Point | AsText | + // +----------------------------------------------------+--------------+ + // | 00000000010100000000000000000024400000000000003440 | POINT(10 20) | + // +----------------------------------------------------+--------------+ + // + // buffer breakdown: + // [ SRID ] [ByteOrder] [WKB Type] [ Y ] [ X ] + // [ 4326 ] [ 1 ] [ 1 ] [ 20 ] [ 10 ] + // 00000000 01 01000000 0000000000002440 0000000000003440 + initialize_point(buffer, 0, 10.0, 20.0); + + // Pre-Fix (version 5 approach swaps coordinates): + SPMySQLGeometryData *mysql5 = [SPMySQLGeometryData dataWithBytes:(const void *)buffer length: 25 version: 5]; + NSString *result5 = [mysql5 wktString]; + XCTAssertTrue([@"POINT(10 20)" isEqual: result5]); + + // Post Fix (version 8 recognizes swap and corrects for it based on SRID): + SPMySQLGeometryData *mysql8 = [SPMySQLGeometryData dataWithBytes:(const void *)buffer length: 25 version: 8]; + NSString *result8 = [mysql8 wktString]; + XCTAssertTrue([@"POINT(10 20)" isEqual: result8]); +} + +@end + +// C - Helper Functions - Implementations +static void initialize_point(void *buffer, uint32_t srid, double x, double y) { + static uint8_t byteOrder = 0x01; + static uint32_t wkbtype = 0x00000001; // wkb_point + + // clear buffer + memset(buffer, 0x00, 32); + + // set buffer + memcpy(buffer + 0, &srid, 4); + memcpy(buffer + 4, &byteOrder, 1); // byte order == little endian + memcpy(buffer + 5, &wkbtype, 4); + memcpy(buffer + 9, &x, 8); + memcpy(buffer + 17, &y, 8); +} diff --git a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj index 30c939e67..ead5ea229 100644 --- a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj +++ b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj @@ -3,22 +3,17 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 177916A21E88733000EE3043 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 177916A01E88733000EE3043 /* LICENSE */; }; 17E3A57B1885A286009CF372 /* SPMySQLDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 17E3A5791885A286009CF372 /* SPMySQLDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17E3A57C1885A286009CF372 /* SPMySQLDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E3A57A1885A286009CF372 /* SPMySQLDataTypes.m */; }; - 269BA7E5249FC988005E4896 /* plugin_auth_common.h in Headers */ = {isa = PBXBuildFile; fileRef = 269BA7DF249FC988005E4896 /* plugin_auth_common.h */; }; - 269BA7E6249FC988005E4896 /* udf_registration_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 269BA7E0249FC988005E4896 /* udf_registration_types.h */; }; - 269BA7E7249FC988005E4896 /* client_plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 269BA7E1249FC988005E4896 /* client_plugin.h */; }; - 269BA7E8249FC988005E4896 /* psi_memory.h in Headers */ = {isa = PBXBuildFile; fileRef = 269BA7E3249FC988005E4896 /* psi_memory.h */; }; - 269BA7E9249FC988005E4896 /* psi_base.h in Headers */ = {isa = PBXBuildFile; fileRef = 269BA7E4249FC988005E4896 /* psi_base.h */; }; - 269BA7EB249FDC97005E4896 /* libcrypto.1.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 269BA7EA249FDC97005E4896 /* libcrypto.1.1.dylib */; }; - 269BA7ED249FDCB1005E4896 /* libssl.1.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 269BA7EC249FDCB1005E4896 /* libssl.1.1.dylib */; }; - 26F0BF1124A0052B00A43B20 /* libcrypto.1.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 269BA7EA249FDC97005E4896 /* libcrypto.1.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 26F0BF1224A0053100A43B20 /* libssl.1.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 269BA7EC249FDCB1005E4896 /* libssl.1.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1A96314625B9CE6600BF2E91 /* SPMySQLArrayAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A96314425B9CE6600BF2E91 /* SPMySQLArrayAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1A96314725B9CE6600BF2E91 /* SPMySQLArrayAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A96314525B9CE6600BF2E91 /* SPMySQLArrayAdditions.m */; }; + 1A96314E25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A96314C25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.m */; }; + 1A96314F25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A96314D25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 507FF1E51BC0D82300104523 /* DataConversion_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 507FF1811BC0C64100104523 /* DataConversion_Tests.m */; }; 507FF23B1BC0E8CA00104523 /* SPMySQL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* SPMySQL.framework */; }; 507FF23D1BC157B500104523 /* SPMySQLStringAdditions_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 507FF23C1BC157B500104523 /* SPMySQLStringAdditions_Tests.m */; }; @@ -29,14 +24,6 @@ 583C734E17B0778A0056B284 /* Data Conversion.m in Sources */ = {isa = PBXBuildFile; fileRef = 583C734C17B0778A0056B284 /* Data Conversion.m */; }; 58428E0014BA5FAE000F8438 /* SPMySQLConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 58428DFE14BA5FAE000F8438 /* SPMySQLConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 58428E0114BA5FAE000F8438 /* SPMySQLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 58428DFF14BA5FAE000F8438 /* SPMySQLConnection.m */; }; - 5842929F14C34B36000F8438 /* my_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929414C34B36000F8438 /* my_alloc.h */; settings = {ATTRIBUTES = (); }; }; - 584292A014C34B36000F8438 /* my_list.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929514C34B36000F8438 /* my_list.h */; settings = {ATTRIBUTES = (); }; }; - 584292A114C34B36000F8438 /* mysql.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929614C34B36000F8438 /* mysql.h */; }; - 584292A214C34B36000F8438 /* mysql_com.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929714C34B36000F8438 /* mysql_com.h */; }; - 584292A414C34B36000F8438 /* mysql_time.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929914C34B36000F8438 /* mysql_time.h */; }; - 584292A514C34B36000F8438 /* mysql_version.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929A14C34B36000F8438 /* mysql_version.h */; }; - 584292A614C34B36000F8438 /* typelib.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929B14C34B36000F8438 /* typelib.h */; }; - 584292A714C34B36000F8438 /* libmysqlclient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5842929D14C34B36000F8438 /* libmysqlclient.a */; }; 584294E414CB8002000F8438 /* SPMySQLConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 584294E314CB8002000F8438 /* SPMySQLConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; 584294F014CB8002000F8438 /* Ping & KeepAlive.h in Headers */ = {isa = PBXBuildFile; fileRef = 584294EE14CB8002000F8438 /* Ping & KeepAlive.h */; }; 584294F114CB8002000F8438 /* Ping & KeepAlive.m in Sources */ = {isa = PBXBuildFile; fileRef = 584294EF14CB8002000F8438 /* Ping & KeepAlive.m */; }; @@ -83,8 +70,35 @@ 58C7C1E914DB6E8600436315 /* Field Definitions.m in Sources */ = {isa = PBXBuildFile; fileRef = 58C7C1E714DB6E8600436315 /* Field Definitions.m */; }; 58D2A4D116EDF1C6002EB401 /* SPMySQLEmptyResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 58D2A4CF16EDF1C6002EB401 /* SPMySQLEmptyResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 58D2A4D216EDF1C6002EB401 /* SPMySQLEmptyResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 58D2A4D016EDF1C6002EB401 /* SPMySQLEmptyResult.m */; }; - 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; + 9615D1592D4C18CB0095F55A /* libmysqlclient.24.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9615D1582D4C18CB0095F55A /* libmysqlclient.24.dylib */; }; + 9615D15A2D4C18F80095F55A /* libmysqlclient.24.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9615D1582D4C18CB0095F55A /* libmysqlclient.24.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 9615D15D2D4C26DD0095F55A /* libcrypto.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9615D15B2D4C26DD0095F55A /* libcrypto.3.dylib */; }; + 9615D15E2D4C26DD0095F55A /* libssl.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9615D15C2D4C26DD0095F55A /* libssl.3.dylib */; }; + 9615D15F2D4C26F80095F55A /* libcrypto.3.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9615D15B2D4C26DD0095F55A /* libcrypto.3.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 9615D3922D4D7DA00095F55A /* libssl.3.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9615D15C2D4C26DD0095F55A /* libssl.3.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 9615D84D2D5EDF530095F55A /* psi_base.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8362D5EDF530095F55A /* psi_base.h */; }; + 9615D84E2D5EDF530095F55A /* psi_memory.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8372D5EDF530095F55A /* psi_memory.h */; }; + 9615D84F2D5EDF530095F55A /* client_plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8392D5EDF530095F55A /* client_plugin.h */; }; + 9615D8502D5EDF530095F55A /* plugin_auth_common.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D83A2D5EDF530095F55A /* plugin_auth_common.h */; }; + 9615D8512D5EDF530095F55A /* udf_registration_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D83B2D5EDF530095F55A /* udf_registration_types.h */; }; + 9615D8522D5EDF530095F55A /* errmsg.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D83D2D5EDF530095F55A /* errmsg.h */; }; + 9615D8532D5EDF530095F55A /* field_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D83E2D5EDF530095F55A /* field_types.h */; }; + 9615D8542D5EDF530095F55A /* my_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D83F2D5EDF530095F55A /* my_alloc.h */; }; + 9615D8552D5EDF530095F55A /* my_command.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8402D5EDF530095F55A /* my_command.h */; }; + 9615D8562D5EDF530095F55A /* my_compress.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8412D5EDF530095F55A /* my_compress.h */; }; + 9615D8572D5EDF530095F55A /* my_list.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8422D5EDF530095F55A /* my_list.h */; }; + 9615D8582D5EDF530095F55A /* mysql.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8432D5EDF530095F55A /* mysql.h */; }; + 9615D8592D5EDF530095F55A /* mysql_com.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8442D5EDF530095F55A /* mysql_com.h */; }; + 9615D85A2D5EDF530095F55A /* mysql_time.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8452D5EDF530095F55A /* mysql_time.h */; }; + 9615D85B2D5EDF530095F55A /* mysql_version.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8462D5EDF530095F55A /* mysql_version.h */; }; + 9615D85C2D5EDF530095F55A /* mysqld_error.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8472D5EDF530095F55A /* mysqld_error.h */; }; + 9615D85D2D5EDF530095F55A /* mysqlx_ername.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8482D5EDF530095F55A /* mysqlx_ername.h */; }; + 9615D85E2D5EDF530095F55A /* mysqlx_error.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D8492D5EDF530095F55A /* mysqlx_error.h */; }; + 9615D85F2D5EDF530095F55A /* mysqlx_version.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D84A2D5EDF530095F55A /* mysqlx_version.h */; }; + 9615D8602D5EDF530095F55A /* typelib.h in Headers */ = {isa = PBXBuildFile; fileRef = 9615D84B2D5EDF530095F55A /* typelib.h */; }; + 96A5DDB32D63C8AE0079105E /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 96A5DDB22D63C89A0079105E /* libc++.tbd */; }; + FD4211952918779400941BFE /* SPMySQLGeometryDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FD4211942918779400941BFE /* SPMySQLGeometryDataTests.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -104,8 +118,9 @@ dstPath = ""; dstSubfolderSpec = 6; files = ( - 26F0BF1224A0053100A43B20 /* libssl.1.1.dylib in CopyFiles */, - 26F0BF1124A0052B00A43B20 /* libcrypto.1.1.dylib in CopyFiles */, + 9615D3922D4D7DA00095F55A /* libssl.3.dylib in CopyFiles */, + 9615D15F2D4C26F80095F55A /* libcrypto.3.dylib in CopyFiles */, + 9615D15A2D4C18F80095F55A /* libmysqlclient.24.dylib in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -119,19 +134,15 @@ 177916A11E88733000EE3043 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 17E3A5791885A286009CF372 /* SPMySQLDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLDataTypes.h; path = Source/SPMySQLDataTypes.h; sourceTree = ""; }; 17E3A57A1885A286009CF372 /* SPMySQLDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPMySQLDataTypes.m; path = Source/SPMySQLDataTypes.m; sourceTree = ""; }; - 269BA7DF249FC988005E4896 /* plugin_auth_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plugin_auth_common.h; sourceTree = ""; }; - 269BA7E0249FC988005E4896 /* udf_registration_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udf_registration_types.h; sourceTree = ""; }; - 269BA7E1249FC988005E4896 /* client_plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = client_plugin.h; sourceTree = ""; }; - 269BA7E3249FC988005E4896 /* psi_memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psi_memory.h; sourceTree = ""; }; - 269BA7E4249FC988005E4896 /* psi_base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psi_base.h; sourceTree = ""; }; - 269BA7EA249FDC97005E4896 /* libcrypto.1.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.1.1.dylib; sourceTree = ""; }; - 269BA7EC249FDCB1005E4896 /* libssl.1.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libssl.1.1.dylib; sourceTree = ""; }; + 1A96314425B9CE6600BF2E91 /* SPMySQLArrayAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLArrayAdditions.h; path = Source/SPMySQLArrayAdditions.h; sourceTree = ""; }; + 1A96314525B9CE6600BF2E91 /* SPMySQLArrayAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPMySQLArrayAdditions.m; path = Source/SPMySQLArrayAdditions.m; sourceTree = ""; }; + 1A96314C25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPMySQLMutableDictionaryAdditions.m; path = Source/SPMySQLMutableDictionaryAdditions.m; sourceTree = ""; }; + 1A96314D25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLMutableDictionaryAdditions.h; path = Source/SPMySQLMutableDictionaryAdditions.h; sourceTree = ""; }; 32DBCF5E0370ADEE00C91783 /* SPMySQLFramework_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLFramework_Prefix.pch; path = Source/SPMySQLFramework_Prefix.pch; sourceTree = ""; }; 507FF1811BC0C64100104523 /* DataConversion_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DataConversion_Tests.m; sourceTree = ""; }; 507FF1D51BC0D7D300104523 /* SPMySQL Unit Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SPMySQL Unit Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 507FF1D81BC0D7D300104523 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 507FF23C1BC157B500104523 /* SPMySQLStringAdditions_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPMySQLStringAdditions_Tests.m; sourceTree = ""; }; - 514D74A824B9FD2A00C08E48 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 580A331C14D75CF7000D6933 /* SPMySQLGeometryData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLGeometryData.h; path = Source/SPMySQLGeometryData.h; sourceTree = ""; }; 580A331D14D75CF7000D6933 /* SPMySQLGeometryData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPMySQLGeometryData.m; path = Source/SPMySQLGeometryData.m; sourceTree = ""; }; 583C734917A489CC0056B284 /* SPMySQLStreamingResultStoreDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLStreamingResultStoreDelegate.h; path = Source/SPMySQLStreamingResultStoreDelegate.h; sourceTree = ""; }; @@ -140,14 +151,6 @@ 58428DF614BA5A13000F8438 /* build-mysql-client.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "build-mysql-client.sh"; sourceTree = ""; }; 58428DFE14BA5FAE000F8438 /* SPMySQLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLConnection.h; path = Source/SPMySQLConnection.h; sourceTree = ""; }; 58428DFF14BA5FAE000F8438 /* SPMySQLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPMySQLConnection.m; path = Source/SPMySQLConnection.m; sourceTree = ""; }; - 5842929414C34B36000F8438 /* my_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = my_alloc.h; sourceTree = ""; }; - 5842929514C34B36000F8438 /* my_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = my_list.h; sourceTree = ""; }; - 5842929614C34B36000F8438 /* mysql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql.h; sourceTree = ""; }; - 5842929714C34B36000F8438 /* mysql_com.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql_com.h; sourceTree = ""; }; - 5842929914C34B36000F8438 /* mysql_time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql_time.h; sourceTree = ""; }; - 5842929A14C34B36000F8438 /* mysql_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql_version.h; sourceTree = ""; }; - 5842929B14C34B36000F8438 /* typelib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = typelib.h; sourceTree = ""; }; - 5842929D14C34B36000F8438 /* libmysqlclient.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libmysqlclient.a; sourceTree = ""; }; 584294E314CB8002000F8438 /* SPMySQLConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPMySQLConstants.h; path = Source/SPMySQLConstants.h; sourceTree = ""; }; 584294EE14CB8002000F8438 /* Ping & KeepAlive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Ping & KeepAlive.h"; path = "Source/SPMySQLConnection Categories/Ping & KeepAlive.h"; sourceTree = ""; }; 584294EF14CB8002000F8438 /* Ping & KeepAlive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "Ping & KeepAlive.m"; path = "Source/SPMySQLConnection Categories/Ping & KeepAlive.m"; sourceTree = ""; }; @@ -196,7 +199,32 @@ 58D2A4D016EDF1C6002EB401 /* SPMySQLEmptyResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SPMySQLEmptyResult.m; path = Source/SPMySQLEmptyResult.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* SPMySQL.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SPMySQL.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9615D1582D4C18CB0095F55A /* libmysqlclient.24.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libmysqlclient.24.dylib; sourceTree = ""; }; + 9615D15B2D4C26DD0095F55A /* libcrypto.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.3.dylib; sourceTree = ""; }; + 9615D15C2D4C26DD0095F55A /* libssl.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libssl.3.dylib; sourceTree = ""; }; + 9615D8362D5EDF530095F55A /* psi_base.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psi_base.h; sourceTree = ""; }; + 9615D8372D5EDF530095F55A /* psi_memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psi_memory.h; sourceTree = ""; }; + 9615D8392D5EDF530095F55A /* client_plugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = client_plugin.h; sourceTree = ""; }; + 9615D83A2D5EDF530095F55A /* plugin_auth_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = plugin_auth_common.h; sourceTree = ""; }; + 9615D83B2D5EDF530095F55A /* udf_registration_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = udf_registration_types.h; sourceTree = ""; }; + 9615D83D2D5EDF530095F55A /* errmsg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = errmsg.h; sourceTree = ""; }; + 9615D83E2D5EDF530095F55A /* field_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = field_types.h; sourceTree = ""; }; + 9615D83F2D5EDF530095F55A /* my_alloc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = my_alloc.h; sourceTree = ""; }; + 9615D8402D5EDF530095F55A /* my_command.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = my_command.h; sourceTree = ""; }; + 9615D8412D5EDF530095F55A /* my_compress.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = my_compress.h; sourceTree = ""; }; + 9615D8422D5EDF530095F55A /* my_list.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = my_list.h; sourceTree = ""; }; + 9615D8432D5EDF530095F55A /* mysql.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysql.h; sourceTree = ""; }; + 9615D8442D5EDF530095F55A /* mysql_com.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysql_com.h; sourceTree = ""; }; + 9615D8452D5EDF530095F55A /* mysql_time.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysql_time.h; sourceTree = ""; }; + 9615D8462D5EDF530095F55A /* mysql_version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysql_version.h; sourceTree = ""; }; + 9615D8472D5EDF530095F55A /* mysqld_error.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysqld_error.h; sourceTree = ""; }; + 9615D8482D5EDF530095F55A /* mysqlx_ername.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysqlx_ername.h; sourceTree = ""; }; + 9615D8492D5EDF530095F55A /* mysqlx_error.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysqlx_error.h; sourceTree = ""; }; + 9615D84A2D5EDF530095F55A /* mysqlx_version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mysqlx_version.h; sourceTree = ""; }; + 9615D84B2D5EDF530095F55A /* typelib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = typelib.h; sourceTree = ""; }; + 96A5DDB22D63C89A0079105E /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + FD4211942918779400941BFE /* SPMySQLGeometryDataTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPMySQLGeometryDataTests.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -213,9 +241,10 @@ buildActionMask = 2147483647; files = ( 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */, - 584292A714C34B36000F8438 /* libmysqlclient.a in Frameworks */, - 269BA7EB249FDC97005E4896 /* libcrypto.1.1.dylib in Frameworks */, - 269BA7ED249FDCB1005E4896 /* libssl.1.1.dylib in Frameworks */, + 96A5DDB32D63C8AE0079105E /* libc++.tbd in Frameworks */, + 9615D15D2D4C26DD0095F55A /* libcrypto.3.dylib in Frameworks */, + 9615D15E2D4C26DD0095F55A /* libssl.3.dylib in Frameworks */, + 9615D1592D4C18CB0095F55A /* libmysqlclient.24.dylib in Frameworks */, 5884133C14CCEC6B0078027F /* libz.dylib in Frameworks */, 58C00ADA14E4959A00AC489A /* SystemConfiguration.framework in Frameworks */, ); @@ -247,6 +276,7 @@ 089C1665FE841158C02AAC07 /* Resources */, 58428DF514BA5A03000F8438 /* Scripts */, 0867D69AFE84028FC02AAC07 /* Linked Frameworks */, + 96A5DDB12D63C8990079105E /* Frameworks */, 034768DFFF38A50411DB9C8B /* Products */, ); name = SPMySQLFramework; @@ -270,7 +300,6 @@ children = ( 5842929214C34B36000F8438 /* MySQL Client Libraries */, 8DC2EF5A0486A6940098B216 /* Info.plist */, - 089C1666FE841158C02AAC07 /* InfoPlist.strings */, ); name = Resources; sourceTree = ""; @@ -300,26 +329,6 @@ name = Classes; sourceTree = ""; }; - 269BA7DE249FC988005E4896 /* mysql */ = { - isa = PBXGroup; - children = ( - 269BA7DF249FC988005E4896 /* plugin_auth_common.h */, - 269BA7E0249FC988005E4896 /* udf_registration_types.h */, - 269BA7E1249FC988005E4896 /* client_plugin.h */, - 269BA7E2249FC988005E4896 /* psi */, - ); - path = mysql; - sourceTree = ""; - }; - 269BA7E2249FC988005E4896 /* psi */ = { - isa = PBXGroup; - children = ( - 269BA7E3249FC988005E4896 /* psi_memory.h */, - 269BA7E4249FC988005E4896 /* psi_base.h */, - ); - path = psi; - sourceTree = ""; - }; 32C88DFF0371C24200C91783 /* Other Sources */ = { isa = PBXGroup; children = ( @@ -338,6 +347,7 @@ 507FF1D81BC0D7D300104523 /* Info.plist */, 507FF1811BC0C64100104523 /* DataConversion_Tests.m */, 507FF23C1BC157B500104523 /* SPMySQLStringAdditions_Tests.m */, + FD4211942918779400941BFE /* SPMySQLGeometryDataTests.m */, ); name = "Unit Tests"; path = "SPMySQL Unit Tests"; @@ -363,33 +373,18 @@ 5842929214C34B36000F8438 /* MySQL Client Libraries */ = { isa = PBXGroup; children = ( - 5842929314C34B36000F8438 /* include */, 5842929C14C34B36000F8438 /* lib */, + 9615D84C2D5EDF530095F55A /* include */, ); path = "MySQL Client Libraries"; sourceTree = ""; }; - 5842929314C34B36000F8438 /* include */ = { - isa = PBXGroup; - children = ( - 269BA7DE249FC988005E4896 /* mysql */, - 5842929414C34B36000F8438 /* my_alloc.h */, - 5842929514C34B36000F8438 /* my_list.h */, - 5842929614C34B36000F8438 /* mysql.h */, - 5842929714C34B36000F8438 /* mysql_com.h */, - 5842929914C34B36000F8438 /* mysql_time.h */, - 5842929A14C34B36000F8438 /* mysql_version.h */, - 5842929B14C34B36000F8438 /* typelib.h */, - ); - path = include; - sourceTree = ""; - }; 5842929C14C34B36000F8438 /* lib */ = { isa = PBXGroup; children = ( - 269BA7EC249FDCB1005E4896 /* libssl.1.1.dylib */, - 269BA7EA249FDC97005E4896 /* libcrypto.1.1.dylib */, - 5842929D14C34B36000F8438 /* libmysqlclient.a */, + 9615D1582D4C18CB0095F55A /* libmysqlclient.24.dylib */, + 9615D15B2D4C26DD0095F55A /* libcrypto.3.dylib */, + 9615D15C2D4C26DD0095F55A /* libssl.3.dylib */, ); path = lib; sourceTree = ""; @@ -442,6 +437,10 @@ 58C009D214E31D1300AC489A /* Category Additions */ = { isa = PBXGroup; children = ( + 1A96314D25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.h */, + 1A96314C25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.m */, + 1A96314425B9CE6600BF2E91 /* SPMySQLArrayAdditions.h */, + 1A96314525B9CE6600BF2E91 /* SPMySQLArrayAdditions.m */, 58C009D314E31D3800AC489A /* SPMySQLStringAdditions.h */, 58C009D414E31D3800AC489A /* SPMySQLStringAdditions.m */, ); @@ -461,6 +460,57 @@ name = "Result Categories"; sourceTree = ""; }; + 9615D8382D5EDF530095F55A /* psi */ = { + isa = PBXGroup; + children = ( + 9615D8362D5EDF530095F55A /* psi_base.h */, + 9615D8372D5EDF530095F55A /* psi_memory.h */, + ); + path = psi; + sourceTree = ""; + }; + 9615D83C2D5EDF530095F55A /* mysql */ = { + isa = PBXGroup; + children = ( + 9615D8382D5EDF530095F55A /* psi */, + 9615D8392D5EDF530095F55A /* client_plugin.h */, + 9615D83A2D5EDF530095F55A /* plugin_auth_common.h */, + 9615D83B2D5EDF530095F55A /* udf_registration_types.h */, + ); + path = mysql; + sourceTree = ""; + }; + 9615D84C2D5EDF530095F55A /* include */ = { + isa = PBXGroup; + children = ( + 9615D83C2D5EDF530095F55A /* mysql */, + 9615D83D2D5EDF530095F55A /* errmsg.h */, + 9615D83E2D5EDF530095F55A /* field_types.h */, + 9615D83F2D5EDF530095F55A /* my_alloc.h */, + 9615D8402D5EDF530095F55A /* my_command.h */, + 9615D8412D5EDF530095F55A /* my_compress.h */, + 9615D8422D5EDF530095F55A /* my_list.h */, + 9615D8432D5EDF530095F55A /* mysql.h */, + 9615D8442D5EDF530095F55A /* mysql_com.h */, + 9615D8452D5EDF530095F55A /* mysql_time.h */, + 9615D8462D5EDF530095F55A /* mysql_version.h */, + 9615D8472D5EDF530095F55A /* mysqld_error.h */, + 9615D8482D5EDF530095F55A /* mysqlx_ername.h */, + 9615D8492D5EDF530095F55A /* mysqlx_error.h */, + 9615D84A2D5EDF530095F55A /* mysqlx_version.h */, + 9615D84B2D5EDF530095F55A /* typelib.h */, + ); + path = include; + sourceTree = ""; + }; + 96A5DDB12D63C8990079105E /* Frameworks */ = { + isa = PBXGroup; + children = ( + 96A5DDB22D63C89A0079105E /* libc++.tbd */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -468,25 +518,37 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 269BA7E5249FC988005E4896 /* plugin_auth_common.h in Headers */, 58428E0014BA5FAE000F8438 /* SPMySQLConnection.h in Headers */, 584294E414CB8002000F8438 /* SPMySQLConstants.h in Headers */, + 1A96314625B9CE6600BF2E91 /* SPMySQLArrayAdditions.h in Headers */, 584294F614CB8002000F8438 /* Querying & Preparation.h in Headers */, + 9615D84D2D5EDF530095F55A /* psi_base.h in Headers */, + 9615D84E2D5EDF530095F55A /* psi_memory.h in Headers */, + 9615D84F2D5EDF530095F55A /* client_plugin.h in Headers */, + 9615D8502D5EDF530095F55A /* plugin_auth_common.h in Headers */, + 9615D8512D5EDF530095F55A /* udf_registration_types.h in Headers */, + 9615D8522D5EDF530095F55A /* errmsg.h in Headers */, + 9615D8532D5EDF530095F55A /* field_types.h in Headers */, + 9615D8542D5EDF530095F55A /* my_alloc.h in Headers */, + 9615D8552D5EDF530095F55A /* my_command.h in Headers */, + 9615D8562D5EDF530095F55A /* my_compress.h in Headers */, + 9615D8572D5EDF530095F55A /* my_list.h in Headers */, + 9615D8582D5EDF530095F55A /* mysql.h in Headers */, + 9615D8592D5EDF530095F55A /* mysql_com.h in Headers */, + 9615D85A2D5EDF530095F55A /* mysql_time.h in Headers */, + 9615D85B2D5EDF530095F55A /* mysql_version.h in Headers */, + 9615D85C2D5EDF530095F55A /* mysqld_error.h in Headers */, + 9615D85D2D5EDF530095F55A /* mysqlx_ername.h in Headers */, + 9615D85E2D5EDF530095F55A /* mysqlx_error.h in Headers */, + 9615D85F2D5EDF530095F55A /* mysqlx_version.h in Headers */, + 9615D8602D5EDF530095F55A /* typelib.h in Headers */, 584294F014CB8002000F8438 /* Ping & KeepAlive.h in Headers */, 584294FA14CB8002000F8438 /* Encoding.h in Headers */, - 269BA7E9249FC988005E4896 /* psi_base.h in Headers */, 58C7C1E414DB6E4C00436315 /* SPMySQLFastStreamingResult.h in Headers */, 584294FE14CB8002000F8438 /* Server Info.h in Headers */, - 5842929F14C34B36000F8438 /* my_alloc.h in Headers */, - 584292A014C34B36000F8438 /* my_list.h in Headers */, 583C734A17A489CC0056B284 /* SPMySQLStreamingResultStoreDelegate.h in Headers */, - 584292A114C34B36000F8438 /* mysql.h in Headers */, - 269BA7E8249FC988005E4896 /* psi_memory.h in Headers */, - 584292A214C34B36000F8438 /* mysql_com.h in Headers */, 584F16A81752911200D150A6 /* SPMySQLStreamingResultStore.h in Headers */, - 584292A414C34B36000F8438 /* mysql_time.h in Headers */, - 584292A514C34B36000F8438 /* mysql_version.h in Headers */, - 584292A614C34B36000F8438 /* typelib.h in Headers */, + 1A96314F25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.h in Headers */, 5884127714CC63830078027F /* SPMySQL.h in Headers */, 588412A814CC7A4D0078027F /* Locking.h in Headers */, 5884142714CCF5190078027F /* Conversion.h in Headers */, @@ -497,7 +559,6 @@ 58C7C1E814DB6E8600436315 /* Field Definitions.h in Headers */, 58C006C814E0B18A00AC489A /* SPMySQLUtilities.h in Headers */, 58C008CD14E2AC7D00AC489A /* SPMySQLConnectionProxy.h in Headers */, - 269BA7E6249FC988005E4896 /* udf_registration_types.h in Headers */, 58C009D514E31D3800AC489A /* SPMySQLStringAdditions.h in Headers */, 58C00AA914E4869C00AC489A /* Max Packet Size.h in Headers */, 58C00AB514E4892E00AC489A /* Delegate & Proxy.h in Headers */, @@ -507,7 +568,6 @@ 586AA16714F30C5F007F82BF /* Convenience Methods.h in Headers */, 584D812E15057ECD00F24774 /* SPMySQLKeepAliveTimer.h in Headers */, 584D82551509775000F24774 /* Copying.h in Headers */, - 269BA7E7249FC988005E4896 /* client_plugin.h in Headers */, 58D2A4D116EDF1C6002EB401 /* SPMySQLEmptyResult.h in Headers */, 583C734D17B0778A0056B284 /* Data Conversion.h in Headers */, ); @@ -541,10 +601,10 @@ 8DC2EF500486A6940098B216 /* Headers */, 8DC2EF520486A6940098B216 /* Resources */, 8DC2EF540486A6940098B216 /* Sources */, - 8DC2EF560486A6940098B216 /* Frameworks */, 26F0BF1024A0052100A43B20 /* CopyFiles */, - 26F0BF1324A0053E00A43B20 /* ShellScript */, 26F0BF1424A0069300A43B20 /* ShellScript */, + 8DC2EF560486A6940098B216 /* Frameworks */, + 26F0BF1324A0053E00A43B20 /* ShellScript */, ); buildRules = ( ); @@ -562,7 +622,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1210; + LastUpgradeCheck = 1320; TargetAttributes = { 507FF1D41BC0D7D300104523 = { CreatedOnToolsVersion = 6.2; @@ -579,10 +639,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, - fr, - ja, Base, - de, ); mainGroup = 0867D691FE84028FC02AAC07 /* SPMySQLFramework */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -608,7 +665,6 @@ buildActionMask = 2147483647; files = ( 177916A21E88733000EE3043 /* LICENSE in Resources */, - 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -617,6 +673,7 @@ /* Begin PBXShellScriptBuildPhase section */ 26F0BF1324A0053E00A43B20 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 12; files = ( ); @@ -630,10 +687,11 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Create symlinks for all re-exported dylibs, at the framework's top level. They must be also relative to the framework directory.\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME\"\nln -Ffsv Versions/Current/lib*.dylib .\n"; + shellScript = "# Create symlinks for all re-exported dylibs, at the framework's top level. They must be also relative to the framework directory.\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME\"\n# ln -Ffsv Versions/Current/lib*.dylib .\n# ln -Ffsv Versions/Current/mysqlplugins .\n"; }; 26F0BF1424A0069300A43B20 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 12; files = ( ); @@ -647,7 +705,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/usr/bin/env bash\n\n# always need to do this\n# Make it so the SPMySQL executable can find the dylibs it was compiled with\necho \"running install_name_tool\"\npwd\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME/Versions/Current\" || exit 1;\npwd\notool -L SPMySQL\nCRYPTO=$(otool -L SPMySQL | grep libcrypto.1.1.dylib | cut -d' ' -f1)\nCRYPTO=\"${CRYPTO#\"${CRYPTO%%[![:space:]]*}\"}\" # remove leading whitespace characters\nCRYPTO=\"${CRYPTO%\"${CRYPTO##*[![:space:]]}\"}\" # remove trailing whitespace characters\n\necho \"CRYPTO: $CRYPTO\"\necho \"Setting @loader_path/libcrypto.1.1.dylib in SPMySQL\"\ninstall_name_tool -change \"$CRYPTO\" @loader_path/libcrypto.1.1.dylib SPMySQL\n\nSSL=$(otool -L SPMySQL | grep libssl.1.1.dylib | cut -d' ' -f1)\nSSL=\"${SSL#\"${SSL%%[![:space:]]*}\"}\" \nSSL=\"${SSL%\"${SSL##*[![:space:]]}\"}\" \necho \"SSL: $SSL\"\necho \"Setting @loader_path/libssl.1.1.dylib in SPMySQL\"\ninstall_name_tool -change \"$SSL\" @loader_path/libssl.1.1.dylib SPMySQL\notool -L SPMySQL\n\necho \"checking for new dylibs\"\ncd \"$SRCROOT\" || exit 1;\npwd\n\nNEW_LIBS=$(git diff --name-only --diff-filter=ACM -- *.dylib)\n\nif [ -z \"$NEW_LIBS\" ]; then\n echo \"no new dylibs, stopping\"\n exit 0;\nfi\n\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME/Versions/A\" || exit 1;\necho \"Setting libcrypto.1.1.dylib in libcrypto.1.1.dylib\"\ninstall_name_tool -id \"libcrypto.1.1.dylib\" libcrypto.1.1.dylib\n\nSSL=$(otool -L libssl.1.1.dylib | grep libssl.1.1.dylib | cut -d' ' -f1)\nSSL=\"${SSL#\"${SSL%%[![:space:]]*}\"}\" \nSSL=\"${SSL%\"${SSL##*[![:space:]]}\"}\" \necho \"SSL: $SSL\"\necho \"Setting libssl.1.1.dylib in libssl.1.1.dylib\"\ninstall_name_tool -id \"libssl.1.1.dylib\" libssl.1.1.dylib\n\nCRYPTO=$(otool -L libssl.1.1.dylib | grep libcrypto.1.1.dylib | cut -d' ' -f1)\nCRYPTO=\"${CRYPTO#\"${CRYPTO%%[![:space:]]*}\"}\" \nCRYPTO=\"${CRYPTO%\"${CRYPTO##*[![:space:]]}\"}\" \necho \"CRYPTO: $CRYPTO\"\necho \"Setting @loader_path/libcrypto.1.1.dylib in libssl.1.1.dylib\"\ninstall_name_tool -change \"$CRYPTO\" @loader_path/libcrypto.1.1.dylib libssl.1.1.dylib\notool -L lib*\n\n# no need for exit, if there are no new libs, we've already exited.\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME/Versions/Current\" || exit 1;\n\necho \"Codesigning libcrypto.1.1.dylib and libssl.1.1.dylib\"\n/usr/bin/codesign --force --sign \"Apple Development\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags \"libcrypto.1.1.dylib\"\n/usr/bin/codesign --force --sign \"Apple Development\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags \"libssl.1.1.dylib\"\n\necho \"Copying libcrypto.1.1.dylib and libssl.1.1.dylib to $SRCROOT/MySQL Client Libraries/lib\"\ncp libcrypto.1.1.dylib \"$SRCROOT/MySQL Client Libraries/lib\" || exit 1;\ncp libssl.1.1.dylib \"$SRCROOT/MySQL Client Libraries/lib\" || exit 1;\n"; + shellScript = "#!/usr/bin/env bash\n\n# always need to do this\n# Make it so the SPMySQL executable can find the dylibs it was compiled with\necho \"running install_name_tool\"\npwd\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME/Versions/Current\" || exit 1;\npwd\notool -L SPMySQL\n\nCRYPTO=$(otool -L SPMySQL | grep libcrypto.3.dylib | cut -d' ' -f1 | head -1)\nCRYPTO=\"${CRYPTO#\"${CRYPTO%%[![:space:]]*}\"}\" # remove leading whitespace characters\nCRYPTO=\"${CRYPTO%\"${CRYPTO##*[![:space:]]}\"}\" # remove trailing whitespace characters\necho \"CRYPTO: $CRYPTO\"\necho \"Setting @loader_path/libcrypto.3.dylib in SPMySQL\"\ninstall_name_tool -change \"$CRYPTO\" @loader_path/libcrypto.3.dylib SPMySQL\notool -L SPMySQL\n\nSSL=$(otool -L SPMySQL | grep libssl.3.dylib | cut -d' ' -f1 | head -1)\nSSL=\"${SSL#\"${SSL%%[![:space:]]*}\"}\" \nSSL=\"${SSL%\"${SSL##*[![:space:]]}\"}\" \necho \"SSL: $SSL\"\necho \"Setting @loader_path/libssl.3.dylib in SPMySQL\"\ninstall_name_tool -change \"$SSL\" @loader_path/libssl.3.dylib SPMySQL\notool -L SPMySQL\n\nMSL=$(otool -L SPMySQL | grep libmysqlclient.24.dylib | cut -d' ' -f1 | head -1)\nMSL=\"${MSL#\"${MSL%%[![:space:]]*}\"}\" \nMSL=\"${MSL%\"${MSL##*[![:space:]]}\"}\" \necho \"MSL: $MSL\"\necho \"Setting @loader_path/libmysqlclient.24.dylib in SPMySQL\"\ninstall_name_tool -change \"$MSL\" @loader_path/libmysqlclient.24.dylib SPMySQL\notool -L SPMySQL\n\necho \"checking for new dylibs\"\ncd \"$SRCROOT\" || exit 1;\npwd\n\nNEW_LIBS=$(git diff --name-only --diff-filter=ACM -- *.dylib)\n\nif [ -z \"$NEW_LIBS\" ]; then\n echo \"no new dylibs, stopping\"\n exit 0;\n fi\n\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME/Versions/A\" || exit 1;\necho \"Setting libcrypto.3.dylib in libcrypto.3.dylib\"\ninstall_name_tool -id \"libcrypto.3.dylib\" libcrypto.3.dylib\ninstall_name_tool -id \"libssl.3.dylib\" libssl.3.dylib\ninstall_name_tool -id \"libmysqlclient.24.dylib\" libmysqlclient.24.dylib\n\nwhile true; do\n CRYPTO=$(otool -L libssl.3.dylib | grep -v \"@loader_path\" | grep libcrypto.3.dylib | cut -d' ' -f1 | head -1)\n CRYPTO=\"${CRYPTO#\"${CRYPTO%%[![:space:]]*}\"}\" \n CRYPTO=\"${CRYPTO%\"${CRYPTO##*[![:space:]]}\"}\" \n\n # Exit the loop if CRYPTO is empty\n if [[ -z \"$CRYPTO\" ]]; then\n break\n fi\n\n echo \"CRYPTO: $CRYPTO\"\n echo \"Setting @loader_path/libcrypto.3.dylib in libssl.3.dylib (replacing $CRYPTO)\"\n install_name_tool -change \"$CRYPTO\" @loader_path/libcrypto.3.dylib libssl.3.dylib\ndone;\n\notool -L lib*\n\nwhile true; do\n SSL=$(otool -L libmysqlclient.24.dylib | grep -v \"@loader_path\" | grep libssl.3.dylib | cut -d' ' -f1 | head -1)\n SSL=\"${SSL#\"${SSL%%[![:space:]]*}\"}\" \n SSL=\"${SSL%\"${SSL##*[![:space:]]}\"}\" \n\n # Exit the loop if CRYPTO is empty\n if [[ -z \"$SSL\" ]]; then\n break\n fi\n\n echo \"Setting @loader_path/libssl.3.dylib in libmysqlclient.24.dylib (replacing $SSL)\"\n install_name_tool -change \"$SSL\" @loader_path/libssl.3.dylib libmysqlclient.24.dylib\ndone;\n\nwhile true; do\n CRYPTO=$(otool -L libmysqlclient.24.dylib | grep -v \"@loader_path\" | grep libcrypto.3.dylib | cut -d' ' -f1 | head -1)\n CRYPTO=\"${CRYPTO#\"${CRYPTO%%[![:space:]]*}\"}\" \n CRYPTO=\"${CRYPTO%\"${CRYPTO##*[![:space:]]}\"}\" \n\n # Exit the loop if CRYPTO is empty\n if [[ -z \"$CRYPTO\" ]]; then\n break\n fi\n\n echo \"Setting @loader_path/libcrypto.3.dylib in libmysqlclient.24.dylib (replacing $CRYPTO)\"\n install_name_tool -change \"$CRYPTO\" @loader_path/libcrypto.3.dylib libmysqlclient.24.dylib \ndone\n\n# no need for exit, if there are no new libs, we've already exited.\ncd \"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME/Versions/Current\" || exit 1;\n\necho \"Codesigning libcrypto.3.dylib, libssl.3.dylib, and libmysqlclient.24.dylib\"\n/usr/bin/codesign --force --sign \"Apple Development\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags \"libcrypto.3.dylib\"\n/usr/bin/codesign --force --sign \"Apple Development\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags \"libssl.3.dylib\"\n/usr/bin/codesign --force --sign \"Apple Development\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags \"libmysqlclient.24.dylib\"\n\necho \"Copying libcrypto.3.dylib, libssl.3.dylib, and libmysqlclient.24.dylib to $SRCROOT/MySQL Client Libraries/lib\"\ncp libcrypto.3.dylib \"$SRCROOT/MySQL Client Libraries/lib\" || exit 1;\ncp libssl.3.dylib \"$SRCROOT/MySQL Client Libraries/lib\" || exit 1;\ncp libmysqlclient.24.dylib \"$SRCROOT/MySQL Client Libraries/lib\" || exit 1;\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -657,6 +715,7 @@ buildActionMask = 2147483647; files = ( 507FF23D1BC157B500104523 /* SPMySQLStringAdditions_Tests.m in Sources */, + FD4211952918779400941BFE /* SPMySQLGeometryDataTests.m in Sources */, 507FF1E51BC0D82300104523 /* DataConversion_Tests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -672,6 +731,7 @@ 5884142814CCF5190078027F /* Conversion.m in Sources */, 5884159514D1A6880078027F /* Querying & Preparation.m in Sources */, 5884159414D1A6760078027F /* Locking.m in Sources */, + 1A96314E25B9CE9900BF2E91 /* SPMySQLMutableDictionaryAdditions.m in Sources */, 17E3A57C1885A286009CF372 /* SPMySQLDataTypes.m in Sources */, 5884165614D2306A0078027F /* SPMySQLResult.m in Sources */, 580A331F14D75CF7000D6933 /* SPMySQLGeometryData.m in Sources */, @@ -682,6 +742,7 @@ 58C00AB614E4892E00AC489A /* Delegate & Proxy.m in Sources */, 58C00BD214E7459600AC489A /* Databases & Tables.m in Sources */, 586A99FC14F02E21007F82BF /* SPMySQLStreamingResult.m in Sources */, + 1A96314725B9CE6600BF2E91 /* SPMySQLArrayAdditions.m in Sources */, 586AA16814F30C5F007F82BF /* Convenience Methods.m in Sources */, 584D812F15057ECD00F24774 /* SPMySQLKeepAliveTimer.m in Sources */, 584D82561509775000F24774 /* Copying.m in Sources */, @@ -701,17 +762,6 @@ }; /* End PBXTargetDependency section */ -/* Begin PBXVariantGroup section */ - 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 514D74A824B9FD2A00C08E48 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 1DEB91AE08733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; @@ -724,25 +774,26 @@ DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = NKQ4HJ66PX; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 20096; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/SPMySQLFramework_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GENERATE_PKGINFO_FILE = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; - LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; + LD_RUNPATH_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/MySQL Client Libraries/lib\"", ); - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; OTHER_LDFLAGS = "-lc++"; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql"; PRODUCT_NAME = SPMySQL; PROVISIONING_PROFILE_SPECIFIER = ""; - REEXPORTED_LIBRARY_NAMES = "crypto.1.1 ssl.1.1"; + REEXPORTED_LIBRARY_NAMES = "crypto.3 ssl.3"; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; @@ -759,23 +810,24 @@ DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = NKQ4HJ66PX; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 20096; FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/SPMySQLFramework_Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/MySQL Client Libraries/lib\"", ); - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; OTHER_LDFLAGS = "-lc++"; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql"; PRODUCT_NAME = SPMySQL; PROVISIONING_PROFILE_SPECIFIER = ""; - REEXPORTED_LIBRARY_NAMES = "crypto.1.1 ssl.1.1"; + REEXPORTED_LIBRARY_NAMES = "crypto.3 ssl.3"; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; @@ -805,9 +857,10 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = NO; ENABLE_TESTABILITY = YES; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -827,9 +880,10 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACH_O_TYPE = mh_dylib; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; @@ -857,8 +911,9 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = NO; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -877,8 +932,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACH_O_TYPE = mh_dylib; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; @@ -894,7 +950,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", @@ -908,7 +963,11 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; INFOPLIST_FILE = "SPMySQL Unit Tests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql-unittests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -927,7 +986,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -936,7 +994,11 @@ ); GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; INFOPLIST_FILE = "SPMySQL Unit Tests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql-unittests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -955,7 +1017,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -964,7 +1025,11 @@ ); GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; INFOPLIST_FILE = "SPMySQL Unit Tests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql-unittests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -995,8 +1060,9 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = NO; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1017,9 +1083,10 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACH_O_TYPE = mh_dylib; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = "Unit Testing"; }; @@ -1034,7 +1101,7 @@ DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = NKQ4HJ66PX; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 20096; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -1043,17 +1110,17 @@ GENERATE_PKGINFO_FILE = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; - LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; + LD_RUNPATH_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/MySQL Client Libraries/lib\"", ); - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; OTHER_LDFLAGS = "-lc++"; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql"; PRODUCT_NAME = SPMySQL; PROVISIONING_PROFILE_SPECIFIER = ""; - REEXPORTED_LIBRARY_NAMES = "crypto.1.1 ssl.1.1"; + REEXPORTED_LIBRARY_NAMES = "crypto.3 ssl.3"; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; @@ -1071,7 +1138,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", @@ -1085,7 +1151,11 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; INFOPLIST_FILE = "SPMySQL Unit Tests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql-unittests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1116,8 +1186,9 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = NO; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1136,8 +1207,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACH_O_TYPE = mh_dylib; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Distribution; }; @@ -1152,23 +1224,24 @@ DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = NKQ4HJ66PX; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 20096; FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/SPMySQLFramework_Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/MySQL Client Libraries/lib\"", ); - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; OTHER_LDFLAGS = "-lc++"; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql"; PRODUCT_NAME = SPMySQL; PROVISIONING_PROFILE_SPECIFIER = ""; - REEXPORTED_LIBRARY_NAMES = "crypto.1.1 ssl.1.1"; + REEXPORTED_LIBRARY_NAMES = "crypto.3 ssl.3"; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; @@ -1197,8 +1270,9 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CURRENT_PROJECT_VERSION = 20096; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = NO; - EXCLUDED_ARCHS = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1217,8 +1291,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACH_O_TYPE = mh_dylib; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; }; name = Beta; }; @@ -1233,23 +1308,24 @@ DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = NKQ4HJ66PX; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 20096; FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/SPMySQLFramework_Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/MySQL Client Libraries/lib\"", ); - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; OTHER_LDFLAGS = "-lc++"; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql"; PRODUCT_NAME = SPMySQL; PROVISIONING_PROFILE_SPECIFIER = ""; - REEXPORTED_LIBRARY_NAMES = "crypto.1.1 ssl.1.1"; + REEXPORTED_LIBRARY_NAMES = "crypto.3 ssl.3"; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; @@ -1267,7 +1343,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -1276,7 +1351,11 @@ ); GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; INFOPLIST_FILE = "SPMySQL Unit Tests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.sequel-ace.spmysql-unittests"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/xcshareddata/xcschemes/SPMySQL.framework.xcscheme b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/xcshareddata/xcschemes/SPMySQL.framework.xcscheme index 5383d9790..ee67abb2e 100644 --- a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/xcshareddata/xcschemes/SPMySQL.framework.xcscheme +++ b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/xcshareddata/xcschemes/SPMySQL.framework.xcscheme @@ -1,6 +1,6 @@ *)aProxy; @@ -60,14 +59,12 @@ @end - @interface SPMySQLConnection (Databases_and_Tables_Private_API) - (BOOL)_storeAndAlterEncodingToUTF8IfRequired; @end - @interface SPMySQLConnection (Max_Packet_Size_Private_API) - (NSInteger)_queryMaxAllowedPacketWithSQL:(NSString *)query resultInColumn:(NSUInteger)colIdx; @@ -78,7 +75,6 @@ @end - @interface SPMySQLConnection (Querying_and_Preparation_Private_API) - (void)_flushMultipleResultSets; @@ -89,7 +85,6 @@ @end - // SPMySQLResult Private API @interface SPMySQLResult (Private_API) diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLArrayAdditions.h b/Frameworks/SPMySQLFramework/Source/SPMySQLArrayAdditions.h new file mode 100644 index 000000000..bd6fa2109 --- /dev/null +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLArrayAdditions.h @@ -0,0 +1,27 @@ +// +// SPMySQLArrayAdditions.h +// Sequel Ace +// +// Created by James on 21/1/2021. +// Copyright © 2020-2022 Sequel-Ace. All rights reserved. +// + + +@interface NSArray (SPMySQLArrayAdditions) + +/** + * Variant of objectAtIndex: that avoids the "index out of bounds" exception by + * just returning nil instead. + * + * @warning This method is NOT thread-safe. + * @param idx An index + * @return The object located at index or nil. + */ +- (nullable id)SPsafeObjectAtIndex:(NSUInteger)idx; +@end + +@interface NSMutableArray (SPMutableArrayAdditions) + +- (void)SPsafeAddObject:(nullable id)obj; + +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLArrayAdditions.m b/Frameworks/SPMySQLFramework/Source/SPMySQLArrayAdditions.m new file mode 100644 index 000000000..33d49775c --- /dev/null +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLArrayAdditions.m @@ -0,0 +1,28 @@ +// +// SPMySQLArrayAdditions.m +// Sequel Ace +// +// Created by James on 21/1/2021. +// Copyright © 2020-2022 Sequel-Ace. All rights reserved. +// + +#import "SPMySQLArrayAdditions.h" + +@implementation NSArray (SPMySQLArrayAdditions) + +- (nullable id)SPsafeObjectAtIndex:(NSUInteger)idx +{ + return idx < self.count ? [self objectAtIndex:idx] : nil; +} + +@end + +@implementation NSMutableArray (SPMySQLMutableArrayAdditions) + +- (void)SPsafeAddObject:(nullable id)obj{ + if (obj != nil) { + [self addObject:obj]; + } +} + +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Copying.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Copying.h index 2105965da..9c2bb2944 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Copying.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Copying.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLConnection (Copying) @end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.h index 19185f16b..587380f2a 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLConnection (Databases_and_Tables) // Database selection diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m index 1e5c4bce2..fa5437f63 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m @@ -31,6 +31,7 @@ #import "Databases & Tables.h" #import "SPMySQL Private APIs.h" #import "SPMySQLStringAdditions.h" +#import "SPMySQLArrayAdditions.h" @implementation SPMySQLConnection (Databases_and_Tables) @@ -127,7 +128,7 @@ - (NSArray *)databasesLike:(NSString *)nameLikeString if (![self queryErrored]) { databaseList = [NSMutableArray arrayWithCapacity:(NSUInteger)[databaseResult numberOfRows]]; for (NSArray *dbRow in databaseResult) { - [databaseList addObject:[dbRow objectAtIndex:0]]; + [databaseList SPsafeAddObject:[dbRow firstObject]]; } } @@ -207,12 +208,13 @@ - (NSArray *)tablesLike:(NSString *)nameLikeString fromDatabase:(NSString *)aDat // Perform the query and record state SPMySQLResult *tableResult = [self queryString:tableQuery]; [tableResult setDefaultRowReturnType:SPMySQLResultRowAsArray]; + [tableResult setReturnDataAsStrings:YES]; // Retrieve the result into an array if the query was successful if (![self queryErrored]) { tableList = [NSMutableArray arrayWithCapacity:(NSUInteger)[tableResult numberOfRows]]; for (NSArray *tableRow in tableResult) { - [tableList addObject:[tableRow objectAtIndex:0]]; + [tableList SPsafeAddObject:[tableRow firstObject]]; } } @@ -239,11 +241,13 @@ @implementation SPMySQLConnection (Databases_and_Tables_Private_API) - (BOOL)_storeAndAlterEncodingToUTF8IfRequired { // If the encoding is already UTF8, no change is required. - if ([encoding isEqualToString:@"utf8"] && !encodingUsesLatin1Transport) return NO; + if ([encoding hasPrefix:@"utf8"] && !encodingUsesLatin1Transport) { + return NO; + } // Store the current encoding for restoration afterwards, and update encoding [self storeEncodingForRestoration]; - [self setEncoding:@"utf8"]; + [self setEncoding:@"utf8mb4"]; return YES; } diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h index 21423305f..ddfa6e5a9 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLConnection (Delegate_and_Proxy) // Connection delegage diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m index e40722ed5..2e960efb6 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m @@ -93,36 +93,49 @@ @implementation SPMySQLConnection (Delegate_and_Proxy_Private_API) */ - (void)_proxyStateChange:(NSObject *)aProxy { + SPLog(@"_proxyStateChange"); + NSThread *reconnectionThread; // Perform no actions if this isn't the current connection proxy, or if notifications // are currently set to be ignored - if (aProxy != proxy || proxyStateChangeNotificationsIgnored) return; + if (aProxy != proxy || proxyStateChangeNotificationsIgnored){ + SPLog(@"aProxy != proxy || proxyStateChangeNotificationsIgnored, returning"); + return; + } SPMySQLConnectionProxyState newState = [aProxy state]; - + + SPLog(@"state = %i", newState); + // If the connection proxy disconnects, trigger a reconnect; use a new thread to allow the // main thread to process events as required. if (state == SPMySQLConnected && newState == SPMySQLProxyIdle && previousProxyState == SPMySQLProxyConnected) { + SPLog(@"state == SPMySQLConnected && newState == SPMySQLProxyIdle && previousProxyState == SPMySQLProxyConnected"); + // Clear the state change selector on the proxy until a connection is re-established proxyStateChangeNotificationsIgnored = YES; // Trigger a reconnect depending on connection usage recently. If the connection has // actively been used in the last couple of minutes, trigger a full reconnection attempt. if (_timeIntervalSinceMonotonicTime(lastConnectionUsedTime) < 60 * 2) { + SPLog(@"If the connection has actively been used in the last couple of minutes, trigger a full reconnection attempt"); + SPLog(@"create new reconnectionThread"); reconnectionThread = [[NSThread alloc] initWithTarget:self selector:@selector(_reconnectAllowingRetries:) object:@YES]; [reconnectionThread setName:@"SPMySQL reconnection thread (full)"]; [reconnectionThread start]; // If used within the last fifteen minutes, trigger a background/single reconnection attempt } else if (_timeIntervalSinceMonotonicTime(lastConnectionUsedTime) < 60 * 15) { + SPLog(@"If used within the last fifteen minutes, trigger a background/single reconnection attempt"); reconnectionThread = [[NSThread alloc] initWithTarget:self selector:@selector(_reconnectAfterBackgroundConnectionLoss) object:nil]; [reconnectionThread setName:@"SPMySQL reconnection thread (limited)"]; [reconnectionThread start]; // Otherwise set the state to connection lost for automatic reconnect on next use } else { + SPLog(@"Otherwise set the state to connection lost for automatic reconnect on next use"); state = SPMySQLConnectionLostInBackground; } } @@ -151,7 +164,21 @@ - (SPMySQLConnectionLostDecision)_delegateDecisionForLostConnection } else { // First check whether the application is in a modal state; if so, wait - while ([NSApp modalWindow]) usleep(100000); + do { + NSWindow __block *modalWindow = nil; + + dispatch_sync(dispatch_get_main_queue(), ^{ + modalWindow = [NSApp modalWindow]; + }); + + if(modalWindow == nil){ + break; + } + else{ + usleep(100000); + } + + } while(0); [self performSelectorOnMainThread:@selector(_delegateDecisionForLostConnection) withObject:nil waitUntilDone:YES]; [delegateDecisionLock lock]; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.h index dab5a7f5b..6a8265ed8 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLConnection (Encoding) // Current connection encoding information diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m index 376723870..4da159554 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m @@ -28,7 +28,6 @@ // // More info at - #import "Encoding.h" #import "SPMySQLStringAdditions.h" @@ -82,11 +81,6 @@ - (BOOL)encodingUsesLatin1Transport */ - (BOOL)setEncoding:(NSString *)theEncoding { - // MySQL versions prior to 4.1 don't support encoding changes; return NO on those - // versions. - if (![self serverVersionIsGreaterThanOrEqualTo:4 minorVersion:1 releaseVersion:0]) { - return NO; - } // If the supplied encoding is already set, return success if ([encoding isEqualToString:theEncoding] && !encodingUsesLatin1Transport) { @@ -121,12 +115,6 @@ - (BOOL)setEncoding:(NSString *)theEncoding */ - (BOOL)setEncodingUsesLatin1Transport:(BOOL)useLatin1 { - // MySQL versions prior to 4.1 don't support encoding changes; return NO on those - // versions. - if (![self serverVersionIsGreaterThanOrEqualTo:4 minorVersion:1 releaseVersion:0]) { - return NO; - } - // If the Latin1 mode is already set, return success if (encodingUsesLatin1Transport == useLatin1) { return YES; @@ -162,7 +150,6 @@ - (BOOL)setEncodingUsesLatin1Transport:(BOOL)useLatin1 #pragma mark - #pragma mark Encoding storage and restoration - /** * Store a previous encoding setting, to allow it to be easily restored * later - used when the encoding needs to be temporarily changed. @@ -205,7 +192,11 @@ - (void)restoreStoredEncoding + (NSStringEncoding)stringEncodingForMySQLCharset:(const char *)mysqlCharset { // Handle the most common cases first - if (!strcmp(mysqlCharset, "utf8")) { + if (!strcmp(mysqlCharset, "utf8mb4")) { + return NSUTF8StringEncoding; + } else if (!strcmp(mysqlCharset, "utf8mb3")) { + return NSUTF8StringEncoding; + } else if (!strcmp(mysqlCharset, "utf8")) { return NSUTF8StringEncoding; } else if (!strcmp(mysqlCharset, "latin1")) { return NSWindowsCP1252StringEncoding; // Warning: This is NOT the same as ISO-8859-1 (aka "ISO Latin 1") @@ -257,8 +248,6 @@ + (NSStringEncoding)stringEncodingForMySQLCharset:(const char *)mysqlCharset return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingDOSLatin2); } else if (!strcmp(mysqlCharset, "latin7")) { return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin7); - } else if (!strcmp(mysqlCharset, "utf8mb4")) { - return NSUTF8StringEncoding; } else if (!strcmp(mysqlCharset, "cp1251")) { return NSWindowsCP1251StringEncoding; } else if (!strcmp(mysqlCharset, "utf16")) { @@ -342,8 +331,8 @@ + (NSString *)mySQLCharsetForStringEncoding:(NSStringEncoding)aStringEncoding case NSJapaneseEUCStringEncoding: return @"ujis"; - case NSUTF8StringEncoding: - return @"utf8"; + case NSUTF8StringEncoding: + return @"utf8"; case NSISOLatin1StringEncoding: return @"latin1"; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Locking.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Locking.m index fd33b3e4f..535fffe67 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Locking.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Locking.m @@ -35,7 +35,6 @@ @implementation SPMySQLConnection (Locking) - /** * Lock the connection. This must be done before performing any operation * that is not thread safe, eg. performing queries or pinging. @@ -67,7 +66,6 @@ - (BOOL)_tryLockConnection return YES; } - /** * Unlock the connection. */ @@ -80,7 +78,7 @@ - (void)_unlockConnection // it means the connection may have been unlocked twice. This is // potentially dangerous, so we log this to the console if ([connectionLock condition] != SPMySQLConnectionBusy) { - NSLog(@"SPMySQLConnection: Tried to unlock the connection, but it wasn't locked."); + SPLog(@"SPMySQLConnection: Tried to unlock the connection, but it wasn't locked."); } // Since we connected with CLIENT_MULTI_RESULT, we must make sure there are not more results! @@ -92,7 +90,7 @@ - (void)_unlockConnection mySQLConnection->net.buff && mysql_more_results(mySQLConnection) ) { - NSLog(@"SPMySQLConnection: Discarding unretrieved results. This is currently normal when using CALL."); + SPLog(@"SPMySQLConnection: Discarding unretrieved results. This is currently normal when using CALL."); [self _flushMultipleResultSets]; } diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.h index 13dacf180..2d4efd4b9 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLConnection (Max_Packet_Size) - (NSUInteger)maxQuerySize; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m index f9271439d..a0590e8c1 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m @@ -28,9 +28,9 @@ // // More info at - #import "Max Packet Size.h" #import "SPMySQL Private APIs.h" +#import "SPMySQLArrayAdditions.h" @implementation SPMySQLConnection (Max_Packet_Size) @@ -109,7 +109,7 @@ - (NSInteger)_queryMaxAllowedPacketWithSQL:(NSString *)query resultInColumn:(NSU [result setReturnDataAsStrings:YES]; // Get the maximum size string - NSString *maxQuerySizeString = [[result getRowAsArray] objectAtIndex:colIdx]; + NSString *maxQuerySizeString = [[result getRowAsArray] SPsafeObjectAtIndex:colIdx]; NSInteger _maxQuerySize = maxQuerySizeString ? [maxQuerySizeString integerValue] : 0; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m index e4af93970..cf7b485a1 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m @@ -28,7 +28,6 @@ // // More info at - #import "Ping & KeepAlive.h" #import "SPMySQL Private APIs.h" #import "Locking.h" @@ -69,6 +68,12 @@ - (void)_keepAlive return; } + // If we've had too many ping failures, don't keep trying + if (keepAlivePingFailures >= 3) { + state = SPMySQLConnectionLostInBackground; + return; + } + // Attempt to lock the connection. If the connection is currently busy, // we don't need a ping. if (![self _tryLockConnection]) return; @@ -144,6 +149,8 @@ - (void)_threadedKeepAlive */ - (BOOL)_pingConnectionUsingLoopDelay:(NSUInteger)loopDelay { + SPLog(@"_pingConnectionUsingLoopDelay"); + if (state != SPMySQLConnected) return NO; uint64_t pingStartTime_t; @@ -154,6 +161,7 @@ - (BOOL)_pingConnectionUsingLoopDelay:(NSUInteger)loopDelay [self _lockConnection]; //we might find ourselves at the losing end of a contest with -[self _disconnect] if(!mySQLConnection) { + SPLog(@"!mySQLConnection, calling _unlockConnection, return NO"); [self _unlockConnection]; return NO; } @@ -175,6 +183,7 @@ - (BOOL)_pingConnectionUsingLoopDelay:(NSUInteger)loopDelay .parentId = (__bridge void *)(self) }; + // Create a pthread for the ping pthread_t keepAlivePingThread_t; @@ -210,7 +219,11 @@ - (BOOL)_pingConnectionUsingLoopDelay:(NSUInteger)loopDelay keepAliveLastPingBlocked = YES; } } while (keepAlivePingThreadActive); - + + + SPLog(@"threadCancelled: %d", threadCancelled); + SPLog(@"pingElapsedTime: %f", pingElapsedTime); + //wait for thread to go away, otherwise pingDetails may go away before _pingThreadCleanup() finishes pthread_join(keepAlivePingThread_t, NULL); @@ -221,6 +234,8 @@ - (BOOL)_pingConnectionUsingLoopDelay:(NSUInteger)loopDelay // Unlock the connection [self _unlockConnection]; + SPLog(@"keepAliveLastPingSuccess: %d", keepAliveLastPingSuccess); + return keepAliveLastPingSuccess; } @@ -232,6 +247,8 @@ - (BOOL)_pingConnectionUsingLoopDelay:(NSUInteger)loopDelay */ void _backgroundPingTask(void *ptr) { + SPLog(@"_backgroundPingTask"); + SPMySQLConnectionPingDetails *pingDetails = (SPMySQLConnectionPingDetails *)ptr; char threadNameBuf[80]; @@ -247,6 +264,11 @@ void _backgroundPingTask(void *ptr) // Set up a signal handler for SIGUSR1, to handle forced timeouts. signal(SIGUSR1, _forceThreadExit); +#ifdef DEBUG + BOOL ret = (BOOL)(!mysql_ping(pingDetails->mySQLConnection)); + SPLog(@"mysql_ping retcode = %d", ret); +#endif + // Perform a ping *(pingDetails->keepAliveLastPingSuccessPointer) = (BOOL)(!mysql_ping(pingDetails->mySQLConnection)); @@ -287,6 +309,8 @@ void _pingThreadCleanup(void *pingDetails) */ - (BOOL)_cancelKeepAlives { + SPLog(@"_cancelKeepAlives"); + // If no keepalive thread is active, return if (keepAliveThread) { diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.h index a595cfb20..3e0e97bee 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLConnection (Querying_and_Preparation) // Data preparation @@ -61,7 +60,6 @@ // Query cancellation - (void)cancelCurrentQuery; -- (BOOL)lastQueryWasCancelledUsingReconnect; @end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m index 17971962e..df4329194 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m @@ -28,9 +28,9 @@ // // More info at - #import "SPMySQLConnection.h" #import "SPMySQL Private APIs.h" +#import "SPMySQLArrayAdditions.h" @implementation SPMySQLConnection (Querying_and_Preparation) @@ -43,7 +43,6 @@ @implementation SPMySQLConnection (Querying_and_Preparation) * as they use the current connection encoding to quote characters. */ - /** * Take a string, escapes any special character, and surrounds it with single quotes * for safe use within a query; correctly escapes any characters within the string @@ -85,21 +84,38 @@ - (NSString *)escapeString:(NSString *)theString includingQuotes:(BOOL)includeQu NSData *cData = [theString dataUsingEncoding:stringEncoding allowLossyConversion:YES]; NSUInteger cDataLength = [cData length]; - // Create a buffer for mysql_real_escape_string to place the converted string into; - // the max length is 2*length (if every character was quoted) + 2 (quotes/terminator). + // Create a buffer for mysql_real_escape_string to place the converted string into. + // MySQL requires 2*length (if every character was quoted) + 1 (null terminator) bytes. + // We add one more byte for the leading quote we're adding, and replace the null + // terminator with the trailing quote. // Adding quotes in this way makes the logic below *slightly* harder to follow but // makes the addition of the quotes almost free, which is much nicer when building // lots of strings. - char *escBuffer = (char *)malloc((cDataLength * 2) + 2); + NSUInteger mallocSize = (cDataLength * 2) + 2; + char *escBuffer = (char *)malloc(mallocSize); // Use mysql_real_escape_string to perform the escape, starting one character in NSUInteger escapedLength = mysql_real_escape_string(mySQLConnection, escBuffer+1, [cData bytes], cDataLength); + // Deal with mysql_real_escape_string errors, such as NO_BACKSLASH_ESCAPES SQL mode being enabled + // https://dev.mysql.com/doc/c-api/8.0/en/mysql-real-escape-string.html + if (escapedLength == (unsigned long)-1) { + NSUInteger theErrorID = mysql_errno(mySQLConnection); + if (theErrorID == CR_INSECURE_API_ERR) { + escapedLength = mysql_real_escape_string_quote(mySQLConnection, escBuffer+1, [cData bytes], cDataLength, '\''); + } else { + NSString *theErrorMessage = [self _stringForCString:mysql_error(mySQLConnection)]; + SPLog(@"[escapeString:includingQuotes]: Unhandled error code %lu returned by mysql_real_escape_string: %@", theErrorID, theErrorMessage); + NSAssert(0 != 0, @"Unhandled error code returned by mysql_real_escape_string"); + free(escBuffer); + return nil; + } + } + // Set up an NSData object to allow conversion back to NSString while preserving // any nul characters contained in the string. NSData *escapedData; if (includeQuotes) { - #warning This code assumes that the encoding cData is in is still ASCII-compatible which may not be the case (e.g. for UTF16, EBCDIC) // Add quotes if requested escBuffer[0] = '\''; @@ -235,7 +251,6 @@ - (id)queryString:(NSString *)theQueryString usingEncoding:(NSStringEncoding)the NSUInteger theErrorID; NSString *theSqlstate; lastQueryWasCancelled = NO; - lastQueryWasCancelledUsingReconnect = NO; // If a disconnect was requested, cancel the action if (userTriggeredDisconnect) { @@ -357,7 +372,7 @@ - (id)queryString:(NSString *)theQueryString usingEncoding:(NSStringEncoding)the // update the affected row count. case SPMySQLResultAsResult: mysqlResult = mysql_store_result(mySQLConnection); - theResult = [[SPMySQLResult alloc] initWithMySQLResult:mysqlResult stringEncoding:theEncoding]; + theResult = [[SPMySQLResult alloc] initWithMySQLResult:mysqlResult stringEncoding:theEncoding version:self.serverMajorVersion]; theAffectedRowCount = mysql_affected_rows(mySQLConnection); break; @@ -399,14 +414,6 @@ - (id)queryString:(NSString *)theQueryString usingEncoding:(NSStringEncoding)the theErrorMessage = NSLocalizedString(@"Query cancelled.", @"Query cancelled error"); theErrorID = 1317; theSqlstate = @"70100"; - - // If the query was cancelled on a MySQL <5 server, check the connection to allow reconnects - // after query kills. This is also handled within the class for internal cancellations, but - // as other external classes may also cancel the query. - if (![self serverVersionIsGreaterThanOrEqualTo:5 minorVersion:0 releaseVersion:0]) { - [self _unlockConnection]; - [self checkConnection]; - } } // Unlock the connection if appropriate - if not a streaming result type. @@ -450,7 +457,7 @@ - (NSArray *)getAllRowsFromQuery:(NSString *)theQueryString */ - (id)getFirstFieldFromQuery:(NSString *)theQueryString { - return [[[self queryString:theQueryString] getRowAsArray] objectAtIndex:0]; + return [[[self queryString:theQueryString] getRowAsArray] firstObject]; } #pragma mark - @@ -548,6 +555,7 @@ + (BOOL)isErrorIDConnectionError:(NSUInteger)theErrorID */ - (void)cancelCurrentQuery { + SPLog(@"cancelCurrentQuery"); // If not connected, no action is required if (state != SPMySQLConnected && state != SPMySQLDisconnecting) return; @@ -562,17 +570,19 @@ - (void)cancelCurrentQuery // The query cancellation cannot occur on the connection actively running a query // so set up a new connection to run the KILL command. - MYSQL *killerConnection = [self _makeRawMySQLConnectionWithEncoding:@"utf8" isMasterConnection:NO]; + MYSQL *killerConnection = [self _makeRawMySQLConnectionWithEncoding:@"utf8mb4" isMasterConnection:NO]; // If the new connection was successfully set up, use it to run a KILL command. if (killerConnection) { NSStringEncoding aStringEncoding = [SPMySQLConnection stringEncodingForMySQLCharset:mysql_character_set_name(killerConnection)]; - BOOL killQuerySupported = [self serverVersionIsGreaterThanOrEqualTo:5 minorVersion:0 releaseVersion:0]; // Build the kill query NSMutableString *killQuery = [NSMutableString stringWithString:@"KILL"]; - if (killQuerySupported) [killQuery appendString:@" QUERY"]; - [killQuery appendFormat:@" %lu", mySQLConnection->thread_id]; + if ([[self serverVersionString] rangeOfString:@"TiDB"].location != NSNotFound) { + [killQuery appendString:@" TIDB"]; + NSLog(@"SPMySQL Framework: Killing Query in TIDB Mode"); + } + [killQuery appendFormat:@" QUERY %lu", mySQLConnection->thread_id]; // Convert to a C string NSUInteger killQueryCStringLength; @@ -586,24 +596,14 @@ - (void)cancelCurrentQuery // If the kill query succeeded, the active query was cancelled. if (killQueryStatus == 0) { - - // On MySQL < 5, the entire connection will have been reset. Ensure it's - // restored. - if (!killQuerySupported) { - [self checkConnection]; - lastQueryWasCancelledUsingReconnect = YES; - } else { - lastQueryWasCancelledUsingReconnect = NO; - } - // Ensure the tracking bool is re-set to cover encompassed queries and return lastQueryWasCancelled = YES; return; } else { - NSLog(@"SPMySQL Framework: query cancellation failed due to cancellation query error (status %d)", killQueryStatus); + SPLog(@"SPMySQL Framework: query cancellation failed due to cancellation query error (status %d) - %lu", killQueryStatus, mySQLConnection->thread_id); } } else if (!userTriggeredDisconnect) { - NSLog(@"SPMySQL Framework: query cancellation failed because connection failed"); + SPLog(@"SPMySQL Framework: query cancellation failed because connection failed - %lu", mySQLConnection->thread_id); } // A full reconnect is required at this point to force a cancellation. As the @@ -625,18 +625,6 @@ - (void)cancelCurrentQuery // Reset tracking bools to cover encompassed queries lastQueryWasCancelled = YES; - lastQueryWasCancelledUsingReconnect = YES; -} - -/** - * If the last query was cancelled, returns whether that query cancellation - * required the connection to be reset or whether the query was successfully - * cancelled leaving the connection intact. - * If the last query was not cancelled, this will return NO. - */ -- (BOOL)lastQueryWasCancelledUsingReconnect -{ - return lastQueryWasCancelledUsingReconnect; } @end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m index ea1c3c0fd..6511dfb91 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m @@ -28,7 +28,6 @@ // // More info at - #import "Server Info.h" #import "SPMySQL Private APIs.h" @@ -120,7 +119,7 @@ - (SPMySQLResult *)listProcesses lastConnectionUsedTime = _monotonicTime(); // Convert to SPMySQLResult - SPMySQLResult *theResult = [[SPMySQLResult alloc] initWithMySQLResult:mysqlResult stringEncoding:stringEncoding]; + SPMySQLResult *theResult = [[SPMySQLResult alloc] initWithMySQLResult:mysqlResult stringEncoding:stringEncoding version: self.serverMajorVersion]; // Unlock and return [self _unlockConnection]; @@ -138,10 +137,13 @@ - (BOOL)killQueryOnThreadID:(unsigned long)theThreadID { // Note that mysql_kill has been deprecated, so use a query to perform this task. NSMutableString *killQuery = [NSMutableString stringWithString:@"KILL"]; - if ([self serverVersionIsGreaterThanOrEqualTo:5 minorVersion:0 releaseVersion:0]) { - [killQuery appendString:@" QUERY"]; + + //Special suppot for TiDB SQL variant + if ([[self serverVersionString] rangeOfString:@"TiDB"].location != NSNotFound) { + [killQuery appendString:@" TIDB"]; } - [killQuery appendFormat:@" %lu", theThreadID]; + + [killQuery appendFormat:@" QUERY %lu", theThreadID]; // Run the query [self queryString:killQuery]; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h index 5d2530167..4e49769e1 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h @@ -33,7 +33,7 @@ @interface SPMySQLConnection : NSObject { // Delegate - NSObject *delegate; + __weak NSObject *delegate; BOOL delegateSupportsWillQueryString; BOOL delegateSupportsConnectionLost; BOOL delegateQueryLogging; // Defaults to YES if protocol implemented @@ -118,7 +118,6 @@ // Query cancellation details BOOL lastQueryWasCancelled; - BOOL lastQueryWasCancelledUsingReconnect; // Timing details uint64_t lastConnectionUsedTime; @@ -167,7 +166,7 @@ * their preference (earlier = better). * A value of nil (default) means SPMySQL will use its built-in cipher list. */ -@property (readwrite, retain) NSString *sslCipherList; +@property (readwrite, copy) NSString *sslCipherList; @property (readwrite, assign) NSUInteger timeout; @property (readwrite, assign) BOOL useKeepAlive; @@ -205,6 +204,7 @@ - (double)timeConnected; - (BOOL)userTriggeredDisconnect; - (BOOL)isNotMariadb103; +- (BOOL)isMariaDB; #pragma mark - #pragma mark Connection utility diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m index fd62ea8f3..9f8f22a0c 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m @@ -34,6 +34,8 @@ #include #include #import "SPMySQLUtilities.h" +#import "SPMySQLArrayAdditions.h" +#import "SPMySQLMutableDictionaryAdditions.h" @interface SPMySQLConnection () @@ -56,7 +58,6 @@ @interface SPMySQLConnection () // List of permissible ciphers to use for SSL connections const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RSA-AES128-SHA:AES128-SHA:AES256-RMD:AES128-RMD:DES-CBC3-RMD:DHE-RSA-AES256-RMD:DHE-RSA-AES128-RMD:DHE-RSA-DES-CBC3-RMD:RC4-SHA:RC4-MD5:DES-CBC3-SHA:DES-CBC-SHA:EDH-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC-SHA"; - @implementation SPMySQLConnection #pragma mark - @@ -124,7 +125,7 @@ + (void)initialize * Typically initialisation would be followed by setting the connection details * and then calling -connect. */ -- (id)init +- (instancetype)init { if ((self = [super init])) { mySQLConnection = NULL; @@ -160,7 +161,7 @@ - (id)init keepAliveLastPingBlocked = NO; // Set up default encoding variables - encoding = @"utf8"; + encoding = @"utf8mb4"; stringEncoding = NSUTF8StringEncoding; encodingUsesLatin1Transport = NO; encodingToRestore = nil; @@ -194,7 +195,6 @@ - (id)init // Start with empty cancellation details lastQueryWasCancelled = NO; - lastQueryWasCancelledUsingReconnect = NO; // Empty or reset the timing variables lastConnectionUsedTime = 0; @@ -265,6 +265,8 @@ - (void) dealloc */ - (BOOL)connect { + SPLog(@"connect"); + userTriggeredDisconnect = NO; return [self _connect]; } @@ -281,6 +283,7 @@ - (BOOL)connect */ - (BOOL)reconnect { + SPLog(@"reconnect"); userTriggeredDisconnect = NO; return [self _reconnectAllowingRetries:YES]; } @@ -290,6 +293,7 @@ - (BOOL)reconnect */ - (void)disconnect { + SPLog(@"calling _disconnect"); userTriggeredDisconnect = YES; [self _disconnect]; } @@ -306,6 +310,7 @@ - (BOOL)isConnected { // If the connection has been allowed to drop in the background, restore it if posslbe if (state == SPMySQLConnectionLostInBackground) { + SPLog(@"SPMySQLConnectionLostInBackground, reconnecting"); [self _reconnectAllowingRetries:YES]; } @@ -332,29 +337,41 @@ - (BOOL)isConnectedViaSSL */ - (BOOL)checkConnection { + SPLog(@"checkConnection"); + // If the connection is not seen as active, don't proceed - if (state != SPMySQLConnected) return NO; + if (state != SPMySQLConnected){ + SPLog(@"state != SPMySQLConnected, returning NO"); + return NO; + } // Similarly, if the connection is currently locked, that indicates it's in use. This // could be because queries are actively being run, or that a ping is running. if ([connectionLock condition] == SPMySQLConnectionBusy) { + SPLog(@"SPMySQLConnectionBusy"); // If a ping thread is not active queries are being performed - return success. if (!keepAlivePingThreadActive) return YES; // If a ping thread is active, wait for it to complete before checking the connection + SPLog(@"ping thread is active, wait for it to complete before checking the connection"); + while (keepAlivePingThreadActive) { usleep(10000); } } + + SPLog(@"calling _pingConnectionUsingLoopDelay"); // Confirm whether the connection is still responding by using a ping BOOL connectionVerified = [self _pingConnectionUsingLoopDelay:400]; + SPLog(@"_pingConnectionUsingLoopDelay finished"); // If the connection didn't respond, trigger a reconnect. This will automatically // attempt to reconnect once, and if that fails will ask the user how to proceed - whether // to keep reconnecting, or whether to disconnect. if (!connectionVerified) { + SPLog(@"!connectionVerified, calling _reconnectAllowingRetries"); connectionVerified = [self _reconnectAllowingRetries:YES]; } @@ -383,6 +400,7 @@ - (BOOL)checkConnectionIfNecessary // If the connection has been dropped in the background, trigger a // reconnect and return the success state here if (state == SPMySQLConnectionLostInBackground) { + SPLog(@"SPMySQLConnectionLostInBackground, calling _reconnectAllowingRetries"); return [self _reconnectAllowingRetries:YES]; } @@ -434,6 +452,18 @@ - (BOOL)isNotMariadb103 return true; } +- (BOOL) isMariaDB +{ + serverVariableVersion = [[NSString alloc] initWithCString:mysql_get_server_info(mySQLConnection) encoding:NSISOLatin1StringEncoding]; + // See more: https://regex101.com/r/0QRlsG/1 + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", @"(^.*)-[mariadb].*"]; + if ([predicate evaluateWithObject: [serverVariableVersion lowercaseString]]){ + return true; + } + + return false; +} + #pragma mark - #pragma mark General connection utilities @@ -465,6 +495,35 @@ + (NSString *)findSocketPath return nil; } +- (void)updateTimeZoneIdentifier:(NSString *)timeZoneIdentifier { + if ([timeZoneIdentifier isEqualToString:self.timeZoneIdentifier]) { + return; + } + + self.timeZoneIdentifier = nil; + if (!timeZoneIdentifier || [timeZoneIdentifier isEqualToString:@""]) { + [self queryString:[NSString stringWithFormat:@"SET time_zone = @@GLOBAL.time_zone"]]; + } else { + [self queryString:[NSString stringWithFormat:@"SET time_zone = %@", [timeZoneIdentifier mySQLTickQuotedString]]]; + if ([self lastErrorMessage] == nil) { + self.timeZoneIdentifier = timeZoneIdentifier; + } + else{ + NSMutableString *lastErrorMessage = [[NSMutableString alloc] init]; + [lastErrorMessage setString:[self lastErrorMessage]]; + SPLog(@"Failed to set time_zone. Error: %@", lastErrorMessage); + self.timeZoneIdentifier = nil; + if (delegate && [delegate respondsToSelector:@selector(queryGaveError:connection:)]) { + [delegate queryGaveError:lastErrorMessage connection:self]; + } + if ([delegate respondsToSelector:@selector(showErrorWithTitle:message:)]) { + [lastErrorMessage appendString:NSLocalizedString(@"\n\ntime_zone will be set to SYSTEM.", @"\n\ntime_zone will be set to SYSTEM.")]; + [delegate showErrorWithTitle:NSLocalizedString(@"Error", @"error") message:lastErrorMessage]; + } + } + } +} + @end #pragma mark - @@ -482,13 +541,16 @@ @implementation SPMySQLConnection (PrivateAPI) */ - (BOOL)_connect { + SPLog(@"_connect"); + // If a connection is already active in some form, throw an exception if (state != SPMySQLDisconnected && state != SPMySQLConnectionLostInBackground) { @synchronized (self) { double diff = _timeIntervalSinceMonotonicTime(initialConnectTime); asprintf(&__crashreporter_info__, "Attempted to connect a connection that is not disconnected (SPMySQLConnectionState=%d).\nIf state==2: Previous connection made %lfs ago from: %s", state, diff, [_debugLastConnectedEvent cStringUsingEncoding:NSUTF8StringEncoding]); - __builtin_trap(); + SPLog(@"Attempted to connect a connection that is not disconnected (SPMySQLConnectionState=%d).\nIf state==2: Previous connection made %lfs ago from: %s", state, diff, [_debugLastConnectedEvent cStringUsingEncoding:NSUTF8StringEncoding]); } + [NSException raise:NSInternalInconsistencyException format:@"Attempted to connect a connection that is not disconnected (SPMySQLConnectionState=%d).", state]; return NO; } @@ -506,6 +568,8 @@ - (BOOL)_connect // If the connection failed, reset state and return if (!mySQLConnection) { + SPLog(@"!mySQLConnection, unlock"); + [self _unlockConnection]; state = SPMySQLDisconnected; return NO; @@ -542,8 +606,7 @@ - (BOOL)_connect serverVersionNumber = mysql_get_server_version(mySQLConnection); // Update SSL state - connectedWithSSL = NO; - if (useSSL) connectedWithSSL = (mysql_get_ssl_cipher(mySQLConnection))?YES:NO; + connectedWithSSL = (mysql_get_ssl_cipher(mySQLConnection))?YES:NO; if (useSSL && !connectedWithSSL) { if ([delegate respondsToSelector:@selector(connectionFellBackToNonSSL:)]) { [delegate connectionFellBackToNonSSL:self]; @@ -594,6 +657,15 @@ - (MYSQL *)_makeRawMySQLConnectionWithEncoding:(NSString *)encodingName isMaster // options, encodings and connection state. bool falseMyBool = FALSE; mysql_options(theConnection, MYSQL_OPT_RECONNECT, &falseMyBool); + + // Set the connection protocol properly (needed so localhost can be used for TCP/IP) + if (useSocket) { + const uint proto = MYSQL_PROTOCOL_SOCKET; + mysql_options(theConnection, MYSQL_OPT_PROTOCOL, &proto); + } else { + const uint proto = MYSQL_PROTOCOL_TCP; + mysql_options(theConnection, MYSQL_OPT_PROTOCOL, &proto); + } // Set the connection timeout mysql_options(theConnection, MYSQL_OPT_CONNECT_TIMEOUT, (const void *)&timeout); @@ -614,7 +686,7 @@ - (MYSQL *)_makeRawMySQLConnectionWithEncoding:(NSString *)encodingName isMaster if (enableClearTextPlugin) { mysql_options(theConnection, MYSQL_ENABLE_CLEARTEXT_PLUGIN, [@"On" UTF8String]); } - + // Set up the connection variables in the format MySQL needs, from the class-wide variables const char *theHost = NULL; const char *theUsername = ""; @@ -694,9 +766,19 @@ - (MYSQL *)_makeRawMySQLConnectionWithEncoding:(NSString *)encodingName isMaster } return NULL; } - } + } else { + enum mysql_ssl_mode opt_ssl_mode = SSL_MODE_PREFERRED; + mysql_options(theConnection, MYSQL_OPT_SSL_MODE, (void *)&opt_ssl_mode); + } - MYSQL *connectionStatus = mysql_real_connect(theConnection, theHost, theUsername, thePassword, NULL, (unsigned int)port, theSocket, [self clientFlags]); + MYSQL *connectionStatus = mysql_real_connect(theConnection, theHost, theUsername, thePassword, NULL, (unsigned int)port, theSocket, [self clientFlags]); + + //If we attempted SSL and failed, try one more time non-ssl if the user isn't requiring SSL + if(!useSSL && theConnection != connectionStatus) { + enum mysql_ssl_mode opt_ssl_mode = SSL_MODE_DISABLED; + mysql_options(theConnection, MYSQL_OPT_SSL_MODE, (void *)&opt_ssl_mode); + connectionStatus = mysql_real_connect(theConnection, theHost, theUsername, thePassword, NULL, (unsigned int)port, theSocket, [self clientFlags]); + } // If the connection failed, return NULL if (theConnection != connectionStatus) { @@ -751,6 +833,8 @@ - (MYSQL *)_makeRawMySQLConnectionWithEncoding:(NSString *)encodingName isMaster */ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry { + + SPLog(@"_reconnectAllowingRetries"); if (userTriggeredDisconnect) return NO; BOOL reconnectSucceeded = NO; @@ -763,6 +847,8 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry // Loop in a panel runloop mode until the reconnection has processed; if an iteration // takes less than the requested 0.1s, sleep instead. while (reconnectingThread) { + SPLog(@"a reconnection attempt is already being made, waiting"); + uint64_t loopIterationStart_t = _monotonicTime(); [[NSRunLoop currentRunLoop] runMode:NSModalPanelRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; @@ -778,6 +864,8 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry } if ([[NSThread currentThread] isCancelled]) { + SPLog(@"NSThread currentThread] isCancelled, returning"); + return NO; } @@ -805,6 +893,8 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry [self _waitForNetworkConnectionWithTimeout:10]; if ([[NSThread currentThread] isCancelled]) { + SPLog(@"NSThread currentThread] isCancelled, returning"); + [self _unlockConnection]; reconnectingThread = NULL; return NO; @@ -812,12 +902,17 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry // If there is a proxy, attempt to reconnect it in blocking fashion if (proxy) { + + SPLog(@"we have a proxy"); + uint64_t loopIterationStart_t, proxyWaitStart_t; // If the proxy is not yet idle after requesting a disconnect, wait for a short time // to allow it to disconnect. if ([proxy state] != SPMySQLProxyIdle) { + SPLog(@"proxy not idle, waiting"); + proxyWaitStart_t = _monotonicTime(); while ([proxy state] != SPMySQLProxyIdle) { loopIterationStart_t = _monotonicTime(); @@ -834,6 +929,8 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry } // Request that the proxy re-establishes its connection + SPLog(@"Request that the proxy re-establishes its connection, calling proxy connect"); + [proxy connect]; // Wait while the proxy connects @@ -841,14 +938,19 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry while (1) { loopIterationStart_t = _monotonicTime(); + SPLog(@"Wait while the proxy connects"); + // If the proxy has connected, record the new local port and break out of the loop if ([proxy state] == SPMySQLProxyConnected) { + SPLog(@"SPMySQLProxyConnected. port: %lu",(unsigned long)[proxy localPort] ); + port = [proxy localPort]; break; } // If the proxy connection attempt time has exceeded the timeout, break of of the loop. if (_timeIntervalSinceMonotonicTime(proxyWaitStart_t) > (timeout + 1)) { + SPLog(@"proxy connection attempt time has exceeded the timeout, break of of the loop, calling proxy disconnect"); [proxy disconnect]; break; } @@ -885,10 +987,15 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry reconnectSucceeded = YES; if (databaseToRestore) { [self selectDatabase:databaseToRestore]; + // When the connection is restored successfully, reset the relevant variables to prepare for the next time + databaseToRestore = nil; } if (encodingToRestore) { [self setEncoding:encodingToRestore]; [self setEncodingUsesLatin1Transport:encodingUsesLatin1TransportToRestore]; + // When the connection is restored successfully, reset the relevant variables to prepare for the next time + encodingToRestore = nil; + encodingUsesLatin1TransportToRestore = NO; } } // If the connection failed and the connection is permitted to retry, @@ -921,6 +1028,7 @@ - (BOOL)_reconnectAllowingRetries:(BOOL)canRetry // By default attempt a reconnect default: reconnectingThread = NULL; + SPLog(@"_reconnectAllowingRetries By default attempt a reconnect"); reconnectSucceeded = [self _reconnectAllowingRetries:YES]; } } @@ -943,15 +1051,15 @@ - (BOOL)_reconnectAfterBackgroundConnectionLoss return (state == SPMySQLConnected); } - /** * Loop while a connection isn't available; allows blocking while the network is disconnected * or still connecting (eg Airport still coming up after sleep). */ - (BOOL)_waitForNetworkConnectionWithTimeout:(double)timeoutSeconds { + SPLog(@"_waitForNetworkConnectionWithTimeout: %f", timeoutSeconds); // Set up the reachability target - the host is not important, and is not connected to. - SCNetworkReachabilityRef reachabilityTarget = SCNetworkReachabilityCreateWithName(NULL, "dev.mysql.com"); + SCNetworkReachabilityRef reachabilityTarget = SCNetworkReachabilityCreateWithName(NULL, "google.com"); BOOL hostReachable; // In a loop until success or the timeout, test reachability @@ -974,13 +1082,19 @@ - (BOOL)_waitForNetworkConnectionWithTimeout:(double)timeoutSeconds if (hostReachable) break; // If the timeout has been exceeded, break out of the loop - if (_timeIntervalSinceMonotonicTime(loopStart_t) >= timeoutSeconds) break; + if (_timeIntervalSinceMonotonicTime(loopStart_t) >= timeoutSeconds) { + SPLog(@"Network connection timeout exceeded"); + break; + } - // Sleep before the next loop iteration - usleep(250000); + // Sleep before the next loop iteration - increase sleep time to reduce CPU usage + usleep(500000); // Sleep for 0.5 seconds instead of 0.25 } CFRelease(reachabilityTarget); + + SPLog(@"return hostReachable: %d", hostReachable); + return hostReachable; } @@ -989,6 +1103,8 @@ - (BOOL)_waitForNetworkConnectionWithTimeout:(double)timeoutSeconds */ - (void)_disconnect { + SPLog(@"_disconnect"); + // If state is connection lost, set state directly to disconnected. if (state == SPMySQLConnectionLostInBackground) { state = SPMySQLDisconnected; @@ -1013,14 +1129,16 @@ - (void)_disconnect break; } } + [self _unlockConnection]; [self _cancelKeepAlives]; - [self _lockConnection]; // Close the underlying MySQL connection if it still appears to be active, and not reading // or writing. While this may result in a leak of the MySQL object, it prevents crashes // due to attempts to close a blocked/stuck connection. if (mySQLConnection && !mySQLConnection->net.reading_or_writing && mySQLConnection->net.vio && mySQLConnection->net.buff) { + SPLog(@"calling mysql_close(mySQLConnection)"); + mysql_close(mySQLConnection); } mySQLConnection = NULL; @@ -1053,7 +1171,7 @@ - (void)_updateConnectionVariables [theResult setDefaultRowReturnType:SPMySQLResultRowAsArray]; NSMutableDictionary *variables = [NSMutableDictionary new]; for (NSArray *variableRow in theResult) { - [variables setObject:[variableRow objectAtIndex:1] forKey:[variableRow objectAtIndex:0]]; + [variables SPsafeSetObject:[variableRow SPsafeObjectAtIndex:1] forKey:[variableRow firstObject]]; } // Get the connection encoding. Although a specific encoding may have been requested on @@ -1098,6 +1216,16 @@ - (void)_updateConnectionVariables [self queryString:@"SET wait_timeout=600"]; } } + + + // Check the information_schema_stats_expiry timeout - if it's not zero, set it to 0 + // Otherwise, stats page will lag behind reality + // https://github.com/Sequel-Ace/Sequel-Ace/issues/1206 + if ([variables objectForKey:@"information_schema_stats_expiry"]) { + if ([[variables objectForKey:@"information_schema_stats_expiry"] integerValue] != 0) { + [self queryString:@"SET information_schema_stats_expiry=0"]; + } + } } /** @@ -1150,18 +1278,4 @@ + (void)_removeThreadVariables:(NSNotification *)aNotification { mysql_thread_end(); } - -- (void)updateTimeZoneIdentifier:(NSString *)timeZoneIdentifier { - if ([timeZoneIdentifier isEqualToString:self.timeZoneIdentifier]) { - return; - } - - self.timeZoneIdentifier = nil; - if (!timeZoneIdentifier || [timeZoneIdentifier isEqualToString:@""]) { - [self queryString:[NSString stringWithFormat:@"SET time_zone = @@GLOBAL.time_zone"]]; - } else { - [self queryString:[NSString stringWithFormat:@"SET time_zone = %@", [timeZoneIdentifier mySQLTickQuotedString]]]; - self.timeZoneIdentifier = timeZoneIdentifier; - } -} @end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionProxy.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionProxy.h index 3622b3121..59b0fa26e 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionProxy.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionProxy.h @@ -28,7 +28,6 @@ // // More info at - /** * Connection proxy state constants. */ @@ -41,7 +40,6 @@ typedef enum { SPMySQLProxyLaunchFailed = 5 } SPMySQLConnectionProxyState; - @protocol SPMySQLConnectionProxy /** diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConstants.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConstants.h index c556b90d6..23ded3ef6 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConstants.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConstants.h @@ -28,7 +28,6 @@ // // More info at - // Connection state typedef enum { SPMySQLDisconnected = 0, diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLEmptyResult.m b/Frameworks/SPMySQLFramework/Source/SPMySQLEmptyResult.m index 97e389096..282b98b64 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLEmptyResult.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLEmptyResult.m @@ -40,7 +40,7 @@ @implementation SPMySQLEmptyResult /** * Override the standard SPMySQLResult interface */ -- (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding +- (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding version:(NSUInteger)majorVersion { return [super init]; } diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.h b/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.h index 71830b243..d433f5643 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLFastStreamingResult : SPMySQLStreamingResult { // Linked list setup diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m b/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m index 73b935c4a..eb73059ec 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m @@ -77,7 +77,7 @@ + (void)initialize * As opposed to SPMySQLResult, defaults to returning rows as arrays, as the result * sets are likely to be larger and processed in loops. */ -- (id)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding connection:(SPMySQLConnection *)theConnection +- (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding connection:(SPMySQLConnection *)theConnection { // If no result set was passed in, return nil. if (!theResult) return nil; @@ -331,7 +331,7 @@ - (void)_downloadAllData // Loop through the rows until the end of the data is reached - indicated via a NULL while ( - (*isConnectedPtr)(parentConnection, isConnectedSelector) + ([parentConnection isConnected]) && (theRow = mysql_fetch_row(resultSet)) ) { // Retrieve the lengths of the returned data @@ -384,11 +384,6 @@ - (void)_downloadAllData [parentConnection _unlockConnection]; connectionUnlocked = YES; - // If the connection query may have been cancelled with a query kill, double-check connection - if ([parentConnection lastQueryWasCancelled] && [parentConnection serverMajorVersion] < 5) { - [parentConnection checkConnection]; - } - dataDownloaded = YES; } } diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch b/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch index 470098b85..80cd86137 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch @@ -9,3 +9,10 @@ #import "mysql.h" #import "SPMySQL.h" #import "SPMySQLUtilities.h" + + +#ifdef DEBUG +# define SPLog(fmt, ...) NSLog((@"%s:%d: " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#else +# define SPLog(...) +#endif diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.h b/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.h index 7106b8c56..631c311ef 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.h @@ -27,7 +27,6 @@ // // More info at - @interface SPMySQLGeometryData : NSObject { // Holds the WKB bytes coming from SQL server @@ -36,10 +35,11 @@ // Holds the buffer length NSUInteger bufferLength; + NSUInteger serverMajorVersion; } -- (instancetype)initWithBytes:(const void *)geoData length:(NSUInteger)length; -+ (instancetype)dataWithBytes:(const void *)geoData length:(NSUInteger)length; +- (instancetype)initWithBytes:(const void *)geoData length:(NSUInteger)length version:(NSUInteger)majorVersion; ++ (instancetype)dataWithBytes:(const void *)geoData length:(NSUInteger)length version:(NSUInteger)majorVersion; - (NSString *)description; - (NSUInteger)length; - (NSData *)data; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m b/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m index c5fa103d2..ce156c36d 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m @@ -54,6 +54,9 @@ #define WKB_HEADER_SIZE (1+SIZEOF_STORED_UINT32) #define BUFFER_START 0 +static bool should_swap_order(int32_t srid, NSUInteger version); +static void order_aware_memcpy(st_point_2d *pt, const void *src, bool needsSwap); + @implementation SPMySQLGeometryData /** @@ -71,12 +74,13 @@ - (instancetype)init /** * Initialize the SPMySQLGeometryData object with the WKB data */ -- (instancetype)initWithBytes:(const void *)geoData length:(NSUInteger)length +- (instancetype)initWithBytes:(const void *)geoData length:(NSUInteger)length version:(NSUInteger)majorVersion { if ((self = [self init])) { bufferLength = length; geoBuffer = malloc(bufferLength); memcpy(geoBuffer, geoData, bufferLength); + serverMajorVersion = majorVersion; } return self; } @@ -88,9 +92,9 @@ - (nonnull id)copyWithZone:(nullable NSZone *)zone { /** * Return an autorelease SPMySQLGeometryData object */ -+ (instancetype)dataWithBytes:(const void *)geoData length:(NSUInteger)length ++ (instancetype)dataWithBytes:(const void *)geoData length:(NSUInteger)length version:(NSUInteger)majorVersion { - return [[SPMySQLGeometryData alloc] initWithBytes:geoData length:length]; + return [[SPMySQLGeometryData alloc] initWithBytes:geoData length:length version: majorVersion]; } /** @@ -145,11 +149,13 @@ - (NSString *)wktString geoType = geoBuffer[ptr]; ptr += SIZEOF_STORED_UINT32; + bool needsSwap = should_swap_order(srid, serverMajorVersion); + switch (geoType) { case wkb_point: - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); - return [NSString stringWithFormat:@"POINT(%.16g %.16g)%@", aPoint.x, aPoint.y, (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); + return [NSString stringWithFormat:@"POINT(%.16g %.16g)%@", aPoint.x, aPoint.y, (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; break; case wkb_linestring: @@ -157,7 +163,7 @@ - (NSString *)wktString memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (i < numberOfItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -174,7 +180,7 @@ - (NSString *)wktString ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (j < numberOfSubItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -189,7 +195,7 @@ - (NSString *)wktString memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (i < numberOfItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE+WKB_HEADER_SIZE; } @@ -206,7 +212,7 @@ - (NSString *)wktString ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (j < numberOfSubItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -230,7 +236,7 @@ - (NSString *)wktString ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for (k=0; k < numberOfSubSubItems; k++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (k < numberOfSubSubItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -261,7 +267,7 @@ - (NSString *)wktString switch(geoType) { case wkb_point: - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"POINT(%.16g %.16g)", aPoint.x, aPoint.y]; ptr += POINT_DATA_SIZE; break; @@ -271,7 +277,7 @@ - (NSString *)wktString memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (i < numberOfItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -287,7 +293,7 @@ - (NSString *)wktString ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (j < numberOfSubItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -301,7 +307,7 @@ - (NSString *)wktString memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (i < numberOfItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE+WKB_HEADER_SIZE; } @@ -318,7 +324,7 @@ - (NSString *)wktString ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (j < numberOfSubItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -342,7 +348,7 @@ - (NSString *)wktString ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for (k=0; k < numberOfSubSubItems; k++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (k < numberOfSubSubItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } @@ -413,10 +419,12 @@ - (NSDictionary *)coordinates geoType = geoBuffer[ptr]; ptr += SIZEOF_STORED_UINT32; + bool needsSwap = should_swap_order(srid, serverMajorVersion); + switch(geoType) { case wkb_point: - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = aPoint.x; x_max = aPoint.x; y_min = aPoint.y; @@ -439,7 +447,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -466,7 +474,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -494,7 +502,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -522,7 +530,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -557,7 +565,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfSubSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (k=0; k < numberOfSubSubItems; k++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -601,7 +609,7 @@ - (NSDictionary *)coordinates switch(geoType) { case wkb_point: - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -614,7 +622,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -633,7 +641,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -650,7 +658,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for (i=0; i < numberOfItems; i++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -668,7 +676,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (j=0; j < numberOfSubItems; j++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -693,7 +701,7 @@ - (NSDictionary *)coordinates memcpy(&numberOfSubSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for (k=0; k < numberOfSubSubItems; k++) { - memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); + order_aware_memcpy(&aPoint, &geoBuffer[ptr], needsSwap); x_min = (aPoint.x < x_min) ? aPoint.x : x_min; x_max = (aPoint.x > x_max) ? aPoint.x : x_max; y_min = (aPoint.y < y_min) ? aPoint.y : y_min; @@ -793,3 +801,33 @@ - (void)dealloc } @end + + +// normally POINT(X Y) = POINT(lon lat) but in MySQL 8, that is only true for SRIDs below. +// So, if we don't have one of these then we need to swap x & y +static bool should_swap_order(int32_t srid, NSUInteger version) { + if (version != 8) { + return false; + } + + static int32_t KNOWN_LON_LAT_SRIDs[8] = { 0, 7035, 7037, 7039, 7041, 7084, 7086, 7133 }; + + for ( int i = 0; i < 8; i++ ) { + if (KNOWN_LON_LAT_SRIDs[i] == srid) { + return false; + } + } + + return true; +} + +static void order_aware_memcpy(st_point_2d *pt, const void *src, bool needsSwap) { + memcpy(pt, src, POINT_DATA_SIZE); + + if (needsSwap) { + double temp = pt->x; + pt->x = pt->y; + pt->y = temp; + } +} + diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.h b/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.h index 1ed5fc56f..6f8d92c91 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLKeepAliveTimer : NSObject { id timerTarget; SEL timerSelector; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m b/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m index fc25d492e..354df02b3 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLKeepAliveTimer.m @@ -28,7 +28,6 @@ // // More info at - #import "SPMySQLKeepAliveTimer.h" @interface SPMySQLKeepAliveTimer () // Private API diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLMutableDictionaryAdditions.h b/Frameworks/SPMySQLFramework/Source/SPMySQLMutableDictionaryAdditions.h new file mode 100644 index 000000000..1d020a002 --- /dev/null +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLMutableDictionaryAdditions.h @@ -0,0 +1,27 @@ +// +// SPMySQLMutableDictionaryAdditions.h +// Sequel Ace +// +// Created by James on 21/1/2021. +// Copyright © 2020-2022 Sequel-Ace. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSMutableDictionary (SPMySQLMutableDictionaryAdditions) + +- (void)SPsafeSetObject:(id)obj forKey:(id)key; +- (void)SPsafeRemoveObjectForKey:(nullable id)key; + +@end + +@interface NSDictionary (SPMySQLDictionaryAdditions) + +/*If obj or key are nil, does nothing. No exception thrown.*/ +- (id)SPsafeObjectForKey:(id)key; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLMutableDictionaryAdditions.m b/Frameworks/SPMySQLFramework/Source/SPMySQLMutableDictionaryAdditions.m new file mode 100644 index 000000000..a8c72938e --- /dev/null +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLMutableDictionaryAdditions.m @@ -0,0 +1,44 @@ +// +// SPMySQLMutableDictionaryAdditions.m +// Sequel Ace +// +// Created by James on 21/1/2021. +// Copyright © 2020-2022 Sequel-Ace. All rights reserved. +// + +#import "SPMySQLMutableDictionaryAdditions.h" + +@implementation NSMutableDictionary (SPMySQLMutableDictionaryAdditions) + +#pragma mark - +#pragma mark NSMutableDictionary methods + +- (void)SPsafeSetObject:(id)obj forKey:(id)key { + if (obj != nil & key != nil) { + [self setObject:obj forKey:key]; + } +} + +- (void)SPsafeRemoveObjectForKey:(nullable id)key{ + id object = [self SPsafeObjectForKey:key]; + if (object != nil && object != [NSNull null]) { + [self removeObjectForKey:key]; + } +} + +@end + +@implementation NSDictionary (SPMySQLDictionaryAdditions) + +#pragma mark - +#pragma mark NSDictionary method + +- (id)SPsafeObjectForKey:(id)key { + id object = [self objectForKey:key]; + if (object != nil && object == [NSNull null]) { + return nil; + } + return object; +} + +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.h b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.h index 33374c73a..27ca8c60e 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLResult (Convenience_Methods) - (NSArray *)getAllRows; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m index 2fee5f5bd..250e60cf0 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m @@ -153,7 +153,7 @@ - (id)_getObjectFromBytes:(char *)bytes ofLength:(NSUInteger)length fieldDefinit // For Geometry types, use a special Geometry object to handle their complexity case SPMySQLResultFieldAsGeometry: - return [SPMySQLGeometryData dataWithBytes:bytes length:length]; + return [SPMySQLGeometryData dataWithBytes:bytes length:length version: self.serverMajorVersion]; // For bit fields, get a zero-padded representation of the data case SPMySQLResultFieldAsBit: diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.h b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.h index ec83af823..99c0321c0 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.h @@ -28,7 +28,6 @@ // // More info at - @interface SPMySQLResult (Field_Definitions) - (NSArray *)fieldDefinitions; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m index c478006ff..d2ea9fefe 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m @@ -43,170 +43,289 @@ - (NSString *)_mysqlTypeToGroupForType:(NSUInteger)type withCharsetNr:(NSUIntege #define MAGIC_BINARY_CHARSET_NR 63 + +//SELECT CONCAT( +//"{", AA.ID, ",", +// (CASE WHEN AA.ID < 10 THEN " " WHEN AA.ID < 100 THEN " " ELSE "" END), +// "\"", +// AA.CHARACTER_SET_NAME, +// "\", \"", +// AA.COLLATION_NAME, +// "\", 1, ",CS.MAXLEN, "}," +// ) +// +//FROM information_schema.collations AS AA +//JOIN information_schema.character_sets AS CS ON CS.CHARACTER_SET_NAME=AA.CHARACTER_SET_NAME GROUP BY AA.ID ORDER BY AA.ID const SPMySQLResultCharset SPMySQLCharsetMap[] = { - {1, "big5","big5_chinese_ci", 1, 2}, - {2, "latin2", "latin2_czech_cs", 1, 1}, - {3, "dec8", "dec8_swedisch_ci", 1, 1}, - {4, "cp850", "cp850_general_ci", 1, 1}, - {5, "latin1", "latin1_german1_ci", 1, 1}, - {6, "hp8", "hp8_english_ci", 1, 1}, - {7, "koi8r", "koi8r_general_ci", 1, 1}, - {8, "latin1", "latin1_swedish_ci", 1, 1}, - {9, "latin2", "latin2_general_ci", 1, 1}, - {10, "swe7", "swe7_swedish_ci", 1, 1}, - {11, "ascii", "ascii_general_ci", 1, 1}, - {12, "ujis", "ujis_japanese_ci", 1, 3}, - {13, "sjis", "sjis_japanese_ci", 1, 2}, - {14, "cp1251", "cp1251_bulgarian_ci", 1, 1}, - {15, "latin1", "latin1_danish_ci", 1, 1}, - {16, "hebrew", "hebrew_general_ci", 1, 1}, - {17, "filename", "filename", 1, 5}, - {18, "tis620", "tis620_thai_ci", 1, 1}, - {19, "euckr", "euckr_korean_ci", 1, 2}, - {20, "latin7", "latin7_estonian_cs", 1, 1}, - {21, "latin2", "latin2_hungarian_ci", 1, 1}, - {22, "koi8u", "koi8u_general_ci", 1, 1}, - {23, "cp1251", "cp1251_ukrainian_ci", 1, 1}, - {24, "gb2312", "gb2312_chinese_ci", 1, 2}, - {25, "greek", "greek_general_ci", 1, 1}, - {26, "cp1250", "cp1250_general_ci", 1, 1}, - {27, "latin2", "latin2_croatian_ci", 1, 1}, - {28, "gbk", "gbk_chinese_ci", 1, 2}, - {29, "cp1257", "cp1257_lithunian_ci", 1, 1}, - {30, "latin5", "latin5_turkish_ci", 1, 1}, - {31, "latin1", "latin1_german2_ci", 1, 1}, - {32, "armscii8", "armscii8_general_ci", 1, 1}, - {33, "utf8", "utf8_general_ci", 1, 3}, //mb3 - {34, "cp1250", "cp1250_czech_cs", 1, 1}, - {35, "ucs2", "ucs2_general_ci", 2, 2}, - {36, "cp866", "cp866_general_ci", 1, 1}, - {37, "keybcs2", "keybcs2_general_ci", 1, 1}, - {38, "macce", "macce_general_ci", 1, 1}, - {39, "macroman", "macroman_general_ci", 1, 1}, - {40, "cp852", "cp852_general_ci", 1, 1}, - {41, "latin7", "latin7_general_ci", 1, 1}, - {42, "latin7", "latin7_general_cs", 1, 1}, - {43, "macce", "macce_bin", 1, 1}, - {44, "cp1250", "cp1250_croatian_ci", 1, 1}, - {45, "utf8", "utf8_general_ci", 1, 4}, //mb4 - {46, "utf8", "utf8_bin", 1, 4}, //mb4 - {47, "latin1", "latin1_bin", 1, 1}, - {48, "latin1", "latin1_general_ci", 1, 1}, - {49, "latin1", "latin1_general_cs", 1, 1}, - {50, "cp1251", "cp1251_bin", 1, 1}, - {51, "cp1251", "cp1251_general_ci", 1, 1}, - {52, "cp1251", "cp1251_general_cs", 1, 1}, - {53, "macroman", "macroman_bin", 1, 1}, - - {57, "cp1256", "cp1256_general_ci", 1, 1}, - {58, "cp1257", "cp1257_bin", 1, 1}, - {59, "cp1257", "cp1257_general_ci", 1, 1}, -#warning 60 is "utf32_general_ci" and "armascii8" is at 64 in mysql 5.5.59!? - {60, "armascii8", "armascii8_bin", 1, 1}, - - {63, "binary", "binary", 1, 1}, - - {65, "ascii", "ascii_bin", 1, 1}, - {66, "cp1250", "cp1250_bin", 1, 1}, - {67, "cp1256", "cp1256_bin", 1, 1}, - {68, "cp866", "cp866_bin", 1, 1}, - {69, "dec8", "dec8_bin", 1, 1}, - {70, "greek", "greek_bin", 1, 1}, - {71, "hebew", "hebrew_bin", 1, 1}, - {72, "hp8", "hp8_bin", 1, 1}, - {73, "keybcs2", "keybcs2_bin", 1, 1}, - {74, "koi8r", "koi8r_bin", 1, 1}, - {75, "koi8u", "koi8u_bin", 1, 1}, - - {77, "latin2", "latin2_bin", 1, 1}, - {78, "latin5", "latin5_bin", 1, 1}, - {79, "latin7", "latin7_bin", 1, 1}, - {80, "cp850", "cp850_bin", 1, 1}, - {81, "cp852", "cp852_bin", 1, 1}, - {82, "swe7", "swe7_bin", 1, 1}, - {83, "utf8", "utf8_bin", 1, 3}, - {84, "big5", "big5_bin", 1, 2}, - {85, "euckr", "euckr_bin", 1, 2}, - {86, "gb2312", "gb2312_bin", 1, 2}, - {87, "gbk", "gbk_bin", 1, 2}, - {88, "sjis", "sjis_bin", 1, 2}, - {89, "tis620", "tis620_bin", 1, 1}, - {90, "ucs2", "ucs2_bin", 2, 2}, - {91, "ujis", "ujis_bin", 1, 3}, - {92, "geostd8", "geostd8_general_ci", 1, 1}, - {93, "geostd8", "geostd8_bin", 1, 1}, - {94, "latin1", "latin1_spanish_ci", 1, 1}, - {95, "cp932", "cp932_japanese_ci", 1, 2}, - {96, "cp932", "cp932_bin", 1, 2}, - {97, "eucjpms", "eucjpms_japanese_ci", 1, 3}, - {98, "eucjpms", "eucjpms_bin", 1, 3}, - {99, "cp1250", "cp1250_polish_ci", 1, 1}, - - {128, "ucs2", "ucs2_unicode_ci", 2, 2}, - {129, "ucs2", "ucs2_icelandic_ci", 2, 2}, - {130, "ucs2", "ucs2_latvian_ci", 2, 2}, - {131, "ucs2", "ucs2_romanian_ci", 2, 2}, - {132, "ucs2", "ucs2_slovenian_ci", 2, 2}, - {133, "ucs2", "ucs2_polish_ci", 2, 2}, - {134, "ucs2", "ucs2_estonian_ci", 2, 2}, - {135, "ucs2", "ucs2_spanish_ci", 2, 2}, - {136, "ucs2", "ucs2_swedish_ci", 2, 2}, - {137, "ucs2", "ucs2_turkish_ci", 2, 2}, - {138, "ucs2", "ucs2_czech_ci", 2, 2}, - {139, "ucs2", "ucs2_danish_ci", 2, 2}, - {140, "ucs2", "ucs2_lithunian_ci", 2, 2}, - {141, "ucs2", "ucs2_slovak_ci", 2, 2}, - {142, "ucs2", "ucs2_spanish2_ci", 2, 2}, - {143, "ucs2", "ucs2_roman_ci", 2, 2}, - {144, "ucs2", "ucs2_persian_ci", 2, 2}, - {145, "ucs2", "ucs2_esperanto_ci", 2, 2}, - {146, "ucs2", "ucs2_hungarian_ci", 2, 2}, - {147, "ucs2", "ucs2_sinhala_ci", 2, 2}, - - {192, "utf8mb3", "utf8mb3_general_ci", 1, 3}, - {193, "utf8mb3", "utf8mb3_icelandic_ci", 1, 3}, - {194, "utf8mb3", "utf8mb3_latvian_ci", 1, 3}, - {195, "utf8mb3", "utf8mb3_romanian_ci", 1, 3}, - {196, "utf8mb3", "utf8mb3_slovenian_ci", 1, 3}, - {197, "utf8mb3", "utf8mb3_polish_ci", 1, 3}, - {198, "utf8mb3", "utf8mb3_estonian_ci", 1, 3}, - {199, "utf8mb3", "utf8mb3_spanish_ci", 1, 3}, - {200, "utf8mb3", "utf8mb3_swedish_ci", 1, 3}, - {201, "utf8mb3", "utf8mb3_turkish_ci", 1, 3}, - {202, "utf8mb3", "utf8mb3_czech_ci", 1, 3}, - {203, "utf8mb3", "utf8mb3_danish_ci", 1, 3}, - {204, "utf8mb3", "utf8mb3_lithunian_ci", 1, 3}, - {205, "utf8mb3", "utf8mb3_slovak_ci", 1, 3}, - {206, "utf8mb3", "utf8mb3_spanish2_ci", 1, 3}, - {207, "utf8mb3", "utf8mb3_roman_ci", 1, 3}, - {208, "utf8mb3", "utf8mb3_persian_ci", 1, 3}, - {209, "utf8mb3", "utf8mb3_esperanto_ci", 1, 3}, - {210, "utf8mb3", "utf8mb3_hungarian_ci", 1, 3}, - {211, "utf8mb3", "utf8mb3_sinhala_ci", 1, 3}, - - {224, "utf8", "utf8_unicode_ci", 1, 4}, //mb4 - {225, "utf8", "utf8_icelandic_ci", 1, 4}, //mb4 - {226, "utf8", "utf8_latvian_ci", 1, 4}, //mb4 - {227, "utf8", "utf8_romanian_ci", 1, 4}, //mb4 - {228, "utf8", "utf8_slovenian_ci", 1, 4}, //mb4 - {229, "utf8", "utf8_polish_ci", 1, 4}, //mb4 - {230, "utf8", "utf8_estonian_ci", 1, 4}, //mb4 - {231, "utf8", "utf8_spanish_ci", 1, 4}, //mb4 - {232, "utf8", "utf8_swedish_ci", 1, 4}, //mb4 - {233, "utf8", "utf8_turkish_ci", 1, 4}, //mb4 - {234, "utf8", "utf8_czech_ci", 1, 4}, //mb4 - {235, "utf8", "utf8_danish_ci", 1, 4}, //mb4 - {236, "utf8", "utf8_lithuanian_ci", 1, 4}, //mb4 - {237, "utf8", "utf8_slovak_ci", 1, 4}, //mb4 - {238, "utf8", "utf8_spanish2_ci", 1, 4}, //mb4 - {239, "utf8", "utf8_roman_ci", 1, 4}, //mb4 - {240, "utf8", "utf8_persian_ci", 1, 4}, //mb4 - {241, "utf8", "utf8_esperanto_ci", 1, 4}, //mb4 - {242, "utf8", "utf8_hungarian_ci", 1, 4}, //mb4 - {243, "utf8", "utf8_sinhala_ci", 1, 4}, //mb4 - - {254, "utf8mb3", "utf8mb3_general_cs", 1, 3}, + {1, "big5", "big5_chinese_ci", 1, 2}, + {2, "latin2", "latin2_czech_cs", 1, 1}, + {3, "dec8", "dec8_swedish_ci", 1, 1}, + {4, "cp850", "cp850_general_ci", 1, 1}, + {5, "latin1", "latin1_german1_ci", 1, 1}, + {6, "hp8", "hp8_english_ci", 1, 1}, + {7, "koi8r", "koi8r_general_ci", 1, 1}, + {8, "latin1", "latin1_swedish_ci", 1, 1}, + {9, "latin2", "latin2_general_ci", 1, 1}, + {10, "swe7", "swe7_swedish_ci", 1, 1}, + {11, "ascii", "ascii_general_ci", 1, 1}, + {12, "ujis", "ujis_japanese_ci", 1, 3}, + {13, "sjis", "sjis_japanese_ci", 1, 2}, + {14, "cp1251", "cp1251_bulgarian_ci", 1, 1}, + {15, "latin1", "latin1_danish_ci", 1, 1}, + {16, "hebrew", "hebrew_general_ci", 1, 1}, + {18, "tis620", "tis620_thai_ci", 1, 1}, + {19, "euckr", "euckr_korean_ci", 1, 2}, + {20, "latin7", "latin7_estonian_cs", 1, 1}, + {21, "latin2", "latin2_hungarian_ci", 1, 1}, + {22, "koi8u", "koi8u_general_ci", 1, 1}, + {23, "cp1251", "cp1251_ukrainian_ci", 1, 1}, + {24, "gb2312", "gb2312_chinese_ci", 1, 2}, + {25, "greek", "greek_general_ci", 1, 1}, + {26, "cp1250", "cp1250_general_ci", 1, 1}, + {27, "latin2", "latin2_croatian_ci", 1, 1}, + {28, "gbk", "gbk_chinese_ci", 1, 2}, + {29, "cp1257", "cp1257_lithuanian_ci", 1, 1}, + {30, "latin5", "latin5_turkish_ci", 1, 1}, + {31, "latin1", "latin1_german2_ci", 1, 1}, + {32, "armscii8", "armscii8_general_ci", 1, 1}, + {33, "utf8", "utf8_general_ci", 1, 3}, + {34, "cp1250", "cp1250_czech_cs", 1, 1}, + {35, "ucs2", "ucs2_general_ci", 1, 2}, + {36, "cp866", "cp866_general_ci", 1, 1}, + {37, "keybcs2", "keybcs2_general_ci", 1, 1}, + {38, "macce", "macce_general_ci", 1, 1}, + {39, "macroman", "macroman_general_ci", 1, 1}, + {40, "cp852", "cp852_general_ci", 1, 1}, + {41, "latin7", "latin7_general_ci", 1, 1}, + {42, "latin7", "latin7_general_cs", 1, 1}, + {43, "macce", "macce_bin", 1, 1}, + {44, "cp1250", "cp1250_croatian_ci", 1, 1}, + {45, "utf8mb4", "utf8mb4_general_ci", 1, 4}, + {46, "utf8mb4", "utf8mb4_bin", 1, 4}, + {47, "latin1", "latin1_bin", 1, 1}, + {48, "latin1", "latin1_general_ci", 1, 1}, + {49, "latin1", "latin1_general_cs", 1, 1}, + {50, "cp1251", "cp1251_bin", 1, 1}, + {51, "cp1251", "cp1251_general_ci", 1, 1}, + {52, "cp1251", "cp1251_general_cs", 1, 1}, + {53, "macroman", "macroman_bin", 1, 1}, + {54, "utf16", "utf16_general_ci", 1, 4}, + {55, "utf16", "utf16_bin", 1, 4}, + {56, "utf16le", "utf16le_general_ci", 1, 4}, + {57, "cp1256", "cp1256_general_ci", 1, 1}, + {58, "cp1257", "cp1257_bin", 1, 1}, + {59, "cp1257", "cp1257_general_ci", 1, 1}, + {60, "utf32", "utf32_general_ci", 1, 4}, + {61, "utf32", "utf32_bin", 1, 4}, + {62, "utf16le", "utf16le_bin", 1, 4}, + {63, "binary", "binary", 1, 1}, + {64, "armscii8", "armscii8_bin", 1, 1}, + {65, "ascii", "ascii_bin", 1, 1}, + {66, "cp1250", "cp1250_bin", 1, 1}, + {67, "cp1256", "cp1256_bin", 1, 1}, + {68, "cp866", "cp866_bin", 1, 1}, + {69, "dec8", "dec8_bin", 1, 1}, + {70, "greek", "greek_bin", 1, 1}, + {71, "hebrew", "hebrew_bin", 1, 1}, + {72, "hp8", "hp8_bin", 1, 1}, + {73, "keybcs2", "keybcs2_bin", 1, 1}, + {74, "koi8r", "koi8r_bin", 1, 1}, + {75, "koi8u", "koi8u_bin", 1, 1}, + {76, "utf8", "utf8_tolower_ci", 1, 3}, + {77, "latin2", "latin2_bin", 1, 1}, + {78, "latin5", "latin5_bin", 1, 1}, + {79, "latin7", "latin7_bin", 1, 1}, + {80, "cp850", "cp850_bin", 1, 1}, + {81, "cp852", "cp852_bin", 1, 1}, + {82, "swe7", "swe7_bin", 1, 1}, + {83, "utf8", "utf8_bin", 1, 3}, + {84, "big5", "big5_bin", 1, 2}, + {85, "euckr", "euckr_bin", 1, 2}, + {86, "gb2312", "gb2312_bin", 1, 2}, + {87, "gbk", "gbk_bin", 1, 2}, + {88, "sjis", "sjis_bin", 1, 2}, + {89, "tis620", "tis620_bin", 1, 1}, + {90, "ucs2", "ucs2_bin", 1, 2}, + {91, "ujis", "ujis_bin", 1, 3}, + {92, "geostd8", "geostd8_general_ci", 1, 1}, + {93, "geostd8", "geostd8_bin", 1, 1}, + {94, "latin1", "latin1_spanish_ci", 1, 1}, + {95, "cp932", "cp932_japanese_ci", 1, 2}, + {96, "cp932", "cp932_bin", 1, 2}, + {97, "eucjpms", "eucjpms_japanese_ci", 1, 3}, + {98, "eucjpms", "eucjpms_bin", 1, 3}, + {99, "cp1250", "cp1250_polish_ci", 1, 1}, + {101,"utf16", "utf16_unicode_ci", 1, 4}, + {102,"utf16", "utf16_icelandic_ci", 1, 4}, + {103,"utf16", "utf16_latvian_ci", 1, 4}, + {104,"utf16", "utf16_romanian_ci", 1, 4}, + {105,"utf16", "utf16_slovenian_ci", 1, 4}, + {106,"utf16", "utf16_polish_ci", 1, 4}, + {107,"utf16", "utf16_estonian_ci", 1, 4}, + {108,"utf16", "utf16_spanish_ci", 1, 4}, + {109,"utf16", "utf16_swedish_ci", 1, 4}, + {110,"utf16", "utf16_turkish_ci", 1, 4}, + {111,"utf16", "utf16_czech_ci", 1, 4}, + {112,"utf16", "utf16_danish_ci", 1, 4}, + {113,"utf16", "utf16_lithuanian_ci", 1, 4}, + {114,"utf16", "utf16_slovak_ci", 1, 4}, + {115,"utf16", "utf16_spanish2_ci", 1, 4}, + {116,"utf16", "utf16_roman_ci", 1, 4}, + {117,"utf16", "utf16_persian_ci", 1, 4}, + {118,"utf16", "utf16_esperanto_ci", 1, 4}, + {119,"utf16", "utf16_hungarian_ci", 1, 4}, + {120,"utf16", "utf16_sinhala_ci", 1, 4}, + {121,"utf16", "utf16_german2_ci", 1, 4}, + {122,"utf16", "utf16_croatian_ci", 1, 4}, + {123,"utf16", "utf16_unicode_520_ci", 1, 4}, + {124,"utf16", "utf16_vietnamese_ci", 1, 4}, + {128,"ucs2", "ucs2_unicode_ci", 1, 2}, + {129,"ucs2", "ucs2_icelandic_ci", 1, 2}, + {130,"ucs2", "ucs2_latvian_ci", 1, 2}, + {131,"ucs2", "ucs2_romanian_ci", 1, 2}, + {132,"ucs2", "ucs2_slovenian_ci", 1, 2}, + {133,"ucs2", "ucs2_polish_ci", 1, 2}, + {134,"ucs2", "ucs2_estonian_ci", 1, 2}, + {135,"ucs2", "ucs2_spanish_ci", 1, 2}, + {136,"ucs2", "ucs2_swedish_ci", 1, 2}, + {137,"ucs2", "ucs2_turkish_ci", 1, 2}, + {138,"ucs2", "ucs2_czech_ci", 1, 2}, + {139,"ucs2", "ucs2_danish_ci", 1, 2}, + {140,"ucs2", "ucs2_lithuanian_ci", 1, 2}, + {141,"ucs2", "ucs2_slovak_ci", 1, 2}, + {142,"ucs2", "ucs2_spanish2_ci", 1, 2}, + {143,"ucs2", "ucs2_roman_ci", 1, 2}, + {144,"ucs2", "ucs2_persian_ci", 1, 2}, + {145,"ucs2", "ucs2_esperanto_ci", 1, 2}, + {146,"ucs2", "ucs2_hungarian_ci", 1, 2}, + {147,"ucs2", "ucs2_sinhala_ci", 1, 2}, + {148,"ucs2", "ucs2_german2_ci", 1, 2}, + {149,"ucs2", "ucs2_croatian_ci", 1, 2}, + {150,"ucs2", "ucs2_unicode_520_ci", 1, 2}, + {151,"ucs2", "ucs2_vietnamese_ci", 1, 2}, + {159,"ucs2", "ucs2_general_mysql500_ci", 1, 2}, + {160,"utf32", "utf32_unicode_ci", 1, 4}, + {161,"utf32", "utf32_icelandic_ci", 1, 4}, + {162,"utf32", "utf32_latvian_ci", 1, 4}, + {163,"utf32", "utf32_romanian_ci", 1, 4}, + {164,"utf32", "utf32_slovenian_ci", 1, 4}, + {165,"utf32", "utf32_polish_ci", 1, 4}, + {166,"utf32", "utf32_estonian_ci", 1, 4}, + {167,"utf32", "utf32_spanish_ci", 1, 4}, + {168,"utf32", "utf32_swedish_ci", 1, 4}, + {169,"utf32", "utf32_turkish_ci", 1, 4}, + {170,"utf32", "utf32_czech_ci", 1, 4}, + {171,"utf32", "utf32_danish_ci", 1, 4}, + {172,"utf32", "utf32_lithuanian_ci", 1, 4}, + {173,"utf32", "utf32_slovak_ci", 1, 4}, + {174,"utf32", "utf32_spanish2_ci", 1, 4}, + {175,"utf32", "utf32_roman_ci", 1, 4}, + {176,"utf32", "utf32_persian_ci", 1, 4}, + {177,"utf32", "utf32_esperanto_ci", 1, 4}, + {178,"utf32", "utf32_hungarian_ci", 1, 4}, + {179,"utf32", "utf32_sinhala_ci", 1, 4}, + {180,"utf32", "utf32_german2_ci", 1, 4}, + {181,"utf32", "utf32_croatian_ci", 1, 4}, + {182,"utf32", "utf32_unicode_520_ci", 1, 4}, + {183,"utf32", "utf32_vietnamese_ci", 1, 4}, + {192,"utf8", "utf8_unicode_ci", 1, 3}, + {193,"utf8", "utf8_icelandic_ci", 1, 3}, + {194,"utf8", "utf8_latvian_ci", 1, 3}, + {195,"utf8", "utf8_romanian_ci", 1, 3}, + {196,"utf8", "utf8_slovenian_ci", 1, 3}, + {197,"utf8", "utf8_polish_ci", 1, 3}, + {198,"utf8", "utf8_estonian_ci", 1, 3}, + {199,"utf8", "utf8_spanish_ci", 1, 3}, + {200,"utf8", "utf8_swedish_ci", 1, 3}, + {201,"utf8", "utf8_turkish_ci", 1, 3}, + {202,"utf8", "utf8_czech_ci", 1, 3}, + {203,"utf8", "utf8_danish_ci", 1, 3}, + {204,"utf8", "utf8_lithuanian_ci", 1, 3}, + {205,"utf8", "utf8_slovak_ci", 1, 3}, + {206,"utf8", "utf8_spanish2_ci", 1, 3}, + {207,"utf8", "utf8_roman_ci", 1, 3}, + {208,"utf8", "utf8_persian_ci", 1, 3}, + {209,"utf8", "utf8_esperanto_ci", 1, 3}, + {210,"utf8", "utf8_hungarian_ci", 1, 3}, + {211,"utf8", "utf8_sinhala_ci", 1, 3}, + {212,"utf8", "utf8_german2_ci", 1, 3}, + {213,"utf8", "utf8_croatian_ci", 1, 3}, + {214,"utf8", "utf8_unicode_520_ci", 1, 3}, + {215,"utf8", "utf8_vietnamese_ci", 1, 3}, + {223,"utf8", "utf8_general_mysql500_ci", 1, 3}, + {224,"utf8mb4", "utf8mb4_unicode_ci", 1, 4}, + {225,"utf8mb4", "utf8mb4_icelandic_ci", 1, 4}, + {226,"utf8mb4", "utf8mb4_latvian_ci", 1, 4}, + {227,"utf8mb4", "utf8mb4_romanian_ci", 1, 4}, + {228,"utf8mb4", "utf8mb4_slovenian_ci", 1, 4}, + {229,"utf8mb4", "utf8mb4_polish_ci", 1, 4}, + {230,"utf8mb4", "utf8mb4_estonian_ci", 1, 4}, + {231,"utf8mb4", "utf8mb4_spanish_ci", 1, 4}, + {232,"utf8mb4", "utf8mb4_swedish_ci", 1, 4}, + {233,"utf8mb4", "utf8mb4_turkish_ci", 1, 4}, + {234,"utf8mb4", "utf8mb4_czech_ci", 1, 4}, + {235,"utf8mb4", "utf8mb4_danish_ci", 1, 4}, + {236,"utf8mb4", "utf8mb4_lithuanian_ci", 1, 4}, + {237,"utf8mb4", "utf8mb4_slovak_ci", 1, 4}, + {238,"utf8mb4", "utf8mb4_spanish2_ci", 1, 4}, + {239,"utf8mb4", "utf8mb4_roman_ci", 1, 4}, + {240,"utf8mb4", "utf8mb4_persian_ci", 1, 4}, + {241,"utf8mb4", "utf8mb4_esperanto_ci", 1, 4}, + {242,"utf8mb4", "utf8mb4_hungarian_ci", 1, 4}, + {243,"utf8mb4", "utf8mb4_sinhala_ci", 1, 4}, + {244,"utf8mb4", "utf8mb4_german2_ci", 1, 4}, + {245,"utf8mb4", "utf8mb4_croatian_ci", 1, 4}, + {246,"utf8mb4", "utf8mb4_unicode_520_ci", 1, 4}, + {247,"utf8mb4", "utf8mb4_vietnamese_ci", 1, 4}, + {248,"gb18030", "gb18030_chinese_ci", 1, 4}, + {249,"gb18030", "gb18030_bin", 1, 4}, + {250,"gb18030", "gb18030_unicode_520_ci", 1, 4}, + {255,"utf8mb4", "utf8mb4_0900_ai_ci", 1, 4}, + {256,"utf8mb4", "utf8mb4_de_pb_0900_ai_ci", 1, 4}, + {257,"utf8mb4", "utf8mb4_is_0900_ai_ci", 1, 4}, + {258,"utf8mb4", "utf8mb4_lv_0900_ai_ci", 1, 4}, + {259,"utf8mb4", "utf8mb4_ro_0900_ai_ci", 1, 4}, + {260,"utf8mb4", "utf8mb4_sl_0900_ai_ci", 1, 4}, + {261,"utf8mb4", "utf8mb4_pl_0900_ai_ci", 1, 4}, + {262,"utf8mb4", "utf8mb4_et_0900_ai_ci", 1, 4}, + {263,"utf8mb4", "utf8mb4_es_0900_ai_ci", 1, 4}, + {264,"utf8mb4", "utf8mb4_sv_0900_ai_ci", 1, 4}, + {265,"utf8mb4", "utf8mb4_tr_0900_ai_ci", 1, 4}, + {266,"utf8mb4", "utf8mb4_cs_0900_ai_ci", 1, 4}, + {267,"utf8mb4", "utf8mb4_da_0900_ai_ci", 1, 4}, + {268,"utf8mb4", "utf8mb4_lt_0900_ai_ci", 1, 4}, + {269,"utf8mb4", "utf8mb4_sk_0900_ai_ci", 1, 4}, + {270,"utf8mb4", "utf8mb4_es_trad_0900_ai_ci", 1, 4}, + {271,"utf8mb4", "utf8mb4_la_0900_ai_ci", 1, 4}, + {273,"utf8mb4", "utf8mb4_eo_0900_ai_ci", 1, 4}, + {274,"utf8mb4", "utf8mb4_hu_0900_ai_ci", 1, 4}, + {275,"utf8mb4", "utf8mb4_hr_0900_ai_ci", 1, 4}, + {277,"utf8mb4", "utf8mb4_vi_0900_ai_ci", 1, 4}, + {278,"utf8mb4", "utf8mb4_0900_as_cs", 1, 4}, + {279,"utf8mb4", "utf8mb4_de_pb_0900_as_cs", 1, 4}, + {280,"utf8mb4", "utf8mb4_is_0900_as_cs", 1, 4}, + {281,"utf8mb4", "utf8mb4_lv_0900_as_cs", 1, 4}, + {282,"utf8mb4", "utf8mb4_ro_0900_as_cs", 1, 4}, + {283,"utf8mb4", "utf8mb4_sl_0900_as_cs", 1, 4}, + {284,"utf8mb4", "utf8mb4_pl_0900_as_cs", 1, 4}, + {285,"utf8mb4", "utf8mb4_et_0900_as_cs", 1, 4}, + {286,"utf8mb4", "utf8mb4_es_0900_as_cs", 1, 4}, + {287,"utf8mb4", "utf8mb4_sv_0900_as_cs", 1, 4}, + {288,"utf8mb4", "utf8mb4_tr_0900_as_cs", 1, 4}, + {289,"utf8mb4", "utf8mb4_cs_0900_as_cs", 1, 4}, + {290,"utf8mb4", "utf8mb4_da_0900_as_cs", 1, 4}, + {291,"utf8mb4", "utf8mb4_lt_0900_as_cs", 1, 4}, + {292,"utf8mb4", "utf8mb4_sk_0900_as_cs", 1, 4}, + {293,"utf8mb4", "utf8mb4_es_trad_0900_as_cs", 1, 4}, + {294,"utf8mb4", "utf8mb4_la_0900_as_cs", 1, 4}, + {296,"utf8mb4", "utf8mb4_eo_0900_as_cs", 1, 4}, + {297,"utf8mb4", "utf8mb4_hu_0900_as_cs", 1, 4}, + {298,"utf8mb4", "utf8mb4_hr_0900_as_cs", 1, 4}, + {300,"utf8mb4", "utf8mb4_vi_0900_as_cs", 1, 4}, + {303,"utf8mb4", "utf8mb4_ja_0900_as_cs", 1, 4}, + {304,"utf8mb4", "utf8mb4_ja_0900_as_cs_ks", 1, 4}, + {305,"utf8mb4", "utf8mb4_0900_as_ci", 1, 4}, {0, NULL, NULL, 0, 0} }; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult.h b/Frameworks/SPMySQLFramework/Source/SPMySQLResult.h index 9cca9e981..5fb247363 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult.h @@ -65,7 +65,7 @@ typedef enum { } // Master init method -- (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding; +- (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding version:(NSUInteger)majorVersion; // Result set information - (NSUInteger)numberOfFields; @@ -94,6 +94,7 @@ typedef enum { * necessary there. */ @property (readwrite, assign) BOOL returnDataAsStrings; +@property (readonly, assign) NSUInteger serverMajorVersion; @property (readwrite, assign) SPMySQLResultRowType defaultRowReturnType; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m index b0e6810e6..39f3e9c89 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m @@ -41,6 +41,7 @@ @implementation SPMySQLResult @synthesize returnDataAsStrings; @synthesize defaultRowReturnType; +@synthesize serverMajorVersion; #pragma mark - #pragma mark Setup and teardown @@ -81,7 +82,7 @@ - (instancetype)init * Standard init method, constructing the SPMySQLResult around a MySQL * result pointer and the encoding to use when working with the data. */ -- (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding +- (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEncoding)theStringEncoding version:(NSUInteger)majorVersion { // If no result set was passed in, return nil. if (!theResult) return nil; @@ -93,6 +94,7 @@ - (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEn resultSet = theResult; numberOfFields = mysql_num_fields(resultSet); numberOfRows = mysql_num_rows(resultSet); + serverMajorVersion = majorVersion; // Cache the field definitions and build up an array of cached field names and types fieldDefinitions = mysql_fetch_fields(resultSet); diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.h b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.h index 3f2f1873e..92e306071 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.h @@ -39,9 +39,6 @@ // Counts and memory length tracking NSUInteger downloadedRowCount; - - IMP isConnectedPtr; - SEL isConnectedSelector; } @property (readonly, assign) BOOL dataDownloaded; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m index f0d5591cf..3c7a4a470 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m @@ -68,7 +68,7 @@ - (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEn // If no result set was passed in, return nil. if (!theResult) return nil; - if ((self = [super initWithMySQLResult:theResult stringEncoding:theStringEncoding])) { + if ((self = [super initWithMySQLResult:theResult stringEncoding:theStringEncoding version:theConnection.serverMajorVersion])) { parentConnection = theConnection; numberOfRows = NSNotFound; @@ -77,10 +77,6 @@ - (instancetype)initWithMySQLResult:(void *)theResult stringEncoding:(NSStringEn dataDownloaded = NO; connectionUnlocked = NO; - // Cache the isConnected selector and pointer for fast connection checks - isConnectedSelector = @selector(isConnected); - isConnectedPtr = [parentConnection methodForSelector:isConnectedSelector]; - // Default to returning rows as arrays defaultRowReturnType = SPMySQLResultRowAsArray; } @@ -157,7 +153,7 @@ - (id)getRowAsType:(SPMySQLResultRowType)theType id theRow = nil; // Ensure that the connection is still up before performing a row fetch - if ((*isConnectedPtr)(parentConnection, isConnectedSelector)) { + if ([parentConnection isConnected]) { // The core of result fetching in streaming mode is still based around mysql_fetch_row, // so use the super to perform normal processing. theRow = [super getRowAsType:theType]; @@ -170,11 +166,6 @@ - (id)getRowAsType:(SPMySQLResultRowType)theType [parentConnection _unlockConnection]; connectionUnlocked = YES; - // If the connection query may have been cancelled with a query kill, double-check connection - if ([parentConnection lastQueryWasCancelled] && [parentConnection serverMajorVersion] < 5) { - [parentConnection checkConnection]; - } - return nil; } diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h index dabe9ece4..15fc35edd 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h @@ -28,7 +28,6 @@ // // More info at - #import #import #include diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.m b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.m index 04569a76d..d05784f80 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.m @@ -83,7 +83,6 @@ static inline void SPMySQLStreamingResultStoreFreeRowData(SPMySQLStreamingResult free(aRow); } - #pragma mark - Setup and teardown /** @@ -275,9 +274,6 @@ - (void)dealloc // Destroy the linked list lock pthread_mutex_destroy(&dataLock); - - // Call dealloc on super to clean up everything else, and to throw an exception if - // the parent connection hasn't been cleaned up correctly. } #pragma mark - Result set information @@ -344,7 +340,7 @@ - (id)cellPreviewAtRow:(NSUInteger)rowIndex column:(NSUInteger)columnIndex previ [NSException raise:NSRangeException format:@"Requested storage index (row %llu, col %llu) beyond bounds (%llu, %llu)", (unsigned long long)rowIndex, (unsigned long long)columnIndex, (unsigned long long)numberOfRows, (unsigned long long)numberOfFields]; } - id cellData = nil; + id __autoreleasing cellData = nil; char *rawCellDataStart; SPMySQLStreamingResultStoreRowData *rowData = dataStorage[rowIndex]; @@ -685,12 +681,14 @@ - (void)_downloadAllData // Loop through the rows until the end of the data is reached - indicated via a NULL while ( - (*isConnectedPtr)(parentConnection, isConnectedSelector) + ([parentConnection isConnected]) && (theRow = mysql_fetch_row(resultSet)) ) { + // If the load has been cancelled, skip any processing - we're only interested // in ensuring that mysql_fetch_row is called for all rows. if (loadCancelled) { + SPLog(@"loadCancelled"); continue; } @@ -800,11 +798,6 @@ - (void)_downloadAllData [parentConnection _unlockConnection]; connectionUnlocked = YES; - // If the connection query may have been cancelled with a query kill, double-check connection - if ([parentConnection lastQueryWasCancelled] && [parentConnection serverMajorVersion] < 5) { - [parentConnection checkConnection]; - } - dataDownloaded = YES; // Inform the delegate the download was completed diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLStringAdditions.h b/Frameworks/SPMySQLFramework/Source/SPMySQLStringAdditions.h index 60832c53f..f2b2bd0e3 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLStringAdditions.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLStringAdditions.h @@ -28,7 +28,6 @@ // // More info at - @interface NSString (SPMySQLStringAdditions) - (NSString *)mySQLBacktickQuotedString; diff --git a/Frameworks/SPMySQLFramework/build-mysql-client.sh b/Frameworks/SPMySQLFramework/build-mysql-client.sh deleted file mode 100755 index 0720b8423..000000000 --- a/Frameworks/SPMySQLFramework/build-mysql-client.sh +++ /dev/null @@ -1,278 +0,0 @@ -#! /bin/ksh - -# -# $Id$ -# -# build-mysql-client.sh -# sequel-pro -# -# Created by Stuart Connolly (stuconnolly.com) -# Copyright (c) 2009 Stuart Connolly. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# More info at - -# Builds the MySQL client libraries for distrubution in Sequel Ace's MySQL framework. -# -# Parameters: -s -- The path to the MySQL source directory. -# -q -- Quiet. Don't output any compiler messages. -# -c -- Clean the source instead of building it. -# -d -- Debug. Output the build statements. - -QUIET='NO' -DEBUG='NO' -CLEAN='NO' - -# Configuration -MIN_OS_X_VERSION='10.6' -ARCHITECTURES='-arch x86_64' - -CONFIGURE_OPTIONS='-DBUILD_CONFIG=mysql_release -DENABLED_LOCAL_INFILE=1 -DWITH_SSL=bundled -DWITH_MYSQLD_LDFLAGS="-all-static --disable-shared" -DWITHOUT_SERVER=1 -DWITH_ZLIB=system -DWITH_UNIT_TESTS=0' -OUTPUT_DIR='SPMySQLFiles.build' - -ESC=`printf '\033'` -set -A INCLUDE_HEADERS 'my_alloc.h' 'my_command.h' 'my_list.h' 'mysql_com.h' 'mysql_time.h' 'mysql_version.h' 'mysql.h' 'typelib.h' 'mysql/client_plugin.h' 'mysql/plugin_auth_common.h' 'mysql/psi/psi_base.h' 'mysql/psi/psi_memory.h' - -usage() -{ - cat < [-b ] [-q -c -d] - -Where: -s -- Path to the MySQL source directory - -b -- Path to Boost 1.59.0 source directory - -q -- Be quiet during the build. Suppress all compiler messages - -c -- Clean the source directory instead of building - -d -- Debug. Output all the build commands -!EOF -} - -# Test for cmake -cmake --version > /dev/null 2>&1 - -if [ ! $? -eq 0 ] -then - echo "$ESC[1;31mIn addition to the standard OS X build tools, '$ESC[0;1mcmake$ESC[1;31m' is required to compile the MySQL source. $ESC[0;1mcmake$ESC[1;31m is found at $ESC[0mcmake.org$ESC[1;31m, and a binary distribution is available from $ESC[0mhttp://www.cmake.org/cmake/resources/software.mhtml$ESC[1;31m ." - echo "Exiting...$ESC[0m" - exit 1 -fi - -if [ $# -eq 0 ] -then - echo "$ESC[1;31mInvalid number of arguments. I need the path to the MySQL source directory.$ESC[0m" - echo '' - usage - exit 1 -fi - -BOOST_SOURCE_DIR= -while getopts ':s:b:qcd' OPTION -do - case "$OPTION" in - s) MYSQL_SOURCE_DIR="$OPTARG";; - b) BOOST_SOURCE_DIR="$OPTARG";; - q) QUIET='YES';; - c) CLEAN='YES';; - d) DEBUG='YES';; - *) echo "$ESC[1;31mUnrecognised option$ESC[0m"; usage; exit 1;; - esac -done - -if [ ! -d "$MYSQL_SOURCE_DIR" ] -then - echo "$ESC[1;31mMySQL source directory does not exist at path '${MYSQL_SOURCE_DIR}'.$ESC[0m" - echo "$ESC[1;31mExiting...$ESC[0m" - exit 1 -fi - -if [ -d "$BOOST_SOURCE_DIR" ]; then - CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DWITH_BOOST=${BOOST_SOURCE_DIR}" -fi - -# Change to source directory -if [ "x${DEBUG}" == 'xYES' ] -then - echo "cd ${MYSQL_SOURCE_DIR}" -fi - -cd "$MYSQL_SOURCE_DIR" - -# Perform a clean if requested -if [ "x${CLEAN}" == 'xYES' ] -then - echo "$ESC[1mCleaning MySQL source and builds...$ESC[0m" - - if [ "x${QUIET}" == 'xYES' ] - then - make clean > /dev/null - - if [ -f 'CMakeCache.txt' ]; then rm 'CMakeCache.txt' > /dev/null; fi - if [ -d "$OUTPUT_DIR" ]; then rm -rf "$OUTPUT_DIR" > /dev/null; fi - else - make clean - - if [ -f 'CMakeCache.txt' ]; then rm 'CMakeCache.txt'; fi - if [ -d "$OUTPUT_DIR" ]; then rm -rf "$OUTPUT_DIR" > /dev/null; fi - fi - - echo "$ESC[1mCleaning MySQL completed.$ESC[0m" - - exit 0 -fi - -echo '' -echo "This script builds the MySQL client libraries for distribution in Sequel Ace's MySQL framework." -echo '' -echo -n "$ESC[1mThis may take a while, are you sure you want to continue [y | n]: $ESC[0m" - -read CONTINUE - -if [ "x${CONTINUE}" == 'xn' ] -then - echo "$ESC[31mAborting...$ESC[0m" - exit 0 -fi - -# Find the SDK path -SDK_PATH=$(xcodebuild -version -sdk 2>/dev/null | grep "^Path: [a-zA-Z0-9\/\.]*$" | /usr/bin/awk -F' ' '{ print $2 }' | grep "$MIN_OS_X_VERSION") - -if [ "x${SDK_PATH}" == 'x' ] -then - echo "$ESC[1;31mNo SDK found matching OS X version ${MIN_OS_X_VERSION}.$ESC[0m" - echo "$ESC[1;31mExiting...$ESC[0m" - exit 1 -fi - -# For CMake 3.0+ use CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET to set SDK path and minimum version -CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DCMAKE_OSX_SYSROOT='${SDK_PATH}' -DCMAKE_OSX_DEPLOYMENT_TARGET=${MIN_OS_X_VERSION}" - -# For CMake 2 add these parameters to the CFLAGS/CXXFLAGS: -# -isysroot ${SDK_PATH} -mmacosx-version-min=${MIN_OS_X_VERSION} - -# C/C++ compiler flags -export CFLAGS="${ARCHITECTURES} -O3 -fno-omit-frame-pointer -fno-exceptions" -export CXXFLAGS="${ARCHITECTURES} -O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" - -echo "$ESC[1mConfiguring MySQL source...$ESC[0m" - -if [ "x${DEBUG}" == 'xYES' ] -then - echo "cmake ${CONFIGURE_OPTIONS} ." -fi - -if [ "x${QUIET}" == 'xYES' ] -then - cmake $CONFIGURE_OPTIONS . > /dev/null -else - cmake $CONFIGURE_OPTIONS . -fi - -if [ $? -eq 0 ] -then - echo "$ESC[1mConfigure successfully completed$ESC[0m" -else - echo "$ESC[1;31mConfigure failed. Exiting...$ESC[0m" - exit 1 -fi - -if [ "x${DEBUG}" == 'xYES' ] -then - echo "make mysqlclient" -fi - -echo "$ESC[1mBuilding client libraries...$ESC[0m" - -if [ "x${QUIET}" == 'xYES' ] -then - make mysqlclient > /dev/null -else - make mysqlclient -fi - -if [ $? -eq 0 ] -then - echo "$ESC[1mBuilding libraries successfully completed$ESC[0m" -else - echo "$ESC[1;31mBuilding libraries failed. Exiting...$ESC[0m" - exit 1 -fi - -echo "$ESC[1mPutting together files for distribution...$ESC[0m" - -# Create the appropriate directories -if [ ! -d "$OUTPUT_DIR" ] -then - mkdir "$OUTPUT_DIR" - if [ ! $? -eq 0 ] - then - echo "$ESC[1;31mCould not create $OUTPUT_DIR output directory!$ESC[0m" - exit 1 - fi -fi - -if [ ! -d "${OUTPUT_DIR}/lib" ] -then - mkdir "${OUTPUT_DIR}/lib" - if [ ! $? -eq 0 ] - then - echo "$ESC[1;31mCould not create ${OUTPUT_DIR}/lib output directory!$ESC[0m" - exit 1 - fi -fi - -if [ ! -d "${OUTPUT_DIR}/include" ] -then - mkdir "${OUTPUT_DIR}/include" - if [ ! $? -eq 0 ] - then - echo "$ESC[1;31mCould not create ${OUTPUT_DIR}/include output directory!$ESC[0m" - exit 1 - fi -fi - -# Copy the library -cp 'archive_output_directory/libmysqlclient.a' "${OUTPUT_DIR}/lib/" - -if [ ! $? -eq 0 ] -then - echo "$ESC[1;31mCould not copy libmysqlclient.a to output directory! (${MYSQL_SOURCE_DIR}/${OUTPUT_DIR}/lib)$ESC[0m" - exit 1 -fi - -# Copy in the required headers -for eachheader in ${INCLUDE_HEADERS[@]} -do - INC_DIR="$(dirname ${eachheader})" - mkdir -p "${OUTPUT_DIR}/include/${INC_DIR}" - cp "include/${eachheader}" "${OUTPUT_DIR}/include/${eachheader}" - if [ ! $? -eq 0 ] - then - echo "$ESC[1;31mCould not copy ${eachheader} to output directory! (${MYSQL_SOURCE_DIR}/${OUTPUT_DIR}/include)$ESC[0m" - exit 1 - fi -done -cp libbinlogevents/export/binary_log_types.h "${OUTPUT_DIR}/include/" - -echo "$ESC[1mBuilding MySQL client libraries successfully completed.$ESC[0m" -echo "$ESC[1mSee ${MYSQL_SOURCE_DIR}/${OUTPUT_DIR}/ for the product.$ESC[0m" - -exit 0 diff --git a/Frameworks/SPMySQLFramework/en.lproj/InfoPlist.strings b/Frameworks/SPMySQLFramework/en.lproj/InfoPlist.strings deleted file mode 100644 index 88f65cf6e..000000000 --- a/Frameworks/SPMySQLFramework/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Headers/SRCommon.h b/Frameworks/ShortcutRecorder.framework/Versions/A/Headers/SRCommon.h index bacfbd99e..bc5712f74 100644 --- a/Frameworks/ShortcutRecorder.framework/Versions/A/Headers/SRCommon.h +++ b/Frameworks/ShortcutRecorder.framework/Versions/A/Headers/SRCommon.h @@ -116,7 +116,7 @@ enum { // Some default values #define ShortcutRecorderEmptyFlags 0 -#define ShortcutRecorderAllFlags ShortcutRecorderEmptyFlags | (NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask | NSShiftKeyMask | NSFunctionKeyMask) +#define ShortcutRecorderAllFlags ShortcutRecorderEmptyFlags | (NSEventModifierFlagCommand | NSEventModifierFlagOption | NSEventModifierFlagControl | NSEventModifierFlagShift | NSEventModifierFlagFunction) #define ShortcutRecorderEmptyCode -1 // These keys will cancel the recoding mode if not pressed with any modifier @@ -174,7 +174,7 @@ FOUNDATION_STATIC_INLINE BOOL SRIsSpecialKey(NSInteger keyCode) { #pragma mark Additions @interface NSAlert( SRAdditions ) -+ (NSAlert *) alertWithNonRecoverableError:(NSError *)error; ++ (NSAlert *) newAlertWithNonRecoverableError:(NSError *)error; @end #pragma mark - diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/Info.plist b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/Info.plist index f6b587f05..53065a19c 100644 --- a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/Info.plist +++ b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 19F101 + 19H15 CFBundleDevelopmentRegion English CFBundleExecutable @@ -25,18 +25,20 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 11E608c + 12B45b + DTPlatformName + macosx DTPlatformVersion - GM + 11.0 DTSDKBuild - 19E258 + 20A2408 DTSDKName - macosx10.15 + macosx11.0 DTXcode - 1150 + 1220 DTXcodeBuild - 11E608c + 12B45b LSMinimumSystemVersion - 10.10 + 10.12 diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ca.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ca.lproj/ShortcutRecorder.strings deleted file mode 100644 index ae10bf3fa..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ca.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/cs.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/cs.lproj/ShortcutRecorder.strings deleted file mode 100644 index 13cde5d43..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/cs.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/da.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/da.lproj/ShortcutRecorder.strings deleted file mode 100644 index db3986a97..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/da.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/de.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/de.lproj/ShortcutRecorder.strings deleted file mode 100644 index 0a406af7c..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/de.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/el.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/el.lproj/ShortcutRecorder.strings deleted file mode 100644 index 75ea26fde..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/el.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/es-MX.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/es-MX.lproj/ShortcutRecorder.strings deleted file mode 100644 index 31daeace5..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/es-MX.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/es.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/es.lproj/ShortcutRecorder.strings deleted file mode 100644 index 45028feeb..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/es.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/fr.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/fr.lproj/ShortcutRecorder.strings deleted file mode 100644 index ff8488510..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/fr.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/it.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/it.lproj/ShortcutRecorder.strings deleted file mode 100644 index b49898097..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/it.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ja.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ja.lproj/ShortcutRecorder.strings deleted file mode 100644 index 4a48483a2..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ja.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ko.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ko.lproj/ShortcutRecorder.strings deleted file mode 100644 index 9b43ae067..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ko.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/nb.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/nb.lproj/ShortcutRecorder.strings deleted file mode 100644 index 8ea479ec5..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/nb.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/nl.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/nl.lproj/ShortcutRecorder.strings deleted file mode 100644 index 260dde804..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/nl.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pl.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pl.lproj/ShortcutRecorder.strings deleted file mode 100644 index fd8142609..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pl.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt-BR.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt-BR.lproj/ShortcutRecorder.strings deleted file mode 100644 index d413a6a8b..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt-BR.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt-PT.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt-PT.lproj/ShortcutRecorder.strings deleted file mode 100644 index b82a0764b..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt-PT.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt.lproj/ShortcutRecorder.strings deleted file mode 100644 index d6bd15fd2..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/pt.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ro.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ro.lproj/ShortcutRecorder.strings deleted file mode 100644 index db1db38f9..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ro.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ru.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ru.lproj/ShortcutRecorder.strings deleted file mode 100644 index fc01d3612..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/ru.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/sk.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/sk.lproj/ShortcutRecorder.strings deleted file mode 100644 index 0aed73e68..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/sk.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/sv.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/sv.lproj/ShortcutRecorder.strings deleted file mode 100644 index a8a2f71da..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/sv.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/th.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/th.lproj/ShortcutRecorder.strings deleted file mode 100644 index ea7778b7f..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/th.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/zh-Hans.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/zh-Hans.lproj/ShortcutRecorder.strings deleted file mode 100644 index ffcb6a0f4..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/zh-Hans.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/zh-Hant.lproj/ShortcutRecorder.strings b/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/zh-Hant.lproj/ShortcutRecorder.strings deleted file mode 100644 index 22fff9111..000000000 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/Resources/zh-Hant.lproj/ShortcutRecorder.strings and /dev/null differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/ShortcutRecorder b/Frameworks/ShortcutRecorder.framework/Versions/A/ShortcutRecorder index 9e48d6f9d..64fef4530 100755 Binary files a/Frameworks/ShortcutRecorder.framework/Versions/A/ShortcutRecorder and b/Frameworks/ShortcutRecorder.framework/Versions/A/ShortcutRecorder differ diff --git a/Frameworks/ShortcutRecorder.framework/Versions/A/_CodeSignature/CodeResources b/Frameworks/ShortcutRecorder.framework/Versions/A/_CodeSignature/CodeResources index c25f6ff09..508fc7427 100644 --- a/Frameworks/ShortcutRecorder.framework/Versions/A/_CodeSignature/CodeResources +++ b/Frameworks/ShortcutRecorder.framework/Versions/A/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Resources/Info.plist - EezoPk44rFPs1QjJuWF9LyxoM5c= + G7G+/X/SyZ24N/EnFQgURlDt8yU= Resources/SRRemoveShortcut.tif @@ -24,51 +24,6 @@ 7dh75aviacDC9SXZtO7jLVldfY0= - Resources/ca.lproj/ShortcutRecorder.strings - - hash - - HV5JnRr78YysDKcWd2KKLbgFvvY= - - optional - - - Resources/cs.lproj/ShortcutRecorder.strings - - hash - - Nysarv1cJhiHLQNAtgu8z2LYhJc= - - optional - - - Resources/da.lproj/ShortcutRecorder.strings - - hash - - 4OO9DLzHM0m1TzCt3eLadCRnDXA= - - optional - - - Resources/de.lproj/ShortcutRecorder.strings - - hash - - 5z/pacf6ep0/SpW6DyTycP1uQLA= - - optional - - - Resources/el.lproj/ShortcutRecorder.strings - - hash - - r31CZvo3RMhjw/qPw5y2QIn2e9k= - - optional - - Resources/en.lproj/ShortcutRecorder.strings hash @@ -78,197 +33,18 @@ optional - Resources/es-MX.lproj/ShortcutRecorder.strings - - hash - - 2uEjYiIkmpusbHiE9J6/ozC0WoY= - - optional - - - Resources/es.lproj/ShortcutRecorder.strings - - hash - - Js1dqvFafY5oejbeZYneGFzh2ns= - - optional - - - Resources/fr.lproj/ShortcutRecorder.strings - - hash - - 7lf350/C9JNIeuYC/w3iy+/7vDU= - - optional - - - Resources/it.lproj/ShortcutRecorder.strings - - hash - - TDTGg92f4tZwYWcYnvryNBsDp8Y= - - optional - - - Resources/ja.lproj/ShortcutRecorder.strings - - hash - - /7uKBGpXosG5jGEAxoT/0yct5mg= - - optional - - - Resources/ko.lproj/ShortcutRecorder.strings - - hash - - 5Dk/+EQY49sveLOrTsn8GCo7hSM= - - optional - - - Resources/nb.lproj/ShortcutRecorder.strings - - hash - - 82jqWHpp81qS6WcsnqXmNU9Gy/8= - - optional - - - Resources/nl.lproj/ShortcutRecorder.strings - - hash - - TfbICfLljcBAC53rUv/mGX6zcVA= - - optional - - - Resources/pl.lproj/ShortcutRecorder.strings - - hash - - TbBUfdnbHpX37Xph3LTnME0X+0A= - - optional - - - Resources/pt-BR.lproj/ShortcutRecorder.strings - - hash - - HO5KZlHw8fJEa9Kl890c4UTJYro= - - optional - - - Resources/pt-PT.lproj/ShortcutRecorder.strings - - hash - - cdFQpbu3K4oGJ0O0G/vCWs/YR7Y= - - optional - - - Resources/pt.lproj/ShortcutRecorder.strings - - hash - - BU6PdafOfHay+q+D6ISRZ6OEiMY= - - optional - - - Resources/ro.lproj/ShortcutRecorder.strings - - hash - - pkJGT1Ffdvdl1wby2j3pFeALP3Y= - - optional - - - Resources/ru.lproj/ShortcutRecorder.strings - - hash - - 5Xe9/H4/pKnxhZSlxGU9Resibbc= - - optional - - - Resources/sk.lproj/ShortcutRecorder.strings - - hash - - cMoBeS+AQPjzSVbcZgchV27WGJ4= - - optional - - - Resources/sv.lproj/ShortcutRecorder.strings - - hash - - K2fgMW3VnX3Rs9+d6+UtdGirMQI= - - optional - - - Resources/th.lproj/ShortcutRecorder.strings - - hash - - w+zj4aTzkjrrAQyU2KlTsxQVEys= - - optional - - - Resources/zh-Hans.lproj/ShortcutRecorder.strings - - hash - - wTJUcVoEcB1pzFbjjEoO2F3C+cg= - - optional - - - Resources/zh-Hant.lproj/ShortcutRecorder.strings - - hash - - 2eJorf3pADOO95VzCES+q52XfEg= - - optional - - files2 Headers/SRCommon.h - hash - - IR7+QLlcSSa8rLzqYFtBKnmImDQ= - hash2 - dC7yLJTKGQm+NFcCMzlMhcua1+Gbrx7i98kgHkkXoJA= + rkWkgUZjTz1zgu417G7opuSgHVMii800l1V944lBSEI= Headers/SRKeyCodeTransformer.h - hash - - lSrwuc6yciVVGL6aK1DyOl2QARc= - hash2 0gNN1MmX1bvv7Cajax8nYXX3NJQsMRKTpGGhB/eVHwU= @@ -276,10 +52,6 @@ Headers/SRRecorderCell.h - hash - - 8HQO1eVqlnd7e0hkUdDWsHHGZiE= - hash2 QA8WHbcBk939ok1TKIW95JNcZx4T3mCIvd4Rh/xZ3tY= @@ -287,10 +59,6 @@ Headers/SRRecorderControl.h - hash - - /c0D5f/FpPDSZSm+KTWrnfDqYEM= - hash2 5fxbBKa5Mk6T0zgHGO8uLuquDqNWQxw3uBdUqNAu3xA= @@ -298,10 +66,6 @@ Headers/SRValidator.h - hash - - 4vEtatb/u1yE2E/z+O0vBURf/SQ= - hash2 EyKpmV3c1krkbgg/IbacvJMmSZhm/3l9paxhmJ91WkE= @@ -309,10 +73,6 @@ Headers/ShortcutRecorder.h - hash - - YUUId4SnEx2G8e7EJgaUyC8Dzb8= - hash2 GiKVkZLHH29bjM4XeP7Vfigi5bSeU9IpNTmhsYFs0WA= @@ -320,21 +80,13 @@ Resources/Info.plist - hash - - EezoPk44rFPs1QjJuWF9LyxoM5c= - hash2 - cfsDqt6kSj2AzkeCOKaHim1Ixlu9Xr+M264MqQ1Kz3k= + mNupcEM6JkBXpfejKqL49N63kE83hzCLR52hcF6dlqQ= Resources/SRRemoveShortcut.tif - hash - - 3KyBKD4lJJ0DFkSxeu591bveWYg= - hash2 Ds/ykCmI5Ts4WWZbpA38YGxP4tuwIqkkUSBYkaPa8pM= @@ -342,10 +94,6 @@ Resources/SRRemoveShortcutPressed.tif - hash - - +BRi/8OvavtPHT3rO/GObqd1mCU= - hash2 HAOtWeSPJdCAUY+O1UDJOOy9TjXqHsEuIwPR9XdaScI= @@ -353,10 +101,6 @@ Resources/SRRemoveShortcutRollover.tif - hash - - cVH4mWqfmMH+G7j/OG/3AeZScKo= - hash2 a41jY+1obryOlkcILehoNzJ1L/ewTVUTtm5P8elZgi4= @@ -364,86 +108,13 @@ Resources/SRSnapback.tiff - hash - - 7dh75aviacDC9SXZtO7jLVldfY0= - hash2 pO4357Maimxyhcef+0LCTROHp4Zwsr3jl33BHJOxGbg= - Resources/ca.lproj/ShortcutRecorder.strings - - hash - - HV5JnRr78YysDKcWd2KKLbgFvvY= - - hash2 - - rq6OYr/xFICMtR82mIx9o6GRVii7b5OqV1N7jlJZODc= - - optional - - - Resources/cs.lproj/ShortcutRecorder.strings - - hash - - Nysarv1cJhiHLQNAtgu8z2LYhJc= - - hash2 - - LlYeJ96xULczN5WgtdwmGUUvIEdeMfzJgEcseeR+yi8= - - optional - - - Resources/da.lproj/ShortcutRecorder.strings - - hash - - 4OO9DLzHM0m1TzCt3eLadCRnDXA= - - hash2 - - QGW8bGFzboRbtUVj7bA3Lxpgwsv597S57CuwECM//Ww= - - optional - - - Resources/de.lproj/ShortcutRecorder.strings - - hash - - 5z/pacf6ep0/SpW6DyTycP1uQLA= - - hash2 - - 2+/E0/xB0Pds88KP58bxJyvvXyuuE5Mec0Hqf1VWUJc= - - optional - - - Resources/el.lproj/ShortcutRecorder.strings - - hash - - r31CZvo3RMhjw/qPw5y2QIn2e9k= - - hash2 - - 761oTpdARAzYL1XfdwXY9GJ/4lmE79Oe1C5FM1s1MEY= - - optional - - Resources/en.lproj/ShortcutRecorder.strings - hash - - 02/vEmNVsc5H/LsbGvkckQToPCw= - hash2 w+gQm8Bcdx7aOsQ0yNDYRBUzgHhTG1g9v3Yf9bgZAfM= @@ -451,253 +122,6 @@ optional - Resources/es-MX.lproj/ShortcutRecorder.strings - - hash - - 2uEjYiIkmpusbHiE9J6/ozC0WoY= - - hash2 - - 0WERkQ2ctJOkzZzCAGC7oXLK803OZ7FdieM+pSCxFvc= - - optional - - - Resources/es.lproj/ShortcutRecorder.strings - - hash - - Js1dqvFafY5oejbeZYneGFzh2ns= - - hash2 - - XFM0aqV6Oaxs4x9IGkDousqjLmLp8cGCn1uun5Sonto= - - optional - - - Resources/fr.lproj/ShortcutRecorder.strings - - hash - - 7lf350/C9JNIeuYC/w3iy+/7vDU= - - hash2 - - SELdr4SirFRi2UzS+eeBvkuDWVUBtLHE9lvieiUQgcA= - - optional - - - Resources/it.lproj/ShortcutRecorder.strings - - hash - - TDTGg92f4tZwYWcYnvryNBsDp8Y= - - hash2 - - SVMREY15e1Ta+HAfsDUAoPl7jQKRW7F9oETKF7F5K7M= - - optional - - - Resources/ja.lproj/ShortcutRecorder.strings - - hash - - /7uKBGpXosG5jGEAxoT/0yct5mg= - - hash2 - - fx45cLudHcV7gnC09v46Is5u6EQGbpCpGY3O0bMCUr0= - - optional - - - Resources/ko.lproj/ShortcutRecorder.strings - - hash - - 5Dk/+EQY49sveLOrTsn8GCo7hSM= - - hash2 - - pr8IjcTg9Gtvr8OvFJr8Ne5UCGr515Wr4IcJmE06Jxs= - - optional - - - Resources/nb.lproj/ShortcutRecorder.strings - - hash - - 82jqWHpp81qS6WcsnqXmNU9Gy/8= - - hash2 - - IeAOnVw3cNoCC1fLCCzwW0DdoiMibgg5auQplyEJ0Ro= - - optional - - - Resources/nl.lproj/ShortcutRecorder.strings - - hash - - TfbICfLljcBAC53rUv/mGX6zcVA= - - hash2 - - 9LUT8SO3LD0x/AyXYrnle4WelUDD9XQw7SOuc7psGVU= - - optional - - - Resources/pl.lproj/ShortcutRecorder.strings - - hash - - TbBUfdnbHpX37Xph3LTnME0X+0A= - - hash2 - - oRPmQVAqVNgNX8DVurOXv3zZ3bNNxyIIBJQGRznVpUc= - - optional - - - Resources/pt-BR.lproj/ShortcutRecorder.strings - - hash - - HO5KZlHw8fJEa9Kl890c4UTJYro= - - hash2 - - G+lhUl1/ukSvYogvhAYTAzeuD32XKgV0iQX7CMuiUdM= - - optional - - - Resources/pt-PT.lproj/ShortcutRecorder.strings - - hash - - cdFQpbu3K4oGJ0O0G/vCWs/YR7Y= - - hash2 - - 9BXiNyWO/KlX+XV0bfjbLkactbX5tHWOzhUNr43k7sM= - - optional - - - Resources/pt.lproj/ShortcutRecorder.strings - - hash - - BU6PdafOfHay+q+D6ISRZ6OEiMY= - - hash2 - - eADvWmzZkFjQTFT19EiIXq9OHV20CWtO4XI0+76ZLpw= - - optional - - - Resources/ro.lproj/ShortcutRecorder.strings - - hash - - pkJGT1Ffdvdl1wby2j3pFeALP3Y= - - hash2 - - ynbquHnpx6NOYXImKni2JcDC9jExUssw0Ku7OyQZdSc= - - optional - - - Resources/ru.lproj/ShortcutRecorder.strings - - hash - - 5Xe9/H4/pKnxhZSlxGU9Resibbc= - - hash2 - - uqb8O7vKhYp9OceDL9HmS2SP26PQ5traIPf/zx8TU3E= - - optional - - - Resources/sk.lproj/ShortcutRecorder.strings - - hash - - cMoBeS+AQPjzSVbcZgchV27WGJ4= - - hash2 - - tg9gV4xQbem+9brDxIdMBau2ujUDFcF0L40inoXJpOY= - - optional - - - Resources/sv.lproj/ShortcutRecorder.strings - - hash - - K2fgMW3VnX3Rs9+d6+UtdGirMQI= - - hash2 - - h48zAbnTqsD1HQmlnzSoIBJQDQjXehQbUa9Np1soJ0k= - - optional - - - Resources/th.lproj/ShortcutRecorder.strings - - hash - - w+zj4aTzkjrrAQyU2KlTsxQVEys= - - hash2 - - XhNBOpdyBqzH3p3dEMNpncyVaRbZRSQ/Qol9YLALyXY= - - optional - - - Resources/zh-Hans.lproj/ShortcutRecorder.strings - - hash - - wTJUcVoEcB1pzFbjjEoO2F3C+cg= - - hash2 - - hI5PhhefskHnsiSLGb865Fq1lOozhxPQ1ZddH7NJ1jU= - - optional - - - Resources/zh-Hant.lproj/ShortcutRecorder.strings - - hash - - 2eJorf3pADOO95VzCES+q52XfEg= - - hash2 - - bj2zYsgNCb1OsaE748IlN34DdSo6xj9P8zgeaBs2L8I= - - optional - - rules diff --git a/Frameworks/libmysqlclient/build-libmysqlclient.sh b/Frameworks/libmysqlclient/build-libmysqlclient.sh new file mode 100755 index 000000000..c43bd11b7 --- /dev/null +++ b/Frameworks/libmysqlclient/build-libmysqlclient.sh @@ -0,0 +1,257 @@ +#!/usr/bin/env bash +# shellcheck shell=bash +#set | grep ARCH + +# ARCHS='arm64 x86_64' +unset CFLAGS + +echo "TARGET BUILD DIR = $TARGET_BUILD_DIR" +echo "SRCROOT = $SRCROOT" + +# set -x + +## Determine the appropriate mysql source path to use +## Introduced by michaeltyson, adapted to account for MYSQL_SRC build path + +# locate src archive file if present +SRC_ARCHIVE=$(ls mysql*tar.gz 2>/dev/null) + +# if there is a mysql.tar.gz in the directory, expand it to mysql and use it +if [ -f "$SRC_ARCHIVE" ]; then + MYSQL_SRC="$PROJECT_TEMP_DIR/mysql" + if [ ! -d "$MYSQL_SRC" ]; then + echo "extracting $SRC_ARCHIVE..." + mkdir "$MYSQL_SRC" + tar -C "$MYSQL_SRC" --strip-components=1 -zxf "$SRC_ARCHIVE" || exit 1 + cp -RL "$MYSQL_SRC/include" "$TARGET_BUILD_DIR" + fi +elif [ ! -f "$SRC_ARCHIVE" ]; then + echo "***** Download mysql src from https://dev.mysql.com/downloads/mysql/ and place in Frameworks/libmysql *****" + exit 1; +fi + + +echo "***** using $MYSQL_SRC for mysql source code *****" + +# check whether libmysqlclient.a already exists - we'll only build if it does not +if [ -f "$TARGET_BUILD_DIR/libmysqlclient.24.dylib" ]; then + echo "***** Using previously-built library $TARGET_BUILD_DIR/libmysqlclient.24.dylib - skipping build *****" + echo "***** To force a rebuild clean project and clean dependencies *****" + exit 0; +else + echo "***** No previously-built library present at $TARGET_BUILD_DIR/libmysqlclient.24.dylib - performing build *****" +fi + +export CC=/usr/bin/clang +export CXX=/usr/bin/clang++ +cd $MYSQL_SRC + + +# Check that we have HomeBrew installed +which -s /usr/local/bin/brew +if [[ $? != 0 ]] ; then + # Install Homebrew if missing + arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +fi +# Check that we have HomeBrew installed +which -s /opt/homebrew/bin/brew +if [[ $? != 0 ]] ; then + # Install Homebrew if missing + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +fi + +rm -rf $BUILD_DIR/arm64 +mkdir -p $BUILD_DIR/arm64 +/opt/homebrew/bin/brew install icu4c googletest bison flex ninja cmake lz4 zlib llvm openssl@3 +export MACOSX_DEPLOYMENT_TARGET=12.0 +export OPENSSL_ROOT_DIR=$(/opt/homebrew/bin/brew --prefix openssl@3) +export OPENSSL_LIB_DIR=$(/opt/homebrew/bin/brew --prefix openssl@3)"/lib" +export OPENSSL_INCLUDE_DIR=$(/opt/homebrew/bin/brew --prefix openssl@3)"/include" + +/opt/homebrew/bin/cmake -S . -B $BUILD_DIR/arm64 \ + -DCMAKE_OSX_ARCHITECTURES=arm64 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ + -DCMAKE_CXX_STANDARD=20 \ + -DCMAKE_SYSTEM_PROCESSOR=arm64 \ + -DCMAKE_OSX_SYSROOT=$(xcrun --sdk macosx --show-sdk-path) \ + -DCMAKE_CXX_FLAGS="-stdlib=libc++ -nostdinc++ -I/opt/homebrew/opt/llvm/include/c++/v1 -mmacosx-version-min=12.0" \ + -DCMAKE_INSTALL_PREFIX=$BUILD_DIR/arm64/install \ + -DCMAKE_PREFIX_PATH="/opt/homebrew/opt/gtest;/opt/homebrew/opt/icu4c;/opt/homebrew/opt/openssl" \ + -DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison \ + -DWITH_SSL=/opt/homebrew/opt/openssl@3 \ + -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3 \ + -DOPENSSL_LIBRARIES=/opt/homebrew/opt/openssl@3/lib \ + -DOPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@3/include \ + -DDOWNLOAD_BOOST=1 -DWITH_BOOST=boost_directory -DBUILD_CONFIG=mysql_release -DENABLED_LOCAL_INFILE=1 -DWITH_MYSQLD_LDFLAGS="-all-static --disable-shared" -DWITHOUT_SERVER=1 -DWITH_ZLIB=system -DWITH_UNIT_TESTS=0 \ + -DDISABLE_SHARED=1 \ + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=yes \ + -DWITH_AUTHENTICATION_PLUGIN=ALL \ + -DWITH_INSECURE_AUTH=ON \ + -DWITH_OLD_PASSWORD=ON \ + -DENABLED_LOCAL_INFILE=ON \ + -DWITH_COMPRESSION=ON \ + -DWITH_ZLIB=bundled \ + -DWITH_INNODB_MEMCACHED=ON \ + -DWITH_PARTITION_STORAGE_ENGINE=ON \ + -DWITH_INNODB_STORAGE_ENGINE=ON \ + -DWITH_ARCHIVE_STORAGE_ENGINE=ON \ + -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ + -DWITH_FEDERATED_STORAGE_ENGINE=ON \ + -DWITH_PERFSCHEMA_STORAGE_ENGINE=ON \ + -DWITH_TOKUDB_STORAGE_ENGINE=ON \ + -DWITH_EXTRA_CHARSETS=all +# Check if CMake succeeded +if [ $? -ne 0 ]; then + echo "❌ CMake failed! Aborting build process." + exit 1 +fi + +/opt/homebrew/bin/cmake --build $BUILD_DIR/arm64 --target install --parallel $(sysctl -n hw.ncpu) +# Check if CMake succeeded +if [ $? -ne 0 ]; then + echo "❌ CMake failed! Aborting build process." + exit 1 +fi + +rm -rf $BUILD_DIR/x86_64 +mkdir -p $BUILD_DIR/x86_64 +arch -x86_64 /usr/local/bin/brew install icu4c googletest bison flex ninja cmake lz4 zlib llvm openssl@3 +mkdir -p /usr/local/mysql/lib/private +export MACOSX_DEPLOYMENT_TARGET=12.0 +export OPENSSL_ROOT_DIR=$(/usr/local/bin/brew --prefix openssl@3) +export OPENSSL_LIB_DIR=$(/usr/local/bin/brew --prefix openssl@3)"/lib" +export OPENSSL_INCLUDE_DIR=$(/usr/local/bin/brew --prefix openssl@3)"/include" + +arch -x86_64 /usr/local/bin/cmake -S . -B $BUILD_DIR/x86_64 \ + -DCMAKE_OSX_ARCHITECTURES=x86_64 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ + -DCMAKE_CXX_STANDARD=20 \ + -DCMAKE_SYSTEM_PROCESSOR=x86_64 \ + -DCMAKE_OSX_SYSROOT=$(xcrun --sdk macosx --show-sdk-path) \ + -DCMAKE_CXX_FLAGS="-stdlib=libc++ -nostdinc++ -I/usr/local/opt/llvm/include/c++/v1 -mmacosx-version-min=12.0" \ + -DCMAKE_INSTALL_PREFIX=$BUILD_DIR/x86_64/install \ + -DCMAKE_PREFIX_PATH="/usr/local/gtest_x86_64;/usr/local/icu_x86_64" \ + -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison \ + -DWITH_SSL=/usr/local/opt/openssl@3 \ + -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 \ + -DOPENSSL_LIBRARIES=/usr/local/opt/openssl@3/lib \ + -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include \ + -DDOWNLOAD_BOOST=1 -DWITH_BOOST=boost_directory -DBUILD_CONFIG=mysql_release -DENABLED_LOCAL_INFILE=1 -DWITH_MYSQLD_LDFLAGS="-all-static --disable-shared" -DWITHOUT_SERVER=1 -DWITH_ZLIB=system -DWITH_UNIT_TESTS=0 \ + -DDISABLE_SHARED=1 \ + -DWITH_AUTHENTICATION_CLIENT_PLUGINS=yes \ + -DWITH_AUTHENTICATION_PLUGIN=ALL \ + -DWITH_INSECURE_AUTH=ON \ + -DWITH_OLD_PASSWORD=ON \ + -DENABLED_LOCAL_INFILE=ON \ + -DWITH_COMPRESSION=ON \ + -DWITH_ZLIB=bundled \ + -DWITH_INNODB_MEMCACHED=ON \ + -DWITH_PARTITION_STORAGE_ENGINE=ON \ + -DWITH_INNODB_STORAGE_ENGINE=ON \ + -DWITH_ARCHIVE_STORAGE_ENGINE=ON \ + -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ + -DWITH_FEDERATED_STORAGE_ENGINE=ON \ + -DWITH_PERFSCHEMA_STORAGE_ENGINE=ON \ + -DWITH_TOKUDB_STORAGE_ENGINE=ON \ + -DWITH_EXTRA_CHARSETS=all +# Check if CMake succeeded +if [ $? -ne 0 ]; then + echo "❌ CMake failed! Aborting build process." + exit 1 +fi + +arch -x86_64 /usr/local/bin/cmake --build $BUILD_DIR/x86_64 --target install --parallel $(sysctl -n hw.ncpu) +# Check if CMake succeeded +if [ $? -ne 0 ]; then + echo "❌ CMake failed! Aborting build process." + exit 1 +fi + +echo "***** creating universallibraries in $TARGET_BUILD_DIR *****" +lipo -create -output $TARGET_BUILD_DIR/libmysqlclient.24.dylib \ + $BUILD_DIR/x86_64/install/lib/libmysqlclient.24.dylib \ + $BUILD_DIR/arm64/install/lib/libmysqlclient.24.dylib + +lipo -create -output $TARGET_BUILD_DIR/libcrypto.3.dylib \ + $BUILD_DIR/x86_64/install/lib/libcrypto.3.dylib \ + $BUILD_DIR/arm64/install/lib/libcrypto.3.dylib + +lipo -create -output $TARGET_BUILD_DIR/libssl.3.dylib \ + $BUILD_DIR/x86_64/install/lib/libssl.3.dylib \ + $BUILD_DIR/arm64/install/lib/libssl.3.dylib + +# lipo -create -output $TARGET_BUILD_DIR/libprotobuf-lite.24.4.0.dylib \ +# $BUILD_DIR/x86_64/install/lib/libprotobuf-lite.24.4.0.dylib \ +# $BUILD_DIR/arm64/install/lib/libprotobuf-lite.24.4.0.dylib + +# lipo -create -output $TARGET_BUILD_DIR/libprotobuf.24.4.0.dylib \ +# $BUILD_DIR/x86_64/install/lib/libprotobuf.24.4.0.dylib \ +# $BUILD_DIR/arm64/install/lib/libprotobuf.24.4.0.dylib + +# lipo -create -output $TARGET_BUILD_DIR/libfido2.1.15.0.dylib \ +# $BUILD_DIR/x86_64/install/lib/libfido2.1.15.0.dylib \ +# $BUILD_DIR/arm64/install/lib/libfido2.1.15.0.dylib + +echo "***** Fixing DYLIB Paths *****" +cd "$TARGET_BUILD_DIR" +install_name_tool -id "libmysqlclient.24.dylib" libmysqlclient.24.dylib +install_name_tool -id "libcrypto.3.dylib" libcrypto.3.dylib +install_name_tool -id "libssl.3.dylib" libssl.3.dylib +# install_name_tool -id "libprotobuf-lite.24.4.0.dylib" libprotobuf-lite.24.4.0.dylib +# install_name_tool -id "libprotobuf.24.4.0.dylib" libprotobuf.24.4.0.dylib +# install_name_tool -id "libfido2.1.15.0.dylib" libfido2.1.15.0.dylib + +while true; do + CRYPTO=$(otool -L libssl.3.dylib | grep -v "@loader_path" | grep libcrypto.3.dylib | cut -d' ' -f1 | head -1) + CRYPTO="${CRYPTO#"${CRYPTO%%[![:space:]]*}"}" + CRYPTO="${CRYPTO%"${CRYPTO##*[![:space:]]}"}" + + # Exit the loop if CRYPTO is empty + if [[ -z "$CRYPTO" ]]; then + break + fi + + echo "CRYPTO: $CRYPTO" + echo "Setting @loader_path/libcrypto.3.dylib in libssl.3.dylib (replacing $CRYPTO)" + install_name_tool -change "$CRYPTO" @loader_path/libcrypto.3.dylib libssl.3.dylib +done; + +while true; do + SSL=$(otool -L libmysqlclient.24.dylib | grep -v "@loader_path" | grep libssl.3.dylib | cut -d' ' -f1 | head -1) + SSL="${SSL#"${SSL%%[![:space:]]*}"}" + SSL="${SSL%"${SSL##*[![:space:]]}"}" + + # Exit the loop if CRYPTO is empty + if [[ -z "$SSL" ]]; then + break + fi + + echo "Setting @loader_path/libssl.3.dylib in libmysqlclient.24.dylib (replacing $SSL)" + install_name_tool -change "$SSL" @loader_path/libssl.3.dylib libmysqlclient.24.dylib +done; + +while true; do + CRYPTO=$(otool -L libmysqlclient.24.dylib | grep -v "@loader_path" | grep libcrypto.3.dylib | cut -d' ' -f1 | head -1) + CRYPTO="${CRYPTO#"${CRYPTO%%[![:space:]]*}"}" + CRYPTO="${CRYPTO%"${CRYPTO##*[![:space:]]}"}" + + # Exit the loop if CRYPTO is empty + if [[ -z "$CRYPTO" ]]; then + break + fi + + echo "Setting @loader_path/libcrypto.3.dylib in libmysqlclient.24.dylib (replacing $CRYPTO)" + install_name_tool -change "$CRYPTO" @loader_path/libcrypto.3.dylib libmysqlclient.24.dylib +done + +echo "***** copying libraries to $SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib" || exit 1; +mkdir -p "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64" || exit 1; +mkdir -p "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64" || exit 1; +mkdir -p "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/include" || exit 1; +rm -rf "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64/*" || exit 1; +rm -rf "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64/*" || exit 1; +rm -rf "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/include/*" || exit 1; +cp "$TARGET_BUILD_DIR/"*.dylib "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib" || exit 1; +rsync -Hav "$BUILD_DIR/arm64/install/include/" "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/include" || exit 1; +cp "$BUILD_DIR/arm64/install/lib/plugin/"*.so "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/arm64" || exit 1; +cp "$BUILD_DIR/x86_64/install/lib/plugin/"*.so "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib/mysqlplugins/x86_64" || exit 1; \ No newline at end of file diff --git a/Frameworks/openssl/openssl.xcodeproj/project.pbxproj b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.pbxproj similarity index 86% rename from Frameworks/openssl/openssl.xcodeproj/project.pbxproj rename to Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.pbxproj index 8c7a4b0d2..a474b8c5d 100644 --- a/Frameworks/openssl/openssl.xcodeproj/project.pbxproj +++ b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.pbxproj @@ -3,11 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXFileReference section */ - 9069D28C0FCE659A0042E34C /* libcrypto.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libcrypto.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 9069D28C0FCE659A0042E34C /* libmysqlclient.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libmysqlclient.a; path = liblibmysqlclient.a; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXGroup section */ @@ -21,7 +21,7 @@ 9069D25C0FCE62420042E34C /* Products */ = { isa = PBXGroup; children = ( - 9069D28C0FCE659A0042E34C /* libcrypto.a */, + 9069D28C0FCE659A0042E34C /* libmysqlclient.a */, ); name = Products; sourceTree = ""; @@ -29,9 +29,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 9069D28B0FCE659A0042E34C /* crypto */ = { + 9069D28B0FCE659A0042E34C /* libmysqlclient */ = { isa = PBXNativeTarget; - buildConfigurationList = 9069D2980FCE65C10042E34C /* Build configuration list for PBXNativeTarget "crypto" */; + buildConfigurationList = 9069D2980FCE65C10042E34C /* Build configuration list for PBXNativeTarget "libmysqlclient" */; buildPhases = ( 9038ACD812DCAC96004FA0D0 /* ShellScript */, ); @@ -39,9 +39,9 @@ ); dependencies = ( ); - name = crypto; - productName = crypto; - productReference = 9069D28C0FCE659A0042E34C /* libcrypto.a */; + name = libmysqlclient; + productName = libmysqlclient; + productReference = 9069D28C0FCE659A0042E34C /* libmysqlclient.a */; productType = "com.apple.product-type.library.static"; }; /* End PBXNativeTarget section */ @@ -52,7 +52,7 @@ attributes = { LastUpgradeCheck = 1220; }; - buildConfigurationList = 9069D1320FCE340B0042E34C /* Build configuration list for PBXProject "openssl" */; + buildConfigurationList = 9069D1320FCE340B0042E34C /* Build configuration list for PBXProject "libmysqlclient" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; @@ -64,7 +64,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 9069D28B0FCE659A0042E34C /* crypto */, + 9069D28B0FCE659A0042E34C /* libmysqlclient */, ); }; /* End PBXProject section */ @@ -72,6 +72,7 @@ /* Begin PBXShellScriptBuildPhase section */ 9038ACD812DCAC96004FA0D0 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -81,7 +82,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PROJECT_DIR}/build-openssl.sh\"\n"; + shellScript = "\"${PROJECT_DIR}/build-libmysqlclient.sh\"\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -120,7 +121,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = "$(PLATFORM_NAME)"; SKIP_INSTALL = YES; @@ -162,7 +163,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.10; + MACOSX_DEPLOYMENT_TARGET = 12.0; SDKROOT = "$(PLATFORM_NAME)"; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = macosx; @@ -174,6 +175,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -183,8 +185,7 @@ GCC_OPTIMIZATION_LEVEL = 0; INSTALL_PATH = "@executable_path"; LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_NAME = crypto; + PRODUCT_NAME = libmysqlclient; VALID_ARCHS = "arm64 x86_64"; }; name = Debug; @@ -193,6 +194,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -201,8 +203,7 @@ GCC_MODEL_TUNING = G5; INSTALL_PATH = "@executable_path"; LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_NAME = crypto; + PRODUCT_NAME = libmysqlclient; VALID_ARCHS = "arm64 x86_64"; ZERO_LINK = NO; }; @@ -211,7 +212,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 9069D1320FCE340B0042E34C /* Build configuration list for PBXProject "openssl" */ = { + 9069D1320FCE340B0042E34C /* Build configuration list for PBXProject "libmysqlclient" */ = { isa = XCConfigurationList; buildConfigurations = ( 9069D1300FCE340B0042E34C /* Debug */, @@ -220,7 +221,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9069D2980FCE65C10042E34C /* Build configuration list for PBXNativeTarget "crypto" */ = { + 9069D2980FCE65C10042E34C /* Build configuration list for PBXNativeTarget "libmysqlclient" */ = { isa = XCConfigurationList; buildConfigurations = ( 9069D28D0FCE659B0042E34C /* Debug */, diff --git a/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Frameworks/openssl/openssl.xcodeproj/xcshareddata/xcschemes/crypto.xcscheme b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/xcshareddata/xcschemes/libmysqlclient.xcscheme similarity index 75% rename from Frameworks/openssl/openssl.xcodeproj/xcshareddata/xcschemes/crypto.xcscheme rename to Frameworks/libmysqlclient/libmysqlclient.xcodeproj/xcshareddata/xcschemes/libmysqlclient.xcscheme index 1f0bd560f..a597321fb 100644 --- a/Frameworks/openssl/openssl.xcodeproj/xcshareddata/xcschemes/crypto.xcscheme +++ b/Frameworks/libmysqlclient/libmysqlclient.xcodeproj/xcshareddata/xcschemes/libmysqlclient.xcscheme @@ -1,10 +1,11 @@ + LastUpgradeVersion = "1620" + version = "1.7"> + buildImplicitDependencies = "YES" + buildArchitectures = "Automatic"> + BuildableName = "liblibmysqlclient.a" + BlueprintName = "libmysqlclient" + ReferencedContainer = "container:libmysqlclient.xcodeproj"> @@ -26,12 +27,11 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + shouldAutocreateTestPlan = "YES"> + BuildableName = "liblibmysqlclient.a" + BlueprintName = "libmysqlclient" + ReferencedContainer = "container:libmysqlclient.xcodeproj"> diff --git a/Frameworks/openssl/10-main.conf b/Frameworks/openssl/10-main.conf deleted file mode 100644 index ddcc07baa..000000000 --- a/Frameworks/openssl/10-main.conf +++ /dev/null @@ -1,1813 +0,0 @@ -## -*- mode: perl; -*- -## Standard openssl configuration targets. - -# Helper functions for the Windows configs -my $vc_win64a_info = {}; -sub vc_win64a_info { - unless (%$vc_win64a_info) { - if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) { - $vc_win64a_info = { AS => "nasm", - ASFLAGS => "-g", - asflags => "-Ox -f win64 -DNEAR", - asoutflag => "-o " }; - } elsif ($disabled{asm}) { - # assembler is still used to compile uplink shim - $vc_win64a_info = { AS => "ml64", - ASFLAGS => "/nologo /Zi", - asflags => "/c /Cp /Cx", - asoutflag => "/Fo" }; - } else { - $die->("NASM not found - make sure it's installed and available on %PATH%\n"); - $vc_win64a_info = { AS => "{unknown}", - ASFLAGS => "", - asflags => "", - asoutflag => "" }; - } - } - return $vc_win64a_info; -} - -my $vc_win32_info = {}; -sub vc_win32_info { - unless (%$vc_win32_info) { - my $ver=`nasm -v 2>NUL`; - my $vew=`nasmw -v 2>NUL`; - if ($ver ne "" || $vew ne "") { - $vc_win32_info = { AS => $ver ge $vew ? "nasm" : "nasmw", - ASFLAGS => "", - asflags => "-f win32", - asoutflag => "-o ", - perlasm_scheme => "win32n" }; - } elsif ($disabled{asm}) { - # not actually used, uplink shim is inlined into C code - $vc_win32_info = { AS => "ml", - ASFLAGS => "/nologo /Zi", - asflags => "/Cp /coff /c /Cx", - asoutflag => "/Fo", - perlasm_scheme => "win32" }; - } else { - $die->("NASM not found - make sure it's installed and available on %PATH%\n"); - $vc_win32_info = { AS => "{unknown}", - ASFLAGS => "", - asflags => "", - asoutflag => "", - perlasm_scheme => "win32" }; - } - } - return $vc_win32_info; -} - -my $vc_wince_info = {}; -sub vc_wince_info { - unless (%$vc_wince_info) { - # sanity check - $die->('%OSVERSION% is not defined') if (!defined(env('OSVERSION'))); - $die->('%PLATFORM% is not defined') if (!defined(env('PLATFORM'))); - $die->('%TARGETCPU% is not defined') if (!defined(env('TARGETCPU'))); - - # - # Idea behind this is to mimic flags set by eVC++ IDE... - # - my $wcevers = env('OSVERSION'); # WCENNN - my $wcevernum; - my $wceverdotnum; - if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) { - $wcevernum = "$1$2"; - $wceverdotnum = "$1.$2"; - } else { - $die->('%OSVERSION% value is insane'); - $wcevernum = "{unknown}"; - $wceverdotnum = "{unknown}"; - } - my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN - my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN - - my $wceplatf = env('PLATFORM'); - - $wceplatf =~ tr/a-z0-9 /A-Z0-9_/; - $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; - - my $wcetgt = env('TARGETCPU'); # just shorter name... - SWITCH: for($wcetgt) { - /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; - $wcelflag.=" /machine:X86"; last; }; - /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; - $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); - $wcecdefs.=" -QRarch4T -QRinterwork-return"; - $wcelflag.=" /machine:THUMB"; last; }; - /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; - $wcelflag.=" /machine:ARM"; last; }; - /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; - $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32"; - $wcelflag.=" /machine:MIPSFPU"; last; }; - /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; - $wcecdefs.=" -DMIPSII -QMmips16"; - $wcelflag.=" /machine:MIPS16"; last; }; - /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; - $wcecdefs.=" -QMmips2"; - $wcelflag.=" /machine:MIPS"; last; }; - /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000"; - $wcelflag.=" /machine:MIPS"; last; }; - /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx"; - $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/); - $wcelflag.=" /machine:$wcetgt"; last; }; - { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_"; - $wcelflag.=" /machine:$wcetgt"; last; }; - } - - $vc_wince_info = { cppflags => $wcecdefs, - lflags => $wcelflag }; - } - return $vc_wince_info; -} - -# Helper functions for the VMS configs -my $vms_info = {}; -sub vms_info { - my $pointer_size_str = $config{target} =~ m|-p(\d+)$| ? $1 : ""; - - # For the case where Configure iterate through all config targets, such - # as when listing them and their details, we reset info if the pointer - # size changes. - if (%$vms_info && $vms_info->{pointer_size} ne $pointer_size_str) { - $vms_info = {}; - } - - unless (%$vms_info) { - $vms_info->{disable_warns} = [ ]; - $vms_info->{pointer_size} = $pointer_size_str; - if ($pointer_size_str eq "64") { - `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; - if ($? == 0) { - push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3"; - } - } - - unless ($disabled{zlib}) { - my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str; - if (defined($disabled{"zlib-dynamic"})) { - $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE"; - } else { - $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib; - # In case the --with-zlib-lib value contains something like - # /SHARE or /LIB or so at the end, remove it. - $vms_info->{def_zlib} =~ s|/.*$||g; - } - } - - if ($config{target} =~ /-ia64/) { - `PIPE ias -H 2> NL:`; - if ($? == 0) { - $vms_info->{AS} = "ias"; - $vms_info->{ASFLAGS} = '-d debug'; - $vms_info->{asflags} = '"-N" vms_upcase'; - $vms_info->{asoutflag} = "-o "; - $vms_info->{perlasm_scheme} = "ias"; - } - } - } - return $vms_info; -} - -my %targets = ( - -#### Basic configs that should work on any 32-bit box - "gcc" => { - inherit_from => [ "BASE_unix" ], - CC => "gcc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O3"), - thread_scheme => "(unknown)", - bn_ops => "BN_LLONG", - }, - "cc" => { - inherit_from => [ "BASE_unix" ], - CC => "cc", - CFLAGS => "-O", - thread_scheme => "(unknown)", - }, - -#### VOS Configurations - "vos-gcc" => { - inherit_from => [ "BASE_unix" ], - CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3"), - cppflags => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES", - lib_cppflags => "-DB_ENDIAN", - thread_scheme => "(unknown)", - sys_id => "VOS", - lflags => add("-Wl,-map"), - bn_ops => "BN_LLONG", - shared_extension => ".so", - }, - -#### Solaris configurations - "solaris-common" => { - inherit_from => [ "BASE_unix" ], - template => 1, - lib_cppflags => "-DFILIO_H", - ex_libs => add("-lsocket -lnsl -ldl"), - dso_scheme => "dlfcn", - thread_scheme => "pthreads", - shared_target => "self", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - shared_ldflag => "-Wl,-Bsymbolic", - shared_defflag => "-Wl,-M,", - shared_sonameflag=> "-Wl,-h,", - }, -#### Solaris x86 with GNU C setups - "solaris-x86-gcc" => { - # NB. GNU C has to be configured to use GNU assembler, and not - # /usr/ccs/bin/as. Failure to comply will result in compile - # failures [at least] in 32-bit build. - inherit_from => [ "solaris-common", asm("x86_elf_asm") ], - CC => "gcc", - CFLAGS => add_before(picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3 -fomit-frame-pointer")), - cflags => add(threads("-pthread")), - lib_cppflags => add("-DL_ENDIAN"), - ex_libs => add(threads("-pthread")), - bn_ops => "BN_LLONG", - shared_cflag => "-fPIC", - shared_ldflag => add_before("-shared -static-libgcc"), - }, - "solaris64-x86_64-gcc" => { - # -shared -static-libgcc might appear controversial, but modules - # taken from static libgcc do not have relocations and linking - # them into our shared objects doesn't have any negative side - # effects. On the contrary, doing so makes it possible to use - # gcc shared build with Sun C. Given that gcc generates faster - # code [thanks to inline assembler], I would actually recommend - # to consider using gcc shared build even with vendor compiler:-) - # -- - inherit_from => [ "solaris-common", asm("x86_64_asm") ], - CC => "gcc", - CFLAGS => add_before(picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3")), - cflags => add_before("-m64", threads("-pthread")), - lib_cppflags => add("-DL_ENDIAN"), - ex_libs => add(threads("-pthread")), - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "elf", - shared_cflag => "-fPIC", - shared_ldflag => add_before("-shared -static-libgcc"), - multilib => "/64", - }, - -#### Solaris x86 with Sun C setups - # There used to be solaris-x86-cc target, but it was removed, - # primarily because vendor assembler can't assemble our modules - # with -KPIC flag. As result it, assembly support, was not even - # available as option. But its lack means lack of side-channel - # resistant code, which is incompatible with security by today's - # standards. Fortunately gcc is readily available prepackaged - # option, which we can firmly point at... - # - # On related note, solaris64-x86_64-cc target won't compile code - # paths utilizing AVX and post-Haswell instruction extensions. - # Consider switching to solaris64-x86_64-gcc even here... - # - "solaris64-x86_64-cc" => { - inherit_from => [ "solaris-common", asm("x86_64_asm") ], - CC => "cc", - CFLAGS => add_before(picker(debug => "-g", - release => "-xO5 -xdepend -xbuiltin")), - cflags => add_before("-xarch=generic64 -xstrconst -Xa"), - cppflags => add(threads("-D_REENTRANT")), - lib_cppflags => add("-DL_ENDIAN"), - thread_scheme => "pthreads", - lflags => add(threads("-mt")), - ex_libs => add(threads("-lpthread")), - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "elf", - shared_cflag => "-KPIC", - shared_ldflag => add_before("-G -dy -z text"), - multilib => "/64", - }, - -#### SPARC Solaris with GNU C setups - "solaris-sparcv7-gcc" => { - inherit_from => [ "solaris-common" ], - CC => "gcc", - CFLAGS => add_before(picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3")), - cflags => add(threads("-pthread")), - lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), - ex_libs => add(threads("-pthread")), - bn_ops => "BN_LLONG RC4_CHAR", - shared_cflag => "-fPIC", - shared_ldflag => add_before("-shared"), - }, - "solaris-sparcv8-gcc" => { - inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ], - cflags => add_before("-mcpu=v8"), - }, - "solaris-sparcv9-gcc" => { - # -m32 should be safe to add as long as driver recognizes - # -mcpu=ultrasparc - inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ], - cflags => add_before("-m32 -mcpu=ultrasparc"), - }, - "solaris64-sparcv9-gcc" => { - inherit_from => [ "solaris-sparcv9-gcc" ], - cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; }, - bn_ops => "BN_LLONG RC4_CHAR", - multilib => "/64", - }, - -#### SPARC Solaris with Sun C setups -# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. -# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 -# SC5.0 note: Compiler common patch 107357-01 or later is required! - "solaris-sparcv7-cc" => { - inherit_from => [ "solaris-common" ], - CC => "cc", - CFLAGS => add_before(picker(debug => "-g", - release => "-xO5 -xdepend")), - cflags => add_before("-xstrconst -Xa"), - cppflags => add(threads("-D_REENTRANT")), - lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), - lflags => add(threads("-mt")), - ex_libs => add(threads("-lpthread")), - bn_ops => "BN_LLONG RC4_CHAR", - shared_cflag => "-KPIC", - shared_ldflag => add_before("-G -dy -z text"), - }, -#### - "solaris-sparcv8-cc" => { - inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ], - cflags => add_before("-xarch=v8"), - }, - "solaris-sparcv9-cc" => { - inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ], - cflags => add_before("-xarch=v8plus"), - }, - "solaris64-sparcv9-cc" => { - inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ], - cflags => add_before("-xarch=v9"), - bn_ops => "BN_LLONG RC4_CHAR", - multilib => "/64", - }, - -#### IRIX 6.x configs -# Only N32 and N64 ABIs are supported. - "irix-common" => { - inherit_from => [ "BASE_unix" ], - template => 1, - cppflags => threads("-D_SGI_MP_SOURCE"), - lib_cppflags => "-DB_ENDIAN", - ex_libs => add(threads("-lpthread")), - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "self", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - shared_ldflag => "-shared -Wl,-Bsymbolic", - shared_sonameflag=> "-Wl,-soname,", - }, - "irix-mips3-gcc" => { - inherit_from => [ "irix-common", asm("mips64_asm") ], - CC => "gcc", - CFLAGS => picker(debug => "-g -O0", - release => "-O3"), - LDFLAGS => "-static-libgcc", - cflags => "-mabi=n32", - bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", - perlasm_scheme => "n32", - multilib => "32", - }, - "irix-mips3-cc" => { - inherit_from => [ "irix-common", asm("mips64_asm") ], - CC => "cc", - CFLAGS => picker(debug => "-g -O0", - release => "-O2"), - cflags => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared", - bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", - perlasm_scheme => "n32", - multilib => "32", - }, - # N64 ABI builds. - "irix64-mips4-gcc" => { - inherit_from => [ "irix-common", asm("mips64_asm") ], - CC => "gcc", - CFLAGS => picker(debug => "-g -O0", - release => "-O3"), - LDFLAGS => "-static-libgcc", - cflags => "-mabi=64 -mips4", - bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "64", - multilib => "64", - }, - "irix64-mips4-cc" => { - inherit_from => [ "irix-common", asm("mips64_asm") ], - CC => "cc", - CFLAGS => picker(debug => "-g -O0", - release => "-O2"), - cflags => "-64 -mips4 -use_readonly_const -G0 -rdata_shared", - bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "64", - multilib => "64", - }, - -#### Unified HP-UX ANSI C configs. -# Special notes: -# - Originally we were optimizing at +O4 level. It should be noted -# that the only difference between +O3 and +O4 is global inter- -# procedural analysis. As it has to be performed during the link -# stage the compiler leaves behind certain pseudo-code in lib*.a -# which might be release or even patch level specific. Generating -# the machine code for and analyzing the *whole* program appears -# to be *extremely* memory demanding while the performance gain is -# actually questionable. The situation is intensified by the default -# HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB -# which is way too low for +O4. In other words, doesn't +O3 make -# more sense? -# - Keep in mind that the HP compiler by default generates code -# suitable for execution on the host you're currently compiling at. -# If the toolkit is meant to be used on various PA-RISC processors -# consider './Configure hpux-parisc-[g]cc +DAportable'. -# - -DMD32_XARRAY triggers workaround for compiler bug we ran into in -# 32-bit message digests. (For the moment of this writing) HP C -# doesn't seem to "digest" too many local variables (they make "him" -# chew forever:-). For more details look-up MD32_XARRAY comment in -# crypto/sha/sha_local.h. -# - originally there were 32-bit hpux-parisc2-* targets. They were -# scrapped, because a) they were not interchangeable with other 32-bit -# targets; b) performance-critical 32-bit assembly modules implement -# even PA-RISC 2.0-specific code paths, which are chosen at run-time, -# thus adequate performance is provided even with PA-RISC 1.1 build. - "hpux-common" => { - inherit_from => [ "BASE_unix" ], - template => 1, - defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED", - "_HPUX_ALT_XOPEN_SOCKET_API"), - lib_cppflags => "-DB_ENDIAN", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", # overridden in 32-bit PA-RISC builds - shared_target => "self", - bin_lflags => "-Wl,+s,+cdp,../:,+cdp,./:", - shared_ldflag => "-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:", - shared_sonameflag=> "-Wl,+h,", - }, - "hpux-parisc-gcc" => { - inherit_from => [ "hpux-common" ], - CC => "gcc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O3"), - cflags => add(threads("-pthread")), - lib_cppflags => add("-DBN_DIV2W"), - ex_libs => add("-ldld", threads("-pthread")), - bn_ops => "BN_LLONG RC4_CHAR", - dso_scheme => "dl", - shared_cflag => "-fPIC", - shared_ldflag => add_before("-shared"), - shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", - }, - "hpux-parisc1_1-gcc" => { - inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ], - multilib => "/pa1.1", - }, - "hpux64-parisc2-gcc" => { - inherit_from => [ "hpux-common", asm("parisc20_64_asm") ], - CC => "gcc", - CFLAGS => combine(picker(debug => "-O0 -g", - release => "-O3")), - cflags => add(threads("-pthread")), - ex_libs => add("-ldl", threads("-pthread")), - bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - shared_cflag => "-fpic", - shared_ldflag => add_before("-shared"), - shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", - multilib => "/pa20_64", - }, - - # More attempts at unified 10.X and 11.X targets for HP C compiler. - "hpux-parisc-cc" => { - inherit_from => [ "hpux-common" ], - CC => "cc", - CFLAGS => picker(debug => "+O0 +d -g", - release => "+O3"), - cflags => "+Optrs_strongly_typed -Ae +ESlit", - cppflags => threads("-D_REENTRANT"), - lib_cppflags => add("-DBN_DIV2W -DMD32_XARRAY"), - ex_libs => add("-ldld", threads("-lpthread")), - bn_ops => "RC4_CHAR", - dso_scheme => "dl", - shared_cflag => "+Z", - shared_ldflag => add_before("-b"), - shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", - }, - "hpux-parisc1_1-cc" => { - inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ], - cflags => add_before("+DA1.1"), - multilib => "/pa1.1", - }, - "hpux64-parisc2-cc" => { - inherit_from => [ "hpux-common", asm("parisc20_64_asm") ], - CC => "cc", - CFLAGS => picker(debug => "+O0 +d -g", - release => "+O3") , - cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit", - cppflags => threads("-D_REENTRANT") , - lib_cppflags => add("-DMD32_XARRAY"), - ex_libs => add("-ldl", threads("-lpthread")), - bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - shared_cflag => "+Z", - shared_ldflag => add_before("-b"), - shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", - multilib => "/pa20_64", - }, - - # HP/UX IA-64 targets - "hpux-ia64-cc" => { - inherit_from => [ "hpux-common", asm("ia64_asm") ], - CC => "cc", - CFLAGS => picker(debug => "+O0 +d -g", - release => "+O2"), - cflags => "-Ae +DD32 +Olit=all -z", - cppflags => add(threads("-D_REENTRANT")), - ex_libs => add("-ldl", threads("-lpthread")), - bn_ops => "SIXTY_FOUR_BIT", - shared_cflag => "+Z", - shared_ldflag => add_before("-b"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - multilib => "/hpux32", - }, - "hpux64-ia64-cc" => { - inherit_from => [ "hpux-common", asm("ia64_asm") ], - CC => "cc", - CFLAGS => picker(debug => "+O0 +d -g", - release => "+O3"), - cflags => "-Ae +DD64 +Olit=all -z", - cppflags => threads("-D_REENTRANT"), - ex_libs => add("-ldl", threads("-lpthread")), - bn_ops => "SIXTY_FOUR_BIT_LONG", - shared_cflag => "+Z", - shared_ldflag => add_before("-b"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - multilib => "/hpux64", - }, - # GCC builds... - "hpux-ia64-gcc" => { - inherit_from => [ "hpux-common", asm("ia64_asm") ], - CC => "gcc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O3"), - cflags => add(threads("-pthread")), - ex_libs => add("-ldl", threads("-pthread")), - bn_ops => "SIXTY_FOUR_BIT", - shared_cflag => "-fpic", - shared_ldflag => add_before("-shared"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - multilib => "/hpux32", - }, - "hpux64-ia64-gcc" => { - inherit_from => [ "hpux-common", asm("ia64_asm") ], - CC => "gcc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O3"), - cflags => combine("-mlp64", threads("-pthread")), - ex_libs => add("-ldl", threads("-pthread")), - bn_ops => "SIXTY_FOUR_BIT_LONG", - shared_cflag => "-fpic", - shared_ldflag => add_before("-shared"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - multilib => "/hpux64", - }, - -#### HP MPE/iX http://jazz.external.hp.com/src/openssl/ - "MPE/iX-gcc" => { - inherit_from => [ "BASE_unix" ], - CC => "gcc", - CFLAGS => "-O3", - cppflags => "-D_POSIX_SOURCE -D_SOCKET_SOURCE", - includes => [ "/SYSLOG/PUB" ], - lib_cppflags => "-DBN_DIV2W", - sys_id => "MPE", - lflags => add("-L/SYSLOG/PUB"), - ex_libs => add("-lsyslog -lsocket -lcurses"), - thread_scheme => "(unknown)", - bn_ops => "BN_LLONG", - }, - -#### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4 -#### and forward. In reality 'uname -s' still returns "OSF1". Originally -#### there were even osf1-* configs targeting prior versions provided, -#### but not anymore... - "tru64-alpha-gcc" => { - inherit_from => [ "BASE_unix", asm("alpha_asm") ], - CC => "gcc", - CFLAGS => "-O3", - cflags => add("-std=c9x", threads("-pthread")), - cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE", - ex_libs => add("-lrt", threads("-pthread")), # for mlock(2) - bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "alpha-osf1-shared", - shared_extension => ".so", - }, - "tru64-alpha-cc" => { - inherit_from => [ "BASE_unix", asm("alpha_asm") ], - CC => "cc", - CFLAGS => "-tune host -fast", - cflags => add("-std1 -readonly_strings", - threads("-pthread")), - cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE", - ex_libs => add("-lrt", threads("-pthread")), # for mlock(2) - bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "alpha-osf1-shared", - shared_ldflag => "-msym", - shared_extension => ".so", - }, - -#### -#### Variety of LINUX:-) -#### -# *-generic* is endian-neutral target, but ./config is free to -# throw in -D[BL]_ENDIAN, whichever appropriate... - "linux-generic32" => { - inherit_from => [ "BASE_unix" ], - CC => "gcc", - CXX => "g++", - CFLAGS => picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3"), - CXXFLAGS => picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3"), - cflags => threads("-pthread"), - cxxflags => combine("-std=c++11", threads("-pthread")), - lib_cppflags => "-DOPENSSL_USE_NODELETE", - ex_libs => add("-ldl", threads("-pthread")), - bn_ops => "BN_LLONG RC4_CHAR", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "linux-shared", - shared_cflag => "-fPIC", - shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - enable => [ "afalgeng" ], - }, - "linux-generic64" => { - inherit_from => [ "linux-generic32" ], - bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - }, - - "linux-ppc" => { - inherit_from => [ "linux-generic32", asm("ppc32_asm") ], - perlasm_scheme => "linux32", - }, - "linux-ppc64" => { - inherit_from => [ "linux-generic64", asm("ppc64_asm") ], - cflags => add("-m64"), - cxxflags => add("-m64"), - lib_cppflags => add("-DB_ENDIAN"), - perlasm_scheme => "linux64", - multilib => "64", - }, - "linux-ppc64le" => { - inherit_from => [ "linux-generic64", asm("ppc64_asm") ], - cflags => add("-m64"), - cxxflags => add("-m64"), - lib_cppflags => add("-DL_ENDIAN"), - perlasm_scheme => "linux64le", - }, - - "linux-armv4" => { - ################################################################ - # Note that -march is not among compiler options in linux-armv4 - # target description. Not specifying one is intentional to give - # you choice to: - # - # a) rely on your compiler default by not specifying one; - # b) specify your target platform explicitly for optimal - # performance, e.g. -march=armv6 or -march=armv7-a; - # c) build "universal" binary that targets *range* of platforms - # by specifying minimum and maximum supported architecture; - # - # As for c) option. It actually makes no sense to specify - # maximum to be less than ARMv7, because it's the least - # requirement for run-time switch between platform-specific - # code paths. And without run-time switch performance would be - # equivalent to one for minimum. Secondly, there are some - # natural limitations that you'd have to accept and respect. - # Most notably you can *not* build "universal" binary for - # big-endian platform. This is because ARMv7 processor always - # picks instructions in little-endian order. Another similar - # limitation is that -mthumb can't "cross" -march=armv6t2 - # boundary, because that's where it became Thumb-2. Well, this - # limitation is a bit artificial, because it's not really - # impossible, but it's deemed too tricky to support. And of - # course you have to be sure that your binutils are actually - # up to the task of handling maximum target platform. With all - # this in mind here is an example of how to configure - # "universal" build: - # - # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 - # - inherit_from => [ "linux-generic32", asm("armv4_asm") ], - perlasm_scheme => "linux32", - }, - "linux-aarch64" => { - inherit_from => [ "linux-generic64", asm("aarch64_asm") ], - perlasm_scheme => "linux64", - }, - "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32 - inherit_from => [ "linux-generic32", asm("aarch64_asm") ], - cflags => add("-mabi=ilp32"), - cxxflags => add("-mabi=ilp32"), - bn_ops => "SIXTY_FOUR_BIT RC4_CHAR", - perlasm_scheme => "linux64", - }, - - "linux-mips32" => { - # Configure script adds minimally required -march for assembly - # support, if no -march was specified at command line. - inherit_from => [ "linux-generic32", asm("mips32_asm") ], - cflags => add("-mabi=32"), - cxxflags => add("-mabi=32"), - perlasm_scheme => "o32", - }, - # mips32 and mips64 below refer to contemporary MIPS Architecture - # specifications, MIPS32 and MIPS64, rather than to kernel bitness. - "linux-mips64" => { - inherit_from => [ "linux-generic32", asm("mips64_asm") ], - cflags => add("-mabi=n32"), - cxxflags => add("-mabi=n32"), - bn_ops => "RC4_CHAR", - perlasm_scheme => "n32", - multilib => "32", - }, - "linux64-mips64" => { - inherit_from => [ "linux-generic64", asm("mips64_asm") ], - cflags => add("-mabi=64"), - cxxflags => add("-mabi=64"), - perlasm_scheme => "64", - multilib => "64", - }, - - #### IA-32 targets... - #### These two targets are a bit aged and are to be used on older Linux - #### machines where gcc doesn't understand -m32 and -m64 - "linux-elf" => { - inherit_from => [ "linux-generic32", asm("x86_elf_asm") ], - CFLAGS => add(picker(release => "-fomit-frame-pointer")), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "BN_LLONG", - }, - "linux-aout" => { - inherit_from => [ "BASE_unix", asm("x86_asm") ], - CC => "gcc", - CFLAGS => add(picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3 -fomit-frame-pointer")), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "BN_LLONG", - thread_scheme => "(unknown)", - perlasm_scheme => "a.out", - }, - - #### X86 / X86_64 targets - "linux-x86" => { - inherit_from => [ "linux-generic32", asm("x86_asm") ], - CFLAGS => add(picker(release => "-fomit-frame-pointer")), - cflags => add("-m32"), - cxxflags => add("-m32"), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "BN_LLONG", - perlasm_scheme => "elf", - }, - "linux-x86-clang" => { - inherit_from => [ "linux-x86" ], - CC => "clang", - CXX => "clang++", - }, - "linux-x86_64" => { - inherit_from => [ "linux-generic64", asm("x86_64_asm") ], - cflags => add("-m64"), - cxxflags => add("-m64"), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "elf", - multilib => "64", - }, - "linux-x86_64-clang" => { - inherit_from => [ "linux-x86_64" ], - CC => "clang", - CXX => "clang++", - }, - "linux-x32" => { - inherit_from => [ "linux-generic32", asm("x86_64_asm") ], - cflags => add("-mx32"), - cxxflags => add("-mx32"), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT", - perlasm_scheme => "elf32", - multilib => "x32", - }, - - "linux-ia64" => { - inherit_from => [ "linux-generic64", asm("ia64_asm") ], - bn_ops => "SIXTY_FOUR_BIT_LONG", - }, - - "linux64-s390x" => { - inherit_from => [ "linux-generic64", asm("s390x_asm") ], - cflags => add("-m64"), - cxxflags => add("-m64"), - lib_cppflags => add("-DB_ENDIAN"), - perlasm_scheme => "64", - multilib => "64", - }, - "linux32-s390x" => { - #### So called "highgprs" target for z/Architecture CPUs - # "Highgprs" is kernel feature first implemented in Linux - # 2.6.32, see /proc/cpuinfo. The idea is to preserve most - # significant bits of general purpose registers not only - # upon 32-bit process context switch, but even on - # asynchronous signal delivery to such process. This makes - # it possible to deploy 64-bit instructions even in legacy - # application context and achieve better [or should we say - # adequate] performance. The build is binary compatible with - # linux-generic32, and the idea is to be able to install the - # resulting libcrypto.so alongside generic one, e.g. as - # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time - # linker to autodiscover. Unfortunately it doesn't work just - # yet, because of couple of bugs in glibc - # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1... - # - inherit_from => [ "linux-generic32", asm("s390x_asm") ], - cflags => add("-m31 -Wa,-mzarch"), - cxxflags => add("-m31 -Wa,-mzarch"), - lib_cppflags => add("-DB_ENDIAN"), - bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; }, - perlasm_scheme => "31", - multilib => "/highgprs", - }, - - #### SPARC Linux setups - "linux-sparcv8" => { - inherit_from => [ "linux-generic32", asm("sparcv8_asm") ], - cflags => add("-mcpu=v8"), - cxxflags => add("-mcpu=v8"), - lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), - }, - "linux-sparcv9" => { - # it's a real mess with -mcpu=ultrasparc option under Linux, - # but -Wa,-Av8plus should do the trick no matter what. - inherit_from => [ "linux-generic32", asm("sparcv9_asm") ], - cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"), - cxxflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"), - lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"), - }, - "linux64-sparcv9" => { - # GCC 3.1 is a requirement - inherit_from => [ "linux-generic64", asm("sparcv9_asm") ], - cflags => add("-m64 -mcpu=ultrasparc"), - cxxflags => add("-m64 -mcpu=ultrasparc"), - lib_cppflags => add("-DB_ENDIAN"), - bn_ops => "BN_LLONG RC4_CHAR", - multilib => "64", - }, - - "linux-alpha-gcc" => { - inherit_from => [ "linux-generic64", asm("alpha_asm") ], - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - }, - "linux-c64xplus" => { - inherit_from => [ "BASE_unix" ], - # TI_CGT_C6000_7.3.x is a requirement - CC => "cl6x", - CFLAGS => "-o2 -ox -ms", - cflags => "--linux -ea=.s -eo=.o -mv6400+ -pden", - cxxflags => "--linux -ea=.s -eo=.o -mv6400+ -pden", - cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT", - threads("-D_REENTRANT")), - bn_ops => "BN_LLONG", - cpuid_asm_src => "c64xpluscpuid.s", - bn_asm_src => "asm/bn-c64xplus.asm c64xplus-gf2m.s", - aes_asm_src => "aes-c64xplus.s aes_cbc.c aes-ctr.fake", - sha1_asm_src => "sha1-c64xplus.s sha256-c64xplus.s sha512-c64xplus.s", - rc4_asm_src => "rc4-c64xplus.s", - modes_asm_src => "ghash-c64xplus.s", - chacha_asm_src => "chacha-c64xplus.s", - poly1305_asm_src => "poly1305-c64xplus.s", - thread_scheme => "pthreads", - perlasm_scheme => "void", - dso_scheme => "dlfcn", - shared_target => "linux-shared", - shared_cflag => "--pic", - shared_ldflag => add("-z --sysv --shared"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - ranlib => "true", - }, - -#### *BSD - "BSD-generic32" => { - # As for thread cflag. Idea is to maintain "collective" set of - # flags, which would cover all BSD flavors. -pthread applies - # to them all, but is treated differently. OpenBSD expands is - # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x - # expands it as -lc_r, which has to be accompanied by explicit - # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x - # expands it as -lc_r, which seems to be sufficient? - inherit_from => [ "BASE_unix" ], - CC => "cc", - CFLAGS => picker(default => "-Wall", - debug => "-O0 -g", - release => "-O3"), - cflags => threads("-pthread"), - cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"), - ex_libs => add(threads("-pthread")), - enable => add("devcryptoeng"), - bn_ops => "BN_LLONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "bsd-gcc-shared", - shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - }, - "BSD-generic64" => { - inherit_from => [ "BSD-generic32" ], - bn_ops => "SIXTY_FOUR_BIT_LONG", - }, - - "BSD-x86" => { - inherit_from => [ "BSD-generic32", asm("x86_asm") ], - CFLAGS => add(picker(release => "-fomit-frame-pointer")), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "BN_LLONG", - shared_target => "bsd-shared", - perlasm_scheme => "a.out", - }, - "BSD-x86-elf" => { - inherit_from => [ "BSD-x86" ], - perlasm_scheme => "elf", - }, - - "BSD-sparcv8" => { - inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ], - cflags => add("-mcpu=v8"), - lib_cppflags => add("-DB_ENDIAN"), - }, - "BSD-sparc64" => { - # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it - # simply *happens* to work around a compiler bug in gcc 3.3.3, - # triggered by RIPEMD160 code. - inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ], - lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"), - bn_ops => "BN_LLONG", - }, - - "BSD-ia64" => { - inherit_from => [ "BSD-generic64", asm("ia64_asm") ], - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - }, - - "BSD-x86_64" => { - inherit_from => [ "BSD-generic64", asm("x86_64_asm") ], - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "elf", - }, - - "bsdi-elf-gcc" => { - inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], - CC => "gcc", - CFLAGS => "-fomit-frame-pointer -O3 -Wall", - lib_cppflags => "-DPERL5 -DL_ENDIAN", - ex_libs => add("-ldl"), - bn_ops => "BN_LLONG", - thread_scheme => "(unknown)", - dso_scheme => "dlfcn", - shared_target => "bsd-gcc-shared", - shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - }, - - "nextstep" => { - inherit_from => [ "BASE_unix" ], - CC => "cc", - CFLAGS => "-O -Wall", - unistd => "", - bn_ops => "BN_LLONG", - thread_scheme => "(unknown)", - }, - "nextstep3.3" => { - inherit_from => [ "BASE_unix" ], - CC => "cc", - CFLAGS => "-O3 -Wall", - unistd => "", - bn_ops => "BN_LLONG", - thread_scheme => "(unknown)", - }, - -#### SCO/Caldera targets. -# -# Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. -# Now we only have blended unixware-* as it's the only one used by ./config. -# If you want to optimize for particular microarchitecture, bypass ./config -# and './Configure unixware-7 -Kpentium_pro' or whatever appropriate. -# Note that not all targets include assembler support. Mostly because of -# lack of motivation to support out-of-date platforms with out-of-date -# compiler drivers and assemblers. -# -# UnixWare 2.0x fails destest with -O. - "unixware-2.0" => { - inherit_from => [ "BASE_unix" ], - CC => "cc", - cflags => threads("-Kthread"), - lib_cppflags => "-DFILIO_H -DNO_STRINGS_H", - ex_libs => add("-lsocket -lnsl -lresolv -lx"), - thread_scheme => "uithreads", - }, - "unixware-2.1" => { - inherit_from => [ "BASE_unix" ], - CC => "cc", - CFLAGS => "-O", - cflags => threads("-Kthread"), - lib_cppflags => "-DFILIO_H", - ex_libs => add("-lsocket -lnsl -lresolv -lx"), - thread_scheme => "uithreads", - }, - "unixware-7" => { - inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], - CC => "cc", - CFLAGS => "-O", - cflags => combine("-Kalloca", threads("-Kthread")), - lib_cppflags => "-DFILIO_H", - ex_libs => add("-lsocket -lnsl"), - thread_scheme => "uithreads", - bn_ops => "BN_LLONG", - perlasm_scheme => "elf-1", - dso_scheme => "dlfcn", - shared_target => "svr5-shared", - shared_cflag => "-Kpic", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - }, - "unixware-7-gcc" => { - inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], - CC => "gcc", - CFLAGS => "-O3 -fomit-frame-pointer -Wall", - cppflags => add(threads("-D_REENTRANT")), - lib_cppflags => add("-DL_ENDIAN -DFILIO_H"), - ex_libs => add("-lsocket -lnsl"), - bn_ops => "BN_LLONG", - thread_scheme => "pthreads", - perlasm_scheme => "elf-1", - dso_scheme => "dlfcn", - shared_target => "gnu-shared", - shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - }, -# SCO 5 - Ben Laurie says the -O breaks the SCO cc. - "sco5-cc" => { - inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], - cc => "cc", - cflags => "-belf", - ex_libs => add("-lsocket -lnsl"), - thread_scheme => "(unknown)", - perlasm_scheme => "elf-1", - dso_scheme => "dlfcn", - shared_target => "svr3-shared", - shared_cflag => "-Kpic", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - }, - "sco5-gcc" => { - inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], - cc => "gcc", - cflags => "-O3 -fomit-frame-pointer", - ex_libs => add("-lsocket -lnsl"), - bn_ops => "BN_LLONG", - thread_scheme => "(unknown)", - perlasm_scheme => "elf-1", - dso_scheme => "dlfcn", - shared_target => "svr3-shared", - shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - }, - -#### IBM's AIX. - # Below targets assume AIX >=5. Caveat lector. If you are accustomed - # to control compilation "bitness" by setting $OBJECT_MODE environment - # variable, then you should know that in OpenSSL case it's considered - # only in ./config. Once configured, build procedure remains "deaf" to - # current value of $OBJECT_MODE. - "aix-common" => { - inherit_from => [ "BASE_unix" ], - template => 1, - sys_id => "AIX", - lib_cppflags => "-DB_ENDIAN", - lflags => "-Wl,-bsvr4", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "self", - module_ldflags => "-Wl,-G,-bsymbolic,-bnoentry", - shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry", - shared_defflag => "-Wl,-bE:", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - dso_extension => ".so", - lib_extension => shared("_a.a"), - shared_extension_simple => shared(".a"), - }, - "aix-gcc" => { - inherit_from => [ "aix-common", asm("ppc32_asm") ], - CC => "gcc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O"), - cflags => add(threads("-pthread")), - ex_libs => add(threads("-pthread")), - bn_ops => "BN_LLONG RC4_CHAR", - perlasm_scheme => "aix32", - shared_ldflag => add_before("-shared -static-libgcc"), - AR => add("-X32"), - RANLIB => add("-X32"), - }, - "aix64-gcc" => { - inherit_from => [ "aix-common", asm("ppc64_asm") ], - CC => "gcc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O"), - cflags => combine("-maix64", threads("-pthread")), - ex_libs => add(threads("-pthread")), - bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - perlasm_scheme => "aix64", - shared_ldflag => add_before("-shared -static-libgcc"), - shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)", - AR => add("-X64"), - RANLIB => add("-X64"), - }, - "aix-cc" => { - inherit_from => [ "aix-common", asm("ppc32_asm") ], - CC => "cc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O"), - cflags => combine("-q32 -qmaxmem=16384 -qro -qroconst", - threads("-qthreaded")), - cppflags => threads("-D_THREAD_SAFE"), - ex_libs => add(threads("-lpthreads")), - bn_ops => "BN_LLONG RC4_CHAR", - perlasm_scheme => "aix32", - shared_cflag => "-qpic", - AR => add("-X32"), - RANLIB => add("-X32"), - }, - "aix64-cc" => { - inherit_from => [ "aix-common", asm("ppc64_asm") ], - CC => "cc", - CFLAGS => picker(debug => "-O0 -g", - release => "-O"), - cflags => combine("-q64 -qmaxmem=16384 -qro -qroconst", - threads("-qthreaded")), - cppflags => threads("-D_THREAD_SAFE"), - ex_libs => add(threads("-lpthreads")), - bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - perlasm_scheme => "aix64", - dso_scheme => "dlfcn", - shared_cflag => "-qpic", - shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)", - AR => add("-X64"), - RANLIB => add("-X64"), - }, - -# SIEMENS BS2000/OSD: an EBCDIC-based mainframe - "BS2000-OSD" => { - inherit_from => [ "BASE_unix" ], - CC => "c89", - CFLAGS => "-O", - cflags => "-XLLML -XLLMK -XL", - cppflags => "-DCHARSET_EBCDIC", - lib_cppflags => "-DB_ENDIAN", - ex_libs => add("-lsocket -lnsl"), - bn_ops => "THIRTY_TWO_BIT RC4_CHAR", - thread_scheme => "(unknown)", - }, - -#### Visual C targets -# -# Win64 targets, WIN64I denotes IA-64/Itanium and WIN64A - AMD64 -# -# Note about /wd4090, disable warning C4090. This warning returns false -# positives in some situations. Disabling it altogether masks both -# legitimate and false cases, but as we compile on multiple platforms, -# we rely on other compilers to catch legitimate cases. -# -# Also note that we force threads no matter what. Configuring "no-threads" -# is ignored. -# -# UNICODE is defined in VC-common and applies to all targets. It used to -# be an opt-in option for VC-WIN32, but not anymore. The original reason -# was because ANSI API was *native* system interface for no longer -# supported Windows 9x. Keep in mind that UNICODE only affects how -# OpenSSL libraries interact with underlying OS, it doesn't affect API -# that OpenSSL presents to application. - - "VC-common" => { - inherit_from => [ "BASE_Windows" ], - template => 1, - CC => "cl", - CPP => '$(CC) /EP /C', - CFLAGS => "/W3 /wd4090 /nologo", - LDFLAGS => add("/debug"), - coutflag => "/Fo", - defines => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN", - "UNICODE", "_UNICODE", - "_CRT_SECURE_NO_DEPRECATE", - "_WINSOCK_DEPRECATED_NO_WARNINGS"), - lib_cflags => add("/Zi /Fdossl_static.pdb"), - lib_defines => add("L_ENDIAN"), - dso_cflags => "/Zi /Fddso.pdb", - bin_cflags => "/Zi /Fdapp.pdb", - shared_ldflag => "/dll", - shared_target => "win-shared", # meaningless except it gives Configure a hint - thread_scheme => "winthreads", - dso_scheme => "win32", - apps_aux_src => add("win32_init.c"), - bn_ops => "EXPORT_VAR_AS_FN", - # additional parameter to build_scheme denotes install-path "flavour" - build_scheme => add("VC-common", { separator => undef }), - }, - "VC-noCE-common" => { - inherit_from => [ "VC-common" ], - template => 1, - CFLAGS => add(picker(debug => '/Od', - release => '/O2')), - cflags => add(picker(default => '/Gs0 /GF /Gy', - debug => - sub { - ($disabled{shared} ? "" : "/MDd"); - }, - release => - sub { - ($disabled{shared} ? "" : "/MD"); - })), - defines => add(picker(default => [], # works as type cast - debug => [ "DEBUG", "_DEBUG" ])), - lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }), - # Following might/should appears controversial, i.e. defining - # /MDd without evaluating $disabled{shared}. It works in - # non-shared build because static library is compiled with /Zl - # and bares no reference to specific RTL. And it works in - # shared build because multiple /MDd options are not prohibited. - # But why /MDd in static build? Well, basically this is just a - # reference point, which allows to catch eventual errors that - # would prevent those who want to wrap OpenSSL into own .DLL. - # Why not /MD in release build then? Well, some are likely to - # prefer [non-debug] openssl.exe to be free from Micorosoft RTL - # redistributable. - bin_cflags => add(picker(debug => "/MDd", - release => sub { $disabled{shared} ? "/MT" : () }, - )), - bin_lflags => add("/subsystem:console /opt:ref"), - ex_libs => add(sub { - my @ex_libs = (); - push @ex_libs, 'ws2_32.lib' unless $disabled{sock}; - push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib'; - return join(" ", @ex_libs); - }), - }, - "VC-WIN64-common" => { - inherit_from => [ "VC-noCE-common" ], - template => 1, - ex_libs => add(sub { - my @ex_libs = (); - push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./); - return join(" ", @_, @ex_libs); - }), - bn_ops => add("SIXTY_FOUR_BIT"), - }, - "VC-WIN64I" => { - inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), - sub { $disabled{shared} ? () : "ia64_uplink" } ], - AS => "ias", - ASFLAGS => "-d debug", - asoutflag => "-o ", - sys_id => "WIN64I", - bn_asm_src => sub { return undef unless @_; - my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; }, - perlasm_scheme => "ias", - multilib => "-ia64", - }, - "VC-WIN64A" => { - inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), - sub { $disabled{shared} ? () : "x86_64_uplink" } ], - AS => sub { vc_win64a_info()->{AS} }, - ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} }, - asoutflag => sub { vc_win64a_info()->{asoutflag} }, - asflags => sub { vc_win64a_info()->{asflags} }, - sys_id => "WIN64A", - bn_asm_src => sub { return undef unless @_; - my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; }, - perlasm_scheme => "auto", - multilib => "-x64", - }, - "VC-WIN32" => { - inherit_from => [ "VC-noCE-common", asm("x86_asm"), - sub { $disabled{shared} ? () : "uplink_common" } ], - AS => sub { vc_win32_info()->{AS} }, - ASFLAGS => sub { vc_win32_info()->{ASFLAGS} }, - asoutflag => sub { vc_win32_info()->{asoutflag} }, - asflags => sub { vc_win32_info()->{asflags} }, - sys_id => "WIN32", - bn_ops => add("BN_LLONG"), - perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} }, - # "WOW" stands for "Windows on Windows", and "VC-WOW" engages - # some installation path heuristics in windows-makefile.tmpl... - build_scheme => add("VC-WOW", { separator => undef }), - }, - "VC-CE" => { - inherit_from => [ "VC-common" ], - CFLAGS => add(picker(debug => "/Od", - release => "/O1i")), - CPPDEFINES => picker(debug => [ "DEBUG", "_DEBUG" ]), - LDFLAGS => add("/nologo /opt:ref"), - cflags => - combine('/GF /Gy', - sub { vc_wince_info()->{cflags}; }, - sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14 - ? ($disabled{shared} ? " /MT" : " /MD") - : " /MC"; }), - cppflags => sub { vc_wince_info()->{cppflags}; }, - lib_defines => add("NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT"), - lib_cppflags => sub { vc_wince_info()->{cppflags}; }, - includes => - add(combine(sub { defined(env('WCECOMPAT')) - ? '$(WCECOMPAT)/include' : (); }, - sub { defined(env('PORTSDK_LIBPATH')) - ? '$(PORTSDK_LIBPATH)/../../include' - : (); })), - lflags => add(combine(sub { vc_wince_info()->{lflags}; }, - sub { defined(env('PORTSDK_LIBPATH')) - ? "/entry:mainCRTstartup" : (); })), - sys_id => "WINCE", - bn_ops => add("BN_LLONG"), - ex_libs => add(sub { - my @ex_libs = (); - push @ex_libs, 'ws2.lib' unless $disabled{sock}; - push @ex_libs, 'crypt32.lib'; - if (defined(env('WCECOMPAT'))) { - my $x = '$(WCECOMPAT)/lib'; - if (-f "$x/env('TARGETCPU')/wcecompatex.lib") { - $x .= '/$(TARGETCPU)/wcecompatex.lib'; - } else { - $x .= '/wcecompatex.lib'; - } - push @ex_libs, $x; - } - push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib' - if (defined(env('PORTSDK_LIBPATH'))); - push @ex_libs, '/nodefaultlib coredll.lib corelibc.lib' - if (env('TARGETCPU') =~ /^X86|^ARMV4[IT]/); - return join(" ", @ex_libs); - }), - }, - -#### MinGW - "mingw" => { - inherit_from => [ "BASE_unix", asm("x86_asm"), - sub { $disabled{shared} ? () : "x86_uplink" } ], - CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-g -O0", - release => "-O3 -fomit-frame-pointer"), - cflags => "-m32", - cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN", - threads("-D_MT")), - lib_cppflags => "-DL_ENDIAN", - sys_id => "MINGW32", - ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), - bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", - thread_scheme => "winthreads", - perlasm_scheme => "coff", - dso_scheme => "win32", - shared_target => "mingw-shared", - shared_cppflags => add("_WINDLL"), - shared_ldflag => "-static-libgcc", - shared_rcflag => "--target=pe-i386", - shared_extension => ".dll", - multilib => "", - apps_aux_src => add("win32_init.c"), - # "WOW" stands for "Windows on Windows", and that word engages - # some installation path heuristics in unix-Makefile.tmpl... - build_scheme => add("WOW", { separator => undef }), - - }, - "mingw64" => { - # As for OPENSSL_USE_APPLINK. Applink makes it possible to use - # .dll compiled with one compiler with application compiled with - # another compiler. It's possible to engage Applink support in - # mingw64 build, but it's not done, because till mingw64 - # supports structured exception handling, one can't seriously - # consider its binaries for using with non-mingw64 run-time - # environment. And as mingw64 is always consistent with itself, - # Applink is never engaged and can as well be omitted. - inherit_from => [ "BASE_unix", asm("x86_64_asm") ], - CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-g -O0", - release => "-O3"), - cflags => "-m64", - cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN", - threads("-D_MT")), - lib_cppflags => "-DL_ENDIAN", - sys_id => "MINGW64", - ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), - bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN", - thread_scheme => "winthreads", - perlasm_scheme => "mingw64", - dso_scheme => "win32", - shared_target => "mingw-shared", - shared_cppflags => add("_WINDLL"), - shared_ldflag => "-static-libgcc", - shared_rcflag => "--target=pe-x86-64", - shared_extension => ".dll", - multilib => "64", - apps_aux_src => add("win32_init.c"), - }, - -#### UEFI - "UEFI" => { - inherit_from => [ "BASE_unix" ], - CC => "cc", - CFLAGS => "-O", - lib_cppflags => "-DL_ENDIAN", - sys_id => "UEFI", - }, - -#### UWIN - "UWIN" => { - inherit_from => [ "BASE_unix" ], - CC => "cc", - CFLAGS => "-O -Wall", - lib_cppflags => "-DTERMIOS -DL_ENDIAN", - sys_id => "UWIN", - bn_ops => "BN_LLONG", - dso_scheme => "win32", - }, - -#### Cygwin - "Cygwin-x86" => { - inherit_from => [ "BASE_unix", asm("x86_asm") ], - CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-g -O0", - release => "-O3 -fomit-frame-pointer"), - lib_cppflags => "-DTERMIOS -DL_ENDIAN", - sys_id => "CYGWIN", - bn_ops => "BN_LLONG", - thread_scheme => "pthread", - perlasm_scheme => "coff", - dso_scheme => "dlfcn", - shared_target => "cygwin-shared", - shared_cppflags => "-D_WINDLL", - shared_extension => ".dll", - }, - "Cygwin-x86_64" => { - inherit_from => [ "BASE_unix", asm("x86_64_asm") ], - CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-g -O0", - release => "-O3"), - lib_cppflags => "-DTERMIOS -DL_ENDIAN", - sys_id => "CYGWIN", - bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthread", - perlasm_scheme => "mingw64", - dso_scheme => "dlfcn", - shared_target => "cygwin-shared", - shared_cppflags => "-D_WINDLL", - shared_extension => ".dll", - }, - # Backward compatibility for those using this target - "Cygwin" => { - inherit_from => [ "Cygwin-x86" ] - }, - # In case someone constructs the Cygwin target name themself - "Cygwin-i386" => { - inherit_from => [ "Cygwin-x86" ] - }, - "Cygwin-i486" => { - inherit_from => [ "Cygwin-x86" ] - }, - "Cygwin-i586" => { - inherit_from => [ "Cygwin-x86" ] - }, - "Cygwin-i686" => { - inherit_from => [ "Cygwin-x86" ] - }, - -##### MacOS X (a.k.a. Darwin) setup - "darwin-common" => { - inherit_from => [ "BASE_unix" ], - template => 1, - CC => "cc", - CFLAGS => picker(debug => "-g -O0", - release => "-O3"), - cppflags => threads("-D_REENTRANT"), - lflags => "-Wl,-search_paths_first", - sys_id => "MACOSX", - bn_ops => "BN_LLONG RC4_CHAR", - thread_scheme => "pthreads", - perlasm_scheme => "osx32", - dso_scheme => "dlfcn", - ranlib => "ranlib -c", - shared_target => "darwin-shared", - shared_cflag => "-fPIC", - shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib", - }, - # Option "freeze" such as -std=gnu9x can't negatively interfere - # with future defaults for below two targets, because MacOS X - # for PPC has no future, it was discontinued by vendor in 2009. - "darwin-ppc-cc" => { - inherit_from => [ "darwin-common", asm("ppc32_asm") ], - cflags => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"), - lib_cppflags => add("-DB_ENDIAN"), - shared_cflag => add("-fno-common"), - perlasm_scheme => "osx32", - }, - "darwin64-ppc-cc" => { - inherit_from => [ "darwin-common", asm("ppc64_asm") ], - cflags => add("-arch ppc64 -std=gnu9x"), - lib_cppflags => add("-DB_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", - perlasm_scheme => "osx64", - }, - "darwin-i386-cc" => { - inherit_from => [ "darwin-common", asm("x86_asm") ], - CFLAGS => add(picker(release => "-fomit-frame-pointer")), - cflags => add("-arch i386"), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "BN_LLONG RC4_INT", - perlasm_scheme => "macosx", - }, - "darwin64-x86_64-cc" => { - inherit_from => [ "darwin-common", asm("x86_64_asm") ], - CFLAGS => add("-Wall"), - cflags => add("-arch x86_64"), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "macosx", - }, - "darwin64-arm64-cc" => { - inherit_from => [ "darwin-common", asm("aarch64_asm") ], - CFLAGS => add("-Wall"), - cflags => add("-arch arm64"), - lib_cppflags => add("-DL_ENDIAN"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "macosx", - }, - -##### GNU Hurd - "hurd-x86" => { - inherit_from => [ "BASE_unix" ], - inherit_from => [ asm("x86_elf_asm") ], - CC => "gcc", - CFLAGS => "-O3 -fomit-frame-pointer -Wall", - cflags => threads("-pthread"), - lib_cppflags => "-DL_ENDIAN", - ex_libs => add("-ldl", threads("-pthread")), - bn_ops => "BN_LLONG", - thread_scheme => "pthreads", - dso_scheme => "dlfcn", - shared_target => "linux-shared", - shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - }, - -##### VxWorks for various targets - "vxworks-ppc60x" => { - inherit_from => [ "BASE_unix" ], - CC => "ccppc", - CFLAGS => "-O2 -Wall -fstrength-reduce", - cflags => "-mrtp -mhard-float -mstrict-align -fno-implicit-fp -fno-builtin -fno-strict-aliasing", - cppflags => combine("-D_REENTRANT -DPPC32_fp60x -DCPU=PPC32", - "_DTOOL_FAMILY=gnu -DTOOL=gnu", - "-I\$(WIND_BASE)/target/usr/h", - "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"), - sys_id => "VXWORKS", - lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"), - ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), - }, - "vxworks-ppcgen" => { - inherit_from => [ "BASE_unix" ], - CC => "ccppc", - CFLAGS => "-O1 -Wall", - cflags => "-mrtp -msoft-float -mstrict-align -fno-builtin -fno-strict-aliasing", - cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC32", - "-DTOOL_FAMILY=gnu -DTOOL=gnu", - "-I\$(WIND_BASE)/target/usr/h", - "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"), - sys_id => "VXWORKS", - lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"), - ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), - }, - "vxworks-ppc405" => { - inherit_from => [ "BASE_unix" ], - CC => "ccppc", - CFLAGS => "-g", - cflags => "-msoft-float -mlongcall", - cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC405", - "-DTOOL_FAMILY=gnu -DTOOL=gnu", - "-I\$(WIND_BASE)/target/h"), - sys_id => "VXWORKS", - lflags => add("-r"), - }, - "vxworks-ppc750" => { - inherit_from => [ "BASE_unix" ], - CC => "ccppc", - CFLAGS => "-ansi -fvolatile -Wall \$(DEBUG_FLAG)", - cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall", - cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604", - "-I\$(WIND_BASE)/target/h"), - sys_id => "VXWORKS", - lflags => add("-r"), - }, - "vxworks-ppc750-debug" => { - inherit_from => [ "BASE_unix" ], - CC => "ccppc", - CFLAGS => "-ansi -fvolatile -Wall -g", - cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall", - cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604", - "-DPEDANTIC -DDEBUG", - "-I\$(WIND_BASE)/target/h"), - sys_id => "VXWORKS", - lflags => add("-r"), - }, - "vxworks-ppc860" => { - inherit_from => [ "BASE_unix" ], - CC => "ccppc", - cflags => "-nostdinc -msoft-float", - cppflags => combine("-DCPU=PPC860 -DNO_STRINGS_H", - "-I\$(WIND_BASE)/target/h"), - sys_id => "VXWORKS", - lflags => add("-r"), - }, - "vxworks-simlinux" => { - inherit_from => [ "BASE_unix" ], - CC => "ccpentium", - cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -fno-builtin -fno-defer-pop", - cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"", - "-DL_ENDIAN -DCPU=SIMLINUX -DNO_STRINGS_H", - "-DTOOL_FAMILY=gnu -DTOOL=gnu", - "-DOPENSSL_NO_HW_PADLOCK", - "-I\$(WIND_BASE)/target/h", - "-I\$(WIND_BASE)/target/h/wrn/coreip"), - sys_id => "VXWORKS", - lflags => add("-r"), - ranlib => "ranlibpentium", - }, - "vxworks-mips" => { - inherit_from => [ "BASE_unix", asm("mips32_asm") ], - CC => "ccmips", - CFLAGS => "-O -G 0", - cflags => "-mrtp -mips2 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -msoft-float -mno-branch-likely -fno-builtin -fno-defer-pop", - cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"", - "-DCPU=MIPS32 -DNO_STRINGS_H", - "-DTOOL_FAMILY=gnu -DTOOL=gnu", - "-DOPENSSL_NO_HW_PADLOCK", - threads("-D_REENTRANT"), - "-I\$(WIND_BASE)/target/h", - "-I\$(WIND_BASE)/target/h/wrn/coreip"), - sys_id => "VXWORKS", - lflags => add("-L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"), - ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"), - thread_scheme => "pthreads", - perlasm_scheme => "o32", - ranlib => "ranlibmips", - }, - -#### uClinux - "uClinux-dist" => { - inherit_from => [ "BASE_unix" ], - CC => sub { env('CC') }, - cppflags => threads("-D_REENTRANT"), - ex_libs => add("\$(LDLIBS)"), - bn_ops => "BN_LLONG", - thread_scheme => "pthreads", - dso_scheme => sub { env('LIBSSL_dlfcn') }, - shared_target => "linux-shared", - shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - ranlib => sub { env('RANLIB') }, - }, - "uClinux-dist64" => { - inherit_from => [ "BASE_unix" ], - CC => sub { env('CC') }, - cppflags => threads("-D_REENTRANT"), - ex_libs => add("\$(LDLIBS)"), - bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthreads", - dso_scheme => sub { env('LIBSSL_dlfcn') }, - shared_target => "linux-shared", - shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - ranlib => sub { env('RANLIB') }, - }, - - ##### VMS - # Most things happen in vms-generic. - # Note that vms_info extracts the pointer size from the end of - # the target name, and will assume that anything matching /-p\d+$/ - # indicates the pointer size setting for the desired target. - "vms-generic" => { - inherit_from => [ "BASE_VMS" ], - template => 1, - CC => "CC/DECC", - CPP => '$(CC)/PREPROCESS_ONLY=SYS$OUTPUT:', - CFLAGS => - combine(picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL", - debug => "/NOOPTIMIZE/DEBUG", - release => "/OPTIMIZE/NODEBUG"), - sub { my @warnings = - @{vms_info()->{disable_warns}}; - @warnings - ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), - lib_defines => - add("OPENSSL_USE_NODELETE", - sub { - return vms_info()->{def_zlib} - ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : (); - }), - lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'", - debug => "/DEBUG/TRACEBACK", - release => "/NODEBUG/NOTRACEBACK"), - lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"), - # no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl - # for object files belonging to selected internal libraries - no_inst_lib_cflags => "", - ex_libs => add(sub { return vms_info()->{zlib} || (); }), - shared_target => "vms-shared", - dso_scheme => "vms", - thread_scheme => "pthreads", - - AS => sub { vms_info()->{AS} }, - ASFLAGS => sub { vms_info()->{ASFLAGS} }, - asoutflag => sub { vms_info()->{asoutflag} }, - asflags => sub { vms_info()->{asflags} }, - perlasm_scheme => sub { vms_info()->{perlasm_scheme} }, - - disable => add('pinshared'), - - apps_aux_src => "vms_term_sock.c", - apps_init_src => "vms_decc_init.c", - }, - - # From HELP CC/POINTER_SIZE: - # - # ---------- - # LONG[=ARGV] The compiler assumes 64-bit pointers. If the ARGV option to - # LONG or 64 is present, the main argument argv will be an - # array of long pointers instead of an array of short pointers. - # - # 64[=ARGV] Same as LONG. - # ---------- - # - # We don't want the hassle of dealing with 32-bit pointers with argv, so - # we force it to have 64-bit pointers, see the added cflags in the -p64 - # config targets below. - - "vms-alpha" => { - inherit_from => [ "vms-generic" ], - bn_ops => "SIXTY_FOUR_BIT RC4_INT", - pointer_size => "", - }, - "vms-alpha-p32" => { - inherit_from => [ "vms-alpha" ], - cflags => add("/POINTER_SIZE=32"), - pointer_size => "32", - }, - "vms-alpha-p64" => { - inherit_from => [ "vms-alpha" ], - cflags => add("/POINTER_SIZE=64=ARGV"), - pointer_size => "64", - }, - "vms-ia64" => { - inherit_from => [ "vms-generic", - sub { vms_info()->{AS} - ? asm("ia64_asm")->() : () } ], - bn_ops => "SIXTY_FOUR_BIT RC4_INT", - pointer_size => "", - - modes_asm_src => "", # Because ghash-ia64.s doesn't work on VMS - }, - "vms-ia64-p32" => { - inherit_from => [ "vms-ia64" ], - cflags => add("/POINTER_SIZE=32"), - pointer_size => "32", - }, - "vms-ia64-p64" => { - inherit_from => [ "vms-ia64" ], - cflags => add("/POINTER_SIZE=64=ARGV"), - pointer_size => "64", - }, - -); diff --git a/Frameworks/openssl/build-openssl.sh b/Frameworks/openssl/build-openssl.sh deleted file mode 100755 index 91cc5d469..000000000 --- a/Frameworks/openssl/build-openssl.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env bash -# shellcheck shell=bash -#set | grep ARCH - -# ARCHS='arm64 x86_64' -unset CFLAGS -# set -x - -## Determine the appropriate openssl source path to use -## Introduced by michaeltyson, adapted to account for OPENSSL_SRC build path - -# locate src archive file if present -SRC_ARCHIVE=$(ls openssl*tar.gz 2>/dev/null) - -# if there is an openssl directory immediately under the openssl.xcode source -# folder then build there -if [ -d "$SRCROOT/openssl" ]; then - OPENSSL_SRC="$SRCROOT/openssl" -# else, if there is a openssl.tar.gz in the directory, expand it to openssl -# and use it -elif [ -f "$SRC_ARCHIVE" ]; then - OPENSSL_SRC="$PROJECT_TEMP_DIR/openssl" - if [ ! -d "$OPENSSL_SRC" ]; then - echo "extracting $SRC_ARCHIVE..." - mkdir "$OPENSSL_SRC" - tar -C "$OPENSSL_SRC" --strip-components=1 -zxf "$SRC_ARCHIVE" || exit 1 - cp -RL "$OPENSSL_SRC/include" "$TARGET_BUILD_DIR" - fi -elif [ ! -f "$SRC_ARCHIVE" ]; then - echo "***** Download openssl src from https://www.openssl.org/source and place in Frameworks/openssl *****" - exit 1; -fi - -cp -f "$SRCROOT"/10-main.conf "$OPENSSL_SRC"/Configurations/ || exit 1 - -echo "***** using $OPENSSL_SRC for openssl source code *****" - -# check whether libcrypto.a already exists - we'll only build if it does not -if [ -f "$TARGET_BUILD_DIR/libcrypto.1.1.dylib" ]; then - echo "***** Using previously-built libary $TARGET_BUILD_DIR/libcrypto.1.1.dylib - skipping build *****" - echo "***** To force a rebuild clean project and clean dependencies *****" - exit 0; -else - echo "***** No previously-built libary present at $TARGET_BUILD_DIR/libcrypto.1.1.dylib - performing build *****" -fi - -BUILDARCHS="darwin64-x86_64-cc" - -# sw_vers -productVersion can return -# 11.0.0 or 10.16 depending on version of -# big sur or setting of SYSTEM_VERSION_COMPAT -# so we'll check for both -# c.f. https://eclecticlight.co/2020/08/13/macos-version-numbering-isnt-so-simple/ - -IS_11=$(sw_vers -productVersion | grep -o '11.[0-9]*') -IS_16=$(sw_vers -productVersion | grep -o '10.16.[0-9]*') - -IS_AT_LEAST_BIG_SUR=0 -if [ -n "$IS_11" ] || [ -n "$IS_16" ]; then - IS_AT_LEAST_BIG_SUR=1 -fi - -if [[ $IS_AT_LEAST_BIG_SUR -gt 0 ]]; then - echo "is at least big sur" - BUILDARCHS="darwin64-arm64-cc darwin64-x86_64-cc" -fi - -echo "***** creating universal binary for architectures: $BUILDARCHS *****" - -if [ "$SDKROOT" != "" ]; then - ISYSROOT="-isysroot $SDKROOT" -fi - -echo "***** using ISYSROOT $ISYSROOT *****" - -OPENSSL_OPTIONS="" - -echo "***** using OPENSSL_OPTIONS $OPENSSL_OPTIONS *****" - -echo "$OPENSSL_SRC" -echo "$BUILD_DIR" - -cd "$OPENSSL_SRC" || exit 1; - -if [[ $IS_AT_LEAST_BIG_SUR -gt 0 ]]; then - echo "***** BUILDING UNIVERSAL ARCH darwin64-arm64-cc ******" - - ./Configure darwin64-arm64-cc no-asm -openssldir="$OPENSSL_SRC" --prefix="$BUILD_DIR" - - make -j "$(sysctl -n hw.ncpu)" CFLAG="-D_DARWIN_C_SOURCE $ASM_DEF -arch arm64 $ISYSROOT -Wno-unused-value -Wno-parentheses" SHARED_LDFLAGS="-arch arm64 -dynamiclib" - - echo "***** copying intermediate libraries to $CONFIGURATION_TEMP_DIR/arm64-*.a *****" - cp libcrypto.a "$CONFIGURATION_TEMP_DIR"/arm64-libcrypto.a - cp libssl.a "$CONFIGURATION_TEMP_DIR"/arm64-libssl.a - - cp libcrypto.1.1.dylib "$CONFIGURATION_TEMP_DIR"/arm64-libcrypto.1.1.dylib - cp libssl.1.1.dylib "$CONFIGURATION_TEMP_DIR"/arm64-libssl.1.1.dylib -fi - -echo "***** BUILDING UNIVERSAL ARCH darwin64-x86_64-cc ******" -make clean - -./Configure darwin64-x86_64-cc -openssldir="$OPENSSL_SRC" --prefix="$BUILD_DIR" - -make -j "$(sysctl -n hw.ncpu)" CFLAG="-D_DARWIN_C_SOURCE $ASM_DEF -arch x86_64 $ISYSROOT" SHARED_LDFLAGS="-arch x86_64 -dynamiclib" - -echo "***** copying intermediate libraries to $CONFIGURATION_TEMP_DIR/x86_64-*.a *****" -cp libcrypto.a "$CONFIGURATION_TEMP_DIR"/x86_64-libcrypto.a -cp libssl.a "$CONFIGURATION_TEMP_DIR"/x86_64-libssl.a -cp libcrypto.1.1.dylib "$CONFIGURATION_TEMP_DIR"/x86_64-libcrypto.1.1.dylib -cp libssl.1.1.dylib "$CONFIGURATION_TEMP_DIR"/x86_64-libssl.1.1.dylib - -mkdir -p "$TARGET_BUILD_DIR" - -if [[ $IS_AT_LEAST_BIG_SUR -gt 0 ]]; then - echo "***** creating universallibraries in $TARGET_BUILD_DIR *****" - lipo -create "$CONFIGURATION_TEMP_DIR/"*-libcrypto.1.1.dylib -output "$TARGET_BUILD_DIR/libcrypto.1.1.dylib" - lipo -create "$CONFIGURATION_TEMP_DIR/"*-libssl.1.1.dylib -output "$TARGET_BUILD_DIR/libssl.1.1.dylib" -else - echo "***** copying libraries to $TARGET_BUILD_DIR *****" - cp "$CONFIGURATION_TEMP_DIR"/x86_64-libcrypto.1.1.dylib "$TARGET_BUILD_DIR/libcrypto.1.1.dylib" - cp "$CONFIGURATION_TEMP_DIR"/x86_64-libssl.1.1.dylib "$TARGET_BUILD_DIR/libssl.1.1.dylib" -fi - -echo "***** removing temporary files from $CONFIGURATION_TEMP_DIR *****" -rm -f "$CONFIGURATION_TEMP_DIR/"*-libcrypto.* -rm -f "$CONFIGURATION_TEMP_DIR/"*-libssl.* - -echo "***** copying libraries to $SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib" -cp "$TARGET_BUILD_DIR/libcrypto.1.1.dylib" "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib" || exit 1; -cp "$TARGET_BUILD_DIR/libssl.1.1.dylib" "$SRCROOT/../SPMySQLFramework/MySQL Client Libraries/lib" || exit 1; diff --git a/Frameworks/openssl/openssl-1.1.1h.tar.gz b/Frameworks/openssl/openssl-1.1.1h.tar.gz deleted file mode 100644 index 4014713f9..000000000 Binary files a/Frameworks/openssl/openssl-1.1.1h.tar.gz and /dev/null differ diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..0e0b7c02c --- /dev/null +++ b/Gemfile @@ -0,0 +1,10 @@ +# By Jakub Kaspar 21/11/2020 +# Copyright © 2020 Sequel-Ace. All rights reserved. + +source 'https://rubygems.org' +gem 'fastlane', '~> 2.226' +gem 'rake', '~> 13' +gem 'abbrev' +gem 'logger' +gem 'mutex_m' +gem 'csv' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..31c906f9c --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,233 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.7) + base64 + nkf + rexml + abbrev (0.1.2) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + artifactory (3.0.17) + atomos (0.1.3) + aws-eventstream (1.3.0) + aws-partitions (1.1046.0) + aws-sdk-core (3.217.1) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.97.0) + aws-sdk-core (~> 3, >= 3.216.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.179.0) + aws-sdk-core (~> 3, >= 3.216.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.11.0) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + base64 (0.2.0) + claide (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + csv (3.3.2) + declarative (0.0.20) + digest-crc (0.7.0) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.6.20240107) + dotenv (2.8.1) + emoji_regex (3.2.3) + excon (0.112.0) + faraday (1.10.4) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.1) + faraday (~> 1.0) + fastimage (2.4.0) + fastlane (2.226.0) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored (~> 1.2) + commander (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + http-cookie (~> 1.0.5) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (>= 2.0.0, < 3.0.0) + naturally (~> 2.2) + optparse (>= 0.1.1, < 1.0.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.5) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (~> 3) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.4.0) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.54.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.3) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-storage_v1 (0.31.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.7.1) + google-cloud-env (>= 1.0, < 3.a) + google-cloud-errors (~> 1.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.4.0) + google-cloud-storage (1.47.0) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.31.0) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.8) + domain_name (~> 0.5) + httpclient (2.8.3) + jmespath (1.6.2) + json (2.9.1) + jwt (2.10.1) + base64 + logger (1.6.5) + mini_magick (4.13.2) + mini_mime (1.1.5) + multi_json (1.15.0) + multipart-post (2.4.1) + mutex_m (0.3.0) + nanaimo (0.4.0) + naturally (2.2.1) + nkf (0.2.0) + optparse (0.6.0) + os (1.1.4) + plist (3.7.2) + public_suffix (6.0.1) + rake (13.0.6) + representable (3.2.0) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.4.2) + rouge (3.28.0) + ruby2_keywords (0.0.5) + rubyzip (2.4.1) + security (0.1.5) + signet (0.19.0) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.a) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.10) + CFPropertyList + naturally + sysrandom (1.0.5) + terminal-notifier (2.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.2) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + uber (0.1.0) + unicode-display_width (2.6.0) + word_wrap (1.0.0) + xcodeproj (1.27.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) + xcpretty (0.4.0) + rouge (~> 3.28.0) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + arm64-darwin-22 + arm64-darwin-24 + universal-darwin-21 + x86_64-linux + +DEPENDENCIES + abbrev + csv + fastlane (~> 2.226) + logger + mutex_m + rake (~> 13) + +BUNDLED WITH + 2.4.5 diff --git a/appStoreDescription.md b/Guides/AppStore_description.md similarity index 100% rename from appStoreDescription.md rename to Guides/AppStore_description.md diff --git a/CODE_OF_CONDUCT.md b/Guides/Code_of_conduct.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to Guides/Code_of_conduct.md diff --git a/Guides/Contributing.md b/Guides/Contributing.md new file mode 100644 index 000000000..9294a6805 --- /dev/null +++ b/Guides/Contributing.md @@ -0,0 +1,32 @@ +# How to contribute + +We are really glad you're reading this, because we need volunteer developers to help this project be successful long-term. + +We make a commitment to review *all* pull requests that are submitted by members of the community. We will provide feedback and recommendations with the effort of incorporating contributions from the community whenever possible. + +We have a lot of work to do, but we're here to provide, with your help, an always-free, macOS first SQL database tool for everyone. + +## Communication + +We use Slack for communication - feel free to join our [Slack workspace](https://join.slack.com/t/sequel-ace/shared_invite/zt-g9bg1q6o-gDWyGCzauwPdg8BjmBCqKg). + +## Testing + +If you add a new feature or fix a bug, it's generally a good idea to write a test to accompany it! Tests help us ensure that our users can depend on Sequel Ace. + +## Submitting changes + +Please send a [GitHub Pull Request to Sequel Ace](https://github.com/Sequel-Ace/Sequel-Ace/pull/new/dev), pointed at the *main* branch, with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). Please include detailed explanations of what changed (screenshots of changes are preferred). Please avoid committing changes that are unrelated to the pull request (if you accidentally edited an .xib file, it's all good, just revert changes to that unrelated file). + +Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: + + $ git commit -m "A brief summary of the commit + > + > A paragraph describing what changed and its impact." + +## Coding conventions + +Start reading our code and you'll get the hang of it. We optimize for readability! + +Thanks, +The Sequel Ace Team diff --git a/Guides/Developing.md b/Guides/Developing.md new file mode 100644 index 000000000..09b4c3639 --- /dev/null +++ b/Guides/Developing.md @@ -0,0 +1,19 @@ +# Developing Sequel Ace + +## Building Locally + +To run Sequel Ace locally from XCode, please: +- download `.zip` archive of this repo/clone locally +- open `sequel-ace.xcodeproj` +- for the `sequel-ace` and `SPMySQLFramework` (located in `Source/Frameworks/SPMySQLFramework`) projects, under `Signing & Capibilities` + - change the Bundle Identifier to be unique to you (e.g. add `.YOUR_USER_NAME`) + - select a Team that you can create signing certificates for +- open the `sequel-ace` project and, under `Signing & Capabilities` change the Team and Bundle Identifier for the `Sequel Ace` and `SequelAceTunnelAssistant` targets +- open the `Source/Frameworks/SPMySQLFramework` project +- run `Sequel Ace Debug` schema + +If you encounter any issues, let us know by [creating a new issue](https://github.com/Sequel-Ace/Sequel-Ace/issues/new/choose). + +## Extending Objective-C from Swift + +Don't forget to add the header for the Objective-C class you wish to extend to `Sequel-Ace-Bridging-Header` as most of the project is not exposed to the Swift compiler. diff --git a/Guides/Security_policy.md b/Guides/Security_policy.md new file mode 100644 index 000000000..e7df97735 --- /dev/null +++ b/Guides/Security_policy.md @@ -0,0 +1,15 @@ +# Security Policy + +## Supported Versions + +Sequel Ace starts at version 2.0 in honor of Sequel Pro's 1.x releases. We do not support issues with Sequel Pro. + +| Version | Supported | +| ------- | -------------------------------- | +| 3.x | :white_check_mark: (active) | +| 2.x | :question: (security fixes only) | +| 1.x | :x: | + +## Reporting a Vulnerability + +Please report any discovered security vulnerabilities to the project maintainer (Jason Morcos) by filling out the contact us form on his software development company's website. Please include "Sequel Ace Security Vulnerability" in the subject line. https://moballo.com/contact-us/ diff --git a/Interfaces/Base.lproj/MainWindow.xib b/Interfaces/Base.lproj/MainWindow.xib deleted file mode 100644 index 848571f95..000000000 --- a/Interfaces/Base.lproj/MainWindow.xib +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Interfaces/Base.lproj/Preferences.xib b/Interfaces/Base.lproj/Preferences.xib deleted file mode 100644 index 155541b4a..000000000 --- a/Interfaces/Base.lproj/Preferences.xib +++ /dev/null @@ -1,1786 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The cipher suites are used for SSL/TLS-secured connections and specify which algorithms Sequel Ace will use to encrypt a connection, as well as their preference. -Warning: If Sequel Ace and the server do not have at least one cipher suite in common, you will no longer be able to connect! - - - - - - - - - - - - - - - - - - - System default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sequel Ace default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -