Hi,
I'm getting mad with some aspects that aren't so clear just reading the source code and
the documentation available (to me, MySQL
Internals documentation could and should be more comprehensive, deepening many other
aspects and details; is there any project
documentation as uml and so on?): I hope you can explain some of these and help me figure
out the point from where to start my
modifications.
First of all, in a table struct what are "fields" and what are "records"? How do they
relates with each other and with the so named
"items"? Which of these structures stores a row?
Secondly: I'm analyzing sql_insert.cc, just as a starting point. I've followed all the
code from "mysql_insert" on and I've found that the
junction point with the handler is the instruction: "write_record(thd, table ,&info)";
in fact, following "write_record()", it can be found
that in the simpliest of the situations, the handler instruction invoked is
ha_write_row(table->record[0]), which seems to just write out a
buffer (the "table->record[0]" that I didn't understand what precisely is) in a custom
way that depends on the storage engine. Now my main
question is: if, as said, a blob is stored in memory as a lenght and a pointer (in a blob
field there is the "String value" which stores
the real data, isn't it?), how and where the pointed data is inserted in the buffer that
then the handler writes out (when, of course, the
storage engine supports blobs)?
I hope it was all almost clear. Thanks.
Manu
Naviga e telefona senza limiti con Tiscali
Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
http://abbonati.tiscali.it/adsl/