mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
post-merge fixes
* restore result=NULL after free in mysqlshow.c (to prevent double-free)
* remove DBUG_EVALUATE_IF again
* remove useless 'stop slave' from a test
* restore charset encoding in mysqltest.{test,result}
* correct error for unparseable BINLOG data is ER_SYNTAX_ERROR now
* restore old libfmt on rhel-7, gcc 4.8.5 cannot compile anything newer
This commit is contained in:
@@ -769,9 +769,10 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
|
||||
while ((row=mysql_fetch_row(result)))
|
||||
print_res_row(result,row);
|
||||
print_res_top(result);
|
||||
mysql_free_result(result);
|
||||
if (opt_show_keys)
|
||||
{
|
||||
mysql_free_result(result); /* free the columns result set */
|
||||
result= NULL;
|
||||
my_snprintf(query, sizeof(query), "show keys from %`s", table);
|
||||
if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql)))
|
||||
{
|
||||
|
||||
@@ -12,11 +12,20 @@ MACRO(BUNDLE_LIBFMT)
|
||||
SET(fmt_byproducts BUILD_BYPRODUCTS ${LIBFMT_INCLUDE_DIR}/fmt/format-inl.h)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
|
||||
# it's for RHEL-7, gcc 4.8.5
|
||||
# with newer fmt it complains about missing space in operator""_a()
|
||||
SET(source URL "https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip"
|
||||
URL_MD5 c622dca45ec3fc95254c48370a9f7a1d)
|
||||
ELSE()
|
||||
SET(source URL "https://github.com/fmtlib/fmt/releases/download/12.2.0/fmt-12.2.0.zip"
|
||||
URL_MD5 6083253772ad29e73a4d5920be08918e)
|
||||
ENDIF()
|
||||
|
||||
ExternalProject_Add(
|
||||
libfmt
|
||||
PREFIX "${dir}"
|
||||
URL "https://github.com/fmtlib/fmt/releases/download/12.2.0/fmt-12.2.0.zip"
|
||||
URL_MD5 6083253772ad29e73a4d5920be08918e
|
||||
${source}
|
||||
INSTALL_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
|
||||
@@ -108,8 +108,6 @@ extern int (*dbug_sanity)(void);
|
||||
do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0)
|
||||
|
||||
#define DBUG_IF(keyword) _db_keyword_(0, (keyword), 1)
|
||||
#define DBUG_EVALUATE_IF(keyword, a1, a2) \
|
||||
(DBUG_IF(keyword) ? (a1) : (a2))
|
||||
|
||||
#define DBUG_PUSH_EMPTY if (_dbug_on_) { DBUG_PUSH(""); }
|
||||
#define DBUG_POP_EMPTY if (_dbug_on_) { DBUG_POP(); }
|
||||
@@ -177,7 +175,6 @@ extern void _db_suicide_(void);
|
||||
#define DBUG_EXECUTE(keyword,a1) do { } while(0)
|
||||
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
|
||||
#define DBUG_IF(keyword) 0
|
||||
#define DBUG_EVALUATE_IF(keyword, a1, a2) (a2)
|
||||
#define DBUG_PRINT(keyword,arglist) do { } while(0)
|
||||
#define DBUG_PUSH_EMPTY do { } while(0)
|
||||
#define DBUG_POP_EMPTY do { } while(0)
|
||||
|
||||
@@ -472,7 +472,6 @@ DROP USER foo@localhost;
|
||||
CREATE USER foo@localhost IDENTIFIED VIA not_installed_plugin;
|
||||
ERROR HY000: Plugin 'not_installed_plugin' is not loaded
|
||||
# End of 10.5 tests
|
||||
#
|
||||
# MDEV-40470 GRANT PROXY with empty password incorrectly checks grantor's privileges
|
||||
#
|
||||
create user u1@localhost;
|
||||
|
||||
@@ -436,7 +436,7 @@ DROP USER foo@localhost;
|
||||
CREATE USER foo@localhost IDENTIFIED VIA not_installed_plugin;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
||||
--echo # MDEV-40470 GRANT PROXY with empty password incorrectly checks grantor's privileges
|
||||
--echo #
|
||||
create user u1@localhost;
|
||||
|
||||
@@ -213,9 +213,6 @@ CHANGE MASTER '' TO MASTER_HOST='master''host', MASTER_PORT=3306, MASTER_LOG_FIL
|
||||
|
||||
-- SET GLOBAL gtid_slave_pos='';
|
||||
call mtr.add_suppression('Slave I/O: Fatal error: .* Connection attempt terminated');
|
||||
stop slave;
|
||||
Warnings:
|
||||
Note 1255 Slave already has been stopped
|
||||
reset slave;
|
||||
Warnings:
|
||||
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
|
||||
|
||||
@@ -79,7 +79,6 @@ exec $MYSQL_DUMP --compact --dump-slave --include-master-host-port test;
|
||||
|
||||
# cleanup after mariadb-dump executed START SLAVE
|
||||
call mtr.add_suppression('Slave I/O: Fatal error: .* Connection attempt terminated');
|
||||
stop slave;
|
||||
reset slave;
|
||||
change master to master_host='127.0.0.1', master_user='root';
|
||||
|
||||
|
||||
@@ -881,9 +881,9 @@ INSERT INTO t1 SELECT f1 - 256 FROM t1;
|
||||
INSERT INTO t1 SELECT f1 - 512 FROM t1;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
select "500g bl<EFBFBD>b<EFBFBD>rsyltet<EFBFBD>y" as "will be lower cased";
|
||||
select "500g blåbærsyltetøy" as "will be lower cased";
|
||||
will be lower cased
|
||||
500g bl<EFBFBD>b<EFBFBD>rsyltet<EFBFBD>y
|
||||
500g blåbærsyltetøy
|
||||
SELECT "UPPER" AS "WILL NOT BE lower cased";
|
||||
WILL NOT BE lower cased
|
||||
UPPER
|
||||
@@ -901,8 +901,8 @@ xyz
|
||||
select 1 as "some new text";
|
||||
some new text
|
||||
1
|
||||
select 0 as "will not lower case <EFBFBD><EFBFBD><EFBFBD>";
|
||||
will not lower case <EFBFBD><EFBFBD><EFBFBD>
|
||||
select 0 as "will not lower case ÄËÐ";
|
||||
will not lower case ÄËÐ
|
||||
0
|
||||
CREATE TABLE t1(
|
||||
a int, b varchar(255), c datetime
|
||||
@@ -1033,7 +1033,6 @@ SELECT 1 /* doesn't throw error */;
|
||||
SELECT 1 /* doesn't throw error */;
|
||||
1
|
||||
1
|
||||
End of tests
|
||||
#
|
||||
# MDEV-38696: infinite loop in my_copy() function
|
||||
#
|
||||
|
||||
@@ -2661,7 +2661,7 @@ DROP TABLE t1;
|
||||
|
||||
# 1. Basic test
|
||||
--lowercase_result
|
||||
SELECT "500g BL<EFBFBD>B<EFBFBD>RSYLTET<EFBFBD>Y" AS "WILL BE lower cased";
|
||||
SELECT "500g BLÅBÆRSYLTETØY" AS "WILL BE lower cased";
|
||||
|
||||
# 2. test that it does not apply to next statement
|
||||
SELECT "UPPER" AS "WILL NOT BE lower cased";
|
||||
@@ -2689,7 +2689,7 @@ SELECT 1 as "SOME OLD TEXT";
|
||||
# 7. Test missing lower casing of "unknown" characters
|
||||
--character_set utf8
|
||||
--lowercase_result
|
||||
SELECT 0 as "WILL NOT lower case <EFBFBD><EFBFBD><EFBFBD>";
|
||||
SELECT 0 as "WILL NOT lower case ÄËÐ";
|
||||
--character_set latin1
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -3061,7 +3061,6 @@ EOF
|
||||
--echo #
|
||||
SELECT 1 /* doesn't throw error */;
|
||||
SELECT 1 /* doesn't throw error */;
|
||||
--echo End of tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-38696: infinite loop in my_copy() function
|
||||
@@ -3078,11 +3077,12 @@ SELECT 1 /* doesn't throw error */;
|
||||
|
||||
--rmdir $srcdir
|
||||
|
||||
--echo # End of 10.11 tests
|
||||
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--disable_query_log
|
||||
--eval SET GLOBAL max_connections = $saved_max_connections
|
||||
--enable_query_log
|
||||
|
||||
--echo # End of 10.11 tests
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ select * from t1;
|
||||
show create table t1;
|
||||
#--error ER_PARSE_ERROR # no error in 10.11 # uncomment when MDEV-40413 is pushed
|
||||
#alter table t1 convert partition `#mysql50#p-2` to table t2;
|
||||
--error ER_NO_SUCH_TABLE # no error in 10.11
|
||||
--error ER_NO_SUCH_TABLE # remove after MDEV-40413
|
||||
alter table t1 convert table t2 to partition p2 values in (7);
|
||||
alter table t1 reorganize partition `#mysql50#p-2` into (partition t2 values in (7));
|
||||
show create table t1;
|
||||
|
||||
@@ -5,7 +5,7 @@ call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 e
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT, KEY(b)) engine=innodb;
|
||||
BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w=';
|
||||
BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA=';
|
||||
Got one of the listed errors
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -4,7 +4,7 @@ call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field");
|
||||
call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table");
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT, KEY(b)) engine=innodb;
|
||||
BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w=';
|
||||
--error ER_GET_ERRNO,ER_SYNTAX_ERROR
|
||||
--error ER_SYNTAX_ERROR # corrupted event
|
||||
BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA=';
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -7345,8 +7345,8 @@ bool Table_map_log_event::init_charset_field(
|
||||
if (include_type(binlog_type_info_array, m_table->field[i]))
|
||||
store_compressed_length(
|
||||
buf,
|
||||
DBUG_EVALUATE_IF("corrupt_table_map_column_charset_length",
|
||||
(1 << 10), binlog_type_info_array[i].m_cs->number));
|
||||
DBUG_IF("corrupt_table_map_column_charset_length")
|
||||
? (1 << 10) : binlog_type_info_array[i].m_cs->number);
|
||||
}
|
||||
return write_tlv_field(m_metadata_buf, column_charset_type, buf);
|
||||
}
|
||||
@@ -7378,8 +7378,8 @@ bool Table_map_log_event::init_charset_field(
|
||||
{
|
||||
store_compressed_length(
|
||||
buf,
|
||||
DBUG_EVALUATE_IF("corrupt_table_map_default_charset_length",
|
||||
(1 << 10), char_column_index));
|
||||
DBUG_IF("corrupt_table_map_default_charset_length")
|
||||
? (1 << 10) : char_column_index);
|
||||
store_compressed_length(buf, cs->number);
|
||||
}
|
||||
char_column_index++;
|
||||
@@ -7399,8 +7399,8 @@ bool Table_map_log_event::init_column_name_field()
|
||||
|
||||
store_compressed_length(
|
||||
buf,
|
||||
DBUG_EVALUATE_IF("corrupt_table_map_column_name_length",
|
||||
(1 << 10), len));
|
||||
DBUG_IF("corrupt_table_map_column_name_length")
|
||||
? (1 << 10) : len);
|
||||
buf.append(m_table->field[i]->field_name.str, len);
|
||||
}
|
||||
return write_tlv_field(m_metadata_buf, COLUMN_NAME, buf);
|
||||
@@ -7425,8 +7425,8 @@ bool Table_map_log_event::init_set_str_value_field()
|
||||
{
|
||||
store_compressed_length(
|
||||
buf,
|
||||
DBUG_EVALUATE_IF("corrupt_table_map_set_str_value_length",
|
||||
(1 << 10), typelib->count));
|
||||
DBUG_IF("corrupt_table_map_set_str_value_length")
|
||||
? (1 << 10) : typelib->count);
|
||||
for (unsigned int i= 0; i < typelib->count; i++)
|
||||
{
|
||||
store_compressed_length(buf, typelib->type_lengths[i]);
|
||||
@@ -7477,8 +7477,8 @@ bool Table_map_log_event::init_geometry_type_field()
|
||||
DBUG_EXECUTE_IF("inject_invalid_geometry_type", geom_type= 100;);
|
||||
store_compressed_length(
|
||||
buf,
|
||||
DBUG_EVALUATE_IF("corrupt_table_map_geometry_type_length",
|
||||
(1 << 10), geom_type));
|
||||
DBUG_IF("corrupt_table_map_geometry_type_length")
|
||||
? (1 << 10) : geom_type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7521,8 +7521,8 @@ bool Table_map_log_event::init_primary_key_field()
|
||||
KEY_PART_INFO *key_part= pk->key_part+i;
|
||||
store_compressed_length(
|
||||
buf,
|
||||
DBUG_EVALUATE_IF("corrupt_table_map_simple_pk_length",
|
||||
(1 << 10), key_part->fieldnr-1));
|
||||
DBUG_IF("corrupt_table_map_simple_pk_length")
|
||||
? (1 << 10) : key_part->fieldnr-1);
|
||||
}
|
||||
return write_tlv_field(m_metadata_buf, SIMPLE_PRIMARY_KEY, buf);
|
||||
}
|
||||
@@ -7536,8 +7536,8 @@ bool Table_map_log_event::init_primary_key_field()
|
||||
|
||||
store_compressed_length(
|
||||
buf,
|
||||
DBUG_EVALUATE_IF("corrupt_table_map_pk_prefix_length",
|
||||
(1 << 10), key_part->fieldnr-1));
|
||||
DBUG_IF("corrupt_table_map_pk_prefix_length")
|
||||
? (1 << 10) : key_part->fieldnr-1);
|
||||
|
||||
// Store character length but not octet length
|
||||
if (key_part->length != m_table->field[key_part->fieldnr-1]->key_length())
|
||||
|
||||
Reference in New Issue
Block a user