diff options
author | miguel@hegel.local <> | 2004-05-05 02:59:17 -0300 |
---|---|---|
committer | miguel@hegel.local <> | 2004-05-05 02:59:17 -0300 |
commit | 8d1480f7c5535edc80c69cf8998538f01b058c6d (patch) | |
tree | acaa682ecb4e7413232120ad5965cc6adc2f410c /sql | |
parent | ee627d251062c455ccd57dac28497d896c721a0e (diff) | |
download | mariadb-git-8d1480f7c5535edc80c69cf8998538f01b058c6d.tar.gz |
Windows fixes for VC++ compiler compability
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 2 | ||||
-rw-r--r-- | sql/item_geofunc.cc | 3 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 6 | ||||
-rw-r--r-- | sql/opt_range.cc | 4 | ||||
-rw-r--r-- | sql/sql_insert.cc | 2 | ||||
-rw-r--r-- | sql/sql_lex.cc | 8 | ||||
-rw-r--r-- | sql/sql_parse.cc | 5 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 4 | ||||
-rw-r--r-- | sql/sql_union.cc | 3 |
9 files changed, 17 insertions, 20 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 670a2b401be..7374242ebf8 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1490,7 +1490,7 @@ int handler::compare_key(key_range *range) if (!range) return 0; // No max range - for (const char *key=range->key, *end=key+range->length; + for (const char *key= (const char*) range->key, *end=key+range->length; key < end; key+= store_length, key_part++) { diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 555c1a74eaf..d95271a54bb 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -697,8 +697,7 @@ longlong Item_func_srid::val_int() DBUG_ASSERT(fixed == 1); String *swkb= args[0]->val_str(&value); Geometry_buffer buffer; - Geometry *geom; - + null_value= (!swkb || !Geometry::create_from_wkb(&buffer, swkb->ptr() + SRID_SIZE, diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 933995c1d22..77e4b24ae41 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2825,9 +2825,9 @@ String *Item_func_uuid::val_str(String *str) uuid_time=tv; pthread_mutex_unlock(&LOCK_uuid_generator); - uint32 time_low= tv & 0xFFFFFFFF; - uint16 time_mid= (tv >> 32) & 0xFFFF; - uint16 time_hi_and_version= (tv >> 48) | UUID_VERSION; + uint32 time_low= (uint32) (tv & 0xFFFFFFFF); + uint16 time_mid= (uint16) ((tv >> 32) & 0xFFFF); + uint16 time_hi_and_version= (uint16) ((tv >> 48) | UUID_VERSION); str->realloc(UUID_LENGTH+1); str->length(UUID_LENGTH); diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 3ef1323893f..1e7bf90738c 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -2612,12 +2612,12 @@ int QUICK_SELECT::get_next() if (!(range= it++)) DBUG_RETURN(HA_ERR_END_OF_FILE); // All ranges used - start_key.key= range->min_key; + start_key.key= (const byte*) range->min_key; start_key.length= range->min_length; start_key.flag= ((range->flag & NEAR_MIN) ? HA_READ_AFTER_KEY : (range->flag & EQ_RANGE) ? HA_READ_KEY_EXACT : HA_READ_KEY_OR_NEXT); - end_key.key= range->max_key; + end_key.key= (const byte*) range->max_key; end_key.length= range->max_length; /* We use READ_AFTER_KEY here because if we are reading on a key diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 8185c716228..a4f98f842e1 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -121,7 +121,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, runs without --log-update or --log-bin). */ int log_on= DELAYED_LOG_UPDATE | DELAYED_LOG_BIN ; - bool transactional_table, log_delayed, bulk_insert; + bool transactional_table, log_delayed; uint value_count; ulong counter = 1; ulonglong id; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 19a6941fe32..63247a64319 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1668,8 +1668,8 @@ TABLE_LIST *st_lex::unlink_first_table(TABLE_LIST *tables, and from local list if it is not the same */ select_lex.table_list.first= ((&select_lex != all_selects_list) ? - (gptr) (*local_first)->next : - (gptr) tables); + (byte*) (*local_first)->next : + (byte*) tables); (*global_first)->next= 0; return tables; } @@ -1698,10 +1698,10 @@ TABLE_LIST *st_lex::link_first_table_back(TABLE_LIST *tables, we do not touch local table 'next' field => we need just put the table in the list */ - select_lex.table_list.first= (gptr) local_first; + select_lex.table_list.first= (byte*) local_first; } else - select_lex.table_list.first= (gptr) global_first; + select_lex.table_list.first= (byte*) global_first; return global_first; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a69c048a918..440e5933f7d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2601,11 +2601,11 @@ unsent_create_error: if ((result=new select_insert(tables->table,&lex->field_list, lex->duplicates))) /* Skip first table, which is the table we are inserting in */ - lex->select_lex.table_list.first= (gptr) first_local_table->next; + lex->select_lex.table_list.first= (byte*) first_local_table->next; lex->select_lex.resolve_mode= SELECT_LEX::NOMATTER_MODE; res=handle_select(thd,lex,result); /* revert changes for SP */ - lex->select_lex.table_list.first= (gptr) first_local_table; + lex->select_lex.table_list.first= (byte*) first_local_table; lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE; if (thd->net.report_error) res= -1; @@ -4362,7 +4362,6 @@ static void remove_escape(char *name) bool add_to_list(THD *thd, SQL_LIST &list,Item *item,bool asc) { ORDER *order; - Item **item_ptr; DBUG_ENTER("add_to_list"); if (!(order = (ORDER *) thd->alloc(sizeof(ORDER)))) DBUG_RETURN(1); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 6e4a748a67a..27f0c7a7c45 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1147,11 +1147,11 @@ static int mysql_test_insert_select(Prepared_statement *stmt, TABLE_LIST *first_local_table= (TABLE_LIST *)lex->select_lex.table_list.first; /* Skip first table, which is the table we are inserting in */ - lex->select_lex.table_list.first= (gptr) first_local_table->next; + lex->select_lex.table_list.first= (uchar*) first_local_table->next; lex->select_lex.resolve_mode= SELECT_LEX::NOMATTER_MODE; res= select_like_statement_test(stmt, tables); /* revert changes*/ - lex->select_lex.table_list.first= (gptr) first_local_table; + lex->select_lex.table_list.first= (uchar*) first_local_table; lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE; return res; } diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 1b3995f30be..0dcf9f4731b 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -112,7 +112,6 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, SELECT_LEX *lex_select_save= thd_arg->lex->current_select; SELECT_LEX *sl, *first_select; select_result *tmp_result; - ORDER *tmp_order; DBUG_ENTER("st_select_lex_unit::prepare"); /* @@ -215,7 +214,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, union_result->tmp_table_param.field_count= types.elements; if (!(table= create_tmp_table(thd_arg, &union_result->tmp_table_param, types, - (ORDER*) 0, union_distinct, 1, + (ORDER*) 0, (bool) union_distinct, 1, (first_select_in_union()->options | thd_arg->options | TMP_TABLE_ALL_COLUMNS), |