Commit 94868914 authored by Alexander Barkov's avatar Alexander Barkov

merge 5.3 -> 5.5

parents 4bf002d6 f189ed50
......@@ -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
#
......@@ -32,6 +32,8 @@ ORDER BY variable_name;
# 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';
......
......@@ -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 #
......@@ -61,11 +61,6 @@ C_MODE_END
size_t username_char_length= 16;
/**
@todo Remove this. It is not safe to use a shared String object.
*/
String my_empty_string("",default_charset_info);
/*
For the Items which have only val_str_ascii() method
and don't have their own "native" val_str(),
......@@ -103,7 +98,6 @@ String *Item_str_func::val_str_from_val_str_ascii(String *str, String *str2)
}
/*
Convert an array of bytes to a hexadecimal representation.
......@@ -2481,7 +2475,7 @@ String *Item_func_make_set::val_str(String *str)
ulonglong bits;
bool first_found=0;
Item **ptr=args+1;
String *result=&my_empty_string;
String *result= make_empty_result();
bits=args[0]->val_int();
if ((null_value=args[0]->null_value))
......
......@@ -1061,6 +1061,4 @@ public:
String *val_str(String *);
};
extern String my_empty_string;
#endif /* ITEM_STRFUNC_INCLUDED */
......@@ -2284,6 +2284,7 @@ bool select_result::check_simple_select() const
static String default_line_term("\n",default_charset_info);
static String default_escaped("\\",default_charset_info);
static String default_field_term("\t",default_charset_info);
static String default_enclosed_and_line_start("", default_charset_info);
static String default_xml_row_term("<row>", default_charset_info);
sql_exchange::sql_exchange(char *name, bool flag,
......@@ -2292,7 +2293,7 @@ sql_exchange::sql_exchange(char *name, bool flag,
{
filetype= filetype_arg;
field_term= &default_field_term;
enclosed= line_start= &my_empty_string;
enclosed= line_start= &default_enclosed_and_line_start;
line_term= filetype == FILETYPE_CSV ?
&default_line_term : &default_xml_row_term;
escaped= &default_escaped;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment