summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c2
-rw-r--r--sql-common/my_time.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 9fca38f3857..7bf9c90254d 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -727,6 +727,7 @@ void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate)
static void cli_flush_use_result(MYSQL *mysql)
{
/* Clear the current execution status */
+ DBUG_ENTER("cli_flush_use_result");
DBUG_PRINT("warning",("Not all packets read, clearing them"));
for (;;)
{
@@ -744,6 +745,7 @@ static void cli_flush_use_result(MYSQL *mysql)
break; /* End of data */
}
}
+ DBUG_VOID_RETURN;
}
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 93549f7340c..be349285b88 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -742,9 +742,13 @@ void set_zero_time(MYSQL_TIME *tm)
int my_time_to_str(const MYSQL_TIME *l_time, char *to)
{
+ uint extra_hours= 0;
+ /* Get extra hours, if we are getting data from the server */
+ if (l_time->year == 0 && l_time->month == 0)
+ extra_hours= l_time->day*24;
return my_sprintf(to, (to, "%s%02d:%02d:%02d",
(l_time->neg ? "-" : ""),
- l_time->hour,
+ extra_hours+ l_time->hour,
l_time->minute,
l_time->second));
}