maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #06699
Re: Review request for a fix for MDEV-5506
Hi, Alexander!
Few questions, see below.
> === modified file 'mysql-test/t/timezone2.test'
> --- mysql-test/t/timezone2.test 2013-08-08 08:58:28 +0000
> +++ mysql-test/t/timezone2.test 2014-01-23 10:34:46 +0000
> @@ -298,5 +298,11 @@ SELECT CONVERT_TZ(TIME('00:00:00'),'+00:
> 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' );
hmm, the bug description was "at shutdown". I don't see a shutdown in
your test case. I suppose, you assume that the server will be eventually
shut down and that'll do. But perhaps it needs to be shut down
immediately, and if mtr will do a lot of work in this server the test
case becomes invalid - it won't crash anymore?
> === modified file 'sql/item_strfunc.cc'
> --- sql/item_strfunc.cc 2013-09-25 12:30:13 +0000
> +++ sql/item_strfunc.cc 2014-01-23 10:17:57 +0000
> @@ -43,7 +43,7 @@ C_MODE_END
> /**
> @todo Remove this. It is not safe to use a shared String object.
> */
I guess, you've fixed that and can remove the comment.
> -String my_empty_string("",default_charset_info);
> +String_const my_empty_string("", default_charset_info);
>
> === modified file 'sql/sql_string.h'
> --- sql/sql_string.h 2012-11-09 08:11:20 +0000
> +++ sql/sql_string.h 2014-01-23 10:26:13 +0000
> @@ -56,25 +56,52 @@ uint convert_to_printable(char *to, size
>
> class String
> {
> + typedef enum
> + {
> + STRING_FLAG_NONE= 0,
> + STRING_FLAG_ALLOCED= 1,
> + STRING_FLAG_READ_ONLY= 2,
> + STRING_FLAG_NULL_TERMINATED= 4
> + } flag_t;
> char *Ptr;
> uint32 str_length,Alloced_length, extra_alloc;
> - bool alloced;
> + flag_t flags;
> CHARSET_INFO *str_charset;
Okay, I understand what you did. But I don't understand why.
What was the problem? Why there was a crash?
Regards,
Sergei
Follow ups