mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
moved bdb/innobase to compile-pentium-debug-max
fixed bug in variable assignment in mysqltest fixed coredump on conversion from empty blob/text to date added test case for empty blob conversion to date BUILD/compile-pentium-debug: move bdb/innobase to compile-pentium-debug-max client/mysqltest.c: fixed bug in variable assignment sql/time.cc: fixed coredump on conversion from empty blob/text to date
This commit is contained in:
parent
3b91fce6b8
commit
96c3bd9432
6 changed files with 40 additions and 6 deletions
|
|
@ -8,6 +8,6 @@ c_warnings="$c_warnings $debug_extra_warnings"
|
|||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$pentium_configs $debug_configs"
|
||||
|
||||
extra_configs="$extra_configs --with-berkeley-db --with-innobase"
|
||||
extra_configs="$extra_configs "
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
|
|
|||
13
BUILD/compile-pentium-debug-max
Executable file
13
BUILD/compile-pentium-debug-max
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#! /bin/sh
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$pentium_configs $debug_configs"
|
||||
|
||||
extra_configs="$extra_configs --with-berkeley-db --with-innobase"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
|
@ -241,8 +241,8 @@ static void do_eval(DYNAMIC_STRING* query_eval, const char* query)
|
|||
else
|
||||
{
|
||||
if(!(v = var_get(p, &p, 0)))
|
||||
die("Bad variabled in eval");
|
||||
dynstr_append(query_eval, v->str_val);
|
||||
die("Bad variable in eval");
|
||||
dynstr_append_mem(query_eval, v->str_val, v->str_val_len);
|
||||
}
|
||||
break;
|
||||
case '\\':
|
||||
|
|
@ -436,6 +436,7 @@ VAR* var_get(const char* var_name, const char** var_name_end, int raw)
|
|||
{
|
||||
sprintf(v->str_val, "%d", v->int_val);
|
||||
v->int_dirty = 0;
|
||||
v->str_val_len = strlen(v->str_val);
|
||||
}
|
||||
if(var_name_end)
|
||||
*var_name_end = var_name ;
|
||||
|
|
@ -475,7 +476,7 @@ int var_set(char* var_name, char* var_name_end, char* var_val,
|
|||
die("Out of memory");
|
||||
}
|
||||
memcpy(v->str_val, var_val, val_len-1);
|
||||
v->str_val_len = val_len;
|
||||
v->str_val_len = val_len - 1;
|
||||
v->str_val[val_len] = 0;
|
||||
v->int_val = atoi(v->str_val);
|
||||
return 0;
|
||||
|
|
|
|||
6
mysql-test/r/df_crash.result
Normal file
6
mysql-test/r/df_crash.result
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
month(updated)
|
||||
10
|
||||
NULL
|
||||
year(updated)
|
||||
1999
|
||||
NULL
|
||||
10
mysql-test/t/df_crash.test
Normal file
10
mysql-test/t/df_crash.test
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
drop table if exists db_crash;
|
||||
CREATE TABLE df_crash (
|
||||
updated text
|
||||
) TYPE=MyISAM;
|
||||
INSERT INTO df_crash VALUES ('1999-10-5');
|
||||
insert into df_crash values ('');
|
||||
|
||||
select month(updated) from df_crash;
|
||||
select year(updated) from df_crash;
|
||||
drop table df_crash;
|
||||
|
|
@ -428,11 +428,15 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
|
|||
uint field_length,year_length,digits,i,number_of_fields,date[7];
|
||||
bool date_used=0;
|
||||
const char *pos;
|
||||
const char *end=str+length;
|
||||
DBUG_ENTER("str_to_TIME");
|
||||
DBUG_PRINT("enter",("str: %.*s",length,str));
|
||||
|
||||
for (; !isdigit(*str) && str != end ; str++) ; // Skipp garbage
|
||||
if(!str)
|
||||
DBUG_RETURN(TIMESTAMP_NONE);
|
||||
|
||||
const char *end=str+length;
|
||||
|
||||
for (; !isdigit(*str) && str != end ; str++) ; // Skip garbage
|
||||
if (str == end)
|
||||
DBUG_RETURN(TIMESTAMP_NONE);
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue