mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 10:15:29 +02:00
Fixed bug when accessing wrong decimal value in dynamic string (Fixed lp:781233)
Store decimal 0.0 in zero bytes in dynamic strings. mysqltest: Don't ignore error from mysql_stmt_fetch; This could cause rows to be missing from log when running with --ps-protocol Fixed wrong result length for CAST(... as TIME) client/mysqltest.cc: Don't ignore error from mysql_stmt_fetch; This could cause rows to be missing from log when running with --ps-protocol libmysql/libmysql.c: The max length for a TIME column is 17, not 15. mysql-test/r/dyncol.result: More tests mysql-test/t/dyncol.test: More tests mysys/ma_dyncol.c: Check content of decimal value on read and store to not get assert in decimal_bin_size(). Store decimal 0.0 in zero bytes in dynamic strings. This also solves a problem where decimal 0 had different internal representations. sql-common/my_time.c: Fixed DBUG_PRINT sql/item_timefunc.h: Fixed wrong result length for CAST(... as TIME). This was the cause of failures in buildbot when doing cast(... as time); sql/protocol.cc: More DBUG_PRINT
This commit is contained in:
parent
3a537679cb
commit
4c81cef75d
8 changed files with 124 additions and 19 deletions
|
|
@ -946,6 +946,12 @@ public:
|
|||
{
|
||||
return tmp_table_field_from_field_type(table, 0);
|
||||
}
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
collation.set(&my_charset_bin);
|
||||
max_length= 17;
|
||||
maybe_null= 1;
|
||||
}
|
||||
bool result_as_longlong() { return TRUE; }
|
||||
longlong val_int();
|
||||
double val_real() { return val_real_from_decimal(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue