summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorgkodinov@dl145s.mysql.com <>2006-11-28 17:14:16 +0100
committergkodinov@dl145s.mysql.com <>2006-11-28 17:14:16 +0100
commit32c9e11df9e76454a3a0b49004f29722cc28295f (patch)
tree83a78303b4c4267413216f751a1b6558df61ee99 /sql-common
parent93f246d4c196d813f3870586534372d13b51fb03 (diff)
parentb7e72c7ba917c9c445c14f0338032c2fc4351d72 (diff)
downloadmariadb-git-32c9e11df9e76454a3a0b49004f29722cc28295f.tar.gz
Merge bk-internal:/home/bk/mysql-5.1
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c2
-rw-r--r--sql-common/my_time.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 4ca62e0649a..7d6f7024727 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1211,6 +1211,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 cdd18fd0051..886be050bf0 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)
{