diff options
author | unknown <monty@mishka.local> | 2005-05-06 11:39:30 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2005-05-06 11:39:30 +0300 |
commit | ab54e167052bb03f7f25cb071ee75f4f26caf68f (patch) | |
tree | 9bc36292e6c63e524c34d371f01eb8a1ec82d9ee /sql/opt_range.cc | |
parent | 21eed96b0261a6c6eff4f8df1493a0e57decf2bb (diff) | |
download | mariadb-git-ab54e167052bb03f7f25cb071ee75f4f26caf68f.tar.gz |
Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows)
Fixed possible core dump in information schema
client/client_priv.h:
--count for mysqlshow
client/mysqlshow.c:
Added option --count to be used when the user want's number of rows per table in the output
(We shouldn't use count(*) as default as this can be a slow operation)
mysys/my_thr_init.c:
Correct comment
sql/ha_berkeley.cc:
Remove not used variable
sql/ha_berkeley.h:
Remove not used variable
sql/ha_innodb.cc:
Remove not used function
sql/ha_ndbcluster.cc:
false -> FALSE
true -> TRUE
sql/handler.cc:
Added and fixed comments
Remove 'strange' code to remove compiler warnings (better to do things like this with attribute)
sql/item.cc:
false -> FALSE
sql/item_cmpfunc.cc:
Fixed indentation
sql/item_cmpfunc.h:
marked BETWEEN as a bool function
sql/item_func.cc:
Simple optimzation
sql/key.cc:
Removed wrong code
sql/log.cc:
Check result from open_index_file()
sql/mysql_priv.h:
Simplyfy some test of netware
sql/mysqld.cc:
Fixed indentation
Check result form open_index_file()
Simplify code with IF_NETWARE()
sql/opt_range.cc:
false -> FALSE
true -> TRUE
Fixed indentation
sql/opt_sum.cc:
Fixed comments
sql/sp_head.cc:
Simple optimzation
Move variable declarations to begining of blocks
sql/sql_acl.cc:
Fix long lines
Rename xx -> column
Move declaration to beginning of block
sql/sql_parse.cc:
Removed comment
sql/sql_select.cc:
Indentation fixes
sql/sql_show.cc:
Fixed reference outside of array (possible core dump)
sql/sql_table.cc:
Simplify code
Combine common code
sql/sql_test.cc:
false -> FALSE
sql/sql_trigger.cc:
false -> false
true -> TRUE
sql/sql_yacc.yy:
Simpler test
sql/unireg.cc:
Added comment
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 95fe003770b..297e625d075 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -853,7 +853,7 @@ QUICK_ROR_INTERSECT_SELECT::QUICK_ROR_INTERSECT_SELECT(THD *thd_param, bool retrieve_full_rows, MEM_ROOT *parent_alloc) : cpk_quick(NULL), thd(thd_param), need_to_fetch_row(retrieve_full_rows), - scans_inited(false) + scans_inited(FALSE) { index= MAX_KEY; head= table; @@ -1022,7 +1022,7 @@ int QUICK_ROR_INTERSECT_SELECT::reset() DBUG_ENTER("QUICK_ROR_INTERSECT_SELECT::reset"); if (!scans_inited && init_ror_merged_scan(TRUE)) DBUG_RETURN(1); - scans_inited= true; + scans_inited= TRUE; List_iterator_fast<QUICK_RANGE_SELECT> it(quick_selects); QUICK_RANGE_SELECT *quick; while ((quick= it++)) @@ -1066,7 +1066,7 @@ QUICK_ROR_INTERSECT_SELECT::~QUICK_ROR_INTERSECT_SELECT() QUICK_ROR_UNION_SELECT::QUICK_ROR_UNION_SELECT(THD *thd_param, TABLE *table) - : thd(thd_param), scans_inited(false) + : thd(thd_param), scans_inited(FALSE) { index= MAX_KEY; head= table; @@ -1148,7 +1148,7 @@ int QUICK_ROR_UNION_SELECT::reset() if (quick->init_ror_merged_scan(FALSE)) DBUG_RETURN(1); } - scans_inited= true; + scans_inited= TRUE; } queue_remove_all(&queue); /* @@ -2677,7 +2677,7 @@ static bool ror_intersect_add(ROR_INTERSECT_INFO *info, { /* Don't add this scan if it doesn't improve selectivity. */ DBUG_PRINT("info", ("The scan doesn't improve selectivity.")); - DBUG_RETURN(false); + DBUG_RETURN(FALSE); } info->out_rows *= selectivity_mult; @@ -2865,7 +2865,7 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree, while (cur_ror_scan != tree->ror_scans_end && !intersect->is_covering) { /* S= S + first(R); R= R - first(R); */ - if (!ror_intersect_add(intersect, *cur_ror_scan, false)) + if (!ror_intersect_add(intersect, *cur_ror_scan, FALSE)) { cur_ror_scan++; continue; @@ -8067,7 +8067,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min() } else { - /* Apply the constant equality conditions to the non-group select fields. */ + /* Apply the constant equality conditions to the non-group select fields */ if (key_infix_len > 0) { if ((result= file->index_read(record, group_prefix, real_prefix_len, @@ -8101,9 +8101,10 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min() */ if (!result) { - if(key_cmp(index_info->key_part, group_prefix, real_prefix_len)) + if (key_cmp(index_info->key_part, group_prefix, real_prefix_len)) key_restore(record, tmp_record, index_info, 0); - } else if (result == HA_ERR_KEY_NOT_FOUND) + } + else if (result == HA_ERR_KEY_NOT_FOUND) result= 0; /* There is a result in any case. */ } } |