Commit graph

190497 commits

Author SHA1 Message Date
Alexander Barkov
c55f24cd99 MDEV-23162 Improve Protocol performance for numeric data
An alternative implementation (replacing the one based on repertoire).

This implementation makes Field send itself to Protocol_text using
data type specific Protocol methods rather than field->val_str()
followed by protocol_text->store_str().

As now Field sends itself in the same way to all protocol types
(e.g. Protocol_binary, Protocol_text, Protocol_local),
the method Field::send_binary() was renamed just to Field::send().

Note, this change introduces symmetry between Field and Item,
because Items also send themself using a single method Item::send(),
which is used for *all* protocol types.

Performance improvement is achieved by the fact that Protocol_text
implements these data type specific methods using store_numeric_string_aux()
rather than store_string_aux(). The conversion now happens only when
character_set_results is not ASCII compatible character sets
(e.g. UCS2, UTF16, UTF32).

In the old code (before any MDEV-23162 work, e.g. as of 10.5.4),
Protocol_text::store(Field*) used val_str() for all data types.
So the execution went through the character set conversion routines
even for numeric and temporal data types.

Benchmarking summary (see  details in MDEV-23478):

The new approach stably demonstrates additional improvement comparing
to the previous implementation (the smaller time - the better):

Original   - the commit before MDEV-23162
             be98036f25

        1m9.336s
        1m9.290s
        1m9.300s

MDEV-23162 - the repertoire optimization

        1m6.101s
        1m5.988s
        1m6.264s

MDEV-23478 - this commit

        1m2.150s
        1m2.079s
        1m2.099s
2020-08-14 10:07:03 +04:00
Alexander Barkov
f1a9700fec Revert "MDEV-23162 Improve Protocol performance for numeric data"
This reverts commit eb2eaba7fd.

A different implementation of MDEV-23162 is coming.
2020-08-14 09:14:07 +04:00
Alexander Barkov
e96f66b93d MDEV-23270 Remove a String parameter from Protocol::store(double/float) 2020-08-14 09:14:07 +04:00
Otto Kekäläinen
0ac8e2cfdb Add a Github CODEOWNERS file to project
As the first entry, define user 'ottok' (Otto Kekäläinen) as the person
who by default gets assigned all PRs that modify the debian/ contents.
2020-08-14 09:03:34 +10:00
Vladislav Vaintroub
5eff7c0226 MDEV-23462 Upgrade wizard not offered during 10.5 MSI installation on Windows
There is no mysql_upgrade_wizard target, only mariadb-upgrade-wizard
2020-08-12 21:38:03 +02:00
Vladislav Vaintroub
7541080214 MDEV-23461 mysql_upgrade_wizard.exe differs from mariadb-upgrade-wizard.exe
The post-build custom command to embed Vista elevation manifest into
mariadb-upgrade-wizard.exe seems to do
something nasty to the executable, perhaps it removes and recreates it.

Thus the previously created hardlink mysql_upgrade_wizard is not marked
to require elevation.

Solved by using MANIFESTUAC linker flag, rather than invoke mt.exe.
This avoids an extra post-build step that modifies mariadb-upgrade-wizard.exe
2020-08-12 21:18:21 +02:00
Vladislav Vaintroub
602d3dafa9 MDEV-23279 postfix - delay accepting connections until server startup is finished. 2020-08-11 17:39:43 +00:00
Alexander Barkov
6a7e646df3 MDEV-23054 Assertion `!item->null_value' failed in Type_handler_inet6::make_sort_key_part (#2)
IFNULL(inet6_not_null_expr, 'foo') erroneously set its nullability to NOT NULL.

Fix:
- Moving the line "maybe_null= args[1]->maybe_null" before the call
  of fix_length_and_dec2(), so the call of Type_handler method
  Item_hybrid_func_fix_attributes() can reset it when desired.

- Fixing Type_handler_inet6::Item_hybrid_func_fix_attributes()
  to ignore args[0] when detecting nullability of IFNULL().
2020-08-11 12:35:19 +04:00
Marko Mäkelä
0718b8ecbf Merge 10.4 into 10.5 2020-08-11 11:12:45 +03:00
Marko Mäkelä
c86114f594 Merge 10.3 into 10.4 2020-08-11 10:53:28 +03:00
Marko Mäkelä
909d362fdb After-merge fix of a result
In the merge eae968f62d, it turns out that
I had accidentally initiated an in-source build in the past, and
$MYSQL_TZINFO_TO_SQL was pointing to a stale copy of the executable in
the source directory, instead of the correct one in the build directory.
2020-08-11 10:38:49 +03:00
Marko Mäkelä
e0c06f5396 Work around MDEV-23445 in the MDEV-14836 test case 2020-08-11 09:08:05 +03:00
Marko Mäkelä
1c58748196 Merge 10.4 into 10.5 2020-08-10 21:38:55 +03:00
Marko Mäkelä
17be2b47ba Merge mariadb-10.5.5 2020-08-10 21:11:54 +03:00
Marko Mäkelä
eae968f62d Merge 10.3 into 10.4 2020-08-10 21:08:46 +03:00
Marko Mäkelä
101ddc5e27 Merge mariadb-10.4.14 2020-08-10 20:37:52 +03:00
Vladislav Vaintroub
4ea915e28c MDEV-23279 main.named_pipe test timeouts if called twice in a row
The test timeouts, because mtr is waiting for pid file.
The pid file is not there, because expected to fail mysqld startup
(duplicate named pipe name), this startup removed pid file of the running
mysqld instance.

To fix, split handle_connections_win() into the initialization part,
and  accept/handle part, like it is done elsewhere.

The initialization part runs before pid file handling, and aborts on errors
, thus avoiding pid file overwrites.
2020-08-10 17:33:48 +00:00
Marko Mäkelä
bafc5c1321 Merge 10.2 into 10.3 2020-08-10 18:40:57 +03:00
Marko Mäkelä
3b6dadb5eb Merge 10.1 into 10.2 2020-08-10 17:57:14 +03:00
Marko Mäkelä
0025eb3f96 Merge mariadb-10.3.24 2020-08-10 17:56:08 +03:00
Daniel Bartholomew
5611df6774
bump the VERSION 2020-08-10 10:37:16 -04:00
Daniel Bartholomew
2b9c53102c
bump the VERSION 2020-08-10 10:32:57 -04:00
Marko Mäkelä
0460d42b94 Merge mariadb-10.2.33 2020-08-10 17:31:49 +03:00
Daniel Bartholomew
c19335ea53
bump the VERSION 2020-08-10 10:26:37 -04:00
Daniel Bartholomew
debd36c880
bump the VERSION 2020-08-10 10:23:10 -04:00
Marko Mäkelä
7f67ef1485 MDEV-16115 Hang after reducing innodb_encryption_threads
The test encryption.create_or_replace would occasionally fail,
because some fil_space_t::n_pending_ops would never be decremented.

fil_crypt_find_space_to_rotate(): If rotate_thread_t::should_shutdown()
holds due to innodb_encryption_threads having been reduced, do
release the reference.

fil_space_remove_from_keyrotation(), fil_space_next(): Declare the
functions static, simplify a little, and define in the same compilation
unit with the only caller, fil_crypt_find_space_to_rotate().

fil_crypt_key_mutex: Remove (unused).
2020-08-10 17:17:25 +03:00
Daniel Bartholomew
3e3da1642d
bump the VERSION 2020-08-10 10:16:31 -04:00
Oleksandr Byelkin
b350ef4cf4 Merge remote-tracking branch 'bb-10.1-release' into 10.1 2020-08-10 16:07:48 +02:00
Marko Mäkelä
6f84150c21 MDEV-23422 innodb_zip.restart fails with extra #sql-ib*.ibd
The background DROP TABLE queue may be blocked for some more time
due to MDEV-16678. Let us apply similar adjustments as earlier:
commit 6af00b2cc6
commit 89633995e4
commit ccd87d34a4
2020-08-10 17:03:54 +03:00
Daniel Black
deb365581b MDEV-23386: mtr: main.mysqld--help autosized table{-open,}-cach and max-connections
Example of the failure:
http://buildbot.askmonty.org/buildbot/builders/bld-p9-rhel7/builds/4417/steps/mtr/logs/stdio
```
main.mysqld--help 'unix'                 w17 [ fail ]
        Test ended at 2020-06-20 18:51:45

CURRENT_TEST: main.mysqld--help
--- /opt/buildbot-slave/bld-p9-rhel7/build/mysql-test/main/mysqld--help.result	2020-06-20 16:06:49.903604179 +0300
+++ /opt/buildbot-slave/bld-p9-rhel7/build/mysql-test/main/mysqld--help.reject	2020-06-20 18:51:44.886766820 +0300
@@ -1797,10 +1797,10 @@
 sync-relay-log-info 10000
 sysdate-is-now FALSE
 system-versioning-alter-history ERROR
-table-cache 421
+table-cache 2000
 table-definition-cache 400
-table-open-cache 421
-table-open-cache-instances 1
+table-open-cache 2000
+table-open-cache-instances 8
 tc-heuristic-recover OFF
 tcp-keepalive-interval 0
 tcp-keepalive-probes 0

mysqltest: Result length mismatch
```
mtr: table_open_cache_basic autosized:

Lets assume that >400 are available and that
we can set the result back to the start value.

All of these system variables are autosized and can
generate MTR output differences.

Closes #1527
2020-08-10 11:58:56 +02:00
Alexander Barkov
9b2fe4bd12 MDEV-23435 Functions do not convert numbers to character_set_results 2020-08-10 07:47:59 +04:00
Alexander Barkov
fe555b9c5f MDEV-23415 Server crash or Assertion `dec_length <= str_length' failed in Item_func_format::val_str_ascii
Problem:

The crash happened in FORMAT(double, dec>=31, 'de_DE').

The patch for MDEV-23118 (commit 0041dacc1b)
did not take into account that String::set_real() has a limit of 31
(FLOATING_POINT_DECIMALS) fractional digits. So for the range of 31..38
digits, set_real() switches to use:
- my_fcvt() - decimal point notation, e.g. 1.9999999999
- my_gcvt() - scientific notation,    e.g. 1e22

my_gcvt() returned a shorter string than Item_func_format::val_str_ascii()
expected to get after the my_fcvt() call, so it crashed on assert.

Solution:

We cannot extend set_real() to use the my_fcvt() mode for the range of
31..38 fractional digits, because set_real() is used in a lot of places
and such a change will break everything.

Introducing String::set_fcvt() which always prints using my_fcvt()
for the whole range of decimals 0..38, supported by the FORMAT() function.
2020-08-08 09:44:31 +04:00
Daniel Black
2b6dd87b2c debian: 99-enable-encryption.cnf.preset file, not symlink
Prevents errors on Windows Linux subsystem.

Fix to pr #1600
2020-08-08 14:06:33 +10:00
Daniel Black
699a43704b debian: remove gcc check. don't package rocksdb on x86_32 2020-08-08 14:04:14 +10:00
Daniel Black
cca55a9ca9 debian: disable rocksdb on 32bit with valid cmake directive 2020-08-08 14:04:13 +10:00
Sergei Golubchik
5b3d3792e2 Merge branch '10.4' into 10.5 2020-08-07 13:43:08 +02:00
Elena Stepanova
ad9d8ffd9f List of unstable tests for 10.5.5 release 2020-08-07 13:42:05 +02:00
Sergei Golubchik
2c9430dae2 update columnstore 2020-08-07 13:41:47 +02:00
Sergei Golubchik
384aeecb63 Merge branch 'merge-perfschema-5.7' into 10.5
null merge (no changes since 5.7.28), update the version
2020-08-07 13:41:39 +02:00
Sergei Golubchik
cd2924bacb MDEV-23330 Server crash or ASAN negative-size-param in my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings
and
MDEV-23414 Assertion `res->charset() == item->collation.collation' failed in Type_handler_string_result::make_packed_sort_key_part

pack_sort_string() *must* take a collation from the Item, not from the
String value. Because when casting a string to _binary the original
String is not copied for performance reasons, it's reused but its
collation does not match Item's collation anymore.

Note, that String's collation cannot be simply changed to _binary,
because for an Item_string literal the original String must stay
unchanged for the duration of the query.

this partially reverts 61c15ebe32
2020-08-07 13:39:04 +02:00
Marko Mäkelä
e081415040 MDEV-23410 buf_LRU_scan_and_free_block() fails to stop at first freed block
An unfortunate performance regression was introduced in
commit b1ab211dee (MDEV-15053)
that affects workloads where the working set is larger than
the buffer pool.

We used to terminate the loop in buf_LRU_scan_and_free_block()
when we succeeded to free a replaceable buffer pool block.
Due to the regression, we would keep freeing all replaceable
blocks until we reach the end of the list or encounter a block
that had never been accessed because it had been brought in
by read-ahead.
2020-08-07 13:36:12 +02:00
Marko Mäkelä
72f677d302 fixup 58e759a939: clang -Winconsistent-missing-override 2020-08-07 13:36:11 +02:00
Sergei Golubchik
28e714b5f6 change buitin plugin types from Alpha to Stable as needed
for the functionality that was part of the server for years
and is moved in 10.5 into a [statically linked] plugin
without changing the underlying code.
2020-08-07 13:36:11 +02:00
Sergei Golubchik
979af00b7c Move ColumnStore dependency on jemalloc from rpm Requires: to Recommends:
this makes it a weak dependency, signalling that ColumnStore can work
without jemalloc and that while jemalloc is desired, missing jemalloc
is not a fatal error.
2020-08-07 13:36:11 +02:00
Sergei Golubchik
694f43644b CPackRPM support for Recommends:
this breaks support for Suggests: but we don't use it anyway
2020-08-07 13:36:11 +02:00
Sergei Golubchik
2b856ecd98 MCOL-4229 ColumnStore fails to build on Ubuntu 20.10 due to missing readline
partially revert 2c5831b2c5 - ColumnStore still needs readline to build
2020-08-07 13:36:11 +02:00
Sergei Golubchik
44885273f2 MDEV-23342 MariaDB cannot be installed over MySQL 5.7.30 on Bionic anymore
Deb: fix Conflicts/Replaces/Breaks
2020-08-07 13:36:11 +02:00
Jan Lindström
845e3c9801 Replaced infinite loop in procedure with limited loop to avoid
hang.
2020-08-07 10:22:38 +03:00
Jan Lindström
1dec60c795 MDEV-22626: mysql_tzinfo_to_sql not replicates timezone to galeranodes if only 1 timezone will be loaded.
Move alter to InnoDB earlier to more correct place to handle
also if only a one timezone file is loaded.
2020-08-07 09:06:13 +03:00
Sergei Golubchik
ddffcad64c Merge branch '10.3' into 10.4 2020-08-06 17:13:02 +02:00