Muhammad Waqas Iftikhar <[email protected]> writes:
> I have been exploring the place where innodb and MySQL connects with each
> other. The handler class and write row function.
> The MySQL column value contains a hex escape character "\x" with every
> column value.
> By changing this value in code (replacing it) the length of the
> data(string) to be stored is effected.
> for \x3 3 characters are stored (3 bytes).
> for \x4 4 character are stored.
> for \x10 12 characters can be stored probably even more.
> Removing this character will store string of any length I replace in MySQL
> whole row (buffer in memory) and when retrieving it will also return some
> text which I did not place i.e. path of innodb folder/project.

VARCHAR formats are fixed size in the row buffer, the first 1 or 2 bytes
(depending on how large the VARCHAR column can be) specify the length of
the column that is valid. The non-valid part of the column in the row
buffer should be considered uninitialized.

e.g.

VARCHAR(16)
[10]01234567890abcdef

length of 10 means that abcdef is unititialized data and should not be read.

-- 
Stewart Smith

Attachment: pgpFGUmH1Afbx.pgp
Description: PGP signature

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to