Commit graph

196681 commits

Author SHA1 Message Date
Oleksandr Byelkin
c9f54e20d4 MDEV-33990: SHOW STATUS counts ER_CON_COUNT_ERROR as Connection_errors_internal
Bring info about cause of closing connection in the place where we increment
statistics to do it correctly.
2024-09-23 16:16:51 +02:00
Sergei Golubchik
bbc62b1b9e clarify --thread-pool-mode usage 2024-09-23 12:51:21 +02:00
Sergei Golubchik
99837b6df6 restore --clent-rr after 7d86751de5 2024-09-23 12:51:21 +02:00
Alexander Barkov
681609d8a0 MDEV-32891 Assertion `value <= ((ulonglong) 0xFFFFFFFFL) * 10000ULL' failed in str_to_DDhhmmssff_internal
Fixing the wrong assert.
2024-09-20 15:39:09 +04:00
Alexander Barkov
607fc15393 MDEV-31302 Assertion `mon > 0 && mon < 13' failed in my_time_t sec_since_epoch(int, int, int, int, int, int)
The code erroneously called sec_since_epoch() for dates with zeros,
e.g. '2024-00-01'.
Fixi: adding a test that the date does not have zeros before
calling TIME_to_native().
2024-09-20 14:13:53 +04:00
Alexander Barkov
9ac8172ac3 MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
The code in my_strtoll10_mb2 and my_strtoll10_utf32
could hit undefinite behavior by negation of LONGLONG_MIN.
Fixing to avoid this.

Also, fixing my_strtoll10() in the same style.
The previous reduction produced a redundant warning on
CAST(_latin1'-9223372036854775808' AS SIGNED)
2024-09-20 13:04:57 +04:00
Alexander Barkov
841dc07ee1 MDEV-28386 UBSAN: runtime error: negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoull_8bit on SELECT ... OCT
The code in my_strntoull_8bit() and my_strntoull_mb2_or_mb4()
could hit undefinite behavior by negating of LONGLONG_MIN.
Fixing the code to avoid this.
2024-09-20 11:01:31 +04:00
Lena Startseva
0a5e4a0191 MDEV-31005: Make working cursor-protocol
Updated tests: cases with bugs or which cannot be run
with the cursor-protocol were excluded with
"--disable_cursor_protocol"/"--enable_cursor_protocol"

Fix for v.10.5
2024-09-18 18:39:26 +07:00
Lena Startseva
ab569524dc MDEV-31005: Make working cursor-protocol
Added ability to disable/enable (--disable_cursor_protocol/
--enable_cursor_protocol) cursor-protocol in tests. If
"--disable_cursor_protocol" is used then ps-protocol is also
disabled. With cursor-protocol prepare statement is executed
only once. For "--cursor-protocol" added filter for queries:
it is executed only for "SELECT" queries.
2024-09-18 18:39:26 +07:00
Daniel Black
450040e0da MDEV-34952 main.log_slow test failure on opensuse builder
The loose regex for the MDEV-34539 test ended up
matching the opensuse in the path in buildbot.

Adjust to more complete regex including space,
backtick and \n, which becomes much less common
as a path name.
2024-09-18 18:46:27 +10:00
Brandon Nesterenko
68938d2b42 MDEV-33500 (part 2): rpl.rpl_parallel_sbm can still fail
The failing test case validates Seconds_Behind_Master for a delayed
slave, while STOP SLAVE is executed during a delay. The test fixes
initially added to the test (commit b04c857596) added a table lock
to ensure a transaction could not finish before validating the
Seconds_Behind_Master field after SLAVE START, but did not address a
possibility that the transaction could finish before running the
STOP SLAVE command, which invalidates the validations for the rest
of the test case. Specifically, this would result in 1) a timeout in
“Waiting for table metadata lock” on the replica, which expects the
transaction to retry after slave restart and hit a lock conflict on
the locked tables (added in b04c857596), and 2) that
Seconds_Behind_Master should have increased, but did not.

The failure can be reproduced by synchronizing the slave to the master
before the MDEV-32265 echo statement (i.e. before the SLAVE STOP).

This patch fixes the test by adding a mechanism to use DEBUG_SYNC to
synchronize a MASTER_DELAY, rather than continually increase the
duration of the delay each time the test fails on buildbot. This is
to ensure that on slow machines, a delay does not pass before the
test gets a chance to validate results. Additionally, it decreases
overall test time because the test can continue immediately after
validation, thereby bypassing the remainder of a full delay for each
transaction.
2024-09-17 06:29:20 -06:00
Alexander Barkov
a1adabdd5c MDEV-25900 Assertion octets < 1024' failed in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string OR Assertion field_length < 1024' failed in Field_string::save_field_metadata
A CHAR column cannot be longer than 1024, because
Binlog_type_info_fixed_string::Binlog_type_info_fixed_string
replies on this fact - it cannot store binlog metadata for longer columns.

In case of the filename character set mbmaxlen is equal to 5,
so only 1024/5=204 characters can fit into the 1024 limit.
- In strict mode:
  Disallowing creation of a CHAR column with octet length grater than 1024.
- In non-strict mode:
  Automatically convert CHAR with octet length>1024 into VARCHAR.
2024-09-17 08:50:26 +04:00
Julius Goryavsky
222744c54e galera SST scripts: fixing glitchy sockstat issues for FreeBSD 2024-09-16 14:54:47 +02:00
Julius Goryavsky
45be538cf4 galera SST scripts: added missing 'datadir' parameter for mysqldump method 2024-09-15 06:47:35 +02:00
Julius Goryavsky
64356509af galera SST scripts: moving mysqldump-specific code out of the wsrep_sst_common 2024-09-15 06:08:03 +02:00
Julius Goryavsky
228cb073ad galera SST scripts: comments update 2024-09-15 06:08:03 +02:00
Julius Goryavsky
46a5d2f1cf galera SST scripts: unification of the previous SST completion check 2024-09-15 06:08:03 +02:00
Julius Goryavsky
7742cc9ff9 galera SST scripts: more robust port checking 2024-09-15 06:07:56 +02:00
Julius Goryavsky
642195d255 MDEV-34234: SST hangs when running on unprivileged containers on RHEL9
The lsof utility is prone to blocking on system calls that
it uses to obtain information about sockets (or files, devices,
etc.). This behavior is described in its own documentation.
It has a '-b' option (in combination with warnings suppression
via '-w') that reduces the probability of blocking, introducing
new problems (luckily probably not relevant for our use case).
However, there is no guarantee that it will not hang on some
distributions, with some TCP/IP stack implementations, or with
some filesystems, etc. Also, of the three utilities that are
suitable for our purposes, lsof is the slowest. So if there
are other utilities that we use during SST, such as 'ss' or
'sockstat', it is reasonable to use them instead of lsof.
This commit changes the prioritization of utilities, it does
not need additional tests (besides the numerous SST tests
already available in the galera suites). If the system still
need to use lsof, this commit adds the '-b' and '-w' options
to it command line - to reduce the likelihood of blocking.
2024-09-15 05:05:03 +02:00
Julius Goryavsky
202fd502cf galera SST scripts: fixes for error logging in non-linux systems 2024-09-15 05:05:03 +02:00
Julius Goryavsky
606c867e7f galera SST scripts: moving common code to wsrep_sst_common file 2024-09-15 05:05:03 +02:00
Julius Goryavsky
4cb73f49bc galera SST scripts: unification of wsrep_sst_backup with the other scripts 2024-09-15 05:05:03 +02:00
Julius Goryavsky
fbd8829149 galera SST scripts: removing obsolete xtrabackup_pid support
Removed handling of the long-unsupported xtrabackup_pid file,
as it is not even created by modern versions of mariabackup.
Instead, added stopping of the asynchronous process that
mariabackup runs (if it is still active) to the exception
handler.
2024-09-15 05:05:03 +02:00
Julius Goryavsky
5cb436e07b MDEV-30822 preparation: refactoring galera sst scripts
This commit makes the SST script for mariabackup more
resilient to unexpected terminations or hangs while
mariabackup or when SST scripts in a previous session
are still running (in reality they were hung while
waiting for something).
2024-09-15 05:05:03 +02:00
Julius Goryavsky
7ee0e60bbb galera mtr tests: minor fixes to make tests more reliable 2024-09-15 05:05:03 +02:00
Marko Mäkelä
4010dff058 mtr_t::log_file_op(): Fix -Wnonnull
GCC 12.2.0 could issue -Wnonnull for an unreachable call to
strlen(new_path).  Let us prevent that by replacing the condition
(type == FILE_RENAME) with the equivalent (new_path).
This should also optimize the generated code, because the life time
of the parameter "type" will be reduced.
2024-09-14 11:05:44 +03:00
Marko Mäkelä
b331cde26b MDEV-34921 MemorySanitizer reports errors for non-debug builds
my_b_encr_write(): Initialize also block_length, and at the same time
last_block_length, so that all 128 bits can be initialized with fewer
writes. This fixes an error that was caught in the test
encryption.tempfiles_encrypted.

test_my_safe_print_str(): Skip a test that would attempt to
display uninitialized data in the test unit.stacktrace.
Previously, our CI did not build unit tests with MemorySanitizer.

handle_delayed_insert(): Remove a redundant call to pthread_exit(0),
which would for some reason cause MemorySanitizer in clang-19 to
report a stack overflow in a RelWithDebInfo build. This fixes a
failure of several tests.

Reviewed by: Vladislav Vaintroub
2024-09-13 14:34:08 +03:00
Dave Gosselin
95885261f0 MDEV-27037 mysqlbinlog emits a warning when reaching EOF before stop-datetime
Emit a warning in the event that we finished processing input files
before reaching the boundary indicated by --stop-datetime.
2024-09-12 08:43:29 -04:00
Dave Gosselin
242b67f1de MDEV-27037 mysqlbinlog emits a warning when reaching EOF before stop-condition
Emit a warning in the event that we finished processing input files
before reaching the boundary indicated by --stop-position.
2024-09-12 08:43:29 -04:00
Yuchen Pei
cc0faa1e3e
MDEV-31788 Factor functions to reduce duplication around spider_check_and_init_casual_read in ha_spider.cc
factored out static functions:
- spider_prep_loop
- spider_start_bg
- spider_send_queries
2024-09-10 11:52:26 +10:00
Yuchen Pei
0ba97e4dc6
MDEV-31788 Factor out calls to spider_ping_table_mon_from_table in ha_spider.cc 2024-09-10 11:52:26 +10:00
Yuchen Pei
9e1579788f
MDEV-31788 Factor spider locking and unlocking code around sending queries 2024-09-10 11:52:22 +10:00
Yuchen Pei
84067291b4
MDEV-28360 Spider: remove #ifdef SPIDER_use_LEX_CSTRING_for_KEY_Field_name 2024-09-10 11:19:19 +10:00
Yuchen Pei
f5b7c25e1e
MDEV-27643 Spider: remove #ifdef HA_CAN_BULK_ACCESS 2024-09-10 11:19:19 +10:00
Yuchen Pei
e7570c7759
MDEV-31788 Remove spider_file_pos
They are for unnecessary debugging purposes only.
2024-09-10 11:19:18 +10:00
Yuchen Pei
a81f419b06
MDEV-27648 remove #define HASH_UPDATE_WITH_HASH_VALUE
The functions called in blocks protected by this macro remain
undefined as of 11.5 c96b23f994
2024-09-10 11:19:14 +10:00
Yuchen Pei
5d54e86c22
MDEV-26178 spider: delete spd_environ.h
It's virtually empty now
2024-09-10 11:15:18 +10:00
Yuchen Pei
869c501ac3
MDEV-27644 Spider: remove HANDLER_HAS_DIRECT_AGGREGATE 2024-09-10 11:15:18 +10:00
Yuchen Pei
3a58291680
MDEV-27662 remove SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE 2024-09-10 11:15:17 +10:00
Yuchen Pei
84977868b1
MDEV-27809 remove SPIDER_I_S_USE_SHOW_FOR_COLUMN
Show::Column() was added in MDEV-19772
4156b1a260
2024-09-10 11:15:17 +10:00
Yuchen Pei
6287fb6e17
MDEV-27652 remove #ifdef HA_HAS_CHECKSUM_EXTENDED
handler::pre_calculate_checksum was added in MDEV-16249
be5c432a42
2024-09-10 11:15:17 +10:00
Yuchen Pei
e8a5553cef
MDEV-27808 remove SPIDER_LIKE_FUNC_HAS_GET_NEGATED
get_negated() was introduced in MDEV-16707
2024-09-10 11:15:16 +10:00
Yuchen Pei
ab49b46d01
MDEV-27664 remove SPIDER_SQL_CACHE_IS_IN_LEX
sql_cache was moved to lex in MDEV-11953 in
de745ecf29
2024-09-10 11:15:16 +10:00
Yuchen Pei
a1e5ee9111
MDEV-27663 remove SPIDER_USE_CONST_ITEM_FOR_STRING_INT_REAL_DECIMAL_DATE_ITEM
{STRING|INT|REAL|DECIMAL|DATE}_ITEM were replaced with CONST_ITEM in
MDEV-14630 c20cd68e60
2024-09-10 11:15:16 +10:00
Yuchen Pei
5e98471df1
MDEV-27811: remove SPIDER_MDEV_16246
MDEV-16246 was fixed long ago. And this macro was removed in other
versions too
2024-09-10 11:15:15 +10:00
Yuchen Pei
8c8684b17f
MDEV-28226 Remove HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
handler::need_info_for_auto_inc() was added in MDEV-7720 / MDEV-7726
in commit dc17ac1638
2024-09-10 11:15:15 +10:00
Yuchen Pei
affcb0713d
MDEV-26178 spider: remove PARTITION_HAS_GET_PART_SPEC
This macro is unused, and not in 11.5 c96b23f994
2024-09-10 11:15:15 +10:00
Yuchen Pei
6d0d09ebc2
MDEV-26178 Spider: remove HANDLER_HAS_TOP_TABLE_FIELDS
This macro is unused
2024-09-10 11:15:14 +10:00
Yuchen Pei
1cb75d9a33
MDEV-27660 Remove #ifdef SPIDER_HANDLER_START_BULK_INSERT_HAS_FLAGS
The flag argument was added to handler::start_bulk_insert() in
the MDEV-539 commit
ca2cdaad86
2024-09-10 11:15:14 +10:00
Yuchen Pei
aaba68ac1e
MDEV-28896 Spider: remove #ifdef SPIDER_UPDATE_ROW_HAS_CONST_NEW_DATA
new_data is const since at least 2017: a05a610d60
2024-09-10 11:15:14 +10:00