Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Oleg Smirnov
WIP: implementation
Andrei Elkin
Revert "MDEV-37686 rpl.create_or_replace_mix2 fails in MDEV-35915 branch"

This reverts commit 3241798214b066d62ba3274ba5dc29549349ca65.
Due to MDEV-38212.
Alexey Botchkov
MDEV-37261 Basic XML data type.

XMLTYPE column added.
Type_handler::get_column_attributes() added so parser can check
if unexpected attributes were specified for the UDT column.
Jan Lindström
Add assertions and re-order delete calls.
Yuchen Pei
MDEV-9826 More hash algorithms for PARTITION BY [LINEAR] KEY

PARTITION BY [LINEAR] KEY ALGORITHM={MYSQL51|MYSQL55|BASE31|CRC32C|XXH32|XXH3}

- The BASE31 algorithm uses a base-31 representation of the bytes, see
  Modular hashing in https://algs4.cs.princeton.edu/34hash/. It serves
  as a simple baseline
- CRC32C uses my_crc32c.
- XXH32 and XXH3 are xxhash algorithms - xxhash.h copied from latest
  release (0.8.3) of https://github.com/Cyan4973/xxHash

For performance (esp. xxh) we use one-shot hash functions in binary
hash_sort, and streaming hash function otherwise for byte-by-byte
hashing. XXH is the only stateful hash function. The other hash
algorithms are stateless and homomorphic, so streaming and one-shot
functions are identical, which is reflected in the logic of fallback
from NULL m_hash_byte to m_hash_str applied to a byte.

Tested with

mtr --suite main --do-test=.*partition
mtr --suite parts

Also ran above tests with the following patch that changes the default
algorithm from MYSQL55 to CRC32C, and XXH32 (changing the patch
accordingly)

modified  sql/ha_partition.cc
@@ -10336,6 +10336,8 @@ uint32 ha_partition::calculate_key_hash_value(Field **field_array)
  switch ((*field_array)->table->part_info->key_algorithm)
  {
  case partition_info::KEY_ALGORITHM_NONE:
+    hasher.set_algorithm(HASH_ALGORITHM_CRC32C);
+    break;
  case partition_info::KEY_ALGORITHM_55:
    /* Hasher default to mysql55 */
    break;
modified  sql/partition_info.cc
@@ -2328,7 +2328,7 @@ bool partition_info::fix_parser_data(THD *thd)
      if ((thd_sql_command(thd) == SQLCOM_CREATE_TABLE ||
            thd_sql_command(thd) == SQLCOM_ALTER_TABLE) &&
          key_algorithm == KEY_ALGORITHM_NONE)
-        key_algorithm= KEY_ALGORITHM_55;
+        key_algorithm= PARTITION_INFO_DEFAULT_ALGORITHM;
    }
    DBUG_RETURN(FALSE);
  }
@@ -2344,7 +2344,7 @@ bool partition_info::fix_parser_data(THD *thd)
    if ((thd_sql_command(thd) == SQLCOM_CREATE_TABLE ||
          thd_sql_command(thd) == SQLCOM_ALTER_TABLE) &&
        key_algorithm == KEY_ALGORITHM_NONE)
-      key_algorithm= KEY_ALGORITHM_55;
+      key_algorithm= PARTITION_INFO_DEFAULT_ALGORITHM;
  }
  defined_max_value= FALSE; // in case it already set (CREATE TABLE LIKE)
  do
modified  sql/partition_info.h
@@ -446,6 +446,8 @@ class partition_info : public DDL_LOG_STATE, public Sql_alloc
  int gen_part_type(THD *thd, String *str) const;
};

+#define PARTITION_INFO_DEFAULT_ALGORITHM partition_info::KEY_ALGORITHM_CRC32C
+
void part_type_error(THD *thd, partition_info *work_part_info,
                      const char *part_type, partition_info *tab_part_info);

modified  sql/sql_partition.cc
@@ -2471,7 +2471,7 @@ static int add_key_with_algorithm(String *str, const partition_info *part_info)
  err+= str->append(STRING_WITH_LEN("KEY "));

  if (part_info->key_algorithm != partition_info::KEY_ALGORITHM_NONE &&
-      part_info->key_algorithm != partition_info::KEY_ALGORITHM_55)
+      part_info->key_algorithm != PARTITION_INFO_DEFAULT_ALGORITHM)
  {
    err+= str->append(STRING_WITH_LEN("ALGORITHM = "));
    switch (part_info->key_algorithm)
@@ -2479,6 +2479,9 @@ static int add_key_with_algorithm(String *str, const partition_info *part_info)
      case partition_info::KEY_ALGORITHM_51:
        err+= str->append(STRING_WITH_LEN("MYSQL51"));
        break;
+      case partition_info::KEY_ALGORITHM_55:
+        err+= str->append(STRING_WITH_LEN("MYSQL55"));
+        break;
      case partition_info::KEY_ALGORITHM_BASE31:
        err+= str->append(STRING_WITH_LEN("BASE31"));
        break;
Alexander Barkov
MDEV-10152 Add support for TYPE .. IS REF CURSOR

In progress
Michael Widenius
MDEV-19683 Add support for Oracle TO_DATE()

Syntax:
TO_DATE(string_expression [DEFAULT string_expression ON CONVERSION ERROR],
        format_string [,NLS_FORMAT_STRING])
The format_string has the same format elements as TO_CHAR(), except a
few elements that are not supported/usable for TO_DATE().
TO_DATE() returns a datetime or date value, depending on if the format
element FF is used.

Allowed separators, same as TO_CHAR():
space, tab and any of !#%'()*+,-./:;<=>

'&' can also be used if next character is not a character a-z or A-Z
"text' indicates a text string that is verbatim in the format. One cannot
use " as a separator.

Format elements supported by TO_DATE():
AD          Anno Domini ("in the year of the Lord")
AD_DOT      Anno Domini ("in the year of the Lord")
AM          Meridian indicator (Before midday)
AM_DOT      Meridian indicator (Before midday)
DAY        Name of day
DD          Day (1-31)
DDD        Day of year (1-336)
DY          Abbreviated name of day
FF[1-6]    Fractional seconds
HH          Hour (1-12)
HH12        Hour (1-12)
HH24        Hour (0-23)
IW          Week of year (1-53). Used with I, IY...IYYY. ISO 8601
MI          Minutes (0-59)
MM          Month (1-12)
MON        Abbreviated name of month
MONTH      Name of Month
PM          Meridian indicator (After midday)
PM_DOT      Meridian indicator (After midday)
RR          20th century dates in the 21st century. 2 digits
            50-99 is assumed from 2000, 0-49 is assumed from 1900.
RRRR        20th century dates in the 21st century. 4 digits
SS          Seconds
SYYYY      Signed 4 digit year; MariaDB only supports positive years
Y          1 digit year
YY          2 digits year
YYY        3 digits year
YYYY        4 digits year

Note that if there is a missing part of the date, the current date is used!
For example if 'MM-DD HH-MM-SS' then the current year will be used.
(Oracle behaviour)

Not supported options:
BC, D, DL, DS, E, EE, FM, FX, RM, SSSSS, TS, TZD, TZH, TZR, X,SY
BC is not supported by MariaDB datetime.
Most of the other are exotic formats, format modifies other things that
does not make in MariaDB as we return datetime or datetime with fractions,
not string.
D (day-of-week) is not supported as it is not clear exactly how it would
map to MariaDB. This element depends on the NLS territory of the session.

Extensions / differences compared to Oracle;
- MariaDB supports FF (fractional seconds).  If FF[£] is used,
  then TO_DATE will return a datetime with # of subseconds.
  If FF is not used a datetime will be returned.
- Names can be shortened to it's unique prefix. For example January and Ja
  works fine.
- No error if the date string is shorter format_string. This is useful to
  get a date from a mixed set of strings in date or datetime format.
  Oracle gives an error if date string is too short.
- MariaDB supports short locales as language names
- NLS_DATE_FORMAT can use both " and ' for quoting.

New formats handled by TO_CHAR():
FF[1-6]    Fractional seconds
DDD        Daynumber 1-366
IW          Week 1-53 according to ISO 8601
I          1 digit year according to ISO 8601
IY          2 digit year according to ISO 8601
IYY        3 digit year according to ISO 8601
IYYY        4 digit year according to ISO 8601
SYYY        4 digit year according to ISO 8601 (Oracle can do signed)

Supported NLS_FORMAT_STRING options are:
NLS_CALENDAR=GREGORIAN
NLS_DATE_LANGUAGE=language

Support languages are:
- All MariaDB short locales, like en_AU.
- The following Oracle language names:
ALBANIAN, AMERICAN, ARABIC, BASQUE, BELARUSIAN, BRAZILIAN PORTUGUESE
BULGARIAN, CANADIAN FRENCH, CATALAN, CROATIAN, CYRILLIC SERBIAN CZECH,
DANISH, DUTCH, EGYPTIAN, ENGLISH, ESTONIAN, FINNISH, FRENCH, GERMAN,
GREEK, HEBREW, HINDI, HUNGARIAN, ICELANDIC, INDONESIAN ITALIAN,
JAPANESE, KANNADA, KOREAN, LATIN AMERICAN SPANISH, LATVIAN,
LITHUANIAN, MACEDONIAN, MALAY, MEXICAN SPANISH, NORWEGIAN, POLISH,
PORTUGUESE, ROMANIAN, RUSSIAN, SIMPLIFIED CHINESE, SLOVAK, SLOVENIAN,
SPANISH, SWAHILI, SWEDISH, TAMIL, THAI, TRADITIONAL CHINESE, TURKISH,
UKRAINIAN, URDU, VIETNAMESE
Michael Widenius
MDEV-19683 Add support for Oracle TO_DATE()

Syntax:
TO_DATE(string_expression [DEFAULT string_expression ON CONVERSION ERROR],
        format_string [,NLS_FORMAT_STRING])
The format_string has the same format elements as TO_CHAR(), except a
few elements that are not supported/usable for TO_DATE().
TO_DATE() returns a datetime or date value, depending on if the format
element FF is used.

Allowed separators, same as TO_CHAR():
space, tab and any of !#%'()*+,-./:;<=>

'&' can also be used if next character is not a character a-z or A-Z
"text' indicates a text string that is verbatim in the format. One cannot
use " as a separator.

Format elements supported by TO_DATE():
AD          Anno Domini ("in the year of the Lord")
AD_DOT      Anno Domini ("in the year of the Lord")
AM          Meridian indicator (Before midday)
AM_DOT      Meridian indicator (Before midday)
DAY        Name of day
DD          Day (1-31)
DDD        Day of year (1-336)
DY          Abbreviated name of day
FF[1-6]    Fractional seconds
HH          Hour (1-12)
HH12        Hour (1-12)
HH24        Hour (0-23)
IW          Week of year (1-53). Used with I, IY...IYYY. ISO 8601
MI          Minutes (0-59)
MM          Month (1-12)
MON        Abbreviated name of month
MONTH      Name of Month
PM          Meridian indicator (After midday)
PM_DOT      Meridian indicator (After midday)
RR          20th century dates in the 21st century. 2 digits
            50-99 is assumed from 2000, 0-49 is assumed from 1900.
RRRR        20th century dates in the 21st century. 4 digits
SS          Seconds
SYYYY      Signed 4 digit year; MariaDB only supports positive years
Y          1 digit year
YY          2 digits year
YYY        3 digits year
YYYY        4 digits year

Note that if there is a missing part of the date, the current date is used!
For example if 'MM-DD HH-MM-SS' then the current year will be used.
(Oracle behaviour)

Not supported options:
BC, D, DL, DS, E, EE, FM, FX, RM, SSSSS, TS, TZD, TZH, TZR, X,SY
BC is not supported by MariaDB datetime.
Most of the other are exotic formats, format modifies other things that
does not make in MariaDB as we return datetime or datetime with fractions,
not string.
D (day-of-week) is not supported as it is not clear exactly how it would
map to MariaDB. This element depends on the NLS territory of the session.

Extensions / differences compared to Oracle;
- MariaDB supports FF (fractional seconds).  If FF[£] is used,
  then TO_DATE will return a datetime with # of subseconds.
  If FF is not used a datetime will be returned.
- Names can be shortened to it's unique prefix. For example January and Ja
  works fine.
- No error if the date string is shorter format_string. This is useful to
  get a date from a mixed set of strings in date or datetime format.
  Oracle gives an error if date string is too short.
- MariaDB supports short locales as language names
- NLS_DATE_FORMAT can use both " and ' for quoting.

New formats handled by TO_CHAR():
FF[1-6]    Fractional seconds
DDD        Daynumber 1-366
IW          Week 1-53 according to ISO 8601
I          1 digit year according to ISO 8601
IY          2 digit year according to ISO 8601
IYY        3 digit year according to ISO 8601
IYYY        4 digit year according to ISO 8601
SYYY        4 digit year according to ISO 8601 (Oracle can do signed)

Supported NLS_FORMAT_STRING options are:
NLS_CALENDAR=GREGORIAN
NLS_DATE_LANGUAGE=language

Support languages are:
- All MariaDB short locales, like en_AU.
- The following Oracle language names:
ALBANIAN, AMERICAN, ARABIC, BASQUE, BELARUSIAN, BRAZILIAN PORTUGUESE
BULGARIAN, CANADIAN FRENCH, CATALAN, CROATIAN, CYRILLIC SERBIAN CZECH,
DANISH, DUTCH, EGYPTIAN, ENGLISH, ESTONIAN, FINNISH, FRENCH, GERMAN,
GREEK, HEBREW, HINDI, HUNGARIAN, ICELANDIC, INDONESIAN ITALIAN,
JAPANESE, KANNADA, KOREAN, LATIN AMERICAN SPANISH, LATVIAN,
LITHUANIAN, MACEDONIAN, MALAY, MEXICAN SPANISH, NORWEGIAN, POLISH,
PORTUGUESE, ROMANIAN, RUSSIAN, SIMPLIFIED CHINESE, SLOVAK, SLOVENIAN,
SPANISH, SWAHILI, SWEDISH, TAMIL, THAI, TRADITIONAL CHINESE, TURKISH,
UKRAINIAN, URDU, VIETNAMESE
Vladislav Vaintroub
MDEV-38226 File permission issues with mariadb-dump --dir

When mariadb-dump runs with the --dir parameter, it creates new
directories. These directories must allow both mariadb-dump and
mariadbd to create new files in them.

If mariadb-dump and mariadbd run under different users, this is not
guaranteed. One problem is my_mkdir(), which by default creates
directories writable only by the current user and group, due to the
default my_umask_dir value of 0700.

This fix tries to preserve the permissions and owner of the original
backup directory passed with --dir when creating subdirectories.

If this fails, a warning is issued and mariadb-dump continues. This is
a best-effort approach. Failures may still occur later when the server
tries to write to a newly created directory. In such cases, the
permissions of the backup root directory (which maria­db-dump does not
create) would already be incorrect.
Rucha Deodhar
MDEV-34723: NEW and OLD in a trigger as row variables

Implementation:
NEW and OLD represent the entire table row. So it can be thought of as
list of Item_trigger_field. When the old mode is appropriately set, we
are in a trigger and NEW or OLD is encountered, create Item_trigger_row
object with same constructor as Item_trigger_field, it will also be used
later while creating Item_trigger_field objects.
Populate the m_fields list while fixing fields. Create a corresponding
instruction sp_instr_set_trigger_row which will be used to set the values
Lawrin Novitsky
Merge branch 'cpp-1.0' into cpp-1.1
Alexander Barkov
MDEV-10152 Add support for TYPE .. IS REF CURSOR

In progress
Alexander Barkov
MDEV-10152 Add support for TYPE .. IS REF CURSOR

In progress
KhaledR57
MDEV-37072: Implement IS JSON predicate

Add support for the SQL standard IS JSON predicate with the syntax:
expr IS [ NOT ] JSON [ { VALUE | ARRAY | OBJECT | SCALAR } ]
[ { WITH | WITHOUT } UNIQUE [ KEYS ] ]

The predicate allows checking if an expression is valid JSON
and optionally constrains the JSON type (VALUE, ARRAY, OBJECT,
SCALAR) and whether object keys are unique.

The implementation includes:
- Basic IS JSON validation
- Support for NOT operator
- Type constraints (VALUE, ARRAY, OBJECT, SCALAR)
- Unique keys constraint (WITH/WITHOUT UNIQUE KEYS)
Alexander Barkov
Fix 04 - vector
Alexey Botchkov
MDEV-37261 Basic XML data type.

additional fixes.
Alexey Botchkov
MDEV-37261 Basic XML data type.

XMLTYPE column added.
Type_handler::get_column_attributes() added so parser can check
if unexpected attributes were specified for the UDT column.
Daniel Bartholomew
bump the VERSION
Marko Mäkelä
fixup! 2f0a43d6668102bd2e0f302c72c26ffdcbbfb4eb
Jan Lindström
MDEV-37354 : SIGSEGV in Wsrep_server_service::release_high_priority_service | discard_streaming_applier

Add assertions and re-order delete calls.
Mohammad El-Shennawy
MDEV-36269: improve error handling for source command

- refactor batch_readline_init to mysql.cc for proper error handling
- add unit test and move it to the end of main/mysql_client_test.test
to resolve embedded test failures
- remove unnecessary code and duplicates to clean up implementation
- redirect error message from stderr to stdout in .test file
- use labels to avoid code duplication
- handle windows check for block device
- ensure file failing to open in windows because being a directory
is different from any other reason for clear error message
Yuchen Pei
remove SELECT_CHECK

looks unused
Vladislav Vaintroub
MDEV-38226 File permission issues with mariadb-dump --dir

When mariadb-dump runs with the --dir parameter, it creates new
directories. These directories must allow both mariadb-dump and
mariadbd to create new files in them.

If mariadb-dump and mariadbd run under different users, this is not
guaranteed. One problem is my_mkdir(), which by default creates
directories writable only by the current user and group, due to the
default my_umask_dir value of 0700.

This fix tries to preserve the permissions and owner of the original
backup directory passed with --dir when creating subdirectories.

If this fails, a warning is issued and mariadb-dump continues. This is
a best-effort approach. Failures may still occur later when the server
tries to write to a newly created directory. In such cases, the
permissions of the backup root directory (which maria­db-dump does not
create) would already be incorrect.
Alexander Barkov
Fix 01 - Fixing context collations
Sergei Golubchik
MDEV-38283 Incorrect results for NULLIF function

narrow a historical hack in convert_const_compared_to_int_field()
to apply only to bigint-vs-string comparison.
Marko Mäkelä
MDEV-38289: innodb.log_corruption_recovery sporadically fails

When the test is starting up the server with innodb_force_recovery=1,
there will be messages about the LSN being in the future. The current
LSN is expected to be 12338 plus any number of FILE_CHECKPOINT records
(16 bytes each). We have observed anything up to 12402=12338+16*4 in
our CI systems. To be on the safe side, let us allow up to ten records.
Rucha Deodhar
MDEV-37950: INSERT ... RETURNING exposes columns for which the user lacks
SELECT privilege

Analysis:
When setup_fields() is called, the want_privilege is set to NO_ACL, so
correct priveleges are not checked.
Fix:
Since RETURNING requires SELECT_ACL privelige, when we are setting up
the returning fields for the given query, set want_privilege to SELECT_ACL.
Reset to original value of want_privilege once done.
Akshat Nehra
MDEV-28823 Secure mariadb-secure-installation output file with chmod

Fix security issue where temporary output files containing SQL commands
and password hashes were created with default permissions (world-readable).
Modified prepare() function to create and umask the $output $config and
$command files. It is more secure than chmod as files can be opened, before
the chmod is applied, and then read when its its later populated.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
Alexey Botchkov
MDEV-37261 Basic XML data type.

XMLTYPE column added.
Giorgio Caculli
required <cstdint> inclusion in various headers
Rex Johnston
MDEV-38295 Recursive CTE usage leaks memory when not used in a top level select

During st_select_lex::cleanup() we assume that leaf tables and any
associated recursive table references can only be present when a join
is present.  After MDEV-37220 this is no longer true.
We shift our cleanup routine out of the test for a join.
Marko Mäkelä
squash! fc7941d0060a64c5262e3e65e45046aa7922f9c9

log_t::get_circular_path(): Get the path name of a circular file.
Replaces get_log_file_path().

log_t::get_path(): Get the name of the current log file.

FIXME: In srv_check_undo_redo_logs_exists() and
recv_sys_t::find_checkpoint(), try to find archived log files as well.
Alexander Barkov
Fix 03 - get_column_attributes
Dylan Liu
fix: correct CMake path configuration error that caused build failures when used as a subdirectory.
Alexander Barkov
MDEV-10152 Add support for TYPE .. IS REF CURSOR

In progress
Alexander Barkov
MDEV-10152 Add support for TYPE .. IS REF CURSOR

In progress
Alexey Botchkov
MDEV-37261 Basic XML data type.

additional fixes.
Alexander Barkov
Fix 02 - Disallow: XMLTYPE CHARACTER SET binary