Hello,

Probably this mail should go to the internals list :)

I was looking into MySQL Client libaray and I could
figure out the DATA are kept as linked list of
MYSQL_ROW structure i.e. in MYSQL_ROWS being one node.

Now MYSQL_ROW is typedefed as char** that is array of
strings.

Looking into the mysql_fetch_lengths() API code, the
lengths are calculated from the offset between
pointers. Forgive my C knowledge, but I was unable to
understand how we are calculating thru offset. As far
as I can understand this is what is happening:

A MYSQL_ROW is allocated with field_count number of
indexes. Each index is then again my_alloced() to
store information about each each and so on. i.e.

myrow = malloc ( sizeof (char*), field_count );
myrow[0] = malloc ( sizeof(char), field_data );
myrow[1] = malloc ( sizeof(char), field_data );
myrow[2] = malloc ( sizeof(char), field_data );
....

In this case how can we calculate lengths using
offsets? Or I am missing something very stupid. A
little clarity will do hell lot of good to me :)

Any pointers...

Regards
Karam




        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to