1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c

on server shutdown after SELECT with CONVERT_TZ

It's wrong to return my_empty_string from val_str().
Removing my_empty_string. Using make_empty_result() instead.
This commit is contained in:
Alexander Barkov
2014-01-28 12:25:29 +04:00
parent 7ea9d1e692
commit f189ed5009
8 changed files with 23 additions and 14 deletions

View File

@ -24,6 +24,8 @@ SET date_format='%Y%m%d';
SET date_format='%Y.%m.%d';
SET date_format='%d.%m.%Y';
SET date_format='%m-%d-%Y';
SET datetime_format= NULL;
ERROR 42000: Variable 'datetime_format' can't be set to the value of 'NULL'
set datetime_format= '%Y%m%d%H%i%s';
set datetime_format= '%Y-%m-%d %H:%i:%s';
set datetime_format= '%m-%d-%y %H:%i:%s.%f';

View File

@ -326,5 +326,11 @@ NULL
Warnings:
Warning 1292 Incorrect datetime value: '00:00:00'
#
# MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c on server shutdown after SELECT with CONVERT_TZ
#
SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' );
CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' )
NULL
#
# End of 5.3 tests
#

View File

@ -32,6 +32,8 @@ SET date_format='%Y.%m.%d';
SET date_format='%d.%m.%Y';
SET date_format='%m-%d-%Y';
--error ER_WRONG_VALUE_FOR_VAR
SET datetime_format= NULL;
set datetime_format= '%Y%m%d%H%i%s';
set datetime_format= '%Y-%m-%d %H:%i:%s';
set datetime_format= '%m-%d-%y %H:%i:%s.%f';

View File

@ -297,6 +297,12 @@ DROP TABLE t1;
SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5');
SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
--echo #
--echo # MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c on server shutdown after SELECT with CONVERT_TZ
--echo #
SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' );
--echo #
--echo # End of 5.3 tests
--echo #