1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fixes to make mysql-test-run --embedded-server working

This commit is contained in:
hf@deer.(none)
2004-12-02 16:08:17 +04:00
parent 733f33cc7c
commit 71bfbbdcd0
20 changed files with 23235 additions and 9 deletions

View File

@@ -427,8 +427,17 @@ static void set_param_date(Item_param *param, uchar **pos, ulong len)
#else/*!EMBEDDED_LIBRARY*/
void set_param_time(Item_param *param, uchar **pos, ulong len)
{
MYSQL_TIME *to= (MYSQL_TIME*)*pos;
param->set_time(to, MYSQL_TIMESTAMP_TIME,
MYSQL_TIME tm= *((MYSQL_TIME*)*pos);
tm.hour+= tm.day * 24;
tm.day= tm.year= tm.month= 0;
if (tm.hour > 838)
{
/* TODO: add warning 'Data truncated' here */
tm.hour= 838;
tm.minute= 59;
tm.second= 59;
}
param->set_time(&tm, MYSQL_TIMESTAMP_TIME,
MAX_TIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN);
}