summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2020-09-28 17:27:42 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2020-09-28 17:27:42 +0530
commit6cbbd6bd96a8b5c97ec4d0b687aac29fb0f63a6a (patch)
tree93d54c9fc71e2e76d1695cd5189bb8298c29d2e9
parenta6987d9fb921a6638bb1a2397b89ca606fad6f49 (diff)
parent842616532a76cd078ba1d526ae4b85d3ad4be069 (diff)
downloadmariadb-git-6cbbd6bd96a8b5c97ec4d0b687aac29fb0f63a6a.tar.gz
Merge branch '10.2' into 10.3
-rw-r--r--client/mysql_upgrade.c2
-rw-r--r--debian/additions/innotop/innotop2
-rwxr-xr-xdebian/additions/mysqlreport2
-rw-r--r--mysql-test/main/mysql_upgrade.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result94
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test14
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def5
-rw-r--r--scripts/mytop.sh2
-rw-r--r--sql-common/client.c4
-rw-r--r--sql/item_geofunc.cc16
-rw-r--r--sql/log_event.cc10
-rw-r--r--sql/opt_subselect.cc13
-rw-r--r--sql/protocol.cc8
-rw-r--r--sql/share/errmsg-utf8.txt10
-rw-r--r--sql/sql_string.cc2
-rw-r--r--storage/innobase/btr/btr0sea.cc6
-rw-r--r--strings/ctype-mb.c6
-rwxr-xr-xtests/drop_test.pl2
-rwxr-xr-xtests/fork2_test.pl2
-rwxr-xr-xtests/fork_big.pl2
-rw-r--r--tests/fork_big2.pl2
-rwxr-xr-xtests/index_corrupt.pl2
-rwxr-xr-xtests/insert_and_repair.pl2
-rwxr-xr-xtests/mail_to_db.pl2
-rw-r--r--tests/mysql_client_test.c5
-rwxr-xr-xtests/pmail.pl2
-rwxr-xr-xtests/rename_test.pl2
-rwxr-xr-xtests/test_delayed_insert.pl2
-rwxr-xr-xtests/truncate.pl2
29 files changed, 178 insertions, 49 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 619fe07505b..26fa275dacd 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -1173,7 +1173,7 @@ static int check_version_match(void)
extract_variable_from_show(&ds_version, version_str))
{
print_error("Version check failed. Got the following error when calling "
- "the 'mysql_upgrade' command line client", &ds_version);
+ "the 'mysql' command line client", &ds_version);
dynstr_free(&ds_version);
return 1; /* Query failed */
}
diff --git a/debian/additions/innotop/innotop b/debian/additions/innotop/innotop
index 399a393e67b..5ffd8180c34 100644
--- a/debian/additions/innotop/innotop
+++ b/debian/additions/innotop/innotop
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!/usr/bin/perl
# vim: tw=160:nowrap:expandtab:tabstop=3:shiftwidth=3:softtabstop=3
diff --git a/debian/additions/mysqlreport b/debian/additions/mysqlreport
index 0c7688abed0..61fef3f89ee 100755
--- a/debian/additions/mysqlreport
+++ b/debian/additions/mysqlreport
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/perl
# mysqlreport v4.0 Oct 23 2015
# http://hackmysql.com/mysqlreport
diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result
index a77a4c061a0..aa58440747a 100644
--- a/mysql-test/main/mysql_upgrade.result
+++ b/mysql-test/main/mysql_upgrade.result
@@ -145,7 +145,7 @@ test
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
DROP USER mysqltest1@'%';
-Version check failed. Got the following error when calling the 'mysql_upgrade' command line client
+Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'mysqltest1'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed
Run mysql_upgrade with a non existing server socket
@@ -413,7 +413,7 @@ OK
# Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR
#
Run mysql_upgrade with unauthorized access
-Version check failed. Got the following error when calling the 'mysql_upgrade' command line client
+Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed
#
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
index 424abc92bc4..3e01ba7e5cb 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
@@ -349,6 +349,11 @@ a
999.99
DROP TABLE t1dec102;
flush logs;
+CREATE TABLE t1 (a GEOMETRY DEFAULT NULL);
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (POINT(10,10));
+DROP TABLE t1;
+FLUSH LOGS;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
@@ -5358,3 +5363,92 @@ START TRANSACTION
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
Error: Found Old DECIMAL (mysql-4.1 or earlier). Not enough metadata to display the value.
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list [0-1-323]
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-324 ddl
+/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
+/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
+/*!100001 SET @@session.server_id=1*//*!*/;
+/*!100001 SET @@session.gtid_seq_no=324*//*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+use `test`/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.pseudo_thread_id=#/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.sql_mode=1411383296/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=X,@@session.collation_connection=X,@@session.collation_server=X/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+CREATE TABLE t1 (a GEOMETRY DEFAULT NULL)
+/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-325
+/*!100001 SET @@session.gtid_seq_no=325*//*!*/;
+START TRANSACTION
+/*!*/;
+# at #
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows:
+#Q> INSERT INTO t1 VALUES (NULL)
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
+### INSERT INTO `test`.`t1`
+### SET
+### @1=NULL /* GEOMETRY meta=4 nullable=1 is_null=1 */
+# Number of rows: 1
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-326
+/*!100001 SET @@session.gtid_seq_no=326*//*!*/;
+START TRANSACTION
+/*!*/;
+# at #
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows:
+#Q> INSERT INTO t1 VALUES (POINT(10,10))
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
+### INSERT INTO `test`.`t1`
+### SET
+### @1='\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00$@\x00\x00\x00\x00\x00\x00$@' /* GEOMETRY meta=4 nullable=1 is_null=0 */
+# Number of rows: 1
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+COMMIT
+/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-327 ddl
+/*!100001 SET @@session.gtid_seq_no=327*//*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+DROP TABLE `t1` /* generated by server */
+/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000004 pos: 4
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
index add977bf07a..b366578f3cd 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
@@ -465,6 +465,17 @@ SELECT * FROM t1dec102 ORDER BY a;
DROP TABLE t1dec102;
flush logs;
+#
+# MDEV-22330: mysqlbinlog stops with an error Don't know how to handle column
+# type: 255 meta: 4 (0004)
+# Check support for GEOMETRY type with verbose mode.
+#
+CREATE TABLE t1 (a GEOMETRY DEFAULT NULL);
+
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t1 VALUES (POINT(10,10));
+DROP TABLE t1;
+FLUSH LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
@@ -475,3 +486,6 @@ flush logs;
--error 1
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000002 2>&1
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
+--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000003
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index 0e2706f2dc3..ff7262947a0 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -11,6 +11,11 @@
##############################################################################
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
+galera_ipv6_mariabackup : MDEV-21770 galera_3nodes.galera_ipv6_mariabackup fails
+galera_ipv6_mariabackup_section : MDEV-21770 galera_3nodes.galera_ipv6_mariabackup fails
+galera_ipv6_mysqldump : MDEV-23576 galera_3nodes.galera_ipv6_mysqldump MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
+galera_ipv6_rsync : MDEV-23581 galera_3nodes.galera_ipv6_rsync MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
+galera_ipv6_rsync_section : MDEV-23580 galera_3nodes.galera_ipv6_rsync_section MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
galera_slave_options_do :MDEV-8798
galera_slave_options_ignore : MDEV-8798
diff --git a/scripts/mytop.sh b/scripts/mytop.sh
index e985d518c01..e7b9040c3a8 100644
--- a/scripts/mytop.sh
+++ b/scripts/mytop.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
#
# $Id: mytop,v 1.91 2012/01/18 16:49:12 mgrennan Exp $
diff --git a/sql-common/client.c b/sql-common/client.c
index 66c68e5952d..4a7a5439f48 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2003, 2016, Oracle and/or its affiliates.
- Copyright (c) 2009, 2017, MariaDB
+ Copyright (c) 2009, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3288,7 +3288,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
/* New protocol with 16 bytes to describe server characteristics */
mysql->server_language=end[2];
mysql->server_status=uint2korr(end+3);
- mysql->server_capabilities|= uint2korr(end+5) << 16;
+ mysql->server_capabilities|= ((unsigned) uint2korr(end+5)) << 16;
pkt_scramble_len= end[7];
if (pkt_scramble_len < 0)
{
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 0744523592c..20ac6f0c88c 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2003, 2016, Oracle and/or its affiliates.
- Copyright (c) 2011, 2016, MariaDB
+ Copyright (c) 2011, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -447,16 +447,18 @@ String *Item_func_boundary::val_str(String *str_value)
DBUG_ASSERT(fixed == 1);
String arg_val;
String *swkb= args[0]->val_str(&arg_val);
+
+ if ((null_value= args[0]->null_value))
+ DBUG_RETURN(0);
+
Geometry_buffer buffer;
- Geometry *g;
uint32 srid= 0;
Transporter trn(&res_receiver);
-
- if ((null_value=
- args[0]->null_value ||
- !(g= Geometry::construct(&buffer, swkb->ptr(), swkb->length()))))
+
+ Geometry *g= Geometry::construct(&buffer, swkb->ptr(), swkb->length());
+ if (!g)
DBUG_RETURN(0);
-
+
if (g->store_shapes(&trn))
goto mem_error;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 1e382cab55f..a0c3efcb85b 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -3045,6 +3045,16 @@ log_event_print_value(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info,
fprintf(stderr, "\nError: Found Old DECIMAL (mysql-4.1 or earlier). "
"Not enough metadata to display the value.\n");
break;
+
+ case MYSQL_TYPE_GEOMETRY:
+ strmake(typestr, "GEOMETRY", typestr_length);
+ if (!ptr)
+ goto return_null;
+
+ length= uint4korr(ptr);
+ my_b_write_quoted(file, ptr + meta, length);
+ return length + meta;
+
default:
print_event_info->flush_for_error();
fprintf(stderr,
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 83840d65876..9ee51074854 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2010, 2019, MariaDB
+ Copyright (c) 2010, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2601,16 +2601,11 @@ bool find_eq_ref_candidate(TABLE *table, table_map sj_inner_tables)
do
{
uint key= keyuse->key;
- KEY *keyinfo;
key_part_map bound_parts= 0;
- bool is_excluded_key= keyuse->is_for_hash_join();
- if (!is_excluded_key)
- {
- keyinfo= table->key_info + key;
- is_excluded_key= !MY_TEST(keyinfo->flags & HA_NOSAME);
- }
- if (!is_excluded_key)
+ if (!keyuse->is_for_hash_join() &&
+ (table->key_info[key].flags & HA_NOSAME))
{
+ KEY *keyinfo= table->key_info + key;
do /* For all equalities on all key parts */
{
/*
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 02c95a42695..3f4e251403b 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 2008, 2012, Monty Program Ab
+ Copyright (c) 2008, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -58,7 +58,8 @@ bool Protocol_binary::net_store_data(const uchar *from, size_t length)
packet->realloc(packet_length+9+length))
return 1;
uchar *to= net_store_length((uchar*) packet->ptr()+packet_length, length);
- memcpy(to,from,length);
+ if (length)
+ memcpy(to,from,length);
packet->length((uint) (to+length-(uchar*) packet->ptr()));
return 0;
}
@@ -716,7 +717,8 @@ void net_send_progress_packet(THD *thd)
uchar *net_store_data(uchar *to, const uchar *from, size_t length)
{
to=net_store_length_fast(to,length);
- memcpy(to,from,length);
+ if (length)
+ memcpy(to,from,length);
return to+length;
}
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index dbc52697d51..9ea94a0a68b 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -1800,9 +1800,10 @@ ER_WRONG_AUTO_KEY 42000 S1009
slo "Môžete mať iba jedno AUTO pole a to musí byť definované ako kľúč"
spa "Puede ser solamente un campo automatico y este debe ser definido como una clave"
swe "Det får finnas endast ett AUTO_INCREMENT-fält och detta måste vara en nyckel"
- ukr "Невірне визначення таблиці; Може бути лише один автоматичний стовбець, що повинен бути визначений як ключ"
+ ukr "Хибне визначення таблиці; Може бути лише один автоматичний стовбець, що повинен бути визначений як ключ"
ER_BINLOG_CANT_DELETE_GTID_DOMAIN
eng "Could not delete gtid domain. Reason: %s."
+ ukr "Не можу видалити домен gtid. Причина: %s."
ER_NORMAL_SHUTDOWN
cze "%s (%s): normální ukončení"
dan "%s (%s): Normal nedlukning"
@@ -2203,6 +2204,7 @@ ER_INSERT_INFO
ER_UPDATE_TABLE_USED
eng "Table '%-.192s' is specified twice, both as a target for '%s' and as a separate source for data"
swe "Table '%-.192s' är använd två gånger. Både för '%s' och för att hämta data"
+ ukr "Таблиця '%-.192s' вказується двічі, як цільова для '%s', так і як окреме джерело даних"
ER_NO_SUCH_THREAD
cze "Neznámá identifikace threadu: %lu"
dan "Ukendt tråd id: %lu"
@@ -2824,6 +2826,7 @@ ER_WRONG_OUTER_JOIN 42000
ER_NULL_COLUMN_IN_INDEX 42000
eng "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler"
swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.192s' till NOT NULL eller använd en annan hanterare"
+ ukr "Вказівник таблиці не підтримує NULL у зазначенному індексі. Будь ласка, зменіть стовпчик '%-.192s' на NOT NULL або використайте інший вказівник таблиці."
ER_CANT_FIND_UDF
cze "Nemohu načíst funkci '%-.192s'"
dan "Kan ikke læse funktionen '%-.192s'"
@@ -4314,6 +4317,7 @@ ER_MASTER_INFO
jpn "'master info '%.*s''構造体の初期化ができませんでした。MariaDBエラーログでエラーメッセージを確認してください。"
serbian "Nisam mogao da inicijalizujem informacionu strukturu glavnog servera, proverite da li imam privilegije potrebne za pristup file-u 'master.info' '%.*s'"
swe "Kunde inte initialisera replikationsstrukturerna för '%.*s'. See MariaDB fel fil för mera information"
+ ukr "Інформаційна структура з'єднання головного і підлеглого (master.info) для '%.*s' не може бути ініціалізована"
ER_SLAVE_THREAD
dan "Kunne ikke danne en slave-tråd; check systemressourcerne"
nla "Kon slave thread niet aanmaken, controleer systeem resources"
@@ -4478,6 +4482,7 @@ ER_UNION_TABLES_IN_DIFFERENT_DIR
serbian "Pogrešna definicija tabele; sve 'MERGE' tabele moraju biti u istoj bazi podataka"
spa "Incorrecta definición de la tabla; Todas las tablas MERGE deben estar en el mismo banco de datos"
swe "Felaktig tabelldefinition; alla tabeller i en MERGE-tabell måste vara i samma databas"
+ ukr "Хибне визначення таблиці; всі MERGE-таблиці повинні належити до однієї бази ланних."
ER_LOCK_DEADLOCK 40001
nla "Deadlock gevonden tijdens lock-aanvraag poging; Probeer herstart van de transactie"
eng "Deadlock found when trying to get lock; try restarting transaction"
@@ -4491,6 +4496,7 @@ ER_LOCK_DEADLOCK 40001
serbian "Unakrsno zaključavanje pronađeno kada sam pokušao da dobijem pravo na zaključavanje; Probajte da restartujete transakciju"
spa "Encontrado deadlock cuando tentando obtener el bloqueo; Tente recomenzar la transición"
swe "Fick 'DEADLOCK' vid låsförsök av block/rad. Försök att starta om transaktionen"
+ ukr "Взаємне блокування знайдено під час спроби отримати блокування; спробуйте перезапустити транзакцію."
ER_TABLE_CANT_HANDLE_FT
nla "Het gebruikte tabel type (%s) ondersteund geen FULLTEXT indexen"
eng "The storage engine %s doesn't support FULLTEXT indexes"
@@ -4517,6 +4523,7 @@ ER_CANNOT_ADD_FOREIGN
serbian "Ne mogu da dodam proveru spoljnog ključa na `%s`"
spa "No puede adicionar clave extranjera constraint para `%s`"
swe "Kan inte lägga till 'FOREIGN KEY constraint' för `%s`'"
+ ukr "Не можу додати обмеження зовнішнього ключа Ha `%s`"
ER_NO_REFERENCED_ROW 23000
nla "Kan onderliggende rij niet toevoegen: foreign key beperking gefaald"
eng "Cannot add or update a child row: a foreign key constraint fails"
@@ -4531,6 +4538,7 @@ ER_NO_REFERENCED_ROW 23000
rus "Невозможно добавить или обновить дочернюю строку: проверка ограничений внешнего ключа не выполняется"
spa "No puede adicionar una línea hijo: falla de clave extranjera constraint"
swe "FOREIGN KEY-konflikt: Kan inte skriva barn"
+ ukr "Не вдається додати або оновити дочірній рядок: невдала перевірка обмеження зовнішнього ключа"
ER_ROW_IS_REFERENCED 23000
eng "Cannot delete or update a parent row: a foreign key constraint fails"
fre "Impossible de supprimer un enregistrement père : une constrainte externe l'empèche"
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index 0cc653c29a9..a5d1f62688d 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -880,7 +880,7 @@ int sortcmp(const String *s,const String *t, CHARSET_INFO *cs)
int stringcmp(const String *s,const String *t)
{
uint32 s_len=s->length(),t_len=t->length(),len=MY_MIN(s_len,t_len);
- int cmp= memcmp(s->ptr(), t->ptr(), len);
+ int cmp= len ? memcmp(s->ptr(), t->ptr(), len) : 0;
return (cmp) ? cmp : (int) (s_len - t_len);
}
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index d9736ebf747..561d463ec5e 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -1775,7 +1775,6 @@ func_exit:
void
btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
{
- hash_table_t* table;
buf_block_t* block;
dict_index_t* index;
const rec_t* rec;
@@ -1844,6 +1843,7 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
n_bytes, index->id);
}
+ hash_table_t* const table = btr_get_search_table(index);
bool locked = false;
if (!page_rec_is_infimum(rec) && !rec_is_metadata(rec, index)) {
@@ -1860,7 +1860,6 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
goto function_exit;
}
- table = btr_get_search_table(index);
ha_insert_for_fold(table, ins_fold, block, ins_rec);
}
@@ -1876,7 +1875,6 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
if (!btr_search_enabled || !block->index) {
goto function_exit;
}
- table = btr_get_search_table(index);
}
if (!left_side) {
@@ -1897,7 +1895,6 @@ check_next_rec:
if (!btr_search_enabled || !block->index) {
goto function_exit;
}
- table = btr_get_search_table(index);
}
ha_insert_for_fold(table, ins_fold, block, ins_rec);
@@ -1914,7 +1911,6 @@ check_next_rec:
if (!btr_search_enabled || !block->index) {
goto function_exit;
}
- table = btr_get_search_table(index);
}
if (!left_side) {
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index f2683726151..a890c147055 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2009, 2014, SkySQL Ab.
+ Copyright (c) 2009, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -407,7 +407,9 @@ my_copy_fix_mb(CHARSET_INFO *cs,
src, src + src_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
- memmove(dst, src, (well_formed_length= status->m_source_end_pos - src));
+ well_formed_length= status->m_source_end_pos - src;
+ if (well_formed_length)
+ memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
diff --git a/tests/drop_test.pl b/tests/drop_test.pl
index e4ae5a2671f..6ed05abb7ab 100755
--- a/tests/drop_test.pl
+++ b/tests/drop_test.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2000 MySQL AB
# Use is subject to license terms
diff --git a/tests/fork2_test.pl b/tests/fork2_test.pl
index a05a9b96679..55e494dcedc 100755
--- a/tests/fork2_test.pl
+++ b/tests/fork2_test.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2000, 2001 MySQL AB
# Use is subject to license terms
diff --git a/tests/fork_big.pl b/tests/fork_big.pl
index b5f8770c903..bd048e8fcb0 100755
--- a/tests/fork_big.pl
+++ b/tests/fork_big.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
use strict;
# Copyright (c) 2001, 2006 MySQL AB
diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl
index 7f055609108..d0c17af8cb1 100644
--- a/tests/fork_big2.pl
+++ b/tests/fork_big2.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (c) 2002, 2003, 2005, 2006 MySQL AB
# Use is subject to license terms
diff --git a/tests/index_corrupt.pl b/tests/index_corrupt.pl
index 8194982755a..e40bb7afdbb 100755
--- a/tests/index_corrupt.pl
+++ b/tests/index_corrupt.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2005 MySQL AB
# Use is subject to license terms
diff --git a/tests/insert_and_repair.pl b/tests/insert_and_repair.pl
index 91333746e79..a8e74e5f30e 100755
--- a/tests/insert_and_repair.pl
+++ b/tests/insert_and_repair.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2000, 2001 MySQL AB
# Use is subject to license terms
diff --git a/tests/mail_to_db.pl b/tests/mail_to_db.pl
index 6e5c115f543..bab9e7eb74a 100755
--- a/tests/mail_to_db.pl
+++ b/tests/mail_to_db.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright Abandoned 1998 TCX DataKonsult AB & Monty Program KB & Detron HB
# This file is public domain and comes with NO WARRANTY of any kind
#
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 1711bf64626..edad6453102 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -8534,7 +8534,8 @@ static void test_mem_overun()
char buffer[10000], field[10];
MYSQL_STMT *stmt;
MYSQL_RES *field_res;
- int rc, i, length;
+ int rc, length;
+ unsigned i;
myheader("test_mem_overun");
@@ -8548,7 +8549,7 @@ static void test_mem_overun()
strxmov(buffer, "create table t_mem_overun(", NullS);
for (i= 0; i < 1000; i++)
{
- sprintf(field, "c%d int", i);
+ sprintf(field, "c%u int", i);
strxmov(buffer, buffer, field, ", ", NullS);
}
length= strlen(buffer);
diff --git a/tests/pmail.pl b/tests/pmail.pl
index 97e5914f794..cf46f5a054d 100755
--- a/tests/pmail.pl
+++ b/tests/pmail.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2000, 2005 MySQL AB
# Use is subject to license terms
diff --git a/tests/rename_test.pl b/tests/rename_test.pl
index ec7254a4cf6..aa0befa125d 100755
--- a/tests/rename_test.pl
+++ b/tests/rename_test.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2000, 2001 MySQL AB
# Use is subject to license terms
diff --git a/tests/test_delayed_insert.pl b/tests/test_delayed_insert.pl
index 2f8f97b25c6..f0702e6378b 100755
--- a/tests/test_delayed_insert.pl
+++ b/tests/test_delayed_insert.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2000, 2001 MySQL AB
# Use is subject to license terms
diff --git a/tests/truncate.pl b/tests/truncate.pl
index e83ebab9291..21d469662d9 100755
--- a/tests/truncate.pl
+++ b/tests/truncate.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2002 MySQL AB
# Use is subject to license terms