diff options
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 2 | ||||
-rw-r--r-- | sql-common/my_time.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index ea158c2a3c9..44b7940a503 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1216,6 +1216,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, for (row=data->data; row ; row = row->next,field++) { uchar *pos; + /* fields count may be wrong */ + DBUG_ASSERT ((field - result) < fields); cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7); field->catalog = strdup_root(alloc,(char*) row->data[0]); field->db = strdup_root(alloc,(char*) row->data[1]); diff --git a/sql-common/my_time.c b/sql-common/my_time.c index ced2a805ae5..fb27fb74872 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -76,8 +76,8 @@ uint calc_days_in_year(uint year) 1 error */ -static my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, - ulong flags, int *was_cut) +my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, + ulong flags, int *was_cut) { if (not_zero_date) { |