189
189
This trickery is used to decrease a number of malloc calls.
191
191
virtual String *val_str(String*, String *)=0;
193
* Interpret field value as an integer but return the result as a string.
195
* This is used for printing bit_fields as numbers while debugging.
197
String *val_int_as_str(String *val_buffer, bool unsigned_flag);
199
193
str_needs_quotes() returns true if the value returned by val_str() needs
200
194
to be quoted when used in constructing an SQL query.
262
256
* table, which is located on disk).
264
258
virtual uint32_t pack_length_in_rec() const;
266
Check to see if field size is compatible with destination.
268
This method is used in row-based replication to verify that the slave's
269
field size is less than or equal to the master's field size. The
270
encoded field metadata (from the master or source) is decoded and compared
271
to the size of this field (the slave or destination).
273
@param field_metadata Encoded size in field metadata
275
@retval 0 if this field's size is < the source field's size
276
@retval 1 if this field's size is >= the source field's size
278
virtual int compatible_field_size(uint32_t field_metadata);
279
virtual uint32_t pack_length_from_metadata(uint32_t field_metadata);
282
This method is used to return the size of the data in a row-based
283
replication row record. The default implementation of returning 0 is
284
designed to allow fields that do not use metadata to return true (1)
285
from compatible_field_size() which uses this function in the comparison.
286
The default value for field metadata for fields that do not have
287
metadata is 0. Thus, 0 == 0 means the fields are compatible in size.
289
Note: While most classes that override this method return pack_length(),
290
the classes Field_varstring, and Field_blob return
291
field_length + 1, field_length, and pack_length_no_ptr() respectfully.
293
virtual uint32_t row_pack_length();
296
261
* Return the "real size" of the data in memory.