Commit 6ef0b2ee authored by Sergei Golubchik's avatar Sergei Golubchik

Merge branch '10.11' into 11.0

parents fe490f85 87e13722
......@@ -2300,10 +2300,7 @@ static int read_and_execute(bool interactive)
the readline/libedit library.
*/
if (line)
{
free(line);
glob_buffer.length(0);
}
line= readline(prompt);
#ifdef USE_LIBEDIT_INTERFACE
/*
......
INCLUDE (CheckCXXSourceCompiles)
INCLUDE (CheckCXXSourceRuns)
INCLUDE (ExternalProject)
SET(WITH_LIBFMT "auto" CACHE STRING
......@@ -27,17 +27,15 @@ ENDMACRO()
MACRO (CHECK_LIBFMT)
IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto")
SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES(
CHECK_CXX_SOURCE_RUNS(
"#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1
#include <fmt/format-inl.h>
#include <iostream>
int main() {
int answer= 42;
int answer= 4321;
fmt::format_args::format_arg arg=
fmt::detail::make_arg<fmt::format_context>(answer);
std::cout << fmt::vformat(\"The answer is {}.\",
fmt::format_args(&arg, 1));
return fmt::vformat(\"{:L}\", fmt::format_args(&arg, 1)).compare(\"4,321\");
}" HAVE_SYSTEM_LIBFMT)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF()
......
......@@ -81,18 +81,15 @@ MACRO (CHECK_PCRE)
FIND_PACKAGE(PkgConfig QUIET)
PKG_CHECK_MODULES(PCRE libpcre2-8)
# in case pkg-config or libpcre2-8.pc is not installed:
IF(NOT PCRE_FOUND)
UNSET(PCRE_FOUND CACHE)
CHECK_LIBRARY_EXISTS(pcre2-8 pcre2_match_8 "" PCRE_FOUND)
ENDIF()
CHECK_LIBRARY_EXISTS(pcre2-8 pcre2_match_8 "${PCRE_LIBRARY_DIRS}" HAVE_PCRE2_MATCH_8)
ENDIF()
IF(NOT PCRE_FOUND OR WITH_PCRE STREQUAL "bundled")
IF(NOT HAVE_PCRE2_MATCH_8 OR WITH_PCRE STREQUAL "bundled")
IF (WITH_PCRE STREQUAL "system")
MESSAGE(FATAL_ERROR "system pcre2-8 library is not found or unusable")
ENDIF()
BUNDLE_PCRE2()
ELSE()
CHECK_LIBRARY_EXISTS(pcre2-posix PCRE2regcomp "" NEEDS_PCRE2_DEBIAN_HACK)
CHECK_LIBRARY_EXISTS(pcre2-posix PCRE2regcomp "${PCRE_LIBRARY_DIRS}" NEEDS_PCRE2_DEBIAN_HACK)
IF(NEEDS_PCRE2_DEBIAN_HACK)
SET(PCRE2_DEBIAN_HACK "-Dregcomp=PCRE2regcomp -Dregexec=PCRE2regexec -Dregerror=PCRE2regerror -Dregfree=PCRE2regfree")
ENDIF()
......
#
# regression introduced by MDEV-14448
#
delimiter $
select 1;
$
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is X
Server version: Y
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> delimiter $
MariaDB [(none)]> select 1;
-> $
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set
MariaDB [(none)]>
\ No newline at end of file
--echo #
--echo # regression introduced by MDEV-14448
--echo #
source include/not_embedded.inc;
source include/not_windows.inc;
error 0,1;
exec $MYSQL -V|grep -q readline;
if ($sys_errno == 1)
{
# strangely enough
skip does not work with libedit;
}
write_file $MYSQL_TMP_DIR/mysql_in;
delimiter $
select 1;
$
EOF
let TERM=dumb;
replace_regex /id is \d+/id is X/ /Server version: .*/Server version: Y/ / \(\d+\.\d+ sec\)//;
error 0,127;
exec socat EXEC:"$MYSQL",pty STDIO < $MYSQL_TMP_DIR/mysql_in;
if ($sys_errno == 127)
{
remove_file $MYSQL_TMP_DIR/mysql_in;
skip no socat;
}
remove_file $MYSQL_TMP_DIR/mysql_in;
......@@ -3085,8 +3085,10 @@ eval SHOW CREATE VIEW test1.v$level;
# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command
# is successful so assuming no expected error was intended
# --error ER_TOO_MANY_TABLES
--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
--enable_ps2_protocol
let $message= The output of following EXPLAIN is deactivated, because the result
differs on some platforms
FIXME Is this a bug ? ;
......@@ -3116,16 +3118,20 @@ SELECT f1 as f2, f2 as f1 FROM test2.t1;
CREATE OR REPLACE VIEW test2.v0 AS
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
eval SHOW CREATE VIEW test1.v$toplevel;
--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
--enable_ps2_protocol
eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
# 2.3.3 UCS2 string instead of common string
CREATE OR REPLACE VIEW test3.v0 AS
SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1;
eval SHOW CREATE VIEW test1.v$toplevel;
--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
--enable_ps2_protocol
eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
......@@ -3133,8 +3139,10 @@ eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CREATE OR REPLACE VIEW test3.v0 AS
SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1;
eval SHOW CREATE VIEW test1.v$toplevel;
--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
--enable_ps2_protocol
eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
--enable_result_log
......
......@@ -6,6 +6,11 @@ connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
# Ensure only the new binlog dump thread is alive (wait for the old one
# to complete its kill)
# And that it has already sent its fake rotate
connection slave;
include/stop_slave.inc
# Test slave with no capability gets dummy event, which is ignored.
set @old_dbug= @@global.debug_dbug;
......
......@@ -18,6 +18,17 @@ sync_slave_with_master;
CHANGE MASTER TO MASTER_USE_GTID=NO;
--source include/start_slave.inc
--connection master
--echo # Ensure only the new binlog dump thread is alive (wait for the old one
--echo # to complete its kill)
--let $wait_condition= select count(*)=1 from information_schema.processlist where command='Binlog Dump'
--source include/wait_condition.inc
--echo # And that it has already sent its fake rotate
--let $wait_condition= select count(*)=1 from information_schema.processlist where state LIKE '%Master has sent all binlog to slave%' and command='Binlog Dump'
--source include/wait_condition.inc
--connection slave
--source include/stop_slave.inc
--echo # Test slave with no capability gets dummy event, which is ignored.
set @old_dbug= @@global.debug_dbug;
......
......@@ -450,7 +450,6 @@ class Item_func_replace :public Item_str_func
Item_str_func(thd, org, find, replace) {}
String *val_str(String *to) override { return val_str_internal(to, false); };
bool fix_length_and_dec(THD *thd) override;
String *val_str_internal(String *str, String *empty_string_for_null);
const Schema *schema() const override { return &mariadb_schema; }
void print(String *str, enum_query_type query_type) override
{
......
......@@ -4787,9 +4787,12 @@ void st_select_lex::fix_prepare_information(THD *thd, Item **conds,
{
Query_arena_stmt on_stmt_arena(thd);
changed_elements|= TOUCHED_SEL_COND;
/*
TODO: return after MDEV-33218 fix
DBUG_ASSERT(
active_arena->is_stmt_prepare_or_first_stmt_execute() ||
active_arena->state == Query_arena::STMT_SP_QUERY_ARGUMENTS);
*/
if (group_list.first)
{
if (!group_list_ptrs)
......
Subproject commit fcd637addcfbe0e9c55ebfc83303e8415cda8e96
Subproject commit 07e7301631a5ac5ce86c3449d539eb4856119e1c
......@@ -2,3 +2,4 @@ wait_timeout : MDEV-26045
mdev_29676 : MDEV-31138
mdev_27239: MDEV-32046
mdev_27575 : MDEV-32997
mdev_28739_simple : MDEV-33343
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment