Hello Tor,
Tor Didriksen a écrit, Le 05.11.2010 16:54:
> Thanks Guilhem, patches look good, only some nitpicks.
>
> -- didrik
>
>
> -static int sort_keyuse(KEYUSE *a,KEYUSE *b);
> -static void set_position(JOIN *join,uint index,JOIN_TAB *table,KEYUSE *key);
>
> -static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
> +static int sort_keyuse(Key_use *a, Key_use *b);
> +static void set_position(JOIN *join, uint index, JOIN_TAB *table,
>
> + Key_use *key);
>
> No need to split this in two lines.
Ok, it looks indeed that the coding style says that 80 chars is ok (for
some reason, my .emacs "fill-column" was set to 78; now changed to 80).
>
> - bool null_rejecting;
> - bool *cond_guard; /* See KEYUSE::cond_guard */
>
> - uint sj_pred_no; /* See KEYUSE::sj_pred_no */
> + bool null_rejecting;
> + bool *cond_guard; ///< @sa Key_use::cond_guard
>
> + uint sj_pred_no; ///< @sa Key_use::sj_pred_no
>
> (setq comment-column 48)
this one has always been in my .emacs, but as I don't use Meta-; it has
no effect (will try to use it now).
I aligned the two comments above to 48.
I find it a bit strange rule by the way. It forces single-line comments
to be shorter than 80-48 = 32 chars. To me, it would be better to allow
pushing the comment a bit to the left if it can fit on one line this
way. But the coding style is the rule...
> + TABLE *table; ///< table owning the index
>
> + Item *val; ///< other side of the equality, or value if no field
> + table_map used_tables; ///< tables used on other side of equality
> + uint key; ///< number of index
>
> + uint keypart; ///< used part of the index
> + uint optimize; ///< 0, or KEY_OPTIMIZE_*
> + key_part_map keypart_map; ///< like keypart, but as a bitmap
>
> + ha_rows ref_table_rows; ///< Estimate of how many rows for a key value
>
>
> Thanks for commenting, could you try to align (most of) them?
They are now aligned thanks to M-; .