mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '11.2' into 11.3
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@
|
||||
*.rpm
|
||||
.*.swp
|
||||
*.ninja
|
||||
.ccls-cache/
|
||||
.ninja_*
|
||||
*.mri
|
||||
*.mri.tpl
|
||||
|
121
.gitlab-ci.yml
121
.gitlab-ci.yml
@@ -207,7 +207,7 @@ fedora-sanitizer:
|
||||
- builddir/_CPack_Packages/Linux/RPM/SPECS/
|
||||
parallel:
|
||||
matrix:
|
||||
- SANITIZER: [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES, -DWITH_MSAN=YES]
|
||||
- SANITIZER: [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES]
|
||||
|
||||
centos8:
|
||||
stage: build
|
||||
@@ -297,6 +297,7 @@ centos7:
|
||||
main.mysqldump : Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
|
||||
main.flush_logs_not_windows : query 'flush logs' succeeded - should have failed with error ER_CANT_CREATE_FILE (1004)
|
||||
main.mysql_upgrade_noengine : upgrade output order does not match the expected
|
||||
main.func_math : MDEV-20966 - Wrong error code
|
||||
" > skiplist
|
||||
- ./mtr --suite=main --force --parallel=auto --xml-report=$CI_PROJECT_DIR/junit.xml --skip-test-list=skiplist $RESTART_POLICY
|
||||
|
||||
@@ -369,22 +370,6 @@ mysql-test-run-ubsan:
|
||||
junit:
|
||||
- junit.xml
|
||||
|
||||
mysql-test-run-msan:
|
||||
stage: test
|
||||
variables:
|
||||
RESTART_POLICY: "--force-restart"
|
||||
dependencies:
|
||||
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
|
||||
needs:
|
||||
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
|
||||
<<: *mysql-test-run-def
|
||||
allow_failure: true
|
||||
artifacts:
|
||||
when: always # Also show results when tests fail
|
||||
reports:
|
||||
junit:
|
||||
- junit.xml
|
||||
|
||||
rpmlint:
|
||||
stage: test
|
||||
dependencies:
|
||||
@@ -439,51 +424,69 @@ fedora install:
|
||||
- installed-database.sql
|
||||
- upgraded-database.sql
|
||||
|
||||
fedora upgrade:
|
||||
stage: test
|
||||
dependencies:
|
||||
- fedora
|
||||
needs:
|
||||
- fedora
|
||||
cppcheck:
|
||||
stage: sast
|
||||
needs: []
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
GIT_SUBMODULE_STRATEGY: normal
|
||||
script:
|
||||
- dnf install -y mariadb-server
|
||||
# Fedora does not support running services in Docker (like Debian packages do) so start it manually
|
||||
- /usr/libexec/mariadb-check-socket
|
||||
- /usr/libexec/mariadb-prepare-db-dir
|
||||
- sudo -u mysql /usr/libexec/mariadbd --basedir=/usr & sleep 10
|
||||
# Dump database contents in installed state
|
||||
- mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > old-installed-database.sql
|
||||
- /usr/libexec/mariadb-check-upgrade
|
||||
# Dump database contents in upgraded state
|
||||
- mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > old-upgraded-database.sql
|
||||
- mariadb --skip-column-names -e "SELECT @@version, @@version_comment" # Show version
|
||||
# @TODO: Upgrade from Fedora 33 MariaDB 10.4 to MariaDB.org latest does not work
|
||||
# so do this manual step to remove conflicts until packaging is fixed
|
||||
- yum remove -y mariadb-server-utils mariadb-gssapi-server mariadb-cracklib-password-check mariadb-backup mariadb-connector-c-config
|
||||
- rm -f rpm/*debuginfo* # Not relevant in this test
|
||||
- yum install -y rpm/*.rpm
|
||||
# nothing provides galera-4 on Fedora, so this step fails if built with wsrep
|
||||
- mysql -e "SHUTDOWN;"
|
||||
- /usr/bin/mariadb-install-db # This step should not do anything on upgrades, just exit
|
||||
- sudo -u mysql /usr/sbin/mariadbd & sleep 10
|
||||
# Dump database contents in installed state
|
||||
- mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > new-installed-database.sql || true
|
||||
# The step above fails on: mariadb-dump: Couldn't execute 'show events': Cannot proceed, because event scheduler is disabled (1577)
|
||||
# @TODO: Since we did a manual start, we also need to run upgrade manually
|
||||
- /usr/bin/mariadb-upgrade
|
||||
# Dump database contents in upgraded state
|
||||
- mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > new-upgraded-database.sql
|
||||
- |
|
||||
mariadb --skip-column-names -e "SELECT @@version, @@version_comment" | tee /tmp/version
|
||||
grep $MARIADB_MAJOR_VERSION /tmp/version || echo "MariaDB didn't upgrade properly"
|
||||
- mariadb --table -e "SELECT * FROM mysql.global_priv; SHOW CREATE USER root@localhost; SHOW CREATE USER 'mariadb.sys'@localhost"
|
||||
- mariadb --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS"
|
||||
- yum install -y cppcheck diffutils
|
||||
# --template: use a single-line template
|
||||
# --force: check large directories without warning
|
||||
# -i<directory>: ignore this directory when scanning
|
||||
# -j: run multiple cppcheck threads
|
||||
# Use newline to escape colon in yaml
|
||||
- >
|
||||
cppcheck --template="{file}:{line}: {severity}: {message}" --force
|
||||
client dbug extra include libmariadb libmysqld libservices mysql-test mysys mysys_ssl pcre plugin
|
||||
strings tests unittest vio wsrep-lib sql sql-common storage
|
||||
-istorage/mroonga -istorage/tokudb -istorage/spider -istorage/rocksdb -iextra/ -ilibmariadb/ -istorage/columnstore
|
||||
--output-file=cppcheck.txt -j $(nproc)
|
||||
# Parallel jobs may output findings in an nondeterministic order. Sort to match ignorelist.
|
||||
- cat cppcheck.txt | sort > cppcheck_sorted.txt
|
||||
# Remove line numbers for diff
|
||||
- sed 's/:[^:]*:/:/' cppcheck_sorted.txt > cppcheck_sorted_no_line_numbers.txt
|
||||
# Only print new issues not found in ignore list
|
||||
- echo "Problems found in ignore list that were not discovered by cppcheck (may have been fixed)."
|
||||
- diff --changed-group-format='%>' --unchanged-group-format='' cppcheck_sorted_no_line_numbers.txt tests/code_quality/cppcheck_ignorelist.txt || true
|
||||
- echo "Problems found by cppcheck that were not in ignore list."
|
||||
- diff --changed-group-format='%<' --unchanged-group-format='' cppcheck_sorted_no_line_numbers.txt tests/code_quality/cppcheck_ignorelist.txt > lines_not_ignored.txt || true
|
||||
- cat lines_not_ignored.txt && test ! -s lines_not_ignored.txt
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- old-installed-database.sql
|
||||
- old-upgraded-database.sql
|
||||
- new-installed-database.sql
|
||||
- new-upgraded-database.sql
|
||||
- cppcheck_sorted.txt
|
||||
|
||||
flawfinder:
|
||||
stage: sast
|
||||
needs: []
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
GIT_SUBMODULE_STRATEGY: normal
|
||||
script:
|
||||
- yum install -y python3 python3-pip jq diffutils git
|
||||
- pip install flawfinder
|
||||
- flawfinder --falsepositive --quiet --html . > flawfinder-all-vulnerabilities.html
|
||||
- cat flawfinder-all-vulnerabilities.html | grep "Hits ="
|
||||
- flawfinder --falsepositive --quiet --minlevel=5 --sarif . > flawfinder-output.json
|
||||
# FlawFinder's --sarif output will display all vulnerabilities despite having --minlevel=5 specified.
|
||||
# Therefore, we postprocess the results with jq and filter out findings where the vulnerability level is less than 5.
|
||||
# Also in the SARIF output format, the vulnerabilities are ranked as 0.2/0.4/0.6/0.8/1.0 which correspond to the --minlevel=1/2/3/4/5 of FlawFinder.
|
||||
# Additionally, we sort the results because individual findings are consistent across different runs, but their ordering may not be.
|
||||
# Vulnerabilities can also be ignored in-line (/* Flawfinder: ignore */), but this option was chosen as to not clutter the codebase.
|
||||
- jq 'del(.runs[] | .tool | .driver | .rules) | del(.runs[] | .results[] | select(.rank < 1)) | del(.runs[] | .results[] | .locations[] | .physicalLocation | .region | .startLine) | .runs[0].results|=sort_by(.fingerprints)' flawfinder-output.json > flawfinder-min-level5.json
|
||||
# Diff against known vulnerabilities, but ignore the line number.
|
||||
- echo "Problems found in ignore list that were not discovered by flawfinder (may have been fixed)."
|
||||
- diff --changed-group-format='%>' --unchanged-group-format='' flawfinder-min-level5.json tests/code_quality/flawfinder_ignorelist.json || true
|
||||
- echo "Problems found by flawfinder that were not in ignore list."
|
||||
- diff --changed-group-format='%<' --unchanged-group-format='' flawfinder-min-level5.json tests/code_quality/flawfinder_ignorelist.json > lines_not_ignored.txt || true
|
||||
- cat lines_not_ignored.txt && test ! -s lines_not_ignored.txt
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- flawfinder-all-vulnerabilities.html
|
||||
- flawfinder-min-level5.json
|
||||
|
||||
mini-benchmark:
|
||||
stage: test
|
||||
|
@@ -27,8 +27,6 @@ IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
ENDIF()
|
||||
|
||||
PROJECT(MariaDB)
|
||||
|
||||
# Remove the following comment if you don't want to have striped binaries
|
||||
# in RPM's:
|
||||
|
||||
@@ -39,6 +37,8 @@ FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0075 CMP0069 CMP0135)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
PROJECT(MariaDB)
|
||||
|
||||
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
|
||||
|
@@ -2142,7 +2142,7 @@ static int get_options(int argc, char **argv)
|
||||
current_db= my_strdup(PSI_NOT_INSTRUMENTED, *argv, MYF(MY_WME));
|
||||
}
|
||||
if (tty_password)
|
||||
opt_password= get_tty_password(NullS);
|
||||
opt_password= my_get_tty_password(NullS);
|
||||
if (debug_info_flag)
|
||||
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
||||
if (debug_check_flag)
|
||||
@@ -4887,7 +4887,7 @@ char *mysql_authentication_dialog_ask(MYSQL *mysql, int type,
|
||||
|
||||
if (type == 2) /* password */
|
||||
{
|
||||
s= get_tty_password("");
|
||||
s= my_get_tty_password("");
|
||||
strnmov(buf, s, buf_len);
|
||||
buf[buf_len-1]= 0;
|
||||
my_free(s);
|
||||
|
@@ -1458,7 +1458,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (tty_password)
|
||||
{
|
||||
opt_password= get_tty_password(NullS);
|
||||
opt_password= my_get_tty_password(NullS);
|
||||
/* add password to defaults file */
|
||||
add_one_option_cnf_file(&ds_args, "password", opt_password);
|
||||
}
|
||||
|
@@ -348,7 +348,7 @@ int main(int argc,char *argv[])
|
||||
}
|
||||
commands = temp_argv;
|
||||
if (tty_password)
|
||||
opt_password = get_tty_password(NullS);
|
||||
opt_password = my_get_tty_password(NullS);
|
||||
|
||||
(void) signal(SIGINT,endprog); /* Here if abort */
|
||||
(void) signal(SIGTERM,endprog); /* Here if abort */
|
||||
@@ -1053,8 +1053,8 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
else if (argc == 1)
|
||||
{
|
||||
/* prompt for password */
|
||||
typed_password= get_tty_password("New password: ");
|
||||
verified= get_tty_password("Confirm new password: ");
|
||||
typed_password= my_get_tty_password("New password: ");
|
||||
verified= my_get_tty_password("Confirm new password: ");
|
||||
if (strcmp(typed_password, verified) != 0)
|
||||
{
|
||||
my_printf_error(0,"Passwords don't match",MYF(ME_BELL));
|
||||
|
@@ -2261,7 +2261,7 @@ get_one_option(const struct my_option *opt, const char *argument,
|
||||
break;
|
||||
}
|
||||
if (tty_password)
|
||||
pass= get_tty_password(NullS);
|
||||
pass= my_get_tty_password(NullS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -481,7 +481,7 @@ static int get_options(int *argc, char ***argv)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
if (tty_password)
|
||||
opt_password = get_tty_password(NullS);
|
||||
opt_password = my_get_tty_password(NullS);
|
||||
if (debug_info_flag)
|
||||
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
||||
if (debug_check_flag)
|
||||
|
@@ -1351,7 +1351,7 @@ static int get_options(int *argc, char ***argv)
|
||||
return EX_USAGE;
|
||||
}
|
||||
if (tty_password)
|
||||
opt_password=get_tty_password(NullS);
|
||||
opt_password=my_get_tty_password(NullS);
|
||||
return(0);
|
||||
} /* get_options */
|
||||
|
||||
@@ -2847,11 +2847,7 @@ static uint dump_routines_for_db(char *db)
|
||||
routine_type[i], routine_name);
|
||||
|
||||
if (mysql_query_with_error_report(mysql, &routine_res, query_buff))
|
||||
{
|
||||
mysql_free_result(routine_list_res);
|
||||
routine_list_res= 0;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
continue;
|
||||
|
||||
while ((row= mysql_fetch_row(routine_res)))
|
||||
{
|
||||
@@ -3357,7 +3353,8 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
|
||||
my_snprintf(query_buff, sizeof(query_buff),
|
||||
"select column_name, extra, generation_expression, data_type "
|
||||
"from information_schema.columns where table_schema=database() "
|
||||
"and table_name=%s", quote_for_equal(table, temp_buff));
|
||||
"and table_name=%s order by ordinal_position",
|
||||
quote_for_equal(table, temp_buff));
|
||||
if (mysql_query_with_error_report(mysql, &result, query_buff))
|
||||
{
|
||||
if (path)
|
||||
@@ -3442,7 +3439,8 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
|
||||
"`EXTRA` AS `Extra`, "
|
||||
"`COLUMN_COMMENT` AS `Comment` "
|
||||
"FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE "
|
||||
"TABLE_SCHEMA = %s AND TABLE_NAME = %s";
|
||||
"TABLE_SCHEMA = %s AND TABLE_NAME = %s "
|
||||
"ORDER BY ORDINAL_POSITION";
|
||||
|
||||
verbose_msg("%s: Warning: Can't set SQL_QUOTE_SHOW_CREATE option (%s)\n",
|
||||
my_progname_short, mysql_error(mysql));
|
||||
|
@@ -319,7 +319,7 @@ static int get_options(int *argc, char ***argv)
|
||||
current_db= *((*argv)++);
|
||||
(*argc)--;
|
||||
if (tty_password)
|
||||
opt_password=get_tty_password(NullS);
|
||||
opt_password=my_get_tty_password(NullS);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@@ -378,7 +378,7 @@ get_options(int *argc,char ***argv)
|
||||
exit(ho_error);
|
||||
|
||||
if (tty_password)
|
||||
opt_password=get_tty_password(NullS);
|
||||
opt_password=my_get_tty_password(NullS);
|
||||
if (opt_count)
|
||||
{
|
||||
/*
|
||||
|
@@ -1545,7 +1545,7 @@ get_options(int *argc,char ***argv)
|
||||
}
|
||||
|
||||
if (tty_password)
|
||||
opt_password= get_tty_password(NullS);
|
||||
opt_password= my_get_tty_password(NullS);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ static my_bool opt_compress= 0, silent= 0, verbose= 0;
|
||||
static my_bool debug_info_flag= 0, debug_check_flag= 0;
|
||||
static my_bool tty_password= 0;
|
||||
static my_bool opt_mark_progress= 0;
|
||||
static my_bool ps_protocol= 0, ps_protocol_enabled= 0;
|
||||
static my_bool ps_protocol= 0, ps_protocol_enabled= 0, ps2_protocol_enabled= 0;
|
||||
static my_bool sp_protocol= 0, sp_protocol_enabled= 0;
|
||||
static my_bool view_protocol= 0, view_protocol_enabled= 0;
|
||||
static my_bool service_connection_enabled= 1;
|
||||
@@ -157,6 +157,7 @@ static struct property prop_list[] = {
|
||||
{ &display_session_track_info, 0, 1, 1, "$ENABLED_STATE_CHANGE_INFO" },
|
||||
{ &display_metadata, 0, 0, 0, "$ENABLED_METADATA" },
|
||||
{ &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
|
||||
{ &ps2_protocol_enabled, 0, 0, 0, "$ENABLED_PS2_PROTOCOL" },
|
||||
{ &view_protocol_enabled, 0, 0, 0, "$ENABLED_VIEW_PROTOCOL"},
|
||||
{ &service_connection_enabled, 0, 1, 0, "$ENABLED_SERVICE_CONNECTION"},
|
||||
{ &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
|
||||
@@ -173,6 +174,7 @@ enum enum_prop {
|
||||
P_SESSION_TRACK,
|
||||
P_META,
|
||||
P_PS,
|
||||
P_PS2,
|
||||
P_VIEW,
|
||||
P_CONN,
|
||||
P_QUERY,
|
||||
@@ -263,6 +265,7 @@ static size_t suite_dir_len, overlay_dir_len;
|
||||
|
||||
/* Precompiled re's */
|
||||
static regex_t ps_re; /* the query can be run using PS protocol */
|
||||
static regex_t ps2_re; /* the query can be run using PS protocol with second execution*/
|
||||
static regex_t sp_re; /* the query can be run as a SP */
|
||||
static regex_t view_re; /* the query can be run as a view*/
|
||||
|
||||
@@ -381,6 +384,7 @@ enum enum_commands {
|
||||
Q_LOWERCASE,
|
||||
Q_START_TIMER, Q_END_TIMER,
|
||||
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
|
||||
Q_DISABLE_PS2_PROTOCOL, Q_ENABLE_PS2_PROTOCOL,
|
||||
Q_DISABLE_VIEW_PROTOCOL, Q_ENABLE_VIEW_PROTOCOL,
|
||||
Q_DISABLE_SERVICE_CONNECTION, Q_ENABLE_SERVICE_CONNECTION,
|
||||
Q_ENABLE_NON_BLOCKING_API, Q_DISABLE_NON_BLOCKING_API,
|
||||
@@ -475,6 +479,8 @@ const char *command_names[]=
|
||||
"character_set",
|
||||
"disable_ps_protocol",
|
||||
"enable_ps_protocol",
|
||||
"disable_ps2_protocol",
|
||||
"enable_ps2_protocol",
|
||||
"disable_view_protocol",
|
||||
"enable_view_protocol",
|
||||
"disable_service_connection",
|
||||
@@ -7422,7 +7428,7 @@ int parse_args(int argc, char **argv)
|
||||
if (argc == 1)
|
||||
opt_db= *argv;
|
||||
if (tty_password)
|
||||
opt_pass= get_tty_password(NullS); /* purify tested */
|
||||
opt_pass= my_get_tty_password(NullS); /* purify tested */
|
||||
if (debug_info_flag)
|
||||
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
||||
if (debug_check_flag)
|
||||
@@ -8510,6 +8516,19 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Execute the query first time if second execution enable
|
||||
*/
|
||||
if(ps2_protocol_enabled && match_re(&ps2_re, query))
|
||||
{
|
||||
if (do_stmt_execute(cn))
|
||||
{
|
||||
handle_error(command, mysql_stmt_errno(stmt),
|
||||
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Execute the query
|
||||
*/
|
||||
@@ -9120,6 +9139,9 @@ int util_query(MYSQL* org_mysql, const char* query){
|
||||
org_mysql->unix_socket);
|
||||
|
||||
cur_con->util_mysql= mysql;
|
||||
if (mysql->charset != org_mysql->charset)
|
||||
mysql_set_character_set(mysql, org_mysql->charset->
|
||||
IF_EMBEDDED(cs_name.str, csname));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -9499,6 +9521,13 @@ void init_re(void)
|
||||
"[[:space:]]*UNINSTALL[[:space:]]+|"
|
||||
"[[:space:]]*UPDATE[[:space:]]"
|
||||
")";
|
||||
/*
|
||||
Filter for queries that can be run for second
|
||||
execution of prepare statement
|
||||
*/
|
||||
const char *ps2_re_str =
|
||||
"^("
|
||||
"[[:space:]]*SELECT[[:space:]])";
|
||||
|
||||
/*
|
||||
Filter for queries that can be run as views
|
||||
@@ -9508,6 +9537,7 @@ void init_re(void)
|
||||
"[[:space:]]*SELECT[[:space:]])";
|
||||
|
||||
init_re_comp(&ps_re, ps_re_str);
|
||||
init_re_comp(&ps2_re, ps2_re_str);
|
||||
init_re_comp(&sp_re, sp_re_str);
|
||||
init_re_comp(&view_re, view_re_str);
|
||||
}
|
||||
@@ -9544,6 +9574,7 @@ int match_re(regex_t *re, char *str)
|
||||
void free_re(void)
|
||||
{
|
||||
regfree(&ps_re);
|
||||
regfree(&ps2_re);
|
||||
regfree(&sp_re);
|
||||
regfree(&view_re);
|
||||
}
|
||||
@@ -9895,6 +9926,9 @@ int main(int argc, char **argv)
|
||||
if (cursor_protocol)
|
||||
ps_protocol= 1;
|
||||
|
||||
/* Enable second execution of SELECT for ps-protocol
|
||||
if ps-protocol is used */
|
||||
ps2_protocol_enabled= ps_protocol;
|
||||
ps_protocol_enabled= ps_protocol;
|
||||
sp_protocol_enabled= sp_protocol;
|
||||
view_protocol_enabled= view_protocol;
|
||||
@@ -10319,6 +10353,12 @@ int main(int argc, char **argv)
|
||||
case Q_ENABLE_PS_PROTOCOL:
|
||||
set_property(command, P_PS, ps_protocol);
|
||||
break;
|
||||
case Q_DISABLE_PS2_PROTOCOL:
|
||||
set_property(command, P_PS2, 0);
|
||||
break;
|
||||
case Q_ENABLE_PS2_PROTOCOL:
|
||||
set_property(command, P_PS2, ps_protocol);
|
||||
break;
|
||||
case Q_DISABLE_VIEW_PROTOCOL:
|
||||
set_property(command, P_VIEW, 0);
|
||||
/* Close only util connections */
|
||||
|
@@ -10,7 +10,7 @@ FUNCTION (CHECK_AWS_SDK RETVAL REASON)
|
||||
SKIP_AWS_SDK("AWS_SDK_EXTERNAL_PROJECT is not ON")
|
||||
ENDIF()
|
||||
IF(NOT NOT_FOR_DISTRIBUTION)
|
||||
SKIP_AWS_SDK("AWS SDK has Apache 2.0 License which is not complatible with GPLv2. Set -DNOT_FOR_DISTRIBUTION=ON if you need it")
|
||||
SKIP_AWS_SDK("AWS SDK has Apache 2.0 License which is not compatible with GPLv2. Set -DNOT_FOR_DISTRIBUTION=ON if you need it")
|
||||
ENDIF()
|
||||
# Check compiler support
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
|
@@ -73,7 +73,7 @@ It was originally forked from Percona XtraBackup 2.3.8.")
|
||||
# Packages with default description
|
||||
SET(CPACK_RPM_client_PACKAGE_SUMMARY "MariaDB database client binaries")
|
||||
SET(CPACK_RPM_client_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
|
||||
SET(CPACK_RPM_common_PACKAGE_SUMMARY "MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)")
|
||||
SET(CPACK_RPM_common_PACKAGE_SUMMARY "MariaDB database common configuration files (e.g. /etc/mysql/conf.d/mariadb.cnf)")
|
||||
SET(CPACK_RPM_common_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
|
||||
SET(CPACK_RPM_compat_PACKAGE_SUMMARY "MariaDB database client library MySQL compat package")
|
||||
SET(CPACK_RPM_compat_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
|
||||
@@ -109,6 +109,8 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE "
|
||||
%define restart_flag %{restart_flag_dir}/need-restart
|
||||
%define _lto_cflags %{nil}
|
||||
|
||||
%define pretrans %{nil}
|
||||
|
||||
%{?filter_setup:
|
||||
%filter_provides_in \\\\.\\\\(test\\\\|result\\\\|h\\\\|cc\\\\|c\\\\|inc\\\\|opt\\\\|ic\\\\|cnf\\\\|rdiff\\\\|cpp\\\\)$
|
||||
%filter_requires_in \\\\.\\\\(test\\\\|result\\\\|h\\\\|cc\\\\|c\\\\|inc\\\\|opt\\\\|ic\\\\|cnf\\\\|rdiff\\\\|cpp\\\\)$
|
||||
@@ -259,6 +261,8 @@ SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/
|
||||
SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||
SET(CPACK_RPM_compat_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||
SET(CPACK_RPM_compat_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||
SET(CPACK_RPM_cracklib-password-check_POST_INSTALL_SCRIPT_FILE
|
||||
${CMAKE_SOURCE_DIR}/plugin/cracklib_password_check/support-files/rpm/mariadb-plugin-cracklib-password-check-postin.sh)
|
||||
|
||||
MACRO(ALTERNATIVE_NAME real alt)
|
||||
IF(${ARGC} GREATER 2)
|
||||
|
42
debian/control
vendored
42
debian/control
vendored
@@ -83,9 +83,9 @@ Description: MariaDB database development files
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes development libraries and header files. To allow sources
|
||||
This package includes development libraries and header files to allow sources
|
||||
expecting the MariaDB Connector/C to build. Sources that expect the MySQL
|
||||
Client libraries should use files from the libmariadb-dev-compat package.
|
||||
client libraries should use files from the libmariadb-dev-compat package.
|
||||
|
||||
Package: libmariadb-dev-compat
|
||||
Architecture: any
|
||||
@@ -233,18 +233,18 @@ Breaks: libmariadb-dev (<< ${source:Version}),
|
||||
Replaces: libmariadb-dev (<< ${source:Version}),
|
||||
libmariadbclient-dev (<< ${source:Version}),
|
||||
libmysqld-dev
|
||||
Description: MariaDB embedded database, development files
|
||||
Description: MariaDB embedded database, development files package
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes the embedded server library development and header files.
|
||||
This package includes the MariaDB embedded server library development and header files.
|
||||
|
||||
Package: mysql-common
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}
|
||||
Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
|
||||
Description: MariaDB client common configuration files package (e.g. /etc/mysql/my.cnf)
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
@@ -258,7 +258,7 @@ Architecture: all
|
||||
Depends: mysql-common (>= 5.6.25),
|
||||
${misc:Depends}
|
||||
Multi-Arch: foreign
|
||||
Description: MariaDB common configuration files
|
||||
Description: MariaDB database common files (e.g. /etc/mysql/mariadb.conf.d/)
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
@@ -930,8 +930,8 @@ Depends: mariadb-client-core (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Backup tool for MariaDB server
|
||||
This backup tool is guaranteed to be compatible with MariaDB.
|
||||
Based on Xtrabackup, but improved to work with MariaDB.
|
||||
Based on Xtrabackup, but improved to work with MariaDB server.
|
||||
This backup tool is guaranteed to be compatible with MariaDB server.
|
||||
.
|
||||
Please refer to the MariaDB Knowledge Base on more information on
|
||||
how to use this tool.
|
||||
@@ -959,11 +959,11 @@ Replaces: mariadb-connect-engine-10.0,
|
||||
mariadb-server-10.0,
|
||||
mariadb-server-10.1
|
||||
Suggests: mariadb-plugin-connect-jdbc
|
||||
Description: Connect storage engine for MariaDB
|
||||
Description: Connect storage engine for MariaDB server
|
||||
Connect engine supports a number of file formats (dbf, xml, txt, bin, etc),
|
||||
connections to ODBC tables and remote MySQL tables, as well as a number of
|
||||
other interesting features.
|
||||
This package contains the Connect plugin for MariaDB.
|
||||
This package contains the Connect plugin for MariaDB server.
|
||||
|
||||
Package: mariadb-plugin-connect-jdbc
|
||||
Architecture: any
|
||||
@@ -1005,10 +1005,10 @@ Replaces: mariadb-rocksdb-engine-10.2,
|
||||
mariadb-rocksdb-engine-10.3,
|
||||
mariadb-rocksdb-engine-10.4
|
||||
Recommends: python3-mysqldb
|
||||
Description: RocksDB storage engine for MariaDB
|
||||
Description: RocksDB storage engine for MariaDB server
|
||||
The RocksDB storage engine is a high performance storage engine, aimed
|
||||
at maximising storage efficiency while maintaining InnoDB-like performance.
|
||||
This package contains the RocksDB plugin for MariaDB.
|
||||
This package contains the RocksDB plugin for MariaDB server.
|
||||
|
||||
Package: mariadb-plugin-oqgraph
|
||||
Architecture: any
|
||||
@@ -1030,10 +1030,10 @@ Replaces: mariadb-oqgraph-engine-10.0,
|
||||
mariadb-oqgraph-engine-10.4,
|
||||
mariadb-server-10.0,
|
||||
mariadb-server-10.1
|
||||
Description: OQGraph storage engine for MariaDB
|
||||
Description: OQGraph storage engine for MariaDB server
|
||||
The OQGraph engine is a computation engine plugin for handling hierarchies
|
||||
(trees) and graphs (friend-of-a-friend, etc) cleanly through standard SQL.
|
||||
This package contains the OQGraph plugin for MariaDB.
|
||||
This package contains the OQGraph plugin for MariaDB server.
|
||||
|
||||
Package: mariadb-plugin-mroonga
|
||||
Architecture: any-alpha any-amd64 any-arm any-arm64 any-i386 any-ia64 any-mips64el any-mips64r6el any-mipsel any-mipsr6el any-nios2 any-powerpcel any-ppc64el any-sh3 any-sh4 any-tilegx
|
||||
@@ -1050,10 +1050,10 @@ Replaces: mariadb-server-10.0,
|
||||
mariadb-server-10.2,
|
||||
mariadb-server-10.3,
|
||||
mariadb-server-10.4
|
||||
Description: Mroonga storage engine for MariaDB
|
||||
Description: Mroonga storage engine for MariaDB server
|
||||
Mroonga (formerly named Groonga Storage Engine) is a storage engine that
|
||||
provides fast CJK-ready full text searching using column store.
|
||||
This package contains the Mroonga plugin for MariaDB.
|
||||
This package contains the Mroonga plugin for MariaDB server.
|
||||
|
||||
Package: mariadb-plugin-spider
|
||||
Architecture: any
|
||||
@@ -1070,9 +1070,9 @@ Replaces: mariadb-server-10.0,
|
||||
mariadb-server-10.2,
|
||||
mariadb-server-10.3,
|
||||
mariadb-server-10.4
|
||||
Description: Spider storage engine for MariaDB
|
||||
Description: Spider storage engine for MariaDB server
|
||||
The Spider storage engine with built-in sharding features. It supports
|
||||
partitioning and xa transactions, and allows tables of different MariaDB
|
||||
partitioning and xa transactions, and allows tables of different MariaDB server
|
||||
instances to be handled as if they were on the same instance. It refers to one
|
||||
possible implementation of ISO/IEC 9075-9:2008 SQL/MED.
|
||||
|
||||
@@ -1127,11 +1127,11 @@ Depends: libcrack2 (>= 2.9.0),
|
||||
mariadb-server,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: CrackLib Password Validation Plugin for MariaDB
|
||||
Description: CrackLib Password Validation Plugin for MariaDB server
|
||||
This password validation plugin uses cracklib to allow only
|
||||
sufficiently secure (as defined by cracklib) user passwords in MariaDB.
|
||||
sufficiently secure (as defined by cracklib) user passwords in MariaDB server.
|
||||
.
|
||||
Install and configure this to enforce stronger passwords for MariaDB users.
|
||||
Install and configure this to enforce stronger passwords for MariaDB server users.
|
||||
|
||||
Package: mariadb-plugin-hashicorp-key-management
|
||||
Architecture: any
|
||||
|
@@ -1129,11 +1129,15 @@ print_summary(
|
||||
fprintf(fil_out, "index_id\t#pages\t\t#leaf_pages\t#recs_per_page"
|
||||
"\t#bytes_per_page\n");
|
||||
|
||||
for (std::map<unsigned long long, per_index_stats>::const_iterator it = index_ids.begin();
|
||||
it != index_ids.end(); it++) {
|
||||
const per_index_stats& index = it->second;
|
||||
for (const auto &ids : index_ids) {
|
||||
const per_index_stats& index = ids.second;
|
||||
if (!index.pages) {
|
||||
DBUG_ASSERT(index.free_pages);
|
||||
continue;
|
||||
}
|
||||
|
||||
fprintf(fil_out, "%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
|
||||
it->first, index.pages, index.leaf_pages,
|
||||
ids.first, index.pages, index.leaf_pages,
|
||||
index.total_n_recs / index.pages,
|
||||
index.total_data_bytes / index.pages);
|
||||
}
|
||||
|
@@ -147,7 +147,9 @@ IF(WOLFSSL_X86_64_BUILD)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/cpuid.c)
|
||||
IF(MSVC)
|
||||
SET(WOLFSSL_AESNI 1)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/aes_asm.asm)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES
|
||||
${WOLFCRYPT_SRCDIR}/aes_asm.asm
|
||||
${WOLFCRYPT_SRCDIR}/aes_gcm_asm.asm)
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -msse4.2 -mpclmul -mrdrnd -mrdseed")
|
||||
ENDIF()
|
||||
|
Submodule extra/wolfssl/wolfssl updated: 4fbd4fd36a...3b3c175af0
@@ -78,4 +78,5 @@
|
||||
{ "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
|
||||
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
|
||||
{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" },
|
||||
{ "HA_ERR_NO_ENCRYPTION", HA_ERR_NO_ENCRYPTION, "" },
|
||||
{ "HA_ERR_COMMIT_ERROR", HA_ERR_COMMIT_ERROR, "" },
|
||||
|
@@ -37,6 +37,7 @@ typedef struct st_json_string_t
|
||||
const uchar *c_str; /* Current position in JSON string */
|
||||
const uchar *str_end; /* The end on the string. */
|
||||
my_wc_t c_next; /* UNICODE of the last read character */
|
||||
int c_next_len; /* character lenght of the last read character. */
|
||||
int error; /* error code. */
|
||||
|
||||
CHARSET_INFO *cs; /* Character set of the JSON string. */
|
||||
@@ -50,7 +51,7 @@ void json_string_set_cs(json_string_t *s, CHARSET_INFO *i_cs);
|
||||
void json_string_set_str(json_string_t *s,
|
||||
const uchar *str, const uchar *end);
|
||||
#define json_next_char(j) \
|
||||
(j)->wc((j)->cs, &(j)->c_next, (j)->c_str, (j)->str_end)
|
||||
((j)->c_next_len= (j)->wc((j)->cs, &(j)->c_next, (j)->c_str, (j)->str_end))
|
||||
#define json_eos(j) ((j)->c_str >= (j)->str_end)
|
||||
/*
|
||||
read_string_const_chr() reads the next character of the string constant
|
||||
|
@@ -250,11 +250,30 @@ static inline void lex_string_set3(LEX_CSTRING *lex_str, const char *c_str,
|
||||
static inline int safe_strcpy(char *dst, size_t dst_size, const char *src)
|
||||
{
|
||||
DBUG_ASSERT(dst_size > 0);
|
||||
/* Note, strncpy will zerofill end of dst if src shorter than dst_size */
|
||||
|
||||
/* 1) IF there is a 0 byte in the first dst_size bytes of src, strncpy will
|
||||
* 0-terminate dst, and pad dst with additional 0 bytes out to dst_size.
|
||||
*
|
||||
* 2) IF there is no 0 byte in the first dst_size bytes of src, strncpy will
|
||||
* copy dst_size bytes, and the final byte won't be 0.
|
||||
*
|
||||
* In GCC 8+, the `-Wstringop-truncation` warning will object to strncpy()
|
||||
* being used in this way, so we need to disable this warning for this
|
||||
* single statement.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 8
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
#endif
|
||||
strncpy(dst, src, dst_size);
|
||||
#if defined(__GNUC__) && __GNUC__ >= 8
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
if (dst[dst_size-1])
|
||||
{
|
||||
/* Ensure string is zero terminated */
|
||||
/* Only possible in case (2), meaning src was truncated. */
|
||||
dst[dst_size-1]= 0;
|
||||
return 1;
|
||||
}
|
||||
|
@@ -48,6 +48,7 @@
|
||||
#define HA_OPEN_NO_PSI_CALL 1024U /* Don't call/connect PSI */
|
||||
#define HA_OPEN_MERGE_TABLE 2048U
|
||||
#define HA_OPEN_FOR_CREATE 4096U
|
||||
#define HA_OPEN_FOR_DROP (1U << 13) /* Open part of drop */
|
||||
|
||||
/*
|
||||
Allow opening even if table is incompatible as this is for ALTER TABLE which
|
||||
@@ -270,10 +271,9 @@ enum ha_base_keytype {
|
||||
|
||||
#define HA_NOSAME 1U /* Set if not dupplicated records */
|
||||
#define HA_PACK_KEY 2U /* Pack string key to previous key */
|
||||
#define HA_AUTO_KEY 16U
|
||||
#define HA_AUTO_KEY 16U /* MEMORY/MyISAM/Aria internal */
|
||||
#define HA_BINARY_PACK_KEY 32U /* Packing of all keys to prev key */
|
||||
#define HA_FULLTEXT 128U /* For full-text search */
|
||||
#define HA_UNIQUE_CHECK 256U /* Check the key for uniqueness */
|
||||
#define HA_SPATIAL 1024U /* For spatial search */
|
||||
#define HA_NULL_ARE_EQUAL 2048U /* NULL in key are cmp as equal */
|
||||
#define HA_GENERATED_KEY 8192U /* Automatically generated key */
|
||||
@@ -285,7 +285,7 @@ enum ha_base_keytype {
|
||||
|
||||
/* The combination of the above can be used for key type comparison. */
|
||||
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_AUTO_KEY | \
|
||||
HA_FULLTEXT | HA_UNIQUE_CHECK | \
|
||||
HA_FULLTEXT | \
|
||||
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY | \
|
||||
HA_UNIQUE_HASH)
|
||||
|
||||
@@ -454,6 +454,7 @@ enum ha_base_keytype {
|
||||
#define HA_ERR_CRASHED 126 /* Indexfile is crashed */
|
||||
#define HA_ERR_WRONG_IN_RECORD 127 /* Record-file is crashed */
|
||||
#define HA_ERR_OUT_OF_MEM 128 /* Out of memory */
|
||||
#define HA_ERR_RETRY_INIT 129 /* Initialization failed and should be retried */
|
||||
#define HA_ERR_NOT_A_TABLE 130 /* not a MYI file - no signature */
|
||||
#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */
|
||||
#define HA_ERR_OLD_FILE 132 /* old databasfile */
|
||||
@@ -529,14 +530,15 @@ enum ha_base_keytype {
|
||||
#define HA_ERR_DISK_FULL 189
|
||||
#define HA_ERR_INCOMPATIBLE_DEFINITION 190
|
||||
#define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191 /* Too many words in a phrase */
|
||||
#define HA_ERR_DECRYPTION_FAILED 192 /* Table encrypted but decypt failed */
|
||||
#define HA_ERR_DECRYPTION_FAILED 192 /* Table encrypted but decrypt failed */
|
||||
#define HA_ERR_FK_DEPTH_EXCEEDED 193 /* FK cascade depth exceeded */
|
||||
#define HA_ERR_TABLESPACE_MISSING 194 /* Missing Tablespace */
|
||||
#define HA_ERR_SEQUENCE_INVALID_DATA 195
|
||||
#define HA_ERR_SEQUENCE_RUN_OUT 196
|
||||
#define HA_ERR_COMMIT_ERROR 197
|
||||
#define HA_ERR_PARTITION_LIST 198
|
||||
#define HA_ERR_LAST 198 /* Copy of last error nr * */
|
||||
#define HA_ERR_NO_ENCRYPTION 199
|
||||
#define HA_ERR_LAST 199 /* Copy of last error nr * */
|
||||
|
||||
/* Number of different errors */
|
||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||
|
@@ -109,7 +109,8 @@ static const char *handler_error_messages[]=
|
||||
"Sequence has been run out",
|
||||
"Sequence values are conflicting",
|
||||
"Error during commit",
|
||||
"Cannot select partitions"
|
||||
"Cannot select partitions",
|
||||
"Cannot initialize encryption. Check that all encryption parameters have been set"
|
||||
};
|
||||
|
||||
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
|
||||
|
@@ -1107,7 +1107,7 @@ extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, size_t to_length,
|
||||
const char *from, size_t length,
|
||||
my_bool *overflow);
|
||||
extern char *get_tty_password(const char *opt_message);
|
||||
extern char *my_get_tty_password(const char *opt_message);
|
||||
#ifdef _WIN32
|
||||
#define BACKSLASH_MBTAIL
|
||||
/* File system character set */
|
||||
|
@@ -141,6 +141,7 @@ typedef unsigned long long my_ulonglong;
|
||||
#define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN
|
||||
#define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
|
||||
#define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS ER_UNSUPPORTED_ENGINE_FOR_GENERATED_COLUMNS
|
||||
#define ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT ER_QUERY_RESULT_INCOMPLETE
|
||||
#define ER_KEY_COLUMN_DOES_NOT_EXITS ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
#define ER_DROP_PARTITION_NON_EXISTENT ER_PARTITION_DOES_NOT_EXIST
|
||||
|
||||
|
@@ -260,7 +260,7 @@ enum enum_indicator_type
|
||||
#define CLIENT_DEPRECATE_EOF (1ULL << 24)
|
||||
|
||||
#define CLIENT_PROGRESS_OBSOLETE (1ULL << 29)
|
||||
#define CLIENT_SSL_VERIFY_SERVER_CERT (1ULL << 30)
|
||||
#define CLIENT_SSL_VERIFY_SERVER_CERT_OBSOLETE (1ULL << 30)
|
||||
/*
|
||||
It used to be that if mysql_real_connect() failed, it would delete any
|
||||
options set by the client, unless the CLIENT_REMEMBER_OPTIONS flag was
|
||||
@@ -318,7 +318,6 @@ enum enum_indicator_type
|
||||
CLIENT_MULTI_STATEMENTS | \
|
||||
CLIENT_MULTI_RESULTS | \
|
||||
CLIENT_PS_MULTI_RESULTS | \
|
||||
CLIENT_SSL_VERIFY_SERVER_CERT | \
|
||||
CLIENT_REMEMBER_OPTIONS | \
|
||||
MARIADB_CLIENT_PROGRESS | \
|
||||
CLIENT_PLUGIN_AUTH | \
|
||||
@@ -335,9 +334,8 @@ enum enum_indicator_type
|
||||
If any of the optional flags is supported by the build it will be switched
|
||||
on before sending to the client during the connection handshake.
|
||||
*/
|
||||
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
|
||||
& ~CLIENT_COMPRESS) \
|
||||
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
|
||||
#define CLIENT_BASIC_FLAGS ((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
|
||||
& ~CLIENT_COMPRESS)
|
||||
|
||||
enum mariadb_field_attr_t
|
||||
{
|
||||
|
13
include/no_valgrind_without_big.inc
Normal file
13
include/no_valgrind_without_big.inc
Normal file
@@ -0,0 +1,13 @@
|
||||
# include/no_valgrind_without_big.inc
|
||||
#
|
||||
# If we are running with Valgrind ($VALGRIND_TEST <> 0) than the resource
|
||||
# consumption (storage space needed, runtime ...) will be extreme.
|
||||
# Therefore we require that the option "--big-test" is also set.
|
||||
#
|
||||
|
||||
if ($VALGRIND_TEST) {
|
||||
if (!$BIG_TEST)
|
||||
{
|
||||
--skip Need "--big-test" when running with Valgrind
|
||||
}
|
||||
}
|
@@ -41,6 +41,7 @@ struct st_mysql_options_extention {
|
||||
uint proc_info_length);
|
||||
HASH connection_attributes;
|
||||
size_t connection_attributes_length;
|
||||
my_bool tls_verify_server_cert;
|
||||
};
|
||||
|
||||
typedef struct st_mysql_methods
|
||||
|
@@ -24,8 +24,8 @@
|
||||
#define HAVE_OPENSSL11 1
|
||||
#define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION)
|
||||
#define ERR_remove_state(X) ERR_clear_error()
|
||||
#define EVP_CIPHER_CTX_SIZE 176
|
||||
#define EVP_MD_CTX_SIZE 72
|
||||
#define EVP_CIPHER_CTX_SIZE 200
|
||||
#define EVP_MD_CTX_SIZE 80
|
||||
#undef EVP_MD_CTX_init
|
||||
#define EVP_MD_CTX_init(X) do { memset((X), 0, EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
|
||||
#undef EVP_CIPHER_CTX_init
|
||||
|
Submodule libmariadb updated: 5af90f00ff...c0ddc2c8cf
@@ -219,3 +219,7 @@ error:
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
char *get_tty_password(const char *opt_message)
|
||||
{
|
||||
return my_get_tty_password(opt_message);
|
||||
}
|
||||
|
@@ -30,7 +30,9 @@
|
||||
|
||||
flush status;
|
||||
eval EXPLAIN $query;
|
||||
--disable_ps2_protocol
|
||||
eval $query;
|
||||
--enable_ps2_protocol
|
||||
|
||||
let $cost=
|
||||
query_get_value(SHOW STATUS LIKE 'Last_query_cost', Value, 1);
|
||||
|
@@ -1,4 +1,6 @@
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
--connection slave
|
||||
|
||||
SET @saved_slave_type_conversions = @@slave_type_conversions;
|
||||
@@ -257,4 +259,4 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||
DROP TABLE t1,t2;
|
||||
--sync_slave_with_master
|
||||
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
@@ -6,6 +6,7 @@
|
||||
## - $engine_type should be set
|
||||
##
|
||||
|
||||
--disable_ps2_protocol
|
||||
set sql_mode=no_engine_substitution;
|
||||
eval set default_storage_engine = $engine_type;
|
||||
set autocommit=1;
|
||||
@@ -787,3 +788,4 @@ call p_verify_status_increment(2, 0, 2, 0);
|
||||
drop table t1, t2, t3;
|
||||
drop procedure p_verify_status_increment;
|
||||
drop function f1;
|
||||
--enable_ps2_protocol
|
||||
|
@@ -76,6 +76,15 @@ INSERT INTO t1 VALUES (_BINARY'\\''
|
||||
SELECT a, HEX(a) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# test how strings are written into view's frm
|
||||
#
|
||||
disable_view_protocol;
|
||||
create view v1 as select hex('<27>\'), hex('<EFBFBD>\t');
|
||||
select * from v1;
|
||||
drop view v1;
|
||||
enable_view_protocol;
|
||||
|
||||
# Checking that with character_set_client=binary 0x5C in 0xE05C
|
||||
# is treated as escape rather than the second byte of a multi-byte character,
|
||||
# even if character_set_connection is big5/cp932/gbk/sjis.
|
||||
@@ -109,5 +118,5 @@ SELECT HEX(a) FROM t1;
|
||||
DROP TABLE t1;
|
||||
--enable_view_protocol
|
||||
|
||||
--echo # Start of ctype_E05C.inc
|
||||
--echo # End of ctype_E05C.inc
|
||||
|
||||
|
@@ -463,6 +463,7 @@ select * from t1;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--disable_ps2_protocol
|
||||
# Ensure that row_count() value is reset after drop table.
|
||||
select 1;
|
||||
select hex(concat(row_count()));
|
||||
@@ -474,6 +475,7 @@ select hex(concat(found_rows()));
|
||||
create table t1 as select concat(found_rows()) as c1;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
create table t1 as select concat(uuid_short()) as c1;
|
||||
show create table t1;
|
||||
|
@@ -10,6 +10,7 @@ SELECT
|
||||
FROM
|
||||
seq_0_to_65535', @@character_set_connection, @@collation_connection);
|
||||
|
||||
--disable_service_connection
|
||||
SELECT COLLATION(c) FROM v_bmp LIMIT 1;
|
||||
|
||||
SELECT HEX(codepoint) FROM v_bmp WHERE HEX(WEIGHT_STRING(c))='FFFD';
|
||||
@@ -23,4 +24,6 @@ SELECT codepoint_hex4,HEX(WEIGHT_STRING(c))
|
||||
FROM v_bmp
|
||||
WHERE codepoint_hex4<>HEX(WEIGHT_STRING(c));
|
||||
|
||||
--enable_service_connection
|
||||
|
||||
DROP VIEW v_bmp;
|
||||
|
@@ -156,10 +156,12 @@ delimiter ;//
|
||||
set @a:=7;
|
||||
create table tmp as select * from t1 where c3 < @a
|
||||
order by c3 limit 1;
|
||||
--disable_ps2_protocol # because SELECT with side effects
|
||||
select f1(@a);
|
||||
insert into tmp(c1,c2,c3) select * from t1 where c3 < @a
|
||||
order by c3 limit 1;
|
||||
select f1(@a);
|
||||
--enable_ps2_protocol
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
insert into t1(c1,c2,c3) select c1,c2,c3 from tmp;
|
||||
|
@@ -195,10 +195,12 @@ delimiter ;//
|
||||
set @a:=7;
|
||||
create table tmp as select * from t1 where c3 < @a
|
||||
order by c3 limit 1;
|
||||
--disable_ps2_protocol # because SELECT with side effects
|
||||
select f1(@a);
|
||||
insert into tmp(c1,c2,c3) select * from t1 where c3 < @a
|
||||
order by c3 limit 1;
|
||||
select f1(@a);
|
||||
--enable_ps2_protocol
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
insert into t1(c1,c2,c3) select c1,c2,c3 from tmp;
|
||||
|
@@ -165,9 +165,11 @@ while ($_dt_tables)
|
||||
|
||||
# Now that we have the comma-separated list of columns, we can write
|
||||
# the table to a file.
|
||||
--disable_ps2_protocol
|
||||
--let $_dt_outfile= `SELECT @@datadir`
|
||||
--let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table
|
||||
eval SELECT * INTO OUTFILE '$_dt_outfile' FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list`;
|
||||
--enable_ps2_protocol
|
||||
|
||||
# Compare files.
|
||||
if ($_dt_prev_outfile)
|
||||
|
@@ -30,7 +30,9 @@
|
||||
|
||||
flush status;
|
||||
eval EXPLAIN $query;
|
||||
--disable_ps2_protocol
|
||||
eval $query;
|
||||
--enable_ps2_protocol
|
||||
|
||||
let $best_cost=
|
||||
query_get_value(SHOW STATUS LIKE 'Last_query_cost', Value, 1);
|
||||
|
@@ -26,6 +26,7 @@
|
||||
--echo # query: $query
|
||||
--echo # select: $select
|
||||
--echo #
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
if ($select) {
|
||||
--enable_prepare_warnings
|
||||
@@ -164,3 +165,4 @@ SHOW STATUS WHERE (Variable_name LIKE 'Sort%' OR
|
||||
|
||||
--echo
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
|
@@ -824,6 +824,7 @@ eval CREATE TABLE t2 (
|
||||
i $datetime DEFAULT $current_timestamp ON UPDATE $current_timestamp NOT NULL
|
||||
);
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT 1 INTO OUTFILE 't3.dat' FROM dual;
|
||||
|
||||
SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
@@ -831,6 +832,7 @@ INTO OUTFILE 't4.dat'
|
||||
FROM dual;
|
||||
|
||||
SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo # Mon Aug 1 15:11:19 2011 UTC
|
||||
SET TIMESTAMP = 1312211479.918273;
|
||||
@@ -929,9 +931,11 @@ remove_file $MYSQLD_DATADIR/test/t5.dat;
|
||||
--echo # Mon Aug 1 15:11:19 2011 UTC
|
||||
SET TIMESTAMP = 1312211479.089786;
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT 1 INTO OUTFILE "file1.dat" FROM dual;
|
||||
SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
INTO OUTFILE "file2.dat" FROM dual;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo # Too short row
|
||||
|
||||
|
@@ -54,6 +54,8 @@ set GLOBAL query_cache_type=ON;
|
||||
set LOCAL query_cache_type=ON;
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
reset query cache;
|
||||
flush status;
|
||||
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
@@ -173,6 +175,8 @@ show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
show status like "Qcache_not_cached";
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
||||
# Cleanup
|
||||
|
||||
connection root;
|
||||
|
@@ -878,6 +878,7 @@ set @@optimizer_where_cost=@save_optimizer_where_cost;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--disable_ps2_protocol
|
||||
--echo # check "Handler_pushed" status varuiables
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(1),
|
||||
@@ -899,6 +900,7 @@ SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
|
||||
show status like "Handler_icp%";
|
||||
|
||||
DROP TABLE t1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
#
|
||||
# MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len
|
||||
|
@@ -14,6 +14,7 @@
|
||||
# old name was innodb_cache.test
|
||||
# main code went into include/query_cache.inc
|
||||
#
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
SET global query_cache_type=ON;
|
||||
SET local query_cache_type=ON;
|
||||
@@ -192,3 +193,4 @@ drop table t2;
|
||||
|
||||
SET global query_cache_type=default;
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
|
@@ -44,13 +44,14 @@ flush status;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
--enable_ps2_protocol
|
||||
|
||||
drop table t1;
|
||||
|
||||
@@ -79,12 +80,14 @@ flush status;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
--enable_ps2_protocol
|
||||
|
||||
drop table t1;
|
||||
|
||||
@@ -114,6 +117,7 @@ INSERT INTO t1 VALUES (1, now(), 0);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
|
||||
--disable_ps2_protocol
|
||||
BEGIN;
|
||||
UPDATE `t1` SET `cool` = 1 WHERE `id` = 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
@@ -126,6 +130,7 @@ SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
--enable_ps2_protocol
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
@@ -23,6 +23,8 @@
|
||||
set GLOBAL query_cache_type=ON;
|
||||
set LOCAL query_cache_type=ON;
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
connect (con1,localhost,root,,test,$MASTER_MYPORT,);
|
||||
connection default;
|
||||
|
||||
@@ -252,6 +254,7 @@ set @a=10;
|
||||
execute stmt1 using @a;
|
||||
show status like 'Qcache_hits';
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
||||
drop table t1;
|
||||
disconnect con1;
|
||||
|
@@ -1 +1,3 @@
|
||||
--disable_ps2_protocol
|
||||
eval select "Outfile OK" into outfile "$MYSQLTEST_VARDIR/tmp/outfile.test";
|
||||
--enable_ps2_protocol
|
||||
|
@@ -34,8 +34,10 @@ SET sql_mode=DEFAULT;
|
||||
--eval CREATE TABLE t1 (a $type DEFAULT $defval, b $type DEFAULT $defval)
|
||||
--eval INSERT INTO t1 VALUES (DEFAULT,DEFAULT);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1
|
||||
DELETE FROM t1;
|
||||
--enable_ps2_protocol
|
||||
SET sql_mode=TRADITIONAL;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--error ER_INVALID_DEFAULT_VALUE_FOR_FIELD
|
||||
|
@@ -11,7 +11,7 @@ let $counter= 5000;
|
||||
let $mysql_errno= 9999;
|
||||
while ($mysql_errno)
|
||||
{
|
||||
--error 0,ER_ACCESS_DENIED_ERROR,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
|
||||
--error 0,ER_ACCESS_DENIED_ERROR,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013,HA_ERR_NO_ENCRYPTION
|
||||
select 1;
|
||||
|
||||
dec $counter;
|
||||
@@ -33,6 +33,10 @@ while ($mysql_errno)
|
||||
{
|
||||
let $mysql_errno=0;
|
||||
}
|
||||
if ($mysql_errno == 199)
|
||||
{
|
||||
let $mysql_errno=0;
|
||||
}
|
||||
if ($mysql_errno > 0)
|
||||
{
|
||||
--sleep 0.1
|
||||
|
@@ -46,7 +46,9 @@ if (`SELECT LENGTH(@@secure_file_priv) > 0`)
|
||||
--let $_wvtf_suffix= `SELECT UUID()`
|
||||
--let $_wvtf_tmp_file= $MYSQLTEST_VARDIR/_wvtf_$_wvtf_suffix
|
||||
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file'
|
||||
--enable_ps2_protocol
|
||||
--copy_file $_wvtf_tmp_file $write_to_file
|
||||
--remove_file $_wvtf_tmp_file
|
||||
}
|
||||
|
@@ -119,19 +119,19 @@ for my $k (sort keys %debuggers) {
|
||||
my $v = $debuggers{$k};
|
||||
$v = $debuggers{$k} = $debuggers{$v} if not ref $v; # resolve aliases
|
||||
|
||||
sub register_opt($$) {
|
||||
my ($name, $msg) = @_;
|
||||
$opts{"$name=s"} = \$opt_vals{$name};
|
||||
$help .= wrap(sprintf(" %-23s", $name), ' 'x25, "$msg under $name\n");
|
||||
sub register_opt($$$) {
|
||||
my ($prefix, $name, $msg) = @_;
|
||||
$opts{"$prefix$name=s"} = \$opt_vals{$prefix.$name};
|
||||
$help .= wrap(sprintf(" %-23s", $prefix.$name), ' 'x25, "$msg under $name\n");
|
||||
}
|
||||
|
||||
$v->{script} = '' unless $v->{script};
|
||||
$v->{options} =~ s/(\{exe\}|$)/ {options} $&/ unless $v->{options} =~ /\{options\}/;
|
||||
|
||||
register_opt "$k" => "Start mariadbd";
|
||||
register_opt "client-$k" => "Start mariadb-test client";
|
||||
register_opt "boot-$k" => "Start bootstrap server";
|
||||
register_opt "manual-$k" => "Before running test(s) let user manually start mariadbd";
|
||||
register_opt "", $k, "Start mysqld";
|
||||
register_opt "client-", $k, "Start mysqltest client";
|
||||
register_opt "boot-", $k, "Start bootstrap server";
|
||||
register_opt "manual-", "$k", "Before running test(s) let user manually start mariadbd";
|
||||
}
|
||||
|
||||
sub subst($%) {
|
||||
|
@@ -68,7 +68,7 @@ sub _cpuinfo {
|
||||
}
|
||||
}
|
||||
$F= undef; # Close file
|
||||
return $self;
|
||||
return $self->{cpus};
|
||||
}
|
||||
|
||||
|
||||
@@ -95,12 +95,7 @@ sub _kstat {
|
||||
push(@{$self->{cpus}}, $cpuinfo);
|
||||
}
|
||||
|
||||
# At least one cpu should have been found
|
||||
# if this method worked
|
||||
if ( $self->{cpus} ) {
|
||||
return $self;
|
||||
}
|
||||
return undef;
|
||||
return $self->{cpus};
|
||||
}
|
||||
|
||||
|
||||
|
@@ -119,3 +119,89 @@ select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_UPDATED_MORE_THAN_
|
||||
PAGES_UPDATED_MORE_THAN_ZERO
|
||||
1
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-31764: ASAN use-after-poison in trace_engine_stats upon ANALYZE FORMAT=JSON
|
||||
#
|
||||
ANALYZE FORMAT=JSON SELECT count(*) FROM information_schema.GLOBAL_STATUS;
|
||||
# Another testcase without I_S:
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 SELECT seq FROM seq_1_to_100;
|
||||
CREATE TABLE t2 (s INT);
|
||||
INSERT INTO t2 SELECT seq FROM seq_1_to_10;
|
||||
# Must use SJ-Materialization to hit the issue with temp.table:
|
||||
ANALYZE FORMAT=JSON SELECT * FROM t1 WHERE a IN (SELECT s FROM t2);
|
||||
ANALYZE
|
||||
{
|
||||
"query_optimization": {
|
||||
"r_total_time_ms": "REPLACED"
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"const_condition": "1",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"loops": 1,
|
||||
"r_loops": 1,
|
||||
"rows": 100,
|
||||
"r_rows": 100,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<subquery2>",
|
||||
"access_type": "eq_ref",
|
||||
"possible_keys": ["distinct_key"],
|
||||
"key": "distinct_key",
|
||||
"key_length": "4",
|
||||
"used_key_parts": ["s"],
|
||||
"ref": ["func"],
|
||||
"r_loops": 100,
|
||||
"r_table_loops": 110,
|
||||
"rows": 1,
|
||||
"r_rows": 0.1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"materialized": {
|
||||
"unique": 1,
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"loops": 1,
|
||||
"r_loops": 1,
|
||||
"rows": 10,
|
||||
"r_rows": 10,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
DROP TABLE t1, t2;
|
||||
|
@@ -62,3 +62,23 @@ select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_UPDATED_MORE_THAN_
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31764: ASAN use-after-poison in trace_engine_stats upon ANALYZE FORMAT=JSON
|
||||
--echo #
|
||||
|
||||
--disable_result_log
|
||||
ANALYZE FORMAT=JSON SELECT count(*) FROM information_schema.GLOBAL_STATUS;
|
||||
--enable_result_log
|
||||
|
||||
--echo # Another testcase without I_S:
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 SELECT seq FROM seq_1_to_100;
|
||||
CREATE TABLE t2 (s INT);
|
||||
INSERT INTO t2 SELECT seq FROM seq_1_to_10;
|
||||
|
||||
--echo # Must use SJ-Materialization to hit the issue with temp.table:
|
||||
--source include/analyze-format.inc
|
||||
ANALYZE FORMAT=JSON SELECT * FROM t1 WHERE a IN (SELECT s FROM t2);
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
@@ -19,7 +19,9 @@ SET @@global.slow_query_log = ON;
|
||||
|
||||
create table t1 (a int);
|
||||
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
--disable_ps2_protocol
|
||||
select * from t1 where a<3;
|
||||
--enable_ps2_protocol
|
||||
drop table t1;
|
||||
let SLOW_LOG_FILE= `select @@slow_query_log_file`;
|
||||
|
||||
|
@@ -11,7 +11,9 @@ set default_storage_engine=innodb;
|
||||
#
|
||||
create table t1 (pk int auto_increment primary key, f varchar(20));
|
||||
insert t1 (f) values ('a'), ('b'), ('c'), ('d');
|
||||
--disable_ps2_protocol
|
||||
select null, f into outfile 'load.data' from t1 limit 1;
|
||||
--enable_ps2_protocol
|
||||
load data infile 'load.data' into table t1;
|
||||
insert t1 (f) values ('<===');
|
||||
select * from t1;
|
||||
|
@@ -45,7 +45,9 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
|
||||
--echo #
|
||||
--disable_query_log
|
||||
create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
|
||||
--disable_ps2_protocol
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_query_log
|
||||
--source include/kill_mysqld.inc
|
||||
--error 1
|
||||
|
@@ -6,6 +6,7 @@
|
||||
--echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees
|
||||
--echo #
|
||||
|
||||
--disable_ps2_protocol
|
||||
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
||||
|
||||
CREATE TABLE t1(a TINYINT NOT NULL,b TINYINT,PRIMARY KEY(b)) ENGINE=innodb;
|
||||
@@ -56,3 +57,4 @@ disconnect thread1;
|
||||
connection default;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
--enable_ps2_protocol
|
||||
|
@@ -402,9 +402,11 @@ SET @@GLOBAL.max_allowed_packet=2048;
|
||||
# reconnect to make the new max packet size take effect
|
||||
--connect (newconn, localhost, root,,)
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT CONVERT('a', BINARY(2049));
|
||||
SELECT CONVERT('a', CHAR(2049));
|
||||
SELECT length(CONVERT(repeat('a',2048), CHAR(2049)));
|
||||
--enable_ps2_protocol
|
||||
|
||||
connection default;
|
||||
disconnect newconn;
|
||||
|
@@ -172,7 +172,10 @@ insert t1 (b) values (1);
|
||||
insert t1 (b) values (10);
|
||||
select * from t1 where a is null;
|
||||
set sql_auto_is_null=1;
|
||||
#Enable after fix MDEV-31307
|
||||
--disable_ps2_protocol
|
||||
select * from t1 where a is null;
|
||||
--enable_ps2_protocol
|
||||
--error ER_CONSTRAINT_FAILED
|
||||
insert t1 (b) values (1);
|
||||
drop table t1;
|
||||
|
@@ -8,6 +8,8 @@ eval CREATE TABLE t1(a $typec);
|
||||
ALTER TABLE t1 ADD KEY(a(10));
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
--echo # Make sure column was actually compressed
|
||||
INSERT INTO t1 VALUES(REPEAT('a', 1000));
|
||||
SELECT LEFT(a, 10), LENGTH(a) FROM t1;
|
||||
@@ -94,6 +96,8 @@ SELECT * FROM t1 ORDER BY a;
|
||||
SELECT a+1 FROM t1 ORDER BY 1;
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
|
@@ -48,6 +48,7 @@ select count(distinct n1), count(distinct n2) from t1;
|
||||
select count(distinct n2), n1 from t1 group by n1;
|
||||
drop table t1;
|
||||
|
||||
--disable_ps2_protocol
|
||||
# test the conversion from tree to MyISAM
|
||||
create table t1 (n int default NULL);
|
||||
let $1=5000;
|
||||
@@ -82,5 +83,6 @@ flush status;
|
||||
select count(distinct s) from t1;
|
||||
show status like 'Created_tmp_disk_tables';
|
||||
drop table t1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@@ -1218,7 +1218,7 @@ drop table if exists t1,t2,t3;
|
||||
# Fix modified for MariaDB: we support this syntax
|
||||
create table t1 (a int) transactional=0;
|
||||
Warnings:
|
||||
Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=0'
|
||||
Warning 1911 Unknown option 'transactional'
|
||||
create table t2 (a int) page_checksum=1;
|
||||
create table t3 (a int) row_format=page;
|
||||
drop table t1,t2,t3;
|
||||
@@ -2016,7 +2016,7 @@ drop table t1;
|
||||
# MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE
|
||||
#
|
||||
create table t1 (c int(10) unsigned) engine=memory transactional=0;
|
||||
ERROR HY000: Table storage engine 'MEMORY' does not support the create option 'TRANSACTIONAL=0'
|
||||
ERROR HY000: Unknown option 'transactional'
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
@@ -1879,7 +1879,7 @@ drop table t1;
|
||||
--echo #
|
||||
--echo # MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE
|
||||
--echo #
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
--error ER_UNKNOWN_OPTION
|
||||
create table t1 (c int(10) unsigned) engine=memory transactional=0;
|
||||
|
||||
--echo #
|
||||
|
@@ -1214,6 +1214,8 @@ generation name
|
||||
2 Grandma Ann
|
||||
2 Grandma Sally
|
||||
2 Grandpa Ben
|
||||
Warnings:
|
||||
Warning 1931 Query execution was interrupted. The query exceeded max_recursive_iterations = 1. The query result may be incomplete
|
||||
# query with recursive tables using key access
|
||||
alter table folks add primary key (id);
|
||||
explain
|
||||
@@ -2479,6 +2481,8 @@ DROP TABLE edges;
|
||||
# in a heap table
|
||||
#
|
||||
create table t1 (id int, test_data varchar(36));
|
||||
set @save_max_recursive_iterations= @@max_recursive_iterations;
|
||||
set max_recursive_iterations= 200000;
|
||||
insert into t1(id, test_data)
|
||||
select id, test_data
|
||||
from (
|
||||
@@ -2490,6 +2494,7 @@ select id + 1, uuid() from data_generator where id < 150000
|
||||
select * from data_generator
|
||||
) as a;
|
||||
drop table t1;
|
||||
set max_recursive_iterations= @save_max_recursive_iterations;
|
||||
#
|
||||
# MDEV-10773: ANALYZE for query with recursive CTE
|
||||
#
|
||||
@@ -2715,6 +2720,8 @@ select * from applied_modules;
|
||||
m
|
||||
m1
|
||||
m2
|
||||
Warnings:
|
||||
Warning 1931 Query execution was interrupted. The query exceeded max_recursive_iterations = 2. The query result may be incomplete
|
||||
drop table value_nodes, module_nodes, module_arguments, module_results;
|
||||
#
|
||||
# mdev-12519: recursive references in subqueries
|
||||
@@ -5990,4 +5997,52 @@ a a
|
||||
9 9
|
||||
10 10
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-20010 Equal on two RANK window functions create wrong result
|
||||
#
|
||||
create table t1 (a int, b int) engine= innodb;
|
||||
insert into t1 values (4, -2), (3, -1);
|
||||
SELECT RANK() OVER (ORDER BY D.C) = RANK() OVER (ORDER BY B.a) FROM
|
||||
(SELECT 5 AS C FROM t1) as D, (SELECT t1.b AS A FROM t1) AS B;
|
||||
RANK() OVER (ORDER BY D.C) = RANK() OVER (ORDER BY B.a)
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
select b, rank() over (order by c) , rank() over (order by dt1.b)
|
||||
from
|
||||
(select 5 as c from t1) as dt,
|
||||
(select b from t1) as dt1;
|
||||
b rank() over (order by c) rank() over (order by dt1.b)
|
||||
-2 1 1
|
||||
-2 1 1
|
||||
-1 1 3
|
||||
-1 1 3
|
||||
select b, rank() over (order by c) , rank() over (order by dt1.b),
|
||||
rank() over (order by c) = rank() over (order by dt1.b)
|
||||
from
|
||||
(select 5 as c from t1) as dt,
|
||||
(select b from t1) as dt1;
|
||||
b rank() over (order by c) rank() over (order by dt1.b) rank() over (order by c) = rank() over (order by dt1.b)
|
||||
-2 1 1 1
|
||||
-2 1 1 1
|
||||
-1 1 3 0
|
||||
-1 1 3 0
|
||||
alter table t1 engine=myisam;
|
||||
select b, rank() over (order by c) , rank() over (order by dt1.b)
|
||||
from
|
||||
(select 5 as c from t1) as dt,
|
||||
(select b from t1) as dt1;
|
||||
b rank() over (order by c) rank() over (order by dt1.b)
|
||||
-2 1 1
|
||||
-2 1 1
|
||||
-1 1 3
|
||||
-1 1 3
|
||||
create view v1 as select b,5 as c from t1;
|
||||
select b, rank() over (order by c) from v1 order by b;
|
||||
b rank() over (order by c)
|
||||
-2 1
|
||||
-1 1
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
# End of 10.4 tests
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# This is too slow on MSAN
|
||||
--source include/not_msan.inc
|
||||
--source include/not_valgrind.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
create table t1 (a int, b varchar(32));
|
||||
insert into t1 values
|
||||
@@ -1535,6 +1536,9 @@ DROP TABLE edges;
|
||||
|
||||
create table t1 (id int, test_data varchar(36));
|
||||
|
||||
set @save_max_recursive_iterations= @@max_recursive_iterations;
|
||||
set max_recursive_iterations= 200000;
|
||||
|
||||
insert into t1(id, test_data)
|
||||
select id, test_data
|
||||
from (
|
||||
@@ -1548,6 +1552,8 @@ select id, test_data
|
||||
|
||||
drop table t1;
|
||||
|
||||
set max_recursive_iterations= @save_max_recursive_iterations;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-10773: ANALYZE for query with recursive CTE
|
||||
--echo #
|
||||
@@ -4019,4 +4025,37 @@ with cte_e as (
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20010 Equal on two RANK window functions create wrong result
|
||||
--echo #
|
||||
|
||||
create table t1 (a int, b int) engine= innodb;
|
||||
insert into t1 values (4, -2), (3, -1);
|
||||
|
||||
SELECT RANK() OVER (ORDER BY D.C) = RANK() OVER (ORDER BY B.a) FROM
|
||||
(SELECT 5 AS C FROM t1) as D, (SELECT t1.b AS A FROM t1) AS B;
|
||||
|
||||
select b, rank() over (order by c) , rank() over (order by dt1.b)
|
||||
from
|
||||
(select 5 as c from t1) as dt,
|
||||
(select b from t1) as dt1;
|
||||
|
||||
select b, rank() over (order by c) , rank() over (order by dt1.b),
|
||||
rank() over (order by c) = rank() over (order by dt1.b)
|
||||
from
|
||||
(select 5 as c from t1) as dt,
|
||||
(select b from t1) as dt1;
|
||||
|
||||
alter table t1 engine=myisam;
|
||||
select b, rank() over (order by c) , rank() over (order by dt1.b)
|
||||
from
|
||||
(select 5 as c from t1) as dt,
|
||||
(select b from t1) as dt1;
|
||||
|
||||
create view v1 as select b,5 as c from t1;
|
||||
select b, rank() over (order by c) from v1 order by b;
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
@@ -725,15 +725,15 @@ create table t1 (a blob);
|
||||
insert into t1 values (0xEE00);
|
||||
select * into outfile 'test/t1.txt' from t1;
|
||||
delete from t1;
|
||||
select hex(load_file('MYSQLD_DATADIR/test/t1.txt'));;
|
||||
hex(load_file('MYSQLD_DATADIR/test/t1.txt'))
|
||||
select hex(load_file('MYSQLD_DATADIR/test/t1.txt')) as lf;
|
||||
lf
|
||||
5CEE5C300A
|
||||
load data infile 't1.txt' into table t1;
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
EE00
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
# End of 5.0 tests
|
||||
#
|
||||
# Start of 5.5 tests
|
||||
#
|
||||
@@ -4893,6 +4893,11 @@ a HEX(a)
|
||||
\'<27>\ 5C27E05C
|
||||
<EFBFBD>\'\ E05C275C
|
||||
DROP TABLE t1;
|
||||
create view v1 as select hex('<27>\'), hex('<27>\t');
|
||||
select * from v1;
|
||||
hex('<27>\') hex('<27>\t')
|
||||
E05C E05C74
|
||||
drop view v1;
|
||||
SET character_set_client=binary, character_set_results=binary;
|
||||
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||
@@character_set_client @@character_set_connection @@character_set_results
|
||||
@@ -4932,7 +4937,7 @@ HEX(a)
|
||||
E05C5B
|
||||
E05B
|
||||
DROP TABLE t1;
|
||||
# Start of ctype_E05C.inc
|
||||
# End of ctype_E05C.inc
|
||||
SET NAMES big5;
|
||||
CREATE TABLE t1 (a ENUM('<27>@') CHARACTER SET big5);
|
||||
SHOW CREATE TABLE t1;
|
||||
|
@@ -78,20 +78,19 @@ select hex(convert(_big5 0xC84041 using ucs2));
|
||||
set names big5;
|
||||
create table t1 (a blob);
|
||||
insert into t1 values (0xEE00);
|
||||
--disable_ps2_protocol
|
||||
select * into outfile 'test/t1.txt' from t1;
|
||||
--enable_ps2_protocol
|
||||
delete from t1;
|
||||
#enable after fix MDEV-27871
|
||||
--disable_view_protocol
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--eval select hex(load_file('$MYSQLD_DATADIR/test/t1.txt'));
|
||||
--eval select hex(load_file('$MYSQLD_DATADIR/test/t1.txt')) as lf
|
||||
load data infile 't1.txt' into table t1;
|
||||
select hex(a) from t1;
|
||||
--remove_file $MYSQLD_DATADIR/test/t1.txt
|
||||
drop table t1;
|
||||
#enable_view_protocol
|
||||
#
|
||||
--echo End of 5.0 tests
|
||||
--echo # End of 5.0 tests
|
||||
|
||||
|
||||
--echo #
|
||||
|
@@ -3352,6 +3352,40 @@ DROP FUNCTION f1;
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-28384 UBSAN: null pointer passed as argument 1, which is declared to never be null in my_strnncoll_binary on SELECT ... COUNT or GROUP_CONCAT
|
||||
#
|
||||
CREATE TABLE t (c BLOB NOT NULL);
|
||||
INSERT IGNORE INTO t VALUES (0);
|
||||
SELECT COUNT(*) FROM t WHERE EXTRACTVALUE(c,'a')='a';
|
||||
COUNT(*)
|
||||
0
|
||||
DROP TABLE t;
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t (c TEXT NOT NULL);
|
||||
INSERT INTO t VALUES();
|
||||
Warnings:
|
||||
Warning 1364 Field 'c' doesn't have a default value
|
||||
INSERT IGNORE INTO t VALUES (NULL);
|
||||
Warnings:
|
||||
Warning 1048 Column 'c' cannot be null
|
||||
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM t GROUP BY c;
|
||||
GROUP_CONCAT(c ORDER BY BINARY c)
|
||||
,
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-30982 UBSAN: runtime error: null pointer passed as argument 2, which is declared to never be null in my_strnncoll_binary on DELETE
|
||||
#
|
||||
CREATE TABLE t (c1 SET('1','2','3'),c2 BINARY);
|
||||
INSERT INTO t VALUES (0,0);
|
||||
DELETE FROM t WHERE c2<c1;
|
||||
DROP TABLE t;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.5 tests
|
||||
#
|
||||
#
|
||||
|
@@ -196,6 +196,39 @@ DROP FUNCTION f1;
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28384 UBSAN: null pointer passed as argument 1, which is declared to never be null in my_strnncoll_binary on SELECT ... COUNT or GROUP_CONCAT
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (c BLOB NOT NULL);
|
||||
INSERT IGNORE INTO t VALUES (0);
|
||||
SELECT COUNT(*) FROM t WHERE EXTRACTVALUE(c,'a')='a';
|
||||
DROP TABLE t;
|
||||
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t (c TEXT NOT NULL);
|
||||
INSERT INTO t VALUES();
|
||||
INSERT IGNORE INTO t VALUES (NULL);
|
||||
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM t GROUP BY c;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30982 UBSAN: runtime error: null pointer passed as argument 2, which is declared to never be null in my_strnncoll_binary on DELETE
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (c1 SET('1','2','3'),c2 BINARY);
|
||||
INSERT INTO t VALUES (0,0);
|
||||
DELETE FROM t WHERE c2<c1;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -254,7 +254,7 @@ DROP TABLE cs, cl0, cl1, tcs;
|
||||
# CHARACTER SET cs1 NOT NULL COLLATE cs2_xxx DEFAULT '' [COLLATE cs2_xxx]
|
||||
# CHARACTER SET cs1 NOT NULL DEFAULT '' COLLATE cs2_xxx
|
||||
#
|
||||
|
||||
--disable_ps2_protocol
|
||||
DELETE FROM results
|
||||
WHERE is_conflicting_charset_explicit_collate_explicit(result, cs, cl0);
|
||||
SELECT ROW_COUNT();
|
||||
@@ -601,7 +601,7 @@ WHERE cs='' AND cl0=''
|
||||
AND result NOT LIKE 'ERROR%'
|
||||
AND result RLIKE cl1;
|
||||
SELECT ROW_COUNT();
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
||||
|
||||
--vertical_results
|
||||
|
@@ -20413,6 +20413,11 @@ a HEX(a)
|
||||
\'<27>\ 5C27E05C
|
||||
<EFBFBD>\'\ E05C275C
|
||||
DROP TABLE t1;
|
||||
create view v1 as select hex('<27>\'), hex('<27>\t');
|
||||
select * from v1;
|
||||
hex('<27>\') hex('<27>\t')
|
||||
E05C E05C74
|
||||
drop view v1;
|
||||
SET character_set_client=binary, character_set_results=binary;
|
||||
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||
@@character_set_client @@character_set_connection @@character_set_results
|
||||
@@ -20452,7 +20457,7 @@ HEX(a)
|
||||
E05C5B
|
||||
E05B
|
||||
DROP TABLE t1;
|
||||
# Start of ctype_E05C.inc
|
||||
# End of ctype_E05C.inc
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
|
@@ -5237,6 +5237,11 @@ a HEX(a)
|
||||
\'<27>\ 5C27E05C
|
||||
<EFBFBD>\'\ E05C275C
|
||||
DROP TABLE t1;
|
||||
create view v1 as select hex('<27>\'), hex('<27>\t');
|
||||
select * from v1;
|
||||
hex('<27>\') hex('<27>\t')
|
||||
E05C E05C74
|
||||
drop view v1;
|
||||
SET character_set_client=binary, character_set_results=binary;
|
||||
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||
@@character_set_client @@character_set_connection @@character_set_results
|
||||
@@ -5276,7 +5281,7 @@ HEX(a)
|
||||
E05C5B
|
||||
E05B
|
||||
DROP TABLE t1;
|
||||
# Start of ctype_E05C.inc
|
||||
# End of ctype_E05C.inc
|
||||
SET NAMES utf8, character_set_connection=gbk;
|
||||
#
|
||||
# MDEV-13118 Wrong results with LOWER and UPPER and subquery
|
||||
|
@@ -8925,6 +8925,33 @@ DROP TABLE t1;
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-28384 UBSAN: null pointer passed as argument 1, which is declared to never be null in my_strnncoll_binary on SELECT ... COUNT or GROUP_CONCAT
|
||||
#
|
||||
CREATE TABLE t (c TEXT CHARACTER SET latin1 COLLATE latin1_bin NOT NULL);
|
||||
INSERT IGNORE INTO t VALUES (0);
|
||||
SELECT COUNT(*) FROM t WHERE EXTRACTVALUE(c,'a')='a';
|
||||
COUNT(*)
|
||||
0
|
||||
DROP TABLE t;
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t (c TEXT CHARACTER SET latin1 COLLATE latin1_bin NOT NULL);
|
||||
INSERT INTO t VALUES();
|
||||
Warnings:
|
||||
Warning 1364 Field 'c' doesn't have a default value
|
||||
INSERT IGNORE INTO t VALUES (NULL);
|
||||
Warnings:
|
||||
Warning 1048 Column 'c' cannot be null
|
||||
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM t GROUP BY c;
|
||||
GROUP_CONCAT(c ORDER BY BINARY c)
|
||||
,
|
||||
DROP TABLE t;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.5 tests
|
||||
#
|
||||
#
|
||||
@@ -8936,9 +8963,9 @@ CREATE OR REPLACE TABLE t1 AS SELECT CAST(1 AS BINARY), CAST(@a AS BINARY), CAST
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`CAST(1 AS BINARY)` varbinary(1) DEFAULT NULL,
|
||||
`CAST(1 AS BINARY)` varbinary(1) NOT NULL,
|
||||
`CAST(@a AS BINARY)` varbinary(20) DEFAULT NULL,
|
||||
`CAST(@b:=3 AS BINARY)` varbinary(1) DEFAULT NULL
|
||||
`CAST(@b:=3 AS BINARY)` varbinary(1) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
@@ -464,6 +464,30 @@ DROP TABLE t1;
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28384 UBSAN: null pointer passed as argument 1, which is declared to never be null in my_strnncoll_binary on SELECT ... COUNT or GROUP_CONCAT
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (c TEXT CHARACTER SET latin1 COLLATE latin1_bin NOT NULL);
|
||||
INSERT IGNORE INTO t VALUES (0);
|
||||
SELECT COUNT(*) FROM t WHERE EXTRACTVALUE(c,'a')='a';
|
||||
DROP TABLE t;
|
||||
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t (c TEXT CHARACTER SET latin1 COLLATE latin1_bin NOT NULL);
|
||||
INSERT INTO t VALUES();
|
||||
INSERT IGNORE INTO t VALUES (NULL);
|
||||
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM t GROUP BY c;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -178,8 +178,7 @@ drop table t1;
|
||||
#
|
||||
# Check more automatic conversion
|
||||
#
|
||||
# Enable view protocol after fix MDEV-28017
|
||||
--disable_view_protocol
|
||||
--disable_service_connection
|
||||
set names koi8r;
|
||||
create table t1 (c1 char(10) character set cp1251);
|
||||
insert into t1 values ('<27>');
|
||||
@@ -204,7 +203,7 @@ select rpad(c1,3,'
|
||||
#select case c1 when '<27>' then '<27>' when '<27>' then '<27>' else 'c' end from t1;
|
||||
#select export_set(5,c1,'<27>'), export_set(5,'<27>',c1) from t1;
|
||||
drop table t1;
|
||||
--enable_view_protocol
|
||||
--enable_service_connection
|
||||
|
||||
#
|
||||
# Bug 20695: problem with field default value's character set
|
||||
|
@@ -18947,6 +18947,11 @@ a HEX(a)
|
||||
\'<27>\ 5C27E05C
|
||||
<EFBFBD>\'\ E05C275C
|
||||
DROP TABLE t1;
|
||||
create view v1 as select hex('<27>\'), hex('<27>\t');
|
||||
select * from v1;
|
||||
hex('<27>\') hex('<27>\t')
|
||||
E05C E05C74
|
||||
drop view v1;
|
||||
SET character_set_client=binary, character_set_results=binary;
|
||||
SELECT @@character_set_client, @@character_set_connection, @@character_set_results;
|
||||
@@character_set_client @@character_set_connection @@character_set_results
|
||||
@@ -18986,7 +18991,7 @@ HEX(a)
|
||||
E05C5B
|
||||
E05B
|
||||
DROP TABLE t1;
|
||||
# Start of ctype_E05C.inc
|
||||
# End of ctype_E05C.inc
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
|
@@ -76,8 +76,10 @@ DROP TABLE t1;
|
||||
--echo # Problem # 1 (original report): wrong parsing of ucs2 data
|
||||
SET character_set_connection=ucs2;
|
||||
--enable_prepare_warnings
|
||||
--disable_ps2_protocol
|
||||
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt';
|
||||
--disable_prepare_warnings
|
||||
--enable_ps2_protocol
|
||||
CREATE TABLE t1(a INT);
|
||||
LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2
|
||||
(@b) SET a=REVERSE(@b);
|
||||
@@ -88,11 +90,12 @@ DROP TABLE t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
remove_file $MYSQLD_DATADIR/test/tmpp.txt;
|
||||
|
||||
|
||||
--disable_ps2_protocol
|
||||
--echo # Problem # 2 : if you write and read ucs2 data to a file they're lost
|
||||
--enable_prepare_warnings
|
||||
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2;
|
||||
--disable_prepare_warnings
|
||||
--enable_ps2_protocol
|
||||
CREATE TABLE t1(a INT);
|
||||
LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2
|
||||
(@b) SET a=REVERSE(@b);
|
||||
|
@@ -2842,6 +2842,62 @@ VALUES ('') UNION VALUES ( _utf16 0x0020 COLLATE utf16_bin);
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-22856 Assertion `!str || str != Ptr' and Assertion `!str || str != Ptr || !is_alloced()' failed in String::copy
|
||||
#
|
||||
SET NAMES utf8mb3, collation_connection='utf16_general_ci';
|
||||
SET sql_buffer_result=1;
|
||||
CREATE TABLE t(c INT);
|
||||
INSERT INTO t VALUES(NULL);
|
||||
SELECT PASSWORD(c) FROM t;
|
||||
PASSWORD(c)
|
||||
|
||||
DROP TABLE t;
|
||||
SET sql_buffer_result=DEFAULT;
|
||||
SET NAMES utf8mb3, collation_connection='utf16_general_ci';
|
||||
CREATE TABLE t1(c INT);
|
||||
INSERT INTO t1 VALUES(NULL);
|
||||
CREATE TABLE t2 AS SELECT PASSWORD(c) FROM t1;
|
||||
DROP TABLE t2, t1;
|
||||
SET NAMES utf8mb3, collation_connection='utf16_general_ci';
|
||||
CREATE TABLE t1 AS SELECT PASSWORD(CAST(NULL AS SIGNED));
|
||||
DROP TABLE t1;
|
||||
SET NAMES utf8mb3, collation_connection='utf16_bin';
|
||||
SET @@sql_buffer_result=ON;
|
||||
CREATE TABLE t (c CHAR(1));
|
||||
INSERT INTO t VALUES (1),(1),(1),(NULL);
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
SELECT PASSWORD(c) FROM t;
|
||||
PASSWORD(c)
|
||||
*E6CC90B878B948C35E92B003C792C46C58C4AF40
|
||||
*E6CC90B878B948C35E92B003C792C46C58C4AF40
|
||||
*E6CC90B878B948C35E92B003C792C46C58C4AF40
|
||||
|
||||
*E6CC90B878B948C35E92B003C792C46C58C4AF40
|
||||
*E6CC90B878B948C35E92B003C792C46C58C4AF40
|
||||
*E6CC90B878B948C35E92B003C792C46C58C4AF40
|
||||
|
||||
DROP TABLE t;
|
||||
SET @@sql_buffer_result=DEFAULT;
|
||||
SET sql_mode='';
|
||||
SET SESSION sql_buffer_result=1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
INSERT INTO t1 VALUES ();
|
||||
INSERT IGNORE INTO t1 VALUES (NULL);
|
||||
SET NAMES utf8mb3, collation_connection='utf16_bin';
|
||||
SELECT PASSWORD(c1) FROM t1;
|
||||
PASSWORD(c1)
|
||||
|
||||
|
||||
DROP TABLE t1;
|
||||
SET SESSION sql_buffer_result=DEFAULT;
|
||||
SET sql_mode=DEFAULT;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.5 tests
|
||||
#
|
||||
#
|
||||
|
@@ -961,6 +961,56 @@ VALUES ('') UNION VALUES ( _utf16 0x0020 COLLATE utf16_bin);
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22856 Assertion `!str || str != Ptr' and Assertion `!str || str != Ptr || !is_alloced()' failed in String::copy
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8mb3, collation_connection='utf16_general_ci';
|
||||
SET sql_buffer_result=1;
|
||||
CREATE TABLE t(c INT);
|
||||
INSERT INTO t VALUES(NULL);
|
||||
SELECT PASSWORD(c) FROM t;
|
||||
DROP TABLE t;
|
||||
SET sql_buffer_result=DEFAULT;
|
||||
|
||||
SET NAMES utf8mb3, collation_connection='utf16_general_ci';
|
||||
CREATE TABLE t1(c INT);
|
||||
INSERT INTO t1 VALUES(NULL);
|
||||
CREATE TABLE t2 AS SELECT PASSWORD(c) FROM t1;
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
SET NAMES utf8mb3, collation_connection='utf16_general_ci';
|
||||
CREATE TABLE t1 AS SELECT PASSWORD(CAST(NULL AS SIGNED));
|
||||
DROP TABLE t1;
|
||||
|
||||
SET NAMES utf8mb3, collation_connection='utf16_bin';
|
||||
SET @@sql_buffer_result=ON;
|
||||
CREATE TABLE t (c CHAR(1));
|
||||
INSERT INTO t VALUES (1),(1),(1),(NULL);
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
SELECT PASSWORD(c) FROM t;
|
||||
DROP TABLE t;
|
||||
SET @@sql_buffer_result=DEFAULT;
|
||||
|
||||
SET sql_mode='';
|
||||
SET SESSION sql_buffer_result=1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
INSERT INTO t1 VALUES ();
|
||||
INSERT IGNORE INTO t1 VALUES (NULL);
|
||||
SET NAMES utf8mb3, collation_connection='utf16_bin';
|
||||
SELECT PASSWORD(c1) FROM t1;
|
||||
DROP TABLE t1;
|
||||
SET SESSION sql_buffer_result=DEFAULT;
|
||||
SET sql_mode=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.5 tests
|
||||
|
@@ -2940,3 +2940,23 @@ DROP TABLE t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-29019 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on SELECT
|
||||
#
|
||||
CREATE TABLE t (a INT);
|
||||
SET collation_connection=utf32_unicode_ci;
|
||||
INSERT INTO t VALUES (0);
|
||||
SELECT * FROM t ORDER BY (OCT(a));
|
||||
a
|
||||
0
|
||||
SELECT HEX(OCT(a)) FROM t;
|
||||
HEX(OCT(a))
|
||||
00000030
|
||||
DROP TABLE t;
|
||||
SET NAMES utf8;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
@@ -1099,7 +1099,30 @@ CREATE TABLE t1 (
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--enable_service_connection
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-29019 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on SELECT
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (a INT);
|
||||
SET collation_connection=utf32_unicode_ci;
|
||||
INSERT INTO t VALUES (0);
|
||||
SELECT * FROM t ORDER BY (OCT(a));
|
||||
SELECT HEX(OCT(a)) FROM t;
|
||||
DROP TABLE t;
|
||||
SET NAMES utf8;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--enable_service_connection
|
||||
|
@@ -19,7 +19,9 @@ create table t1 (sal int(10),id int(10));
|
||||
INSERT INTO t1 (sal,id) VALUES (5000,1);
|
||||
INSERT INTO t1 (sal,id) VALUES (2000,1);
|
||||
INSERT INTO t1 (sal,id) VALUES (1000,1);
|
||||
--disable_ps2_protocol
|
||||
select f1(sal) from t1 where id>= 1;
|
||||
--enable_ps2_protocol
|
||||
select * from t2;
|
||||
drop table t2;
|
||||
drop function f1;
|
||||
@@ -96,9 +98,12 @@ end|
|
||||
|
||||
delimiter ;|
|
||||
|
||||
#Check after fix MDEV-31281
|
||||
--disable_ps2_protocol
|
||||
select f1(10);
|
||||
select f1(sal) from t1;
|
||||
select f1(sal) from t1 where 1=0;
|
||||
--enable_ps2_protocol
|
||||
drop function f1;
|
||||
delimiter |;
|
||||
|
||||
|
@@ -3,6 +3,8 @@
|
||||
|
||||
--source include/default_optimizer_switch.inc
|
||||
|
||||
--disable_ps2_protocol
|
||||
|
||||
flush status;
|
||||
show status like "%custom_aggregate%";
|
||||
create table t2 (sal int(10));
|
||||
@@ -73,6 +75,8 @@ with agg_sum as (
|
||||
select * from agg_sum;
|
||||
show status like "%custom_aggregate%";
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
||||
drop table t2,t1,t3;
|
||||
drop function f1;
|
||||
drop function f2;
|
||||
|
@@ -388,6 +388,7 @@ DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
#
|
||||
# Test.
|
||||
--disable_ps2_protocol
|
||||
CREATE TABLE t1 (c1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT GET_LOCK('mysqltest_lock', 100);
|
||||
@@ -424,6 +425,7 @@ disconnect con1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Test NO_CLEAR_EVENT flag. The signal should still be visible after
|
||||
|
@@ -611,7 +611,6 @@ disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop tables tm, t1, t2;
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-9621 INSERT DELAYED fails on insert for tables with many columns
|
||||
@@ -660,3 +659,4 @@ INSERT DELAYED INTO t1 VALUES (0);
|
||||
INSERT DELAYED INTO t1 VALUES (0);
|
||||
DROP TABLE t1;
|
||||
|
||||
--enable_view_protocol
|
||||
|
@@ -452,6 +452,7 @@ DELETE t1 FROM db1.t1, db2.t1;
|
||||
|
||||
# Test multiple-table cross database deletes
|
||||
|
||||
--disable_ps2_protocol
|
||||
DELETE t1 FROM db1.t2 AS t1, db2.t2 AS t2 WHERE t2.a = 1 AND t1.a = t2.a;
|
||||
SELECT ROW_COUNT();
|
||||
CALL count_rows();
|
||||
@@ -463,6 +464,7 @@ DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
DROP PROCEDURE count_rows;
|
||||
DROP TABLE t1, t2;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Bug#46958: Assertion in Diagnostics_area::set_ok_status, trigger,
|
||||
|
@@ -904,11 +904,14 @@ select distinct t1.id, tt.id, tt.data
|
||||
(select t1.id, 'yes' as data from t1) as tt
|
||||
on t1.id = tt.id;
|
||||
|
||||
#Check after fix MDEV-31277
|
||||
--disable_ps2_protocol
|
||||
select distinct t1.id, tt.id, tt.data
|
||||
from t1
|
||||
left join
|
||||
(select t1.id, 'yes' as data from t1 where id > 1) as tt
|
||||
on t1.id = tt.id;
|
||||
--enable_ps2_protocol
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
@@ -22733,7 +22733,7 @@ from
|
||||
(select a, sum(b) as s from t2 group by a) as dt,
|
||||
t3
|
||||
where dt.a=t1.a and t3.a < 3
|
||||
)
|
||||
) as SUBQ
|
||||
from t1 limit 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
|
||||
@@ -22747,14 +22747,9 @@ from
|
||||
(select a, sum(b) as s from t2 group by a) as dt,
|
||||
t3
|
||||
where dt.a=t1.a and t3.a < 3
|
||||
)
|
||||
) as SUBQ
|
||||
from t1 limit 5;
|
||||
a ( select concat(t3.a,'=',dt.s)
|
||||
from
|
||||
(select a, sum(b) as s from t2 group by a) as dt,
|
||||
t3
|
||||
where dt.a=t1.a and t3.a < 3
|
||||
)
|
||||
a SUBQ
|
||||
1 1=804
|
||||
2 1=1056
|
||||
3 1=846
|
||||
@@ -22773,7 +22768,7 @@ from
|
||||
(select a, sum(b) as s from t2 group by a) as dt,
|
||||
t3
|
||||
where dt.a=t1.a and t3.a < 3
|
||||
)
|
||||
) as SUBQ
|
||||
from t1 limit 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
|
||||
@@ -22787,14 +22782,9 @@ from
|
||||
(select a, sum(b) as s from t2 group by a) as dt,
|
||||
t3
|
||||
where dt.a=t1.a and t3.a < 3
|
||||
)
|
||||
) as SUBQ
|
||||
from t1 limit 5;
|
||||
a ( select concat(t3.a,'=',dt.s)
|
||||
from
|
||||
(select a, sum(b) as s from t2 group by a) as dt,
|
||||
t3
|
||||
where dt.a=t1.a and t3.a < 3
|
||||
)
|
||||
a SUBQ
|
||||
1 1=11858
|
||||
2 1=11380
|
||||
3 1=11588
|
||||
|
@@ -2017,9 +2017,9 @@ DELIMITER ;$$
|
||||
CALL p1('a');
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT a FROM (SELECT "aa" a) t WHERE REGEXP_INSTR(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1));
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
||||
DELIMITER $$;
|
||||
CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT
|
||||
@@ -4198,7 +4198,7 @@ select
|
||||
(select a, sum(b) as s from t2 group by a) as dt,
|
||||
t3
|
||||
where dt.a=t1.a and t3.a < 3
|
||||
)
|
||||
) as SUBQ
|
||||
from t1 limit 5;
|
||||
|
||||
eval explain $q;
|
||||
|
@@ -42,6 +42,7 @@ explain extended
|
||||
select * from (select * from t1 where f1 in (2,3)) tt join
|
||||
(select * from t1 where f1 in (1,2)) aa on tt.f1=aa.f1;
|
||||
|
||||
--disable_ps2_protocol
|
||||
flush status;
|
||||
explain extended
|
||||
select * from (select * from t1 where f1 in (2,3)) tt where f11=2;
|
||||
@@ -49,6 +50,7 @@ show status like 'Handler_read%';
|
||||
flush status;
|
||||
select * from (select * from t1 where f1 in (2,3)) tt where f11=2;
|
||||
show status like 'Handler_read%';
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo for merged views
|
||||
create view v1 as select * from t1;
|
||||
@@ -69,6 +71,7 @@ explain extended
|
||||
select * from v3 join v4 on f1=f2;
|
||||
select * from v3 join v4 on f1=f2;
|
||||
|
||||
--disable_ps2_protocol
|
||||
flush status;
|
||||
explain extended select * from v4 where f2 in (1,3);
|
||||
show status like 'Handler_read%';
|
||||
@@ -91,6 +94,7 @@ show status like 'Handler_read%';
|
||||
flush status;
|
||||
select * from t1 join (select * from t2 group by f2) tt on f1=f2;
|
||||
show status like 'Handler_read%';
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo for materialized views
|
||||
drop view v1,v2,v3;
|
||||
@@ -106,6 +110,7 @@ explain extended select * from t1 join v2 on f1=f2;
|
||||
select * from t1 join v2 on f1=f2;
|
||||
explain extended
|
||||
select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1;
|
||||
--disable_ps2_protocol
|
||||
flush status;
|
||||
select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1;
|
||||
show status like 'Handler_read%';
|
||||
@@ -116,6 +121,7 @@ show status like 'Handler_read%';
|
||||
flush status;
|
||||
select * from t1 join v2 on f1=f2;
|
||||
show status like 'Handler_read%';
|
||||
--enable_ps2_protocol
|
||||
|
||||
explain extended select * from v1 join v4 on f1=f2;
|
||||
--source include/explain-no-costs.inc
|
||||
@@ -162,6 +168,7 @@ join
|
||||
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z
|
||||
on x.f1 = z.f1;
|
||||
|
||||
--disable_ps2_protocol
|
||||
flush status;
|
||||
select * from
|
||||
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
|
||||
@@ -170,6 +177,7 @@ join
|
||||
on x.f1 = z.f1;
|
||||
show status like 'Handler_read%';
|
||||
flush status;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo merged in merged derived join merged in merged derived
|
||||
explain extended select * from
|
||||
|
@@ -1183,5 +1183,16 @@ a
|
||||
1
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-31743 Server crash in store_length, assertion failure in
|
||||
# Type_handler_string_result::sort_length
|
||||
#
|
||||
create table t1 (a int, b longtext, c varchar(18));
|
||||
insert into t1 values (1, 'Aa123456', 'abc'), (2, 'Bb7897777', 'def'),
|
||||
(3, 'Cc01287', 'xyz'), (5, 'd12345', 'efg');
|
||||
select distinct if(sum(a), b, 0) from t1 group by value(c) with rollup;
|
||||
if(sum(a), b, 0)
|
||||
Aa123456
|
||||
drop table t1;
|
||||
#
|
||||
# end of 10.5 tests
|
||||
#
|
||||
|
@@ -494,14 +494,18 @@ DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20)
|
||||
default NULL);
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE
|
||||
'../../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE';
|
||||
--enable_ps2_protocol
|
||||
LOAD DATA INFILE '../../tmp/data1.tmp' INTO TABLE t2;
|
||||
--error 0,1
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/data1.tmp
|
||||
|
||||
--disable_ps2_protocol
|
||||
SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
|
||||
'../../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE';
|
||||
--enable_ps2_protocol
|
||||
LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2;
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp
|
||||
|
||||
@@ -911,6 +915,18 @@ select distinct a from t1 where t1.a=1 and t1.a in (select a+0 from t2 where t2.
|
||||
select distinct a from t1 where t1.a=1 and t1.a in (select a+0 from t2 where t2.b in (1,2)) limit 0,1;
|
||||
drop table t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31743 Server crash in store_length, assertion failure in
|
||||
--echo # Type_handler_string_result::sort_length
|
||||
--echo #
|
||||
|
||||
create table t1 (a int, b longtext, c varchar(18));
|
||||
insert into t1 values (1, 'Aa123456', 'abc'), (2, 'Bb7897777', 'def'),
|
||||
(3, 'Cc01287', 'xyz'), (5, 'd12345', 'efg');
|
||||
|
||||
select distinct if(sum(a), b, 0) from t1 group by value(c) with rollup;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # end of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -7,9 +7,11 @@ drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr));
|
||||
--disable_ps2_protocol
|
||||
select count(*) from t1;
|
||||
select * from t1;
|
||||
select * from t1 limit 0;
|
||||
--enable_ps2_protocol
|
||||
show status like "Empty_queries";
|
||||
drop table t1;
|
||||
|
||||
@@ -17,8 +19,10 @@ drop table t1;
|
||||
# Accessing a non existing table should not increase Empty_queries
|
||||
#
|
||||
|
||||
--disable_ps2_protocol
|
||||
--error 1146
|
||||
select * from t2;
|
||||
--enable_ps2_protocol
|
||||
show status like "Empty_queries";
|
||||
|
||||
--echo # End of 4.1 tests
|
||||
|
@@ -80,10 +80,12 @@ SET optimizer_switch='outer_join_with_cache=off';
|
||||
|
||||
SET SESSION debug_dbug= '+d,only_one_Unique_may_be_created';
|
||||
|
||||
--disable_ps2_protocol
|
||||
--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
|
||||
--enable_ps2_protocol
|
||||
|
||||
SET debug_dbug= @saved_dbug;
|
||||
|
||||
|
@@ -94,8 +94,10 @@ end|
|
||||
delimiter ;|
|
||||
|
||||
flush status;
|
||||
--disable_ps2_protocol
|
||||
--error 1062
|
||||
select f1(), f2();
|
||||
--enable_ps2_protocol
|
||||
show status like 'Com_insert';
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
@@ -19,20 +19,5 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
SET GLOBAL slow_query_log = @sql_tmp;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-31181: Server crash in subselect_uniquesubquery_engine::print
|
||||
# upon EXPLAIN EXTENDED DELETE
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (pk INT PRIMARY KEY);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
EXPLAIN EXTENDED DELETE FROM t1 WHERE a IN (SELECT pk FROM t2);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 delete from `test`.`t1` using `test`.`t2` where `test`.`t2`.`pk` = `test`.`t1`.`a`
|
||||
drop table t1, t2;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user