diff options
author | unknown <monty@mysql.com> | 2004-03-30 02:32:41 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-03-30 02:32:41 +0300 |
commit | ceeaa24d187b228fd6e8b1ac1e667d341155640f (patch) | |
tree | 54b32bf1935af765ea1bb9b118082d9ce067d4c0 /sql | |
parent | db9fde085fdbdacd48760c0243805e8df8b39a8c (diff) | |
download | mariadb-git-ceeaa24d187b228fd6e8b1ac1e667d341155640f.tar.gz |
false/true -> FALSE/TRUE
Fixes after last merge
mysql-test/r/bdb-crash.result:
fixed bad merge
mysql-test/r/myisam.result:
after merge fix
mysql-test/r/order_by.result:
fixed bad merge
mysql-test/t/order_by.test:
after merge fix
sql/field_conv.cc:
false/true -> FALSE/TRUE
sql/handler.cc:
false/true -> FALSE/TRUE
sql/item.cc:
false/true -> FALSE/TRUE
sql/item_cmpfunc.cc:
false/true -> FALSE/TRUE
sql/item_sum.cc:
false/true -> FALSE/TRUE
sql/slave.cc:
false/true -> FALSE/TRUE
sql/sql_acl.cc:
false/true -> FALSE/TRUE
sql/sql_cache.cc:
after merge fix
sql/sql_help.cc:
false/true -> FALSE/TRUE
sql/sql_olap.cc:
false/true -> FALSE/TRUE
sql/sql_parse.cc:
false/true -> FALSE/TRUE
sql/sql_select.cc:
fix after bad merge
sql/sql_table.cc:
fix after bad merge
sql/sql_test.cc:
false/true -> FALSE/TRUE
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field_conv.cc | 2 | ||||
-rw-r--r-- | sql/handler.cc | 4 | ||||
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 6 | ||||
-rw-r--r-- | sql/item_sum.cc | 2 | ||||
-rw-r--r-- | sql/slave.cc | 2 | ||||
-rw-r--r-- | sql/sql_acl.cc | 8 | ||||
-rw-r--r-- | sql/sql_cache.cc | 5 | ||||
-rw-r--r-- | sql/sql_help.cc | 6 | ||||
-rw-r--r-- | sql/sql_olap.cc | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 29 | ||||
-rw-r--r-- | sql/sql_table.cc | 24 | ||||
-rw-r--r-- | sql/sql_test.cc | 12 |
14 files changed, 53 insertions, 53 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 3272c2faf48..5632c63c521 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -173,7 +173,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions) field->reset(); if (field == field->table->next_number_field) { - field->table->auto_increment_field_not_null= false; + field->table->auto_increment_field_not_null= FALSE; return 0; // field is set in handler.cc } if (current_thd->count_cuted_fields == CHECK_FIELD_WARN) diff --git a/sql/handler.cc b/sql/handler.cc index d69836dadfa..38b95424637 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -879,11 +879,11 @@ void handler::update_auto_increment() table->auto_increment_field_not_null && current_thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO) { - table->auto_increment_field_not_null= false; + table->auto_increment_field_not_null= FALSE; auto_increment_column_changed=0; DBUG_VOID_RETURN; } - table->auto_increment_field_not_null= false; + table->auto_increment_field_not_null= FALSE; thd=current_thd; if ((nr=thd->next_insert_id)) thd->next_insert_id=0; // Clear after use diff --git a/sql/item.cc b/sql/item.cc index 36b263f62cf..48e35f06ec3 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -637,7 +637,7 @@ void Item_param::set_time(TIME *tm, timestamp_type type) ltime.time_type= type; - item_is_time= true; + item_is_time= TRUE; item_type= STRING_ITEM; value_is_set= 1; } diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 9175f12a60c..24d60b51eab 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -770,11 +770,13 @@ longlong Item_func_between::val_int() null_value=1; else if (args[1]->null_value) { - null_value= sortcmp(value,b,cmp_collation.collation) <= 0; // not null if false range. + // Set to not null if false range. + null_value= sortcmp(value,b,cmp_collation.collation) <= 0; } else { - null_value= sortcmp(value,a,cmp_collation.collation) >= 0; // not null if false range. + // Set to not null if false range. + null_value= sortcmp(value,a,cmp_collation.collation) >= 0; } } else if (cmp_type == INT_RESULT) diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 807585f696d..113ef0e1922 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1759,7 +1759,7 @@ void Item_func_group_concat::clear() result.length(0); result.copy(); null_value= TRUE; - warning_for_row= false; + warning_for_row= FALSE; if (table) { table->file->extra(HA_EXTRA_NO_CACHE); diff --git a/sql/slave.cc b/sql/slave.cc index 5493d422d37..be9a5795233 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2681,7 +2681,7 @@ bool st_relay_log_info::is_until_satisfied() /* Probably error so we aborting */ sql_print_error("Slave SQL thread is stopped because UNTIL " "condition is bad."); - return true; + return TRUE; } } else diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 9284b1cd574..ef5036bb9f1 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1293,20 +1293,20 @@ bool hostname_requires_resolving(const char *hostname) { char cur; if (!hostname) - return false; + return FALSE; int namelen= strlen(hostname); int lhlen= strlen(my_localhost); if ((namelen == lhlen) && !my_strnncoll(&my_charset_latin1, (const uchar *)hostname, namelen, (const uchar *)my_localhost, strlen(my_localhost))) - return false; + return FALSE; for (; (cur=*hostname); hostname++) { if ((cur != '%') && (cur != '_') && (cur != '.') && ((cur < '0') || (cur > '9'))) - return true; + return TRUE; } - return false; + return FALSE; } /* diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 52b0b05a757..66422a5ed3a 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -883,9 +883,8 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) DBUG_PRINT("qcache", ("Another thread process same query")); } } - else - if (thd->lex.sql_command == SQLCOM_SELECT) - statistic_increment(refused, &structure_guard_mutex); + else if (thd->lex->sql_command == SQLCOM_SELECT) + statistic_increment(refused, &structure_guard_mutex); end: DBUG_VOID_RETURN; diff --git a/sql/sql_help.cc b/sql/sql_help.cc index f6bae67c3b6..980ed4047f3 100644 --- a/sql/sql_help.cc +++ b/sql/sql_help.cc @@ -731,12 +731,12 @@ int mysqld_help(THD *thd, const char *mask) &categories_list,&category_id); if (!count_categories) { - if (send_header_2(protocol,false)) + if (send_header_2(protocol,FALSE)) goto end; } else if (count_categories > 1) { - if (send_header_2(protocol,false) || + if (send_header_2(protocol,FALSE) || send_variant_2_list(mem_root,protocol,&categories_list,"Y",0)) goto end; } @@ -780,7 +780,7 @@ int mysqld_help(THD *thd, const char *mask) else { /* First send header and functions */ - if (send_header_2(protocol, false) || + if (send_header_2(protocol, FALSE) || send_variant_2_list(mem_root,protocol, &topics_list, "N", 0)) goto end; search_categories(thd, tables[1].table, used_fields, diff --git a/sql/sql_olap.cc b/sql/sql_olap.cc index 026ddbae7c7..46f1e6c156e 100644 --- a/sql/sql_olap.cc +++ b/sql/sql_olap.cc @@ -64,7 +64,7 @@ static int make_new_olap_select(LEX *lex, SELECT_LEX *select_lex, List<Item> new while ((item=list_it++)) { - bool not_found=true; + bool not_found= TRUE; if (item->type()==Item::FIELD_ITEM) { Item_field *iif = (Item_field *)item; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 54d878eb760..68ef195cdc4 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1389,7 +1389,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, /* Clear variables that are allocated */ thd->user_connect= 0; - int res= check_user(thd, COM_CHANGE_USER, passwd, passwd_len, db, false); + int res= check_user(thd, COM_CHANGE_USER, passwd, passwd_len, db, FALSE); if (res) { diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2ac1b116635..63fe8d77f1a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1089,7 +1089,7 @@ JOIN::exec() if (!tables_list) { // Only test of functions if (select_options & SELECT_DESCRIBE) - select_describe(this, false, false, false, + select_describe(this, FALSE, FALSE, FALSE, (zero_result_cause?zero_result_cause:"No tables used")); else { @@ -4112,7 +4112,7 @@ return_zero_rows(JOIN *join, select_result *result,TABLE_LIST *tables, if (select_options & SELECT_DESCRIBE) { - select_describe(join, false, false, false, info); + select_describe(join, FALSE, FALSE, FALSE, info); DBUG_RETURN(0); } @@ -7161,8 +7161,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, /* check if we can use a key to resolve the group */ /* Tables using JT_NEXT are handled here */ uint nr; - key_map keys_to_use, keys; - keys_to_use.set_all(); + key_map keys; /* If not used with LIMIT, only use keys if the whole query can be @@ -7170,18 +7169,18 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, retrieving all rows through an index. */ if (select_limit >= table->file->records) + { + keys= *table->file->keys_to_use_for_scanning(); + keys.merge(table->used_keys); -nning(); - - - -ified in FORCE INDEX clause, - -n ORDER BY. - - -ry); - + /* + We are adding here also the index speified in FORCE INDEX clause, + if any. + This is to allow users to use index in ORDER BY. + */ + if (table->force_index) + keys.merge(table->keys_in_use_for_query); + keys.intersect(usable_keys); } else keys= usable_keys; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index b3728f4833e..db6f9043ec4 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1669,13 +1669,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables, case HA_ADMIN_REJECT: protocol->store("status", 6, system_charset_info); protocol->store("Operation need committed state",30, system_charset_info); - open_for_modify= false; - break; - - case HA_ADMIN_REJECT: - net_store_data(packet,"status"); - net_store_data(packet,"Operation need committed state"); - open_for_modify= false; + open_for_modify= FALSE; break; case HA_ADMIN_ALREADY_DONE: @@ -2081,9 +2075,10 @@ int mysql_discard_or_import_tablespace(THD *thd, err: close_thread_tables(thd); thd->tablespace_op=FALSE; - if (error == 0) { + if (error == 0) + { send_ok(thd); - DBUG_RETURN(0); + DBUG_RETURN(0); } DBUG_RETURN(error); } @@ -2878,13 +2873,14 @@ copy_data_between_tables(TABLE *from,TABLE *to, goto err; }; - /* Turn off recovery logging since rollback of an - alter table is to delete the new table so there - is no need to log the changes to it. */ - error = ha_recovery_logging(thd,FALSE); + /* + Turn off recovery logging since rollback of an alter table is to + delete the new table so there is no need to log the changes to it. + */ + error= ha_recovery_logging(thd,FALSE); if (error) { - error = 1; + error= 1; goto err; } diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 6763181ce4a..cc3d30e5983 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -276,10 +276,14 @@ static void display_table_locks(void) THR_LOCK *lock=(THR_LOCK*) list->data; VOID(pthread_mutex_lock(&lock->mutex)); - push_locks_into_array(&saved_table_locks, lock->write.data, false, "Locked - write"); - push_locks_into_array(&saved_table_locks, lock->write_wait.data, true, "Waiting - write"); - push_locks_into_array(&saved_table_locks, lock->read.data, false, "Locked - read"); - push_locks_into_array(&saved_table_locks, lock->read_wait.data, true, "Waiting - read"); + push_locks_into_array(&saved_table_locks, lock->write.data, FALSE, + "Locked - write"); + push_locks_into_array(&saved_table_locks, lock->write_wait.data, TRUE, + "Waiting - write"); + push_locks_into_array(&saved_table_locks, lock->read.data, FALSE, + "Locked - read"); + push_locks_into_array(&saved_table_locks, lock->read_wait.data, TRUE, + "Waiting - read"); VOID(pthread_mutex_unlock(&lock->mutex)); } VOID(pthread_mutex_unlock(&THR_LOCK_lock)); |