- 19 Oct, 2021 2 commits
-
-
Alexey Botchkov authored
SQL service added. It provides the limited set of client library functions to be used by plugin.
-
Eric Herman authored
https://jira.mariadb.org/browse/MDEV-26221 my_sys DYNAMIC_ARRAY and DYNAMIC_STRING inconsistancy The DYNAMIC_STRING uses size_t for sizes, but DYNAMIC_ARRAY used uint. This patch adjusts DYNAMIC_ARRAY to use size_t like DYNAMIC_STRING. As the MY_DIR member number_of_files is copied from a DYNAMIC_ARRAY, this is changed to be size_t. As MY_TMPDIR members 'cur' and 'max' are copied from a DYNAMIC_ARRAY, these are also changed to be size_t. The lists of plugins and stored procedures use DYNAMIC_ARRAY, but their APIs assume a size of 'uint'; these are unchanged.
-
- 15 Oct, 2021 1 commit
-
-
Rucha Deodhar authored
ER_WARN_DATA_OUT_OF_RANGE Analysis: value for row_number is hard coded into push_warning_printf() to 1. Fix: make push_warning_printf() use m_current_row_for_warning instead of 1.
-
- 14 Oct, 2021 7 commits
-
-
Vladislav Vaintroub authored
The reason for crash is that natural_sort_key(release_lock('a')) would evaluate release_lock() twice, once in Item::is_null() and another time in Item::val_str(). Second time it returns NULL, since lock was already released. Fixed to prevent double evaluation.
-
Vladislav Vaintroub authored
Fixed typo, added test.
-
Vladislav Vaintroub authored
When returning non-null value from natural_sort_key, make sure Item::null_value is false.
-
Vladislav Vaintroub authored
Leading zeros added a single byte overhead per numeric string, even when they were. Sorting leading zeros offers only for little value (except determinism in sort). I decided to drop it for now, we can be like ICU, which drops leading zeros, in numeric sorting, even with IDENTICAL collation strength. Also, disabled virtual stored columns (thus also indexes), on Serg's request Hopefully it is temporarily, and will be reenabled soon, when everyone is as happy with key generation algorithm as I am.
-
Vladislav Vaintroub authored
- return error from natsort_encode_numeric_key, if it would need to allocate memory. All needed memory was preallocated much earlier. - Add test for sort order of leading zero vs numeric strings with suffix.
-
Vladislav Vaintroub authored
- Remove second optional parameter to natural_sort_key(), and all fraction handling. - Rename natsort_num2str() to natsort_encode_length() to show the intention that it encodes string *lengths*, and not encode whitespaces and what not. Handles lengths for which log10(len) >= 10, even if they do not happen for MariaDB Strings (where length is limited by 32bit, and log10(len) is <= 9) - Do not let natural sort key grow past max_packet_length. - Split Item_func_natural_sort_key::val_str() further and add natsort_encode_numeric_string(), which contains comment on how whitespaces are handled. - Simplify, and speedup to_natsort_key() in common case, by removing handling of weird charsets utf16/32, that encode numbers in several bytes. In rare cases utf16/32 is used, we'll convert to utf8 prior to creating keys, and back to original charset afterwards.
-
Vladislav Vaintroub authored
The numbers should be compared as numbers, while the rest should be compared as string. Introduce natural_sort_key() function that transforms original string so that the lexicographic order of such keys is suitable for natural sort.
-
- 13 Oct, 2021 12 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
innodb_max_dirty_pages_pct_update(), innodb_max_dirty_pages_pct_lwm_update(): Invoke buf_pool.page_cleaner_wakeup() in order to wake up buf_flush_page_cleaner. This allows the test innodb.page_cleaner to run without any occasional timeouts. The occasional hangs were introduced by commit 7b1252c0 (MDEV-24278).
-
Jan Lindström authored
Add wait_condition
-
Jan Lindström authored
10.5 version
-
Marko Mäkelä authored
The changes to galera.galear_var_replicate_myisam_on in commit d9b933be are omitted due to conflicts with commit 27d66d64.
-
Marko Mäkelä authored
The test galera.galera_var_replicate_myisam_on would trigger an assertion failure "mode() == m_local" in wsrep-lib/src/client_state.cpp after the merge of commit 3067ffc5 enabled it.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In commit 1cb218c3 (MDEV-26450) we introduced the function log_write_and_flush(), which may compete with log_checkpoint() invoking log_write_flush_to_disk_low() from another thread. The assertion n_pending_flushes==1 is too strict. There is no possibility of a race condition here, because fil_flush() is protected by fil_system->mutex and the rest will be protected by log_sys->mutex. log_write_flush_to_disk_low(), log_write_and_flush(): Relax the assertions to test for a nonzero count.
-
Daniel Black authored
Debian stretch is supported until Jun 2022. MyRocks definitavely does require 1.1.3+. Mroonga has never been zstd enabled, though support for it exists in the codebase. While a 1.1.3+ version exists in stretch backports we don't support this. Fixes: b67210b1054118fe14b6346bdee3f9bbd3416870
-
- 12 Oct, 2021 18 commits
-
-
Sergei Krivonos authored
-
Eugene Kosov authored
-
Sergei Golubchik authored
If charset aggregation decides to convert arguments to some specific charset and some arguments are numbers, they'll be wrapped into a Item_func_conv_charset(), that changes result_type() to STRING_RESULT. Fix: don't convert numbers, sformat needs their numerical value only.
-
Sergei Golubchik authored
-
Vladislav Vaintroub authored
libfmt must be built before sql or sql_embedded target, since compilation of item_strfunc.cc depends on it. Previously, GenServerSource depended on libfmt,yet this GenServerSource is not a direct or indirect dependency of sql, if -DPLUGIN_PERFSCHEMA=NO is used in cmake configuration step.
-
Sergei Golubchik authored
1. it is against sql way, auto-detection should use metadata, not data, consider: create table t1 (qwe varchar(10)) as values ('qwe'),('qw'),('q'),('werty'); select sformat('{:*>5s}', qwe) from t1; this will auto-break on the third row. 2. using max_char_length() instead of length() fixes that, but there's a second big issue, fmt < 8.0 doesn't natively support unicode, so {:c} would only work for one-byte strings, for 'a', not for 'я' because of all that let's always format strings as strings. {:c} will only now work for numbers and still only in the ascii range.
-
Sergei Golubchik authored
libfmt 6.1 is in Ubuntu focal repositories. it's easy to compile with 6.1 by doing #define detail internal but 6.1 also produces different results in main.func_sformat and we want MariaDB to behave identically everywhere.
-
Sergei Golubchik authored
String inherits from Sql_alloc, so it's allocated on the thd's memroot, this cannot be done per row. Moved String[] allocation into the Item_func_sformat constructor (not fix_fields(), because we want it on the same memroot where the item is).
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
by printing a String as an std::string_view, not as a char*
-
Sergei Golubchik authored
* comment - use the standard style * no need to reimplement for with while * TODO comments for not implemented types * rename the error not to refer to the underlying library, it's the implementation detail * use res->length(0) to set length to 0, but preserve the already allocated buffer * rename main.sformat -> main.func_sformat * removed a duplicated part of the test
-
Alan Cueva authored
SFORMAT() SQL function that uses fmtlib (https://fmt.dev/) for python-like (also Rust, C++20, etc) string formatting Only fmtlib 7.0.0+ is supported, older fmtlib produces different results in the test. No native support for temporal and decimal values, * TIME_RESULT is handled as STRING_RESULT * DECIMAL_RESULT as REAL_RESULT
-
Oleksandr Byelkin authored
Explicitly devide two function of 0 length in the hash keys comparing.
-
Oleksandr Byelkin authored
No empty name roles exists (no sens to look for). The problem already present in our test cases.
-
Oleksandr Byelkin authored
Prohibit user variables without name
-
Oleksandr Byelkin authored
Get rid of locking "empty" plugin. This problem present in our tests in case of malformed frm-file, for example.
-