1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-12 08:01:43 +03:00

branches/zip: Add const qualifiers to the functions that read MySQL data.

row_mysql_read_true_varchar(), row_mysql_read_blob_ref(),
row_mysql_store_col_in_innobase_format(),
row_sel_convert_mysql_key_to_innobase(): Add const qualifiers.

row_sel_convert_mysql_key_to_innobase(): Document that the first parameter
is in/out.
This commit is contained in:
marko
2007-08-03 07:09:29 +00:00
parent 60c44c3a5f
commit c99c5c240a
5 changed files with 58 additions and 51 deletions

View File

@@ -47,14 +47,16 @@ row_mysql_store_true_var_len(
Reads a >= 5.0.3 format true VARCHAR length, in the MySQL row format, and
returns a pointer to the data. */
byte*
const byte*
row_mysql_read_true_varchar(
/*========================*/
/* out: pointer to the data, we skip the 1 or 2 bytes
at the start that are used to store the len */
ulint* len, /* out: variable-length field length */
byte* field, /* in: field in the MySQL format */
ulint lenlen);/* in: storage length of len: either 1 or 2 bytes */
/* out: pointer to the data, we skip
the 1 or 2 bytes at the start that are
used to store the len */
ulint* len, /* out: variable-length field length */
const byte* field, /* in: field in the MySQL format */
ulint lenlen);/* in: storage length of len: either 1
or 2 bytes */
/***********************************************************************
Stores a reference to a BLOB in the MySQL format. */
@@ -70,14 +72,15 @@ row_mysql_store_blob_ref(
/***********************************************************************
Reads a reference to a BLOB in the MySQL format. */
byte*
const byte*
row_mysql_read_blob_ref(
/*====================*/
/* out: pointer to BLOB data */
ulint* len, /* out: BLOB length */
byte* ref, /* in: BLOB reference in the MySQL format */
ulint col_len); /* in: BLOB reference length (not BLOB
length) */
/* out: pointer to BLOB data */
ulint* len, /* out: BLOB length */
const byte* ref, /* in: BLOB reference in the
MySQL format */
ulint col_len); /* in: BLOB reference length
(not BLOB length) */
/******************************************************************
Stores a non-SQL-NULL field given in the MySQL format in the InnoDB format.
The counterpart of this function is row_sel_field_store_in_mysql_format() in
@@ -101,7 +104,7 @@ row_mysql_store_col_in_innobase_format(
format differs in a row and in a
key value: in a key value the length
is always stored in 2 bytes! */
byte* mysql_data, /* in: MySQL column value, not
const byte* mysql_data, /* in: MySQL column value, not
SQL NULL; NOTE that dfield may also
get a pointer to mysql_data,
therefore do not discard this as long