From 3f2c4758b07227ed6658f0ccc491b747dfd7aa54 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 11 Jun 2021 17:13:19 +1000 Subject: [PATCH 1/4] MDEV-25894: support AIX as a platform in mtr Parital backport of 48938c57c7f75b2a7627212b01cd65cfd6830261 so platform dependent AIX tests can be done. --- mysql-test/include/platform.combinations | 2 ++ mysql-test/lib/My/Platform.pm | 11 ++++++++++- mysql-test/main/mysqld--help,aix.rdiff | 0 mysql-test/suite.pm | 8 +++++++- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 mysql-test/main/mysqld--help,aix.rdiff diff --git a/mysql-test/include/platform.combinations b/mysql-test/include/platform.combinations index 4681ac05314..4f0660b7a40 100644 --- a/mysql-test/include/platform.combinations +++ b/mysql-test/include/platform.combinations @@ -1,4 +1,6 @@ [win] +[aix] + [unix] diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm index db1206f187e..b8bc9f8ec84 100644 --- a/mysql-test/lib/My/Platform.pm +++ b/mysql-test/lib/My/Platform.pm @@ -22,7 +22,7 @@ use File::Basename; use File::Path; use base qw(Exporter); -our @EXPORT= qw(IS_CYGWIN IS_WINDOWS IS_WIN32PERL +our @EXPORT= qw(IS_CYGWIN IS_WINDOWS IS_WIN32PERL IS_AIX native_path posix_path mixed_path check_socket_path_length process_alive open_for_append); @@ -54,6 +54,15 @@ BEGIN { } } +BEGIN { + if ($^O eq "aix") { + eval 'sub IS_AIX { 1 }'; + } + else { + eval 'sub IS_AIX { 0 }'; + } +} + # # native_path diff --git a/mysql-test/main/mysqld--help,aix.rdiff b/mysql-test/main/mysqld--help,aix.rdiff new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index 2617f95d989..b76a50716cc 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -17,7 +17,13 @@ sub skip_combinations { unless $ENV{DEBUG_KEY_MANAGEMENT_SO}; # don't run tests for the wrong platform - $skip{'include/platform.combinations'} = [ (IS_WINDOWS) ? 'unix' : 'win' ]; + if (IS_WINDOWS) { + $skip{'include/platform.combinations'} = [ 'aix', 'unix' ]; + } elsif (IS_AIX) { + $skip{'include/platform.combinations'} = [ 'win', 'unix' ]; + } else { + $skip{'include/platform.combinations'} = [ 'aix', 'win' ]; + } $skip{'include/maybe_debug.combinations'} = [ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ]; From 0a9487b62b5f4126c63a191a1867367c845ddfbe Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 2 Jul 2021 13:00:34 +1000 Subject: [PATCH 2/4] mtr: aix - no pool of threads --- mysql-test/include/not_aix.inc | 4 ++++ mysql-test/main/mdev-21101.test | 1 + mysql-test/suite.pm | 1 + 3 files changed, 6 insertions(+) create mode 100644 mysql-test/include/not_aix.inc diff --git a/mysql-test/include/not_aix.inc b/mysql-test/include/not_aix.inc new file mode 100644 index 00000000000..ecdb3b97a6e --- /dev/null +++ b/mysql-test/include/not_aix.inc @@ -0,0 +1,4 @@ +# +# suite.pm will make sure that all tests including this file +# will be skipped if run under AIX +# diff --git a/mysql-test/main/mdev-21101.test b/mysql-test/main/mdev-21101.test index 627e86462a1..543b587c5e6 100644 --- a/mysql-test/main/mdev-21101.test +++ b/mysql-test/main/mdev-21101.test @@ -1,4 +1,5 @@ --source include/not_embedded.inc +--source include/not_aix.inc # Test that wait_timeout does not cause connection to be closed, when connection is delayed due to # threadpool internal problems, e.g misconfiguration - too few threads and queueing. # So if client did not cause wait_timeout, do not report it either. diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index b76a50716cc..2428f3156b9 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -53,6 +53,7 @@ sub skip_combinations { unless $ENV{HA_EXAMPLE_SO}; $skip{'include/not_windows.inc'} = 'Requires not Windows' if IS_WINDOWS; + $skip{'include/not_aix.inc'} = 'Requires not AIX' if IS_AIX; $skip{'main/plugin_loaderr.test'} = 'needs compiled-in innodb' unless $::mysqld_variables{'innodb'} eq "ON"; From c22f7f2323d6f823c9340d0a85a2b7ad0239f16f Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 2 Jul 2021 15:57:50 +1000 Subject: [PATCH 3/4] MDEV-25129 postfix for windows C:\projects\server\sql\sql_show.cc(7913): error C2220: warning treated as error - no 'object' file generated [C:\projects\server\win_build\sql\sql.vcxproj] C:\projects\server\sql\sql_show.cc(7913): warning C4267: 'initializing': conversion from 'size_t' to 'uint', possible loss of data [C:\projects\server\win_build\sql\sql.vcxproj] caused by 768c51880a5aa6d25d4c0fe7de7a88561ff46422 --- sql/sql_show.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index f8f784bbbad..721bb053343 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -7572,7 +7572,7 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond) int add_symbol_to_table(const char* name, TABLE* table){ DBUG_ENTER("add_symbol_to_table"); - uint length= strlen(name); + size_t length= strlen(name); // If you've added a new SQL keyword longer than KEYWORD_SIZE, // please increase the defined max length From 7ce5984d6df1bb4f843bec244411ec5514c46105 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 2 Jul 2021 15:50:21 +1000 Subject: [PATCH 4/4] mtr: fix tests funcs_1.is_tables_is & sql_sequence.rebuild --- mysql-test/suite/funcs_1/r/is_tables_is.result | 8 ++++++++ mysql-test/suite/sql_sequence/rebuild.result | 2 ++ 2 files changed, 10 insertions(+) diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result index 70564ab6af8..338f445c2d4 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is.result @@ -458,6 +458,8 @@ TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y user_comment Separator ----------------------------------------------------- TABLE_CATALOG def @@ -806,6 +808,8 @@ TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y user_comment Separator ----------------------------------------------------- TABLE_CATALOG def @@ -1545,6 +1549,8 @@ TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y user_comment Separator ----------------------------------------------------- TABLE_CATALOG def @@ -1893,6 +1899,8 @@ TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y user_comment Separator ----------------------------------------------------- TABLE_CATALOG def diff --git a/mysql-test/suite/sql_sequence/rebuild.result b/mysql-test/suite/sql_sequence/rebuild.result index c8dc47ad8fa..a7f231d5253 100644 --- a/mysql-test/suite/sql_sequence/rebuild.result +++ b/mysql-test/suite/sql_sequence/rebuild.result @@ -45,6 +45,7 @@ INNODB_SYS_INDEXES INNODB_SYS_TABLES INNODB_SYS_VIRTUAL INNODB_TRX +KEYWORDS KEY_CACHES KEY_COLUMN_USAGE PARAMETERS @@ -59,6 +60,7 @@ SCHEMA_PRIVILEGES SESSION_STATUS SESSION_VARIABLES SPATIAL_REF_SYS +SQL_FUNCTIONS STATISTICS SYSTEM_VARIABLES TABLES