diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-08-13 23:49:10 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-08-13 23:49:10 +0400 |
commit | c1599821a55ac4f59c5c799480a07913e1c26daa (patch) | |
tree | 0c064252ad3959fcd53b0f06a40b98d691fe070e /sql-common | |
parent | 624dd71b9419555eca8baadc695e3376de72286f (diff) | |
parent | c4fd167d5a740f67ee5287a9b05b5383403b9ed0 (diff) | |
download | mariadb-git-c1599821a55ac4f59c5c799480a07913e1c26daa.tar.gz |
Merge remote-tracking branch 'origin/10.4' into 10.5
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client_plugin.c | 8 | ||||
-rw-r--r-- | sql-common/my_time.c | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index b15203cd9be..4faf05847d8 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -362,7 +362,13 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type, mysql->options.extension && mysql->options.extension->plugin_dir ? mysql->options.extension->plugin_dir : PLUGINDIR, "/", name, SO_EXT, NullS); - + + if (strpbrk(name, "()[]!@#$%^&/*;.,'?\\")) + { + errmsg= "invalid plugin name"; + goto err; + } + DBUG_PRINT ("info", ("dlopeninig %s", dlpath)); /* Open new dll handle */ if (!(dlhandle= dlopen(dlpath, RTLD_NOW))) diff --git a/sql-common/my_time.c b/sql-common/my_time.c index b8054aa2c23..22ea32e5076 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -1728,7 +1728,11 @@ longlong number_to_datetime_or_date(longlong nr, ulong sec_part, !check_date(time_res, nr || sec_part, flags, was_cut)) { if (time_res->time_type == MYSQL_TIMESTAMP_DATE && sec_part != 0) - *was_cut= MYSQL_TIME_NOTE_TRUNCATED; + { + /* Date format, but with fractional digits, e.g. 20010203.5 */ + *was_cut= MYSQL_TIME_NOTE_TRUNCATED; + time_res->second_part= 0; + } return nr; } |