diff options
author | unknown <monty@hundin.mysql.fi> | 2002-10-15 01:54:51 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-10-15 01:54:51 +0300 |
commit | 3642350465a2fd833d2402564ed9e1c65ff9fcd0 (patch) | |
tree | 01e28de4d5a39440ec9be3f0373cf34da3874144 /sql | |
parent | bdea072ea4389666e795790d7768987eccf108b4 (diff) | |
parent | 1835d68915b1bf7cd50e6e53b667a638c7a826a1 (diff) | |
download | mariadb-git-3642350465a2fd833d2402564ed9e1c65ff9fcd0.tar.gz |
Merge work:/my/mysql-4.1 into hundin.mysql.fi:/my/mysql-4.1
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innodb.cc | 4 | ||||
-rw-r--r-- | sql/init.cc | 1 | ||||
-rw-r--r-- | sql/log.cc | 1 | ||||
-rw-r--r-- | sql/net_pkg.cc | 4 | ||||
-rw-r--r-- | sql/sql_db.cc | 7 | ||||
-rw-r--r-- | sql/sql_lex.h | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 5 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 1 | ||||
-rw-r--r-- | sql/sql_select.cc | 7 | ||||
-rw-r--r-- | sql/sql_show.cc | 5 | ||||
-rw-r--r-- | sql/sql_union.cc | 4 |
11 files changed, 17 insertions, 24 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 02f1d33b1dc..f75f431ad52 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3155,8 +3155,8 @@ innobase_drop_database( memcpy(namebuf, ptr, len); namebuf[len] = '/'; namebuf[len + 1] = '\0'; -#ifdef __WIN__ - casedn_str(namebuf); +#ifdef FN_NO_CASE_SENCE + my_casedn_str(system_charset_info, namebuf); #endif trx = trx_allocate_for_mysql(); diff --git a/sql/init.cc b/sql/init.cc index 052ee16925e..8834fd3a89c 100644 --- a/sql/init.cc +++ b/sql/init.cc @@ -24,7 +24,6 @@ void unireg_init(ulong options) { uint i; double nr; - CHARSET_INFO *cs; DBUG_ENTER("unireg_init"); MYSYS_PROGRAM_DONT_USE_CURSES(); diff --git a/sql/log.cc b/sql/log.cc index 59f99e3460e..8cb1577d745 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -973,7 +973,6 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command, last_time=skr; struct tm tm_tmp; struct tm *start; - ulong length; localtime_r(&skr,&tm_tmp); start=&tm_tmp; /* Note that my_b_write() assumes it knows the length for this */ diff --git a/sql/net_pkg.cc b/sql/net_pkg.cc index 9f91db95052..1da625e776f 100644 --- a/sql/net_pkg.cc +++ b/sql/net_pkg.cc @@ -273,12 +273,12 @@ send_eof(THD *thd, bool no_flush) { if (!no_flush && (thd->client_capabilities & CLIENT_PROTOCOL_41)) { - char buff[5]; + uchar buff[5]; uint tmp= min(thd->total_warn_count, 65535); buff[0]=254; int2store(buff+1, tmp); int2store(buff+3, 0); // No flags yet - VOID(my_net_write(net,buff,5)); + VOID(my_net_write(net,(char*) buff,5)); VOID(net_flush(net)); } else diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 1d843b78d4e..58b12bca00d 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -69,7 +69,6 @@ static bool write_db_opt(const char *path, HA_CREATE_INFO *create) error=0; my_close(file,MYF(0)); } -exit: return error; } @@ -104,7 +103,7 @@ static bool load_db_opt(const char *path, HA_CREATE_INFO *create) IO_CACHE cache; init_io_cache(&cache, file, IO_SIZE, READ_CACHE, 0, 0, MYF(0)); - while ((int) (nbytes= my_b_gets(&cache, (byte*) buf, sizeof(buf))) > 0) + while ((int) (nbytes= my_b_gets(&cache, (char*) buf, sizeof(buf))) > 0) { char *pos= buf+nbytes-1; /* Remove end space and control characters */ @@ -251,10 +250,8 @@ exit2: int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) { char path[FN_REFLEN+16]; - MY_DIR *dirp; long result=1; int error = 0; - register File file; uint create_options = create_info ? create_info->options : 0; DBUG_ENTER("mysql_alter_db"); @@ -602,7 +599,7 @@ bool mysql_change_db(THD *thd, const char *name) int mysqld_show_create_db(THD *thd, const char *dbname) { - int length, db_length; + int length; char path[FN_REFLEN], *to; uint db_access; bool found_libchar; diff --git a/sql/sql_lex.h b/sql/sql_lex.h index fe708d3b782..f301e4c8af0 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -210,7 +210,7 @@ private: SELECT_LEX_UNIT - unit of selects (UNION, INTERSECT, ...) group SELECT_LEXs */ -class st_lex; +struct st_lex; class st_select_lex; class THD; class select_result; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7902e66043d..e096ef7869e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1287,6 +1287,7 @@ mysql_execute_command(THD *thd) int res= 0; LEX *lex= &thd->lex; TABLE_LIST *tables= (TABLE_LIST*) lex->select_lex.table_list.first; + TABLE_LIST *cursor; SELECT_LEX *select_lex= &lex->select_lex; SELECT_LEX_UNIT *unit= &lex->unit; DBUG_ENTER("mysql_execute_command"); @@ -1343,7 +1344,7 @@ mysql_execute_command(THD *thd) DBUG_VOID_RETURN; } //check rights - for (TABLE_LIST *cursor= tables; + for (cursor= tables; cursor; cursor= cursor->next) if (cursor->derived) @@ -1361,7 +1362,7 @@ mysql_execute_command(THD *thd) } thd->send_explain_fields(explain_result); // EXPLAIN derived tables - for (TABLE_LIST *cursor= tables; + for (cursor= tables; cursor; cursor= cursor->next) if (cursor->derived) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index a085795fa76..bd115f0fc1e 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -634,7 +634,6 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length) { MEM_ROOT thd_root = thd->mem_root; PREP_STMT stmt; - bool error; DBUG_ENTER("mysql_stmt_prepare"); bzero((char*) &stmt, sizeof(stmt)); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f7d585e85f8..c120dc9d16f 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -171,7 +171,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result) result->abort(); if (res || thd->net.report_error) { - send_error(thd, 0, MYF(0)); + send_error(thd, 0, NullS); res= 1; } delete result; @@ -7177,7 +7177,6 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, bool distinct,const char *message) { List<Item> field_list; - Item *item; List<Item> item_list; THD *thd=join->thd; SELECT_LEX *select_lex = &(join->thd->lex.select_lex); @@ -7191,7 +7190,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, if (message) { - item_list.push_back(new Item_int((int)thd->lex.select->select_number)); + item_list.push_back(new Item_int((int32) thd->lex.select->select_number)); item_list.push_back(new Item_string(thd->lex.select->type, strlen(thd->lex.select->type), default_charset_info)); @@ -7218,7 +7217,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, tmp2.length(0); item_list.empty(); - item_list.push_back(new Item_int((int)thd->lex.select->select_number)); + item_list.push_back(new Item_int((int32) thd->lex.select->select_number)); item_list.push_back(new Item_string(thd->lex.select->type, strlen(thd->lex.select->type), default_charset_info)); diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 214cd321562..d6fe2f3772a 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -230,7 +230,7 @@ int mysqld_show_table_types(THD *thd) const char *option_name= show_comp_option_name[(int) *types->value]; if (*types->value == SHOW_OPTION_YES && - !strcasecmp(default_type_name, types->type)) + !my_strcasecmp(system_charset_info, default_type_name, types->type)) option_name= "DEFAULT"; net_store_data(packet, option_name); net_store_data(packet, types->comment); @@ -1398,7 +1398,6 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) int mysqld_show_charsets(THD *thd, const char *wild) { - uint i; char buff[8192]; String packet2(buff,sizeof(buff),default_charset_info); List<Item> field_list; @@ -1425,7 +1424,7 @@ int mysqld_show_charsets(THD *thd, const char *wild) net_store_data(&packet2,convert,cs[0]->name); net_store_data(&packet2,(uint32) cs[0]->number); net_store_data(&packet2,(uint32) cs[0]->strxfrm_multiply); - net_store_data(&packet2,(uint32) cs[0]->mbmaxlen ? cs[0]->mbmaxlen : 1); + net_store_data(&packet2,(uint32) (cs[0]->mbmaxlen ? cs[0]->mbmaxlen : 1)); if (my_net_write(&thd->net, (char*) packet2.ptr(),packet2.length())) goto err; diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 74cb8f6ffea..01b0eb9e6ec 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -116,7 +116,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *result) TMP_TABLE_PARAM tmp_table_param; this->thd= thd; this->result= result; - SELECT_LEX *lex_select_save= thd->lex.select; + SELECT_LEX *lex_select_save= thd->lex.select, *sl; /* Global option */ if (((void*)(global_parameters)) == ((void*)this)) @@ -184,7 +184,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *result) // prepare selects joins.empty(); - for (SELECT_LEX *sl= first_select(); sl; sl= sl->next_select()) + for (sl= first_select(); sl; sl= sl->next_select()) { JOIN *join= new JOIN(thd, sl->item_list, sl->options | thd->options | SELECT_NO_UNLOCK | |