1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-06 13:10:12 +03:00
Commit Graph

351 Commits

Author SHA1 Message Date
Alexander Barkov
e9d541f912 Cleanup#1 for MDEV-34319: DECLARE TYPE .. TABLE OF .. INDEX BY
- Checking that the key expression is compatible with the INDEX BY data type
  for assignment in expressions:
    assoc_array_variable(key_expr)
    assoc_array_variable(key_expr).field

  in all contexts: SELECT, assignment target, INTO target.
  Raising an error in case it's not compatible.

- Disallowing non-constant expressions as a key,
  as the key is evaluated during the fix_fields() time.

- Disallowing stored functions as a key:
    assoc_array(stored_function())
    assoc_array(stored_function()).field

  The underlying MariaDB code is not ready to call a stored function
  during the fix_fields() time. This will be fixed in a separate MDEV.

- Removing the move Assoc_array_data's constructor.
  Using the usual constructor instead.

- Setting m_key.thread_specific and m_value.thread_specific to true
  in the Assoc_array_data constructor. This is needed to get assoc array
  element data counted by the @@session.memory_used status variable.

  Adding DBUG_ASSERTs to make sure the thread_specific flag never
  disappears in Assoc_array_data members.

- Removing my_free(item) from Field_assoc_array::element_by_key.
  It was a remainder from an earlier patch version.
  In the current patch version all Items behind an assoc array are
  created on a mem_root. It's wrong to use my_free() with them.

- Adding a helper method Field_assoc_array::assoc_tree_search()

- Fixing assoc_array_var.delete() to work as a procedure
  rather than a function. It does not need SELECT/DO any more.

- Fixing the crash in a few ctype_xxx tests, caused by the grammar change.

- Fixing compilation failure on Windows

- Adding a new method LEX::set_field_type_udt_or_typedef()
  and removing duplicate code from sql_yacc.yy

- Renaming the grammar rule field_type_all_with_composites to
  field_type_all_with_typedefs

- Removing the grammar rule assoc_array_index_types.
  Changing the grammar to "INDEX_SYM BY field_type".

  Removing the grammar rule field_type_all_with_record.
  Allow field_type_all_with_typedefs as an assoc array element.

  Catching wrong index and element data types has been moved to
  Type_handler_assoc_array::Column_definition_set_attributes().
  It raises an SQL error on things like:
  * assoc array of assoc arrays in TABLE OF
  * index by a non-supported types in INDEX BY

- Removing four methods:
  * sp_type_def_list::type_defs_add_record()
  * sp_type_def_list::type_defs_add_composite2()
  * sp_pcontext::type_defs_declare_record()
  * sp_type_def_list::type_defs_declare_composite2()
  Adding two methods instead:
  * sp_type_def_list::type_defs_add()
  * sp_pcontext::type_defs_add()
  This allows to get rid of the duplicate code detecting data type
  declarations with the same name in the same sp_pcontext frame.

- Adding new methods:
  * LEX::declare_type_assoc_array()
  * LEX::LEX::declare_type_record()
  They create a type specific sp_type_def_xxx and the call the generic
  sp_pcontext::type_defs_add().

- m_key_def.sp_prepare_create_field() inside
  Field_assoc_array::create_fields() is now called for all key data types
  (not only for integers)

- Removing the assignment of key_def->charset in
  Type_handler_assoc_array::sp_variable_declarations_finalize().
  The charset is now evaluated in m_key_def.sp_prepare_create_field().

- Fixing Item_assoc_array::get_key() to set the character set of the "key"
  to utf8mb3 instead of binary

- Fixing Field_assoc_array::copy_and_convert_key() to set the key length
  limit in terms of the character length as specified in
  INDEX BY VARCHAR(N), instead of octet length. This is needed to make
  keys with multi-byte characters work correctly.
  Also it now raises different errors depending on the reason of the
  key conversion failures:
  * ER_INVALID_CHARACTER_STRING
  * ER_CANNOT_CONVERT_CHARACTER

- Changing the prototype for Type_handler_composite::key_to_lex_cstring() to

   virtual LEX_CSTRING key_to_lex_cstring(THD *thd,
                                          const sp_rcontext_addr &var,
                                          Item **key,
                                          String *buffer) const;
   * Now it returns a LEX_CSTRING, instead of getting it as an out parameter.
   * Gets an sp_rcontext_addr instead of "name" and "def"
   * Gets a String buffer which can be used to be passed to val_str(),
     or for character set conversion purposes.

- Removing Field_assoc_array::m_key_def, as all required information
  is available from Field_assoc_array::m_key_field.
  In Field_assoc_array::create_fields turning m_key_def to a local variable
  key_def.

- Fixing Field_assoc_array::copy_and_convert_key() to follow MariaDB coding
  style: only constants can be passed by-reference, not-constants should
  be passed by-pointer.

- Adding DBUG_ASSERTs into Type_handler_assoc_array::get_item()
  and Type_handler_assoc_array::get_or_create_item() that the passed
  key in "name" is well formed according to the charset of INDEX BY.

- Changing the error ER_TOO_LONG_KEY to ER_WRONG_STRING_LENGTH.
  The former prints length limit in bytes, which is not applicable
  for INDEX BY values, because its limit is in characters.
  Also, the latter is more verbose.

- Fixing the problem that these wrong uses of an assoc array variable:

    BEGIN
      assoc_var;
      assoc_var(1);
    END;

  raised a weird error message:
    ERROR 1054 (42S22): Unknown column 'assoc_var' in '(null)'

  Now a more readable parse error is raised.

- Adding a "Duplicate key" warning for the cases when assigning
  between two assoc arrays rejects some records due to different
  collations in their INDEX BY key definitions.

- Disallow INDEX OF propagation from VARCHAR to TEXT.
  The underlying code cannot handle TEXT.
  Adding tests.

- Adding a helper class StringBufferKey to pass to val_str() when
  a key value is evaluated.
  Fixing all val_str() calls to val_str(&buffer), as the former is
  not desirable.

- Fixing a wrong use of args[0]->null_value in
  Item_func_assoc_array_exists::val_bool()

- Fixing a problem that using TABLE OF TEXT crashed the server.
  Thanks to Iqbal Hassan for the proposed patch.

- Changes in Qualified_ident:
  * Fixing the Qualified_ident constructors to get all parst as
    Lex_ident_cli_st, rather than the first part as Lex_ident_cli_st
    with the following parts Lex_ident_sys.
    This makes the code more symmetric.
  * Fixing the grammar in sql_yacc.yy accordinly.
  * Fixing the data type storing the possition in the client query
    from "const char *" to Lex_ident_cli.
  * Adding a new method Qualified_ident::is_sane().
    It allows to reduce the code side in sql_yacc.yy.
    Thanks to Iqbal Hassan for the idea.

- Replacing qs_append() to append_ulonglong() in:
  * Item_method_func::print()
  * Item_splocal_assoc_array_element::print()
  * Item_splocal_assoc_array_element_field::print()

  These methods do not use reserve()/alloc(), so calling qs_append()
  was wrong and caused a crash.

- Changing the output formats of these methods:
  * Item_splocal_assoc_array_element::print()
  * Item_splocal_assoc_array_element_field::print()
  not to print the key two times.
  Also moving the `@123` part (the variable offset) immediately
  after the variabl name and before the `[key]` part.

- Fixing a memory leak happened when trying to insert a duplicate
  key into an assoc array. Also adding a new "THD *" parameter to
  Field_assoc_array::insert_element(). Thanks to Iqbal Hassan for the fix.
  Adding a test into sp-assoc-array-ctype.test.

- In  Field_assoc_array::create_fields: m_element_field->field_name is now
  set for all element data types (not only for records).
  This fixed a wrong variable name in warnings. Adding tests.

- Adding tests:
  * Adding tests for assoc array elements in UNIONs.

  * Copying from an assoc array with a varchar key
    to an assoc array with a shorter varchar key.

  * A relatively big associative array.

  * Memory usage for x86_64.

  * Package variable as assoc array keys.

  * Character set conversion

  * TABLE OF TEXT

  * TABLE OF VARCHAR(>64k bytes) propagation to TABLE OF TEXT.

  * TEXT element fields in an array of records.

  * VARCHAR->TEXT propagation in elements in an array of records.

  * Some more tests
2025-08-01 18:03:20 +02:00
Iqbal Hassan
41014a4ecd MDEV-34319: DECLARE TYPE .. TABLE OF .. INDEX BY in stored routines
This patch adds support for associative arrays in stored procedures
for sql_mode=ORACLE.
The syntax follows Oracle's PL/SQL syntax for associative arrays -
TYPE assoc_array_t IS TABLE OF VARCHAR2(100) INDEX BY INTEGER;
or
TYPE assoc_array_t IS TABLE OF record_t INDEX BY VARCHAR2(100);
where record_t is a record type.

The following functions were added for associative arrays:
- COUNT - Retrieve the number of elements within the arra
- EXISTS - Check whether given key exists in the array
- FIRST - Retrieve the first key in the array
- LAST - Retrieve the last key in the array
- PRIOR - Retrieve the key before the given key
- NEXT - Retrieve the key after the given key
- DELETE - Remove the element with the given key or remove all elements
if no key is given

The arrays/elements can be initialized with the following methods:
- Constructor
i.e. array:= assoc_array_t('key1'=>1, 'key2'=>2, 'key3'=>3)
- Assignment
i.e. array(key):= record_t(1, 2)
- SELECT INTO
i.e. SELECT x INTO array(key)

TODOs:
- Nested tables are not supported yet.
i.e. TYPE assoc_array_t IS TABLE OF other_assoc_array_t INDEX BY INTEGER;
- Associative arrays comparisons are not supported yet.
2025-08-01 18:03:20 +02:00
Oleksandr Byelkin
f1102da37a Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
Oleg Smirnov
4bb2669d18 MDEV-33281 Optimizer hints Cleanup: fix formatting, rename objects 2025-05-05 12:02:47 +07:00
Oleg Smirnov
877e4a386c MDEV-33281 Implement optimizer hints
This commit introduces:
    - the infrastructure for optimizer hints;
    - hints for join buffering: BNL(), NO_BNL(), BKA(), NO_BKA();
    - NO_ICP() hint for disabling index condition pushdown;
    - MRR(), MO_MRR() hint for multi-range reads control;
    - NO_RANGE_OPTIMIZATION() for disabling range optimization;
    - QB_NAME() for assigning names for query blocks.
2025-05-05 12:02:47 +07:00
Sergei Golubchik
237e24497b Merge remote-tracking branch 'github/bb-11.4-release' into bb-11.8-serg 2025-04-27 19:40:00 +02:00
Oleksandr Byelkin
a8d4642375 Merge branch '10.11' into 11.4 2025-04-26 10:53:02 +02:00
Julius Goryavsky
88dfa6bcee Merge branch '10.5' into '10.6' 2025-04-15 01:49:48 +02:00
Nikita Malyavin
e6ea5d568c MDEV-36507 fix dbug_print_row concurrent access
7544fd4cae had to make use of a static array to avoid memory
use-after-free or leak.

Instead, let us make a function returning String, this is the only way
to automatically manage the memory after the function returned.

To make it all correct, move constructor is added. Normally, it is
expected, that the constructor will be elided upon return of an object
by value, but if something goes different, or -fno-elide-constructors is
used, we can have a problem. So this was a move constructor avoids
copy elision-related UB.

dbug_print_row returning char* is still there for convenient use in a
debugger.
2025-04-11 13:42:53 +02:00
Vasilii Lakhin
717c12de0e Fix typos in C comments inside sql/ 2025-03-14 12:08:56 +04:00
Sergei Golubchik
a83afd8537 cleanup: remove String::append_float
between set_real() and set_fcvt(), a third String method for
real->string conversion looks definitely redundant
2024-11-05 14:00:51 -08:00
Vicențiu Ciorbaru
f813ac2a51 Introduce String::append_float
This method will write out a float to a String object, keeping the
charset of the original string.

Also have Float::to_string make use of String::append_float
2024-11-05 14:00:49 -08:00
Sergei Golubchik
32e6f8ff2e cleanup: remove unconditional #ifdef's 2024-11-05 14:00:47 -08:00
Oleksandr Byelkin
ea75a0b600 Merge branch '11.4' into 11.5 2024-08-05 17:50:18 +02:00
Oleksandr Byelkin
1640c9b06e Merge branch '11.2' into 11.4 2024-08-04 17:27:48 +02:00
Oleksandr Byelkin
80abd847da Merge branch '10.11' into 11.1 2024-08-03 09:32:42 +02:00
Yuchen Pei
f071b7620b Merge branch '10.5' into 10.6 2024-07-16 15:54:22 +08:00
Alexander Barkov
2f4b0ba328 Moving a part of sql_lex.h into other *.h files
- Lex_ident_cli* into a new file sql/lex_ident_cli.h
- Lex_ident_sys* into a new file sql/lex_ident_sys.h
- Well_formed_prefix into include/m_ctype.h

This change is needed to the optimizer hint parser coming soon.
2024-07-16 09:09:38 +04:00
Oleg Smirnov
405613ebb5 MDEV-34490 get_copy() and build_clone() may return an instance of an ancestor class instead of a copy/clone
The `Item` class methods `get_copy()`, `build_clone()`, and `clone_item()`
face an issue where they may be defined in a descendant class
(e.g., `Item_func`) but not in a further descendant (e.g., `Item_func_child`).
This can lead to scenarios where `build_clone()`, when operating on an
instance of `Item_func_child` with a pointer to the base class (`Item`),
returns an instance of `Item_func` instead of `Item_func_child`.

Since this limitation cannot be resolved at compile time, this commit
introduces runtime type checks for the copy/clone operations.
A debug assertion will now trigger in case of a type mismatch.

`get_copy()`, `build_clone()`, and `clone_item()` are no more virtual,
but virtual `do_get_copy()`, `do_build_clone()`, and `do_clone_item()`
are added to the protected section of the class `Item`.

Additionally, const qualifiers have been added to certain methods
to enhance code reliability.

Reviewer: Oleksandr Byelkin <sanja@mariadb.com>
2024-07-15 18:25:57 +07:00
Oleksandr Byelkin
dd7d9d7fb1 Merge branch '11.4' into 11.5 2024-05-23 17:01:43 +02:00
Oleksandr Byelkin
99b370e023 Merge branch '11.2' into 11.4 2024-05-21 19:38:51 +02:00
Alexander Barkov
310fd6ff69 Backporting bugs fixes fixed by MDEV-31340 from 11.5
The patch for MDEV-31340 fixed the following bugs:

MDEV-33084 LASTVAL(t1) and LASTVAL(T1) do not work well with lower-case-table-names=0
MDEV-33085 Tables T1 and t1 do not work well with ENGINE=CSV and lower-case-table-names=0
MDEV-33086 SHOW OPEN TABLES IN DB1 -- is case insensitive with lower-case-table-names=0
MDEV-33088 Cannot create triggers in the database `MYSQL`
MDEV-33103 LOCK TABLE t1 AS t2 -- alias is not case sensitive with lower-case-table-names=0
MDEV-33108 TABLE_STATISTICS and INDEX_STATISTICS are case insensitive with lower-case-table-names=0
MDEV-33109 DROP DATABASE MYSQL -- does not drop SP with lower-case-table-names=0
MDEV-33110 HANDLER commands are case insensitive with lower-case-table-names=0
MDEV-33119 User is case insensitive in INFORMATION_SCHEMA.VIEWS
MDEV-33120 System log table names are case insensitive with lower-cast-table-names=0

Backporting the fixes from 11.5 to 10.5
2024-05-21 14:58:01 +04:00
Marko Mäkelä
fec2fd6add Merge 10.11 into 11.0 2024-03-28 10:51:36 +02:00
Marko Mäkelä
ccb7a1e9a1 Merge 10.5 into 10.6 2024-03-27 15:00:56 +02:00
Alexander Barkov
0fc123c595 MDEV-33772 Bad SEPARATOR value in GROUP_CONCAT on character set conversion
Item_func_group_concat::print() did not take into account
that Item_func_group_concat::separator can be of a different character set
than the "String *str" (when the printing is being done to).
Therefore, printing did not work correctly for:
- non-ASCII separators when GROUP_CONCAT is done on 8bit data
  or multi-byte data with mbminlen==1.
- all separators (even including simple ones like comma)
  when GROUP_CONCAT is done on ucs2/utf16/utf32 data (mbminlen>1).

Because of this problem, VIEW definitions did not print correctly to
their FRM files. This later led to a wrong SELECT and SHOW CREATE output.

Fix:

- Adding new String methods:

  bool append_for_single_quote_using_mb_wc(const char *str, size_t length,
                                           CHARSET_INFO *cs);

  bool append_for_single_quote_opt_convert(const char *str,
                                           size_t length,
                                           CHARSET_INFO *cs)

  which perform both escaping and character set conversion at the same time.

- Adding a new String method escaped_wc_for_single_quote(),
  to reuse the code between the old and the new methods.

- Fixing Item_func_group_concat::print() to use the new
  method append_for_single_quote_opt_convert().
2024-03-27 15:22:58 +04:00
Alexander Barkov
929c2e06aa MDEV-31531 Remove my_casedn_str() and my_caseup_str()
Under terms of MDEV 27490 we'll add support for non-BMP identifiers
and upgrade casefolding information to Unicode version 14.0.0.
In Unicode-14.0.0 conversion to lower and upper cases can increase octet length
of the string, so conversion won't be possible in-place any more.

This patch removes virtual functions performing in-place casefolding:
  - my_charset_handler_st::casedn_str()
  - my_charset_handler_st::caseup_str()
and fixes the code to use the non-inplace functions instead:
  - my_charset_handler_st::casedn()
  - my_charset_handler_st::caseup()
2024-02-28 22:20:29 +04:00
Oleksandr Byelkin
34272bd6a5 Merge branch '11.2' into 11.3 2023-11-14 18:33:03 +01:00
Oleksandr Byelkin
b83c379420 Merge branch '10.5' into 10.6 2023-11-08 15:57:05 +01:00
Oleksandr Byelkin
6cfd2ba397 Merge branch '10.4' into 10.5 2023-11-08 12:59:00 +01:00
Alexander Barkov
e2da748c29 MDEV-28835 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT
Problem:

Item_func_date_format::val_str() and make_date_time() did not take into
account that the format string and the result string
(separately or at the same time) can be of a tricky character set
like UCS2, UTF16, UTF32. As a result, DATE_FORMAT() could generate
an ill-formed result which crashed on DBUG_ASSERTs testing well-formedness
in other parts of the code.

Fix:

1. class String changes
   Removing String::append_with_prefill(). It was not compatible with
   tricky character sets. Also it was inconvenient to use and required
   too much duplicate code on the caller side.
   Adding String::append_zerofill() instead. It's compatible with tricky
   character sets and is easier to use.
   Adding helper methods Static_binary_string::q_append_wc() and
   String::append_wc(), to append a single wide character
   (a Unicode code point in my_wc_t).

2. storage/spider changes
   Removing spider_string::append_with_prefill().
   It used String::append_with_prefix() inside, but it was unused itself.

3. Changing tricky charset incompatible code pieces in make_date_time()
   to compatible replacements:

   - Fixing the loop scanning the format string to iterate in terms
     of Unicode code points (using mb_wc()) rather than in terms
     of "char" items.
   - Using append_wc(my_wc_t) instead of append(char) to append
     a single character to the result string.
   - Using append_zerofill() instead of append_with_prefill() to
     append date/time numeric components to the result string.
2023-10-04 08:51:48 +04:00
Alexander Barkov
8951f7d940 MDEV-31992 Automatic conversion from LEX_STRING to LEX_CSTRING
- Adding automatic conversion operator from LEX_STRING to LEX_CSTRING
  Now a LEX_STRING can be passed directly to any function expecting
  a LEX_CSTRING parameter passed by value or by reference.
- Removing a number of duplicate methods accepting LEX_STRING.
  Now the code used the LEX_CSTRING version.
2023-08-23 15:30:06 +04:00
Sergei Golubchik
a4817e1520 cleanup: String::strstr() const 2023-07-04 16:37:29 +02:00
Marko Mäkelä
5bada1246d Merge 10.5 into 10.6 2023-04-11 16:15:19 +03:00
Oleksandr Byelkin
ac5a534a4c Merge remote-tracking branch '10.4' into 10.5 2023-03-31 21:32:41 +02:00
Alexander Barkov
965bdf3e66 MDEV-30746 Regression in ucs2_general_mysql500_ci
1. Adding a separate MY_COLLATION_HANDLER
   my_collation_ucs2_general_mysql500_ci_handler
   implementing a proper order for ucs2_general_mysql500_ci
   The problem happened because ucs2_general_mysql500_ci
   erroneously used my_collation_ucs2_general_ci_handler.

2. Cosmetic changes: Renaming:
   - plane00_mysql500 to my_unicase_mysql500_page00
   - my_unicase_pages_mysql500 to my_unicase_mysql500_pages
   to use the same naming style with:
   - my_unicase_default_page00
   - my_unicase_defaul_pages

3. Moving code fragments from
   - handler::check_collation_compatibility() in handler.cc
   - upgrade_collation() in table.cc
   into new methods in class Charset, to reuse the code easier.
2023-03-01 15:38:02 +04:00
Marko Mäkelä
6aec87544c Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
Marko Mäkelä
c41c79650a Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
Vicențiu Ciorbaru
08c852026d Apply clang-tidy to remove empty constructors / destructors
This patch is the result of running
run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' .

Code style changes have been done on top. The result of this change
leads to the following improvements:

1. Binary size reduction.
* For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by
  ~400kb.
* A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb.

2. Compiler can better understand the intent of the code, thus it leads
   to more optimization possibilities. Additionally it enabled detecting
   unused variables that had an empty default constructor but not marked
   so explicitly.

   Particular change required following this patch in sql/opt_range.cc

   result_keys, an unused template class Bitmap now correctly issues
   unused variable warnings.

   Setting Bitmap template class constructor to default allows the compiler
   to identify that there are no side-effects when instantiating the class.
   Previously the compiler could not issue the warning as it assumed Bitmap
   class (being a template) would not be performing a NO-OP for its default
   constructor. This prevented the "unused variable warning".
2023-02-09 16:09:08 +02:00
Vicențiu Ciorbaru
c115559b66 Extend Binary_string::strstr to also take in a const char pointer
One shouldn't have to instantiate a Binary_string every time a strstr
call is needed.
2023-02-03 16:27:16 +02:00
Sergei Golubchik
900d7bf360 Merge branch '10.5' into 10.6 2022-10-02 22:14:21 +02:00
Sergei Golubchik
3a2116241b Merge branch '10.4' into 10.5 2022-10-02 14:38:13 +02:00
Alexander Barkov
1118e979c2 MDEV-29672 Add MTR tests covering key and key segment flags and types 2022-09-30 11:08:49 +04:00
Marko Mäkelä
44fd2c4b24 Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
Marko Mäkelä
0792aff161 Merge 10.4 into 10.5 2022-09-20 13:17:02 +03:00
Marko Mäkelä
0c0a569028 Merge 10.3 into 10.4 2022-09-20 12:38:25 +03:00
Alexander Barkov
5dcc56be4d MDEV-29561 SHOW CREATE TABLE produces syntactically incorrect structure 2022-09-20 11:02:36 +04:00
Alexander Barkov
0e8544cd73 MDEV-29355 Backport templatized INET6 implementation from 10.7 to 10.6 2022-08-23 14:36:08 +04:00
Norio Akagi
84d26f98c7 MDEV-28315 Fix ASAN stack-buffer-overflow in String::copy_aligned
Starting since this commit 36cdd5c3cd
there is an ASAN stack-buffer-overflow error because we append a NULL
terminator beyond the length of memory allocated.

Reviewed by: Monty and Nayuta Yanagisawa
2022-08-01 20:27:33 +09:00
Sergei Golubchik
4c1ed54bfc fix Binary_string::c_ptr and c_ptr_safe
if the Ptr="abc", then str_length=3, and for a C ptr it needs Ptr[3]=0;
but it passes str_length+1 (=4) to realloc, and realloc allocates
arg_length+1 bytes (that is 5) and does Ptr[arg_length]= 0; (Ptr[4]=0)
2021-09-05 21:08:18 +02:00
Sergei Golubchik
3648b333c7 cleanup: formatting
also avoid an oxymoron of using `MYSQL_PLUGIN_IMPORT` under
`#ifdef MYSQL_SERVER`, and empty_clex_str is so trivial that a plugin
can define it if needed.
2021-06-11 13:02:55 +02:00