Loading Docs/internals.texi +50 −2 Original line number Diff line number Diff line Loading @@ -214,12 +214,15 @@ you will not develop sloppy coding habits. If you can write it in fewer lines, do it (as long as the code will not be slower or much harder to read). @item Don't use two commands on the same line. @item Do not check the same pointer for @code{NULL} more than once. @item Use long function and variable names in English; This makes your code easier to read. Use long function and variable names in English; This makes your code easier to read. Use the 'varible_name' style instead of 'VariableName'. @item Think assembly - make it easier for the compiler to optimize your code. Loading Loading @@ -266,6 +269,25 @@ Any @code{#define}'s are in all-caps. @item Matching @samp{@{} are in the same column. @item Put the @samp{@{} after a 'switch' on the same line @example switch (arg) { @end example Because this gives better overall indentation for the switch statement. @item In all other cases, @{ and @} should be on their own line, except if there is nothing inside @{ @}. @item Have a space after 'if' @item Put a space after ',' for function arguments @item Functions return 0 on success, and non-zero on error, so you can do: Loading @@ -289,6 +311,32 @@ Use pointers rather than array indexing when operating on strings. @end itemize Suggested mode in emacs: @example (load "cc-mode") (setq c-mode-common-hook '(lambda () (turn-on-font-lock) (setq comment-column 48))) (setq c-style-alist (cons '("MY" (c-basic-offset . 2) (c-comment-only-line-offset . 0) (c-offsets-alist . ((statement-block-intro . +) (knr-argdecl-intro . 0) (substatement-open . 0) (label . -) (statement-cont . +) (arglist-intro . c-lineup-arglist-intro-after-paren) (arglist-close . c-lineup-arglist) )) ) c-style-alist)) (c-set-style "MY") (setq c-default-style "MY") @end example @node mysys functions,,, @chapter mysys functions Loading Docs/manual.texi +3 −0 Original line number Diff line number Diff line Loading @@ -47117,6 +47117,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.43 @itemize @bullet @item Fixed a unlikely core-dump bug when doing @code{EXPLAIN SELECT} when using many tables and @code{ORDER BY}. @item Fixed bug in @code{LOAD DATA FROM MASTER} when using table with @code{CHECKSUM=1}. @item myisam/mi_check.c +0 −6 Original line number Diff line number Diff line Loading @@ -1302,11 +1302,8 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, { info->state->data_file_length=sort_info->max_pos; if (param->testflag & T_CALC_CHECKSUM) { DBUG_PRINT("QQ",("set_checksum")); share->state.checksum=param->glob_crc; } } if (!(param->testflag & T_SILENT)) { Loading Loading @@ -2198,10 +2195,7 @@ static int sort_get_next_record(SORT_INFO *sort_info) if (*sort_info->record) { if (param->calc_checksum) { DBUG_PRINT("QQ",("calc_checksum")); param->glob_crc+= mi_static_checksum(info,sort_info->record); } DBUG_RETURN(0); } if (!sort_info->fix_datafile) Loading sql/sql_select.cc +8 −6 Original line number Diff line number Diff line Loading @@ -570,8 +570,9 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, if (!(select_options & SELECT_BIG_RESULT) && ((group && join.const_tables != join.tables && (!simple_group || !test_if_skip_sort_order(&join.join_tab[join.const_tables], group, thd->select_limit,0)) || thd->select_limit,0))) || select_distinct) && join.tmp_table_param.quick_group && !procedure) { Loading @@ -584,10 +585,11 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, order=group; if (order && (join.const_tables == join.tables || (simple_order && test_if_skip_sort_order(&join.join_tab[join.const_tables], order, (join.const_tables != join.tables - 1 || (join.select_options & OPTION_FOUND_ROWS)) ? HA_POS_ERROR : thd->select_limit,0))) HA_POS_ERROR : thd->select_limit,0)))) order=0; select_describe(&join,need_tmp, (order != 0 && Loading Loading
Docs/internals.texi +50 −2 Original line number Diff line number Diff line Loading @@ -214,12 +214,15 @@ you will not develop sloppy coding habits. If you can write it in fewer lines, do it (as long as the code will not be slower or much harder to read). @item Don't use two commands on the same line. @item Do not check the same pointer for @code{NULL} more than once. @item Use long function and variable names in English; This makes your code easier to read. Use long function and variable names in English; This makes your code easier to read. Use the 'varible_name' style instead of 'VariableName'. @item Think assembly - make it easier for the compiler to optimize your code. Loading Loading @@ -266,6 +269,25 @@ Any @code{#define}'s are in all-caps. @item Matching @samp{@{} are in the same column. @item Put the @samp{@{} after a 'switch' on the same line @example switch (arg) { @end example Because this gives better overall indentation for the switch statement. @item In all other cases, @{ and @} should be on their own line, except if there is nothing inside @{ @}. @item Have a space after 'if' @item Put a space after ',' for function arguments @item Functions return 0 on success, and non-zero on error, so you can do: Loading @@ -289,6 +311,32 @@ Use pointers rather than array indexing when operating on strings. @end itemize Suggested mode in emacs: @example (load "cc-mode") (setq c-mode-common-hook '(lambda () (turn-on-font-lock) (setq comment-column 48))) (setq c-style-alist (cons '("MY" (c-basic-offset . 2) (c-comment-only-line-offset . 0) (c-offsets-alist . ((statement-block-intro . +) (knr-argdecl-intro . 0) (substatement-open . 0) (label . -) (statement-cont . +) (arglist-intro . c-lineup-arglist-intro-after-paren) (arglist-close . c-lineup-arglist) )) ) c-style-alist)) (c-set-style "MY") (setq c-default-style "MY") @end example @node mysys functions,,, @chapter mysys functions Loading
Docs/manual.texi +3 −0 Original line number Diff line number Diff line Loading @@ -47117,6 +47117,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.43 @itemize @bullet @item Fixed a unlikely core-dump bug when doing @code{EXPLAIN SELECT} when using many tables and @code{ORDER BY}. @item Fixed bug in @code{LOAD DATA FROM MASTER} when using table with @code{CHECKSUM=1}. @item
myisam/mi_check.c +0 −6 Original line number Diff line number Diff line Loading @@ -1302,11 +1302,8 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, { info->state->data_file_length=sort_info->max_pos; if (param->testflag & T_CALC_CHECKSUM) { DBUG_PRINT("QQ",("set_checksum")); share->state.checksum=param->glob_crc; } } if (!(param->testflag & T_SILENT)) { Loading Loading @@ -2198,10 +2195,7 @@ static int sort_get_next_record(SORT_INFO *sort_info) if (*sort_info->record) { if (param->calc_checksum) { DBUG_PRINT("QQ",("calc_checksum")); param->glob_crc+= mi_static_checksum(info,sort_info->record); } DBUG_RETURN(0); } if (!sort_info->fix_datafile) Loading
sql/sql_select.cc +8 −6 Original line number Diff line number Diff line Loading @@ -570,8 +570,9 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, if (!(select_options & SELECT_BIG_RESULT) && ((group && join.const_tables != join.tables && (!simple_group || !test_if_skip_sort_order(&join.join_tab[join.const_tables], group, thd->select_limit,0)) || thd->select_limit,0))) || select_distinct) && join.tmp_table_param.quick_group && !procedure) { Loading @@ -584,10 +585,11 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, order=group; if (order && (join.const_tables == join.tables || (simple_order && test_if_skip_sort_order(&join.join_tab[join.const_tables], order, (join.const_tables != join.tables - 1 || (join.select_options & OPTION_FOUND_ROWS)) ? HA_POS_ERROR : thd->select_limit,0))) HA_POS_ERROR : thd->select_limit,0)))) order=0; select_describe(&join,need_tmp, (order != 0 && Loading