summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2016-06-25 20:55:43 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-30 11:43:02 +0200
commit2fe8dd0f90e2bbe0180e30c36ebc9132fcdd4b06 (patch)
tree4d84b1ddb3e0af4660d52c0ac1792e85c652fc0d /sql/unireg.cc
parentdb7edfed17efe6bc3684b0fbacc0b0249e4f0fa2 (diff)
downloadmariadb-git-2fe8dd0f90e2bbe0180e30c36ebc9132fcdd4b06.tar.gz
various cleanups
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index c99266dbff1..463822e52e8 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -604,8 +604,8 @@ static bool pack_header(THD *thd, uchar *forminfo,
MTYP_NOEMPTY_BIT);
no_empty++;
}
- /*
- We mark first TIMESTAMP field with NOW() in DEFAULT or ON UPDATE
+ /*
+ We mark first TIMESTAMP field with NOW() in DEFAULT or ON UPDATE
as auto-update field.
*/
if (field->sql_type == MYSQL_TYPE_TIMESTAMP &&
@@ -768,8 +768,7 @@ static size_t packed_fields_length(List<Create_field> &create_fields)
length+= strlen(field->field_name)+1;
length+= field->comment.length;
}
- length++;
- length++;
+ length+= 2;
DBUG_RETURN(length);
}
@@ -818,7 +817,7 @@ static bool pack_fields(uchar **buff_arg, List<Create_field> &create_fields,
DBUG_ASSERT(field->unireg_check < 256);
buff[10]= (uchar) field->unireg_check;
buff[12]= (uchar) field->interval_id;
- buff[13]= (uchar) field->sql_type;
+ buff[13]= (uchar) field->sql_type;
if (field->sql_type == MYSQL_TYPE_GEOMETRY)
{
buff[11]= 0;
@@ -910,7 +909,6 @@ static bool pack_fields(uchar **buff_arg, List<Create_field> &create_fields,
*buff++= sep;
}
*buff++= 0;
-
}
}
}