List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:May 19 2002 2:28pm
Subject:MyISAM Database Static Row Header
View as plain text  

>>>>> "Mike" == Mike Grover <mike@stripped> writes:

Mike> Let me Re Explain my question..
Mike> I am looking for the code that shows what the data is for the first
Mike> field In a Static MyISAM Database record row, And how to set it for Null
Mike> fields.

Mike>  Thanks, Mike

Before the first field in a MyISAM table, there is a bit-map for each
field that can be NULL.  (This is number-of-null-fields/8+1 byte

The first bit (ascii value 1) is always set, as a marker that the row
is not deleted.

To set a NULL - field, you have to set the corresponding bit to 0 and
then set the corresponding bytes in the field to the value you want.

From 'myisamchk -dvv' you can deduce the start position for each
field. (The first field in this map is the null-bits).


For technical support contracts, goto
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius <monty@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland

MyISAM Database Static Row HeaderMike Grover13 May
  • MyISAM Database Static Row HeaderMichael Widenius19 May