diff options
author | unknown <holyfoot/hf@hfmain.(none)> | 2007-07-22 14:03:53 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@hfmain.(none)> | 2007-07-22 14:03:53 +0500 |
commit | e97dc8a936700d3a53d40352729e77c6d054015f (patch) | |
tree | 3606f2c23939191c319f01ada7109cff7b5eb6cb /sql-common | |
parent | d3294a6051558535f8895a2b2f8512e0749a155c (diff) | |
parent | eee081dae7e2b1974cb3fe394cf984d7b3a03659 (diff) | |
download | mariadb-git-e97dc8a936700d3a53d40352729e77c6d054015f.tar.gz |
Merge mysql.com:/home/hf/work/29494/my50-29494
into mysql.com:/home/hf/work/29494/my51-29494
sql-common/client.c:
Auto merged
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 6d63c457390..cdf9eed8574 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1226,12 +1226,12 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, /* fields count may be wrong */ DBUG_ASSERT((uint) (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]); - field->table = strdup_root(alloc,(char*) row->data[2]); - field->org_table= strdup_root(alloc,(char*) row->data[3]); - field->name = strdup_root(alloc,(char*) row->data[4]); - field->org_name = strdup_root(alloc,(char*) row->data[5]); + field->catalog= strmake_root(alloc,(char*) row->data[0], lengths[0]); + field->db= strmake_root(alloc,(char*) row->data[1], lengths[1]); + field->table= strmake_root(alloc,(char*) row->data[2], lengths[2]); + field->org_table= strmake_root(alloc,(char*) row->data[3], lengths[3]); + field->name= strmake_root(alloc,(char*) row->data[4], lengths[4]); + field->org_name= strmake_root(alloc,(char*) row->data[5], lengths[5]); field->catalog_length= lengths[0]; field->db_length= lengths[1]; @@ -1252,7 +1252,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, field->flags|= NUM_FLAG; if (default_value && row->data[7]) { - field->def=strdup_root(alloc,(char*) row->data[7]); + field->def=strmake_root(alloc,(char*) row->data[7], lengths[7]); field->def_length= lengths[7]; } else |