Loading client/mysqltest.c +9 −4 Original line number Diff line number Diff line Loading @@ -3616,19 +3616,24 @@ static int run_query_stmt(MYSQL *mysql, struct st_query *q, int flags) /* Read result from each column */ for (col_idx= 0; col_idx < num_fields; col_idx++) { /* FIXME is string terminated? */ const char *val= (const char *)bind[col_idx].buffer; ulonglong len= *bind[col_idx].length; const char *val; ulonglong len; if (col_idx < max_replace_column && replace_column[col_idx]) { val= replace_column[col_idx]; len= strlen(val); } if (*bind[col_idx].is_null) else if (*bind[col_idx].is_null) { val= "NULL"; len= 4; } else { /* FIXME is string terminated? */ val= (const char *) bind[col_idx].buffer; len= *bind[col_idx].length; } if (!display_result_vertically) { if (col_idx) /* No tab before first col */ Loading myisam/mi_check.c +1 −1 Original line number Diff line number Diff line Loading @@ -1848,7 +1848,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, if (sort_one_index(param,info,keyinfo,next_page,new_file)) { DBUG_PRINT("error", ("From page: %ld, keyoffset: 0x%lx used_length: %d", ("From page: %ld, keyoffset: %lu used_length: %d", (ulong) pagepos, (ulong) (keypos - buff), (int) used_length)); DBUG_DUMP("buff",(byte*) buff,used_length); Loading mysql-test/r/update.result +8 −0 Original line number Diff line number Diff line Loading @@ -337,3 +337,11 @@ a b 22 3 23 3 drop table t1; create table t1 (f1 date not null); insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; f1 2000-01-01 2002-02-02 drop table t1; mysql-test/t/update.test +9 −0 Original line number Diff line number Diff line Loading @@ -260,5 +260,14 @@ update t1 set a=a+11,b=2 order by a limit 3; update t1 set a=a+12,b=3 order by a limit 3; select * from t1 order by a; drop table t1; # # Bug#14186 select datefield is null not updated # create table t1 (f1 date not null); insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; drop table t1; # End of 4.1 tests sql/item_func.cc +1 −0 Original line number Diff line number Diff line Loading @@ -1378,6 +1378,7 @@ my_decimal *Item_func_abs::decimal_op(my_decimal *decimal_value) void Item_func_abs::fix_length_and_dec() { Item_func_num1::fix_length_and_dec(); maybe_null= 1; } Loading Loading
client/mysqltest.c +9 −4 Original line number Diff line number Diff line Loading @@ -3616,19 +3616,24 @@ static int run_query_stmt(MYSQL *mysql, struct st_query *q, int flags) /* Read result from each column */ for (col_idx= 0; col_idx < num_fields; col_idx++) { /* FIXME is string terminated? */ const char *val= (const char *)bind[col_idx].buffer; ulonglong len= *bind[col_idx].length; const char *val; ulonglong len; if (col_idx < max_replace_column && replace_column[col_idx]) { val= replace_column[col_idx]; len= strlen(val); } if (*bind[col_idx].is_null) else if (*bind[col_idx].is_null) { val= "NULL"; len= 4; } else { /* FIXME is string terminated? */ val= (const char *) bind[col_idx].buffer; len= *bind[col_idx].length; } if (!display_result_vertically) { if (col_idx) /* No tab before first col */ Loading
myisam/mi_check.c +1 −1 Original line number Diff line number Diff line Loading @@ -1848,7 +1848,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, if (sort_one_index(param,info,keyinfo,next_page,new_file)) { DBUG_PRINT("error", ("From page: %ld, keyoffset: 0x%lx used_length: %d", ("From page: %ld, keyoffset: %lu used_length: %d", (ulong) pagepos, (ulong) (keypos - buff), (int) used_length)); DBUG_DUMP("buff",(byte*) buff,used_length); Loading
mysql-test/r/update.result +8 −0 Original line number Diff line number Diff line Loading @@ -337,3 +337,11 @@ a b 22 3 23 3 drop table t1; create table t1 (f1 date not null); insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; f1 2000-01-01 2002-02-02 drop table t1;
mysql-test/t/update.test +9 −0 Original line number Diff line number Diff line Loading @@ -260,5 +260,14 @@ update t1 set a=a+11,b=2 order by a limit 3; update t1 set a=a+12,b=3 order by a limit 3; select * from t1 order by a; drop table t1; # # Bug#14186 select datefield is null not updated # create table t1 (f1 date not null); insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; drop table t1; # End of 4.1 tests
sql/item_func.cc +1 −0 Original line number Diff line number Diff line Loading @@ -1378,6 +1378,7 @@ my_decimal *Item_func_abs::decimal_op(my_decimal *decimal_value) void Item_func_abs::fix_length_and_dec() { Item_func_num1::fix_length_and_dec(); maybe_null= 1; } Loading