summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-07-02 23:50:56 +0300
committerMonty <monty@mariadb.org>2020-07-02 23:50:56 +0300
commit53ecc354e398ead01b4dbf2d77170dafc29debd2 (patch)
tree75e4dd943eca85d37401821ae469fdcace0c66f4
parentb6ec1e8bbf0ffca2d715aded694722e0c4b5d484 (diff)
downloadmariadb-git-53ecc354e398ead01b4dbf2d77170dafc29debd2.tar.gz
Fixed errors found by MSAN
-rw-r--r--libmysqld/libmysql.c1
-rw-r--r--mysql-test/main/mysql_upgrade.test2
-rw-r--r--mysql-test/suite/csv/read_only.test1
-rw-r--r--sql/sql_load.cc4
4 files changed, 5 insertions, 3 deletions
diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c
index 8c80e1a3f54..c4b3a17f508 100644
--- a/libmysqld/libmysql.c
+++ b/libmysqld/libmysql.c
@@ -1141,6 +1141,7 @@ my_bool STDCALL mysql_embedded(void)
void my_net_local_init(NET *net)
{
net->max_packet= (uint) net_buffer_length;
+ net->read_timeout= net->write_timeout= 0;
my_net_set_read_timeout(net, CLIENT_NET_READ_TIMEOUT);
my_net_set_write_timeout(net, CLIENT_NET_WRITE_TIMEOUT);
net->retry_count= 1;
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index 0171fe6c7ba..a3d8ba0375c 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -17,7 +17,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
--echo Run it again - should say already completed
---replace_result $MYSQL_SERVER_VERSION VERSION
+--replace_regex /upgraded to .*, use/upgraded to VERSION, use/
--exec $MYSQL_UPGRADE 2>&1
# It should have created a file in the MySQL Servers datadir
diff --git a/mysql-test/suite/csv/read_only.test b/mysql-test/suite/csv/read_only.test
index 2af209182d0..a3c851a6a70 100644
--- a/mysql-test/suite/csv/read_only.test
+++ b/mysql-test/suite/csv/read_only.test
@@ -1,3 +1,4 @@
+--source include/not_as_root.inc
#
# MDEV-11883 MariaDB crashes with out-of-memory when query information_schema
#
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index d5692196457..09af120e6cf 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -2031,8 +2031,8 @@ int READ_INFO::read_xml(THD *thd)
case '=': /* attribute name end - read the value */
//check for tag field and attribute name
- if(!memcmp(tag.c_ptr_safe(), STRING_WITH_LEN("field")) &&
- !memcmp(attribute.c_ptr_safe(), STRING_WITH_LEN("name")))
+ if(!strcmp(tag.c_ptr_safe(), "field") &&
+ !strcmp(attribute.c_ptr_safe(), "name"))
{
/*
this is format <field name="xx">xx</field>