Bug #45180 Numerous coding style violations in the maria code, operator =
Submitted: 29 May 2009 1:09 Modified: 18 Mar 2010 10:37
Reporter: Marc ALFF Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S1 (Critical)
Version:mysql-6.0-maria OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[29 May 2009 1:09] Marc ALFF
Description:
The use of the operator '=' should follow this style:
foo= "ok";
but not this:
foo = "bad";

Example of violations:

ma_check.c:    int success = mlockall(MCL_CURRENT);     /* or plock(DATLOCK); */
ma_check.c:  share->kfile.file = -1;
ma_create.c:  share.state.dellink = HA_OFFSET_ERROR;
ma_create.c:  share.base.keystart = share.state.state.key_file_length=
ma_create.c:    share->bitmap.file.file = dfile;
ma_dynrec.c:    info->s->state.dellink = filepos;
ma_dynrec.c:    if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL)
ma_dynrec.c:    *packpos++ = (uchar) flag;
ma_dynrec.c:    if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL)
ma_dynrec.c:    if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL &&
ma_info.c:    x->filenr  = info->dfile.file;
ma_info.c:    x->options         = share->options;
ma_info.c:    x->data_file_name   = share->data_file_name.str;
ma_info.c:    x->index_file_name  = share->index_file_name.str;
ma_info.c:    x->data_file_type   = share->data_file_type;

etc.

Not every occurence of " = " is a violation since some might be located
inside comments, but still: the result of
  storage/maria> grep " = " *.c | wc -l
is currently 178, in mysql-6.0

How to repeat:
Read the code, read the coding style.
[29 May 2009 5:38] Sveta Smirnova
Thank you for the report.

Verified as described.