Skip to content

Commit

Permalink
Some 8.0.33/34 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paranoiq committed Aug 20, 2024
1 parent 843677c commit 9133b54
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 14 deletions.
3 changes: 2 additions & 1 deletion sources/Platform/Features/MysqlFeatures.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -2712,7 +2713,7 @@ class MysqlFeatures extends FeaturesList

/** @var array<EntityType::*, int> */
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,
Expand Down
5 changes: 4 additions & 1 deletion sources/Sql/Ddl/Table/Option/StorageEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions sources/Sql/MysqlVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
24 changes: 23 additions & 1 deletion tests/Mysql/Data/IgnoredErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> */
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
];

}
10 changes: 10 additions & 0 deletions tests/Mysql/Data/KnownFailures.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];

}
1 change: 0 additions & 1 deletion tests/Mysql/MysqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 5 additions & 3 deletions tests/Mysql/MysqlTestFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ 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',
'disable_testcase', 'disable_warnings', 'disconnect', 'DISCONNECT', 'echo', 'ECHO', 'enable_abort_on_error', 'enable_async_client',
'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',
Expand All @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions tests/debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 9133b54

Please sign in to comment.