From 9133b54d23ffc944b9d371033d335ea4a4d01039 Mon Sep 17 00:00:00 2001 From: Vlasta Neubauer Date: Tue, 20 Aug 2024 15:37:08 +0200 Subject: [PATCH] Some 8.0.33/34 fixes --- sources/Platform/Features/MysqlFeatures.php | 3 ++- .../Sql/Ddl/Table/Option/StorageEngine.php | 5 +++- sources/Sql/MysqlVariable.php | 1 + tests/Mysql/Data/IgnoredErrors.php | 24 ++++++++++++++++++- tests/Mysql/Data/KnownFailures.php | 10 ++++++++ tests/Mysql/MysqlTest.php | 1 - tests/Mysql/MysqlTestFilter.php | 8 ++++--- tests/debugger.php | 14 +++++------ 8 files changed, 52 insertions(+), 14 deletions(-) diff --git a/sources/Platform/Features/MysqlFeatures.php b/sources/Platform/Features/MysqlFeatures.php index c9beb28f..0a6d0e47 100644 --- a/sources/Platform/Features/MysqlFeatures.php +++ b/sources/Platform/Features/MysqlFeatures.php @@ -2382,6 +2382,7 @@ class MysqlFeatures extends FeaturesList [MysqlVariable::NDB_LOG_ORIG, self::MIN, self::MAX], [MysqlVariable::NDB_LOG_TRANSACTION_COMPRESSION, 80031, self::MAX], [MysqlVariable::NDB_LOG_TRANSACTION_COMPRESSION_LEVEL_ZSTD, 80031, self::MAX], + [MysqlVariable::NDB_LOG_TRANSACTION_DEPENDENCY, 80033, self::MAX], [MysqlVariable::NDB_LOG_TRANSACTION_ID, self::MIN, self::MAX], [MysqlVariable::NDB_LOG_UPDATE_AS_WRITE, self::MIN, self::MAX], [MysqlVariable::NDB_LOG_UPDATE_MINIMAL, 50636, 50699], @@ -2712,7 +2713,7 @@ class MysqlFeatures extends FeaturesList /** @var array */ public array $maxLengths = [ - EntityType::GENERAL => 64, // default + EntityType::GENERAL => 65535, // limit unknown, but bigger than 64 EntityType::SCHEMA => 64, EntityType::TABLE => 64, EntityType::VIEW => 64, diff --git a/sources/Sql/Ddl/Table/Option/StorageEngine.php b/sources/Sql/Ddl/Table/Option/StorageEngine.php index 308ec8fa..e782033f 100644 --- a/sources/Sql/Ddl/Table/Option/StorageEngine.php +++ b/sources/Sql/Ddl/Table/Option/StorageEngine.php @@ -48,6 +48,9 @@ public function __construct(string $value) public const NDBCLUSTER = 'ndbcluster'; public const NDBINFO = 'ndbinfo'; + // HeatWave (secondary engine) + public const RAPID = 'rapid'; + // Percona public const TOKUDB = 'TokuDB'; public const XTRADB = 'XtraDB'; @@ -80,7 +83,7 @@ public function __construct(string $value) 'aria' => self::ARIA, 'berkeleydb' => self::BERKELEYDB, 'blackhole' => self::BLACKHOLE, - 'columnstrore' => self::COLUMN_STORE, + 'columnstore' => self::COLUMN_STORE, 'csv' => self::CSV, 'falcon' => self::FALCON, 'federated' => self::FEDERATED, diff --git a/sources/Sql/MysqlVariable.php b/sources/Sql/MysqlVariable.php index 970be195..aaab9cb4 100644 --- a/sources/Sql/MysqlVariable.php +++ b/sources/Sql/MysqlVariable.php @@ -733,6 +733,7 @@ class MysqlVariable extends SqlEnum public const NDB_LOG_TRANSACTION_ID = 'ndb_log_transaction_id'; public const NDB_LOG_TRANSACTION_COMPRESSION = 'ndb_log_transaction_compression'; public const NDB_LOG_TRANSACTION_COMPRESSION_LEVEL_ZSTD = 'ndb_log_transaction_compression_level_zstd'; + public const NDB_LOG_TRANSACTION_DEPENDENCY = 'ndb_log_transaction_dependency'; public const NDB_LOG_UPDATE_AS_WRITE = 'ndb_log_update_as_write'; public const NDB_LOG_UPDATE_MINIMAL = 'ndb_log_update_minimal'; public const NDB_LOG_UPDATED_ONLY = 'ndb_log_updated_only'; diff --git a/tests/Mysql/Data/IgnoredErrors.php b/tests/Mysql/Data/IgnoredErrors.php index 43e5cd77..72affbe6 100644 --- a/tests/Mysql/Data/IgnoredErrors.php +++ b/tests/Mysql/Data/IgnoredErrors.php @@ -35,6 +35,7 @@ trait IgnoredErrors 'ER_TRUNCATED_WRONG_VALUE', // e.g. adding column without default value 'ER_TRUNCATED_WRONG_VALUE_FOR_FIELD', 'ER_TOO_MANY_KEY_PARTS', // to do: detect multi-column index when not explicitly spatial + 'ER_BAD_FIELD_ERROR', ]; /** @var list */ @@ -114,7 +115,6 @@ trait IgnoredErrors 'ER_CANT_CREATE_TABLE', // columns 'ER_DUP_FIELDNAME', - 'ER_BAD_FIELD_ERROR', 'ER_CANT_REMOVE_ALL_FIELDS', 'ER_DEPENDENT_BY_GENERATED_COLUMN', 'ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN', @@ -262,6 +262,7 @@ trait IgnoredErrors 'ER_TRG_IN_WRONG_SCHEMA', // locking 'ER_WRONG_LOCK_OF_SYSTEM_TABLE', + 'ER_USER_LOCK_OVERLONG_NAME', // routines 'ER_UDF_EXISTS', 'ER_SP_DOES_NOT_EXIST', @@ -540,6 +541,7 @@ trait IgnoredErrors 'ER_VIEW_CHECK_FAILED', 'ER_UNABLE_TO_COLLECT_LOG_STATUS', 'ER_ADMIN_WRONG_MRG_TABLE', + 'ER_SECONDARY_ENGINE', 'ER_SECONDARY_ENGINE_DDL', 'ER_CRASHED_ON_USAGE', 'ER_AUTOINC_READ_FAILED', @@ -783,6 +785,24 @@ trait IgnoredErrors 'ER_SLAVE_CHANNEL_SQL_SKIP_COUNTER', 'ER_BINLOG_FATAL_ERROR', 'ER_TEMP_TABLE_PREVENTS_SWITCH_SESSION_BINLOG_FORMAT', + 'ER_REPLICA_CONFIGURATION', + 'ER_CONNECTION_METADATA', + 'ER_BAD_REPLICA', + 'ER_REPLICA_CHANNEL_DOES_NOT_EXIST', + 'ER_REPLICA_CHANNEL_SQL_SKIP_COUNTER', + 'ER_REPLICA_SQL_THREAD_MUST_STOP', + 'ER_REPLICA_AM_INIT_REPOSITORY', + 'ER_REPLICA_CHANNEL_MUST_STOP', + 'ER_REPLICA_CHANNEL_OPERATION_NOT_ALLOWED', + 'ER_BAD_REPLICA_AUTO_POSITION', + 'ER_REPLICA_IGNORE_SERVER_IDS', + 'ER_REPLICA_MAX_CHANNELS_EXCEEDED', + 'ER_REPLICA_MULTIPLE_CHANNELS_CMD', + 'ER_REPLICA_CHANNEL_SQL_THREAD_MUST_STOP', + 'ER_REPLICA_CHANNEL_IO_THREAD_MUST_STOP', + 'ER_CANT_RESET_SOURCE', + 'ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE', + 'ER_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK', '3', // group replication 'ER_GROUP_REPLICATION_CONFIGURATION', @@ -889,6 +909,7 @@ trait IgnoredErrors 'ER_NOT_VALID_PASSWORD', 'ER_PASSWORD_NO_MATCH', 'ER_READ_ONLY_MODE', + 'ER_CANT_CHANGE_SYS_VAR_IN_READ_ONLY_MODE', 'ER_UNKNOWN_AUTHID', 'ER_RENAME_ROLE', 'ER_ROLE_NOT_GRANTED', @@ -910,6 +931,7 @@ trait IgnoredErrors 'ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE', 'ER_CMD_NEED_SUPER', 'ER_MISSING_CURRENT_PASSWORD', + 'ER_VALIDATE_PASSWORD_INSUFFICIENT_CHANGED_CHARACTERS', ]; } diff --git a/tests/Mysql/Data/KnownFailures.php b/tests/Mysql/Data/KnownFailures.php index 35f491f2..54614c54 100644 --- a/tests/Mysql/Data/KnownFailures.php +++ b/tests/Mysql/Data/KnownFailures.php @@ -1134,6 +1134,16 @@ trait KnownFailures "SET PERSIST test_component.str_sys_var = 'test';" => Valid::YES, "RESET PERSIST test_component.bool_sys_var;" => Valid::YES, "SET PERSIST_ONLY test_component.bool_sys_var = 12;" => Valid::YES, + "RESET PERSIST test_component.bool_ro_sys_var;" => Valid::YES, + "SET PERSIST test_component.bool_ro_sys_var = OFF;" => Valid::YES, + "SET PERSIST test_component.bool_sys_var = OFF;" => Valid::YES, + "SELECT @@test_component.str_sys_var_default;" => Valid::YES, + "SET GLOBAL test_component.str_sys_var_default=something;" => Valid::YES, + "SET GLOBAL test_component.str_sys_var_default=\"dictionary.txt\";", + "SET GLOBAL test_server_telemetry_traces.callsite_context_keys=';source_file;source_line;;';" => Valid::YES, + + "SET GLOBAL test_server_telemetry_traces.application_context_keys='client_id;root_id;parent_id;id';" => Valid::YES, + "SET GLOBAL test_server_telemetry_traces.trace_key='activate';" => Valid::YES, ]; } diff --git a/tests/Mysql/MysqlTest.php b/tests/Mysql/MysqlTest.php index c4d695ee..2734886a 100644 --- a/tests/Mysql/MysqlTest.php +++ b/tests/Mysql/MysqlTest.php @@ -8,7 +8,6 @@ use RecursiveIteratorIterator; use SplFileInfo; use SqlFtw\Formatter\Formatter; -use SqlFtw\Platform\ClientSideExtension; use SqlFtw\Platform\Platform; use SqlFtw\Session\Session; use SqlFtw\Tests\Mysql\Data\TestSkips; diff --git a/tests/Mysql/MysqlTestFilter.php b/tests/Mysql/MysqlTestFilter.php index 92cf8d47..ffc2e324 100644 --- a/tests/Mysql/MysqlTestFilter.php +++ b/tests/Mysql/MysqlTestFilter.php @@ -30,7 +30,7 @@ class MysqlTestFilter { public const MYSQL_TEST_SUITE_COMMANDS = [ - 'append_file', 'assert', 'break', 'cat_file', 'change_user', 'character_set', 'chdir', 'chmod', 'close OUT', 'closehandle', + 'append_file', 'assert', 'break', 'cat_file', 'change_user', 'character_set', 'chdir', 'chmod', 'close OUT', 'close\\(', 'closehandle', 'connect', 'CONNECT', 'copy_file', 'dec', 'DEC', 'die', 'diff_files', 'dirty_close', 'disable_abort_on_error', 'disable_async_client', 'disable_connect_log', 'disable_info', 'disable_metadata', 'disable_parsing', 'disable_ps_protocol', 'disable_query_log', 'disable_reconnect', 'disable_result_log', 'disable_session_track_info', @@ -38,8 +38,8 @@ class MysqlTestFilter 'enable_connect_log', 'enable_info', 'enable_metadata', 'enable_parsing', 'enable_ps_protocol', 'enable_query_log', 'enable_reconnect', 'enable_result_log', 'enable_session_track_info', 'enable_testcase', 'enable_warnings', 'END_OF_PROCEDURE', 'eof', 'EOF', 'ERROR_LOG', 'eval', 'EVAL', 'exec', 'exec_in_background', 'EXECUTE_STEP', 'exit', 'expecterror', - 'expr', 'file_exists', 'force', 'horizontal_results', 'ibdata2', 'inc', 'INC', 'let', 'LET', 'list_files', - 'lowercase_result', 'mkdir', 'move_file', 'my', 'mysqlx', /*'open',*/ 'open OUT', 'output', 'partially_sorted_result', 'perl', + 'expr', 'file_exists', 'for my', 'force', 'horizontal_results', 'ibdata2', 'inc', 'INC', 'let', 'LET', 'list_files', + 'lowercase_result', 'mkdir', 'move_file', 'my', 'mysqlx', /*'open',*/ 'open OUT', 'open\\(', 'output', 'partially_sorted_result', 'perl', 'print', 'PROCEDURE', 'query', 'query_attributes', 'read', 'real_sleep', 'reap', 'REAP', 'REAp', 'recvresult', 'remove_file', 'remove_files_wildcard', 'replace_column', 'replace_numeric_round', 'replace_regex', 'replace_result', 'reset_connection', 'result_format', 'rmdir', 'save_master_pos', 'SCRIPT', 'secret', 'send_eval', 'send_quit', @@ -48,6 +48,8 @@ class MysqlTestFilter 'wait_for_slave_to_stop', 'write_file', // some params 'create-schema', '-uroot', '--password', 'silent', 'concurrency', 'iterations', '--commit=1', + // labels + 'END_OF_PERL', ]; private string $commands; diff --git a/tests/debugger.php b/tests/debugger.php index 66cab7c5..7279dde0 100644 --- a/tests/debugger.php +++ b/tests/debugger.php @@ -32,14 +32,14 @@ FormattersDogma::register(); Dumper::$hiddenFields[] = 'sql'; -Dumper::$hiddenFields[] = 'maxLengths'; Dumper::$doNotTraverse[] = Parser::class; -Dumper::$doNotTraverse[] = Assert::class . '::validCommands'; -Dumper::$doNotTraverse[] = InvalidTokenException::class . '::tokens'; -Dumper::$doNotTraverse[] = Platform::class . '::nonReserved'; -Dumper::$doNotTraverse[] = Platform::class . '::operators'; -Dumper::$doNotTraverse[] = Platform::class . '::preparableCommands'; -Dumper::$doNotTraverse[] = Platform::class . '::reserved'; +Dumper::$doNotTraverse[] = Assert::class . '::$validCommands'; +Dumper::$doNotTraverse[] = InvalidTokenException::class . '::$tokens'; +Dumper::$doNotTraverse[] = Platform::class . '::$nonReserved'; +Dumper::$doNotTraverse[] = Platform::class . '::$operators'; +Dumper::$doNotTraverse[] = Platform::class . '::$preparableCommands'; +Dumper::$doNotTraverse[] = Platform::class . '::$reserved'; +Dumper::$doNotTraverse[] = TokenList::class . '::$maxLengths'; Dumper::$namespaceReplacements['~SqlFtw\\\\Parser\\\\(.*)~'] = '..\1'; Dumper::$namespaceReplacements['~SqlFtw\\\\Formatter\\\\(.*)~'] = '..\1'; Dumper::$namespaceReplacements['~SqlFtw\\\\Sql\\\\(.*)~'] = '..\1';