Commit graph

1066 commits

Author SHA1 Message Date
Daniel Black
e86986a157 Merge 10.6 into 10.7 2022-03-24 18:57:07 +11:00
Daniel Black
065f995e6d Merge branch 10.5 into 10.6 2022-03-18 12:17:11 +11:00
Daniel Black
b73d852779 Merge 10.4 to 10.5 2022-03-17 17:03:24 +11:00
Daniel Black
069139a549 Merge 10.3 to 10.4
extra2_read_len resolved by keeping the implementation
in sql/table.cc by exposed it for use by ha_partition.cc

Remove identical implementation in unireg.h
(ref: bfed2c7d57)
2022-03-16 16:39:10 +11:00
Daniel Black
a950086036 Merge 10.2 (part) into 10.3
commit '6de482a6fefac0c21daf33ed465644151cdf879f'

10.3 no longer errors in truncate_notembedded.test
but per comments, a non-crash is all that we are after.
2022-03-15 16:44:52 +11:00
Haidong Ji
114476f2ec MDEV-27978 fix wrong name in error when max_session_mem_used exceeded
Fixed typo in my_malloc_size_cb_func. There is no max-thread-mem-used
sys variable in MariaDB, only max-session-mem-used. The relevant entry
in sys_vars.cc is also fixed.

Added a fallback case in case we could allocate the 256 bytes for the
error message containing the exact setting.
2022-03-08 15:13:09 +11:00
Marko Mäkelä
01bb003a3a Merge 10.6 into 10.7 2022-02-23 16:22:34 +02:00
Marko Mäkelä
164a6aa41c Merge 10.5 into 10.6 2022-02-23 16:19:45 +02:00
Marko Mäkelä
b91a123d8c Extend have_sanitizer with ASAN+UBSAN and MSAN
Disable some tests that are too slow or big for MSAN.
2022-02-23 15:48:08 +02:00
Oleksandr Byelkin
9ed8deb656 Merge branch '10.6' into 10.7 2022-02-04 14:11:46 +01:00
Oleksandr Byelkin
f5c5f8e41e Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
Oleksandr Byelkin
cf63eecef4 Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
Oleksandr Byelkin
a576a1cea5 Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
Oleksandr Byelkin
41a163ac5c Merge branch '10.2' into 10.3 2022-01-29 15:41:05 +01:00
mkaruza
53173709b3 MDEV-26223 Galera cluster node consider old server_id value even after modification of server_id [wsrep_gtid_mode=ON]
Variable `wsrep_new_cluster` now will be TRUE also when there is only `gcomm://` used
in configuration. This configuration, even without --wsrep-new-cluster,
is considered to bootstrap new cluster.

Updated galera GTID test to ignore warning message when non bootstrap
node have server-id different thant one cluster is initialized with.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-01-27 08:22:46 +02:00
Jan Lindström
0f7fececbf Revert "MDEV-26223 Galera cluster node consider old server_id value even after modification of server_id [wsrep_gtid_mode=ON]"
This reverts commit a0f711e928.
2022-01-25 11:05:41 +02:00
Jan Lindström
a0f711e928 MDEV-26223 Galera cluster node consider old server_id value even after modification of server_id [wsrep_gtid_mode=ON]
For non bootstrap node server id should be ignored because using custom
value can lead to inconsistency problem with replicated GTID in cluster.
Providing warning message when this happens.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-01-20 11:53:41 +02:00
Vladislav Vaintroub
47e18af906 MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
Marko Mäkelä
5f160b4d86 Merge 10.6 into 10.7 2021-11-25 08:10:02 +02:00
Marko Mäkelä
3cfbfa58de Merge 10.5 into 10.6 2021-11-25 08:08:42 +02:00
Marko Mäkelä
ca26953924 Merge 10.4 into 10.5 2021-11-25 07:49:58 +02:00
Marko Mäkelä
b53ee760ff Cleanup: offsetof instead of my_offsetof
Sys_lc_messages, Sys_lc_time_names: Use offsetof(MY_LOCALE, ...)
because the type has standard layout.
2021-11-24 12:42:31 +02:00
Vicențiu Ciorbaru
12eb8ad7b9 MDEV-26242: Assertion `i >= 0' failed on setting default_tmp_storage_engine to 'DEFAULT' in 10.7
Locking / unlocking plugins is already handled by Sys_var_plugin::check
method. No need to do that in the specialized checking code, use
var->save_value instead to get the plugin handle.
2021-10-29 14:56:09 +03:00
Marko Mäkelä
d7af7bfc2b Merge 10.6 into 10.7 2021-10-28 09:14:51 +03:00
Marko Mäkelä
d8c6c53a06 Merge 10.5 into 10.6 2021-10-28 09:08:58 +03:00
Marko Mäkelä
a8ded39557 Merge 10.4 into 10.5 2021-10-28 08:48:36 +03:00
Marko Mäkelä
3a79e5fd31 Merge 10.3 into 10.4 2021-10-28 08:28:39 +03:00
Marko Mäkelä
657bcf928e Merge 10.2 into 10.3 2021-10-28 07:50:05 +03:00
Alexey Botchkov
efedf3da68 MDEV-22711 Assertion `nr != 0' failed in handler::update_auto_increment.
DBUG_ASSERT removed as the AUTO INCREMENT can actually be 0 when the
SET insert_id= 0; was done.
2021-10-26 00:29:27 +04:00
Marko Mäkelä
b4911f5a34 Merge 10.6 into 10.7 2021-10-13 16:37:12 +03:00
Marko Mäkelä
a8379e53e8 Merge 10.5 into 10.6
The changes to galera.galear_var_replicate_myisam_on
in commit d9b933bec6
are omitted due to conflicts
with commit 27d66d644c.
2021-10-13 13:28:12 +03:00
Marko Mäkelä
99bb3fb656 Merge 10.4 into 10.5 2021-10-13 12:33:56 +03:00
Marko Mäkelä
a736a3174a Merge 10.3 into 10.4 2021-10-13 12:03:32 +03:00
Marko Mäkelä
4a7dfda373 Merge 10.2 into 10.3 2021-10-13 11:38:21 +03:00
Alexander Barkov
eadd878808 MDEV-23269 SIGSEGV in ft_boolean_check_syntax_string on setting ft_boolean_syntax
The crash happened because my_isalnum() does not support character
sets with mbminlen>1.

The value of "ft_boolean_syntax" is converted to utf8 in do_string_check().
So calling my_isalnum() is combination with "default_charset_info" was wrong.

Adding new parameters (size_t length, CHARSET_INFO *cs) to
ft_boolean_check_syntax_string() and passing self->charset(thd)
as the character set.
2021-10-11 17:43:23 +04:00
Jan Lindström
52505bf20d MDEV-24947 : Remove parameter wsrep_replicate_myisam 2021-08-07 10:09:12 +03:00
Jan Lindström
14731d7635 MDEV-24843 : Remove parameter wsrep_strict_ddl
Changes to be committed:
	modified:   mysql-test/include/galera_variables_ok.inc
	modified:   mysql-test/include/galera_variables_ok_debug.inc
	modified:   mysql-test/suite/galera/r/galera_defaults.result
	deleted:    mysql-test/suite/galera/r/galera_var_wsrep_strict_ddl.result
	modified:   mysql-test/suite/galera/t/galera_defaults.test
	deleted:    mysql-test/suite/galera/t/galera_var_wsrep_strict_ddl.test
	modified:   mysql-test/suite/sys_vars/r/sysvars_wsrep.result
	modified:   mysql-test/suite/wsrep/r/variables.result
	modified:   mysql-test/suite/wsrep/r/variables_debug.result
	modified:   sql/sys_vars.cc
	modified:   sql/wsrep_mysqld.cc
	modified:   sql/wsrep_mysqld.h
	modified:   sql/wsrep_var.cc
	modified:   sql/wsrep_var.h
2021-08-07 10:09:12 +03:00
Marko Mäkelä
ddcb242b3c Merge 10.6 into 10.7 2021-08-04 11:52:39 +03:00
Oleksandr Byelkin
6efb5e9f5e Merge branch '10.5' into 10.6 2021-08-02 10:11:41 +02:00
Oleksandr Byelkin
ae6bdc6769 Merge branch '10.4' into 10.5 2021-07-31 23:19:51 +02:00
Oleksandr Byelkin
7841a7eb09 Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
Nikita Malyavin
6ed47508c8 add const qualifiers to sys_var::value_ptr functions and fix const casts
This is important since Sys_var_typelib and its descendants return
pointers to constant symbols from *_value_ptr, which are situated in
write-protected-memory.

* functions const-qualified:
  - value_ptr
  - session_value_ptr
  - global_value_ptr
  - default_value_ptr
  - Sys_var_vers_asof::value_ptr
  - other minor private ones

* remove C-style typecasts when it discards qualifiers
2021-07-27 14:15:01 +03:00
Nikita Malyavin
c6bff46958 MDEV-16026 MDEV-16481 refactor Sys_var_vers_asof
MDEV-16026: Forbid global system_versioning_asof in non-default time zone

* store `system_versioning_asof` in unix time;
* both session and global vars are processed in session timezone;
* setting `default` does not copy global variable anymore. Instead, it sets
  system_time to SYSTEM_TIME_UNSPECIFIED, which means that no 'AS OF' time
  is applied and `now()` can be assumed

As a regression, we cannot assign values below 1970 (UTC) anymore

MDEV-16481: set global system_versioning_asof=sf() crashes in specific case

* sys_vars.h: add `MYSQL_TIME` field to `set_var::save_result`
* sys_vars.ic: get rid of calling `var->value->get_date()` from
 `Sys_var_vers_asof::update()`
* versioning.sysvars: add test; remove double warning

refactor Sys_var_vers_asof

* inherit from sys_var rather than Sys_var_enum
* remove junk "DEFAULT" keyword. There is DEFAULT in SQL grammar for it.
* make all conversions in check() to avoid possible errors
* avoid double var->value evaluation, which could
  consequence in undefined behavior
2021-07-27 14:15:01 +03:00
Anel Husakovic
f7216fa63d MDEV-12914: Engine for temporary tables which are implicitly created as RocksDB is substituted silently
- There should be no substitution if engine exists, only when doesn't
exist
- Handling of an error when sys_var `default_tmp_storage_engine` is
assigned to unsupported engine.
- rocksdb doesn't support embedded server ebfc4e6ad0 so is excluded

Closes PR #774
Reviewed by: serg@mariadb.com
             vicentiu@mariadb.org
2021-07-10 08:50:53 +02:00
Vladislav Vaintroub
3d6eb7afcf MDEV-25602 get rid of __WIN__ in favor of standard _WIN32
This fixed the MySQL bug# 20338 about misuse of double underscore
prefix __WIN__, which was old MySQL's idea of identifying Windows
Replace it by _WIN32 standard symbol for targeting Windows OS
(both 32 and 64 bit)

Not that connect storage engine is not fixed in this patch (must be
fixed in "upstream" branch)
2021-06-06 13:21:03 +02:00
Monty
a206658b98 Change CHARSET_INFO character set and collaction names to LEX_CSTRING
This change removed 68 explict strlen() calls from the code.

The following renames was done to ensure we don't use the old names
when merging code from earlier releases, as using the new variables
for print function could result in crashes:
- charset->csname renamed to charset->cs_name
- charset->name renamed to charset->coll_name

Almost everything where mechanical changes except:
- Changed to use the new Protocol::store(LEX_CSTRING..) when possible
- Changed to use field->store(LEX_CSTRING*, CHARSET_INFO*) when possible
- Changed to use String->append(LEX_CSTRING&) when possible

Other things:
- There where compiler issues with ensuring that all character set names
  points to the same string: gcc doesn't allow one to use integer constants
  when defining global structures (constant char * pointers works fine).
  To get around this, I declared defines for each character set name
  length.
2021-05-19 22:54:07 +02:00
Rucha Deodhar
2fdb556e04 MDEV-8334: Rename utf8 to utf8mb3
This patch changes the main name of 3 byte character set from utf8 to
utf8mb3. New old_mode UTF8_IS_UTF8MB3 is added and set TRUE by default,
so that utf8 would mean utf8mb3. If not set, utf8 would mean utf8mb4.
2021-05-19 06:48:36 +02:00
Sujatha
7e1ec1550c MDEV-19371: Implement binlog_expire_logs_seconds for purging of binary logs
Post push fixes.

* Set binlog_expire_logs_seconds max valid value to 8553600
  i.e 99 * 24 * 60 * 60 (99 days)
2021-05-17 12:48:37 +05:30
Sujatha
49ff2cbff4 MDEV-19371: Implement binlog_expire_logs_seconds for purging of binary logs
Part1: Functional changes

Backporting upstream changes.
commit a7e1ef858ee82493dd8ad9a76bc9c22fe3b8c05b
Author: Neha Kumari <neha.n.kumari@oracle.com>
Note:
From the upstream patch only the new option binlog_expire_logs_seconds
specific changes are taken.

* Unlike in the upstream patch 'binlog_expire_logs_seconds' does not
  replace the "old" 'expire_logs_days', to preserve backward-compatibility.

* Datatype of 'expire_logs_days' variable is changed to double.

* Default value of 'binlog_expire_logs_seconds=0' similar to
  'expire_logs_days'.

* The purge_time can be specified in days with the micro-day precision.
  Eg:
  expire_logs_days=1 is the same as expire_logs_days=1.000000 to make
    binlog_expire_logs_seconds=86400.
  binlog_expire_logs_seconds=1 is the same as expire_logs_days=0.000012.

* If binary log is disabled and option 'expire_logs_days' or
  'binlog_expire_logs_seconds' used with purge_time > 0 a warning will be
  issued.
2021-05-10 09:36:40 +05:30
Marko Mäkelä
4930f9c94b Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00