  | |  | bk commit - MyODBC 3.51 (1.491) | bk commit - MyODBC 3.51 (1.491) 2005-08-11 - By Bogdan Degtyariov
Back Below is the list of changes that have just been commited into a local MyODBC 3.51 repository of 'bdegtyariov'. When 'bdegtyariov' does a push, they will be propogaged to the main repository and within 2 hours after the push into the public repository.
For more information on how to access the public repository see: http://www.mysql.com/products/myodbc/faq_2.html#Development_source
You can also browse the changes from public repository: Complete repository: http://mysql.bkbits.net:8080/myodbc3/ This changeset : http://mysql.bkbits.net:8080/myodbc3/cset@(protected)
ChangeSet 1.491 05/08/11 22:13:54 bdegtyariov@(protected) +1 -0 catalog.c: fixed bug #4519 with more than 18 foreign keys and #8100 with the quoting
driver/catalog.c 1.49 05/08/11 22:10:25 bdegtyariov@(protected) +13 -7 fixed bug #4519 with more than 18 foreign keys and #8100 with the quoting
# This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: bdegtyariov # Host: suse3000. # Root: /home/bdegtyariov/myodbc-3.51
--- 1.48/driver/catalog.c 2005-08-11 20:33:52 +03:00 +++ 1.49/driver/catalog.c 2005-08-11 22:10:25 +03:00 @@ -1868,6 +1868,7 @@ MEM_ROOT *alloc; MYSQL_ROW row; char **data; + char **tempdata; /* We need this array for the cases if key count is greater than 18 */ char PkQualifier_buff[NAME_LEN+1],PkName_buff[NAME_LEN+1], *PkTableQualifier,*PkTableName; char FkQualifier_buff[NAME_LEN+1],FkName_buff[NAME_LEN+1], @@ -1893,13 +1894,13 @@ goto empty_set; } pthread_mutex_unlock(&stmt->dbc->lock); - stmt->result_array= (char**) my_malloc(sizeof(char*)*SQLFORE_KEYS _FIELDS* - (ulong)stmt->result->field _count, + tempdata= (char**) my_malloc(sizeof(char*)*SQLFORE_KEYS_FIELDS* + 64, /* Maximum index count */ MYF(MY_FAE | MY_ZEROFILL)); /* Convert mysql fields to data that odbc wants */ alloc= &stmt->result->field_alloc; - data= stmt->result_array; + data= tempdata; comment_id= stmt->result->field_count-1; while ( (row= mysql_fetch_row(stmt->result)) ) @@ -1907,7 +1908,7 @@ if ( (row[1] && strcmp(row[1],"InnoDB")==0) ) { const char *token,*pktoken,*fk_cols_start,*pk_cols_start; - char *comment_token, ref_token[NAME_LEN+1], tmpbuff[NAME _LEN+1]; + char *comment_token, ref_token[NAME_LEN+1]; char *pkcomment,*fkcomment; uint key_seq,pk_length,fk_length; @@ -1930,10 +1931,9 @@ continue; fk_length= (uint)((token-1)-fk_cols_start); - if ( !(token= my_next_token(token+7,&comment_token,ref _token,'/')) ) + if ( !(token= my_next_token(token+8,&comment_token,ref _token,'/')) ) continue; - strcpy(ref_token, - strcpy(tmpbuff, ref_token+1)); /* Remove first quot character */ + data[0]= strdup_root(alloc,ref_token); /* PKTABLE_CAT */ if ( !(token= my_next_token(token,&comment_token,ref_token ,'(')) || @@ -1999,6 +1999,12 @@ } while ( comment_token = strchr(comment_token,';') );/* multi table ref */ } } + + /* Copy only the elements that contain fk names */ + stmt->result_array= (MYSQL_ROW) my_memdup((gptr) tempdata, + sizeof(char*)*SQLFORE_KEYS _FIELDS*row_count, + MYF(0)); + my_free((gptr)tempdata, MYF(0)); } else /* NO FOREIGN KEY support from SERVER */ {
-- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=mysql@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |