Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f9de7149
Commit
f9de7149
authored
Jul 21, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc fixes for compile-time errors
parent
a3c4a6d0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
691 additions
and
691 deletions
+691
-691
sql/item_sum.cc
sql/item_sum.cc
+5
-7
sql/item_timefunc.cc
sql/item_timefunc.cc
+0
-1
sql/log_event.h
sql/log_event.h
+104
-104
sql/opt_range.cc
sql/opt_range.cc
+512
-511
sql/opt_range.h
sql/opt_range.h
+70
-68
No files found.
sql/item_sum.cc
View file @
f9de7149
...
@@ -2102,7 +2102,6 @@ bool Item_func_group_concat::setup(THD *thd)
...
@@ -2102,7 +2102,6 @@ bool Item_func_group_concat::setup(THD *thd)
List
<
Item
>
list
;
List
<
Item
>
list
;
SELECT_LEX
*
select_lex
=
thd
->
lex
->
current_select
;
SELECT_LEX
*
select_lex
=
thd
->
lex
->
current_select
;
uint
const_fields
;
uint
const_fields
;
byte
*
record
;
qsort_cmp2
compare_key
;
qsort_cmp2
compare_key
;
DBUG_ENTER
(
"Item_func_group_concat::setup"
);
DBUG_ENTER
(
"Item_func_group_concat::setup"
);
...
@@ -2163,7 +2162,6 @@ bool Item_func_group_concat::setup(THD *thd)
...
@@ -2163,7 +2162,6 @@ bool Item_func_group_concat::setup(THD *thd)
table
->
no_rows
=
1
;
table
->
no_rows
=
1
;
key_length
=
table
->
reclength
;
key_length
=
table
->
reclength
;
record
=
table
->
record
[
0
];
/* Offset to first result field in table */
/* Offset to first result field in table */
field_list_offset
=
table
->
fields
-
(
list
.
elements
-
const_fields
);
field_list_offset
=
table
->
fields
-
(
list
.
elements
-
const_fields
);
...
...
sql/item_timefunc.cc
View file @
f9de7149
...
@@ -2519,7 +2519,6 @@ longlong Item_func_timestamp_diff::val_int()
...
@@ -2519,7 +2519,6 @@ longlong Item_func_timestamp_diff::val_int()
uint
year
;
uint
year
;
uint
year_beg
,
year_end
,
month_beg
,
month_end
;
uint
year_beg
,
year_end
,
month_beg
,
month_end
;
uint
diff_days
=
(
uint
)
(
seconds
/
86400L
);
uint
diff_days
=
(
uint
)
(
seconds
/
86400L
);
uint
diff_months
=
0
;
uint
diff_years
=
0
;
uint
diff_years
=
0
;
if
(
neg
==
-
1
)
if
(
neg
==
-
1
)
{
{
...
...
sql/log_event.h
View file @
f9de7149
...
@@ -521,7 +521,7 @@ public:
...
@@ -521,7 +521,7 @@ public:
virtual
int
write_data_body
(
IO_CACHE
*
file
__attribute__
((
unused
)))
virtual
int
write_data_body
(
IO_CACHE
*
file
__attribute__
((
unused
)))
{
return
0
;
}
{
return
0
;
}
virtual
Log_event_type
get_type_code
()
=
0
;
virtual
Log_event_type
get_type_code
()
=
0
;
virtual
const
bool
is_valid
()
=
0
;
virtual
bool
is_valid
()
const
=
0
;
inline
bool
get_cache_stmt
()
{
return
cache_stmt
;
}
inline
bool
get_cache_stmt
()
{
return
cache_stmt
;
}
Log_event
(
const
char
*
buf
,
const
Format_description_log_event
*
description_event
);
Log_event
(
const
char
*
buf
,
const
Format_description_log_event
*
description_event
);
virtual
~
Log_event
()
{
free_temp_buf
();}
virtual
~
Log_event
()
{
free_temp_buf
();}
...
@@ -669,7 +669,7 @@ public:
...
@@ -669,7 +669,7 @@ public:
Log_event_type
get_type_code
()
{
return
QUERY_EVENT
;
}
Log_event_type
get_type_code
()
{
return
QUERY_EVENT
;
}
int
write
(
IO_CACHE
*
file
);
int
write
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
// returns 0 on success, -1 on error
int
write_data
(
IO_CACHE
*
file
);
// returns 0 on success, -1 on error
const
bool
is_valid
()
{
return
query
!=
0
;
}
bool
is_valid
()
const
{
return
query
!=
0
;
}
int
get_data_size
()
int
get_data_size
()
{
{
/* Note that the "1" below is the db's length. */
/* Note that the "1" below is the db's length. */
...
@@ -711,7 +711,7 @@ public:
...
@@ -711,7 +711,7 @@ public:
Slave_log_event
(
const
char
*
buf
,
uint
event_len
);
Slave_log_event
(
const
char
*
buf
,
uint
event_len
);
~
Slave_log_event
();
~
Slave_log_event
();
int
get_data_size
();
int
get_data_size
();
const
bool
is_valid
()
{
return
master_host
!=
0
;
}
bool
is_valid
()
const
{
return
master_host
!=
0
;
}
Log_event_type
get_type_code
()
{
return
SLAVE_EVENT
;
}
Log_event_type
get_type_code
()
{
return
SLAVE_EVENT
;
}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
};
};
...
@@ -806,7 +806,7 @@ public:
...
@@ -806,7 +806,7 @@ public:
}
}
int
write_data_header
(
IO_CACHE
*
file
);
int
write_data_header
(
IO_CACHE
*
file
);
int
write_data_body
(
IO_CACHE
*
file
);
int
write_data_body
(
IO_CACHE
*
file
);
const
bool
is_valid
()
{
return
table_name
!=
0
;
}
bool
is_valid
()
const
{
return
table_name
!=
0
;
}
int
get_data_size
()
int
get_data_size
()
{
{
return
(
table_name_len
+
db_len
+
2
+
fname_len
return
(
table_name_len
+
db_len
+
2
+
fname_len
...
@@ -873,7 +873,7 @@ public:
...
@@ -873,7 +873,7 @@ public:
~
Start_log_event_v3
()
{}
~
Start_log_event_v3
()
{}
Log_event_type
get_type_code
()
{
return
START_EVENT_V3
;}
Log_event_type
get_type_code
()
{
return
START_EVENT_V3
;}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
bool
is_valid
()
{
return
1
;
}
bool
is_valid
()
const
{
return
1
;
}
int
get_data_size
()
int
get_data_size
()
{
{
return
START_V3_HEADER_LEN
;
//no variable-sized part
return
START_V3_HEADER_LEN
;
//no variable-sized part
...
@@ -913,7 +913,7 @@ public:
...
@@ -913,7 +913,7 @@ public:
~
Format_description_log_event
()
{
my_free
((
gptr
)
post_header_len
,
MYF
(
0
));
}
~
Format_description_log_event
()
{
my_free
((
gptr
)
post_header_len
,
MYF
(
0
));
}
Log_event_type
get_type_code
()
{
return
FORMAT_DESCRIPTION_EVENT
;}
Log_event_type
get_type_code
()
{
return
FORMAT_DESCRIPTION_EVENT
;}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
bool
is_valid
()
bool
is_valid
()
const
{
{
return
((
common_header_len
>=
((
binlog_version
==
1
)
?
OLD_HEADER_LEN
:
return
((
common_header_len
>=
((
binlog_version
==
1
)
?
OLD_HEADER_LEN
:
LOG_EVENT_MINIMAL_HEADER_LEN
))
&&
LOG_EVENT_MINIMAL_HEADER_LEN
))
&&
...
@@ -968,7 +968,7 @@ public:
...
@@ -968,7 +968,7 @@ public:
const
char
*
get_var_type_name
();
const
char
*
get_var_type_name
();
int
get_data_size
()
{
return
9
;
/* sizeof(type) + sizeof(val) */
;}
int
get_data_size
()
{
return
9
;
/* sizeof(type) + sizeof(val) */
;}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
bool
is_valid
()
{
return
1
;
}
bool
is_valid
()
const
{
return
1
;
}
};
};
/*****************************************************************************
/*****************************************************************************
...
@@ -1004,7 +1004,7 @@ class Rand_log_event: public Log_event
...
@@ -1004,7 +1004,7 @@ class Rand_log_event: public Log_event
Log_event_type
get_type_code
()
{
return
RAND_EVENT
;}
Log_event_type
get_type_code
()
{
return
RAND_EVENT
;}
int
get_data_size
()
{
return
16
;
/* sizeof(ulonglong) * 2*/
}
int
get_data_size
()
{
return
16
;
/* sizeof(ulonglong) * 2*/
}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
bool
is_valid
()
{
return
1
;
}
bool
is_valid
()
const
{
return
1
;
}
};
};
/*****************************************************************************
/*****************************************************************************
...
@@ -1051,7 +1051,7 @@ public:
...
@@ -1051,7 +1051,7 @@ public:
UV_CHARSET_NUMBER_SIZE
+
UV_VAL_LEN_SIZE
+
val_len
);
UV_CHARSET_NUMBER_SIZE
+
UV_VAL_LEN_SIZE
+
val_len
);
}
}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
bool
is_valid
()
{
return
1
;
}
bool
is_valid
()
const
{
return
1
;
}
};
};
/*****************************************************************************
/*****************************************************************************
...
@@ -1077,7 +1077,7 @@ public:
...
@@ -1077,7 +1077,7 @@ public:
{}
{}
~
Stop_log_event
()
{}
~
Stop_log_event
()
{}
Log_event_type
get_type_code
()
{
return
STOP_EVENT
;}
Log_event_type
get_type_code
()
{
return
STOP_EVENT
;}
const
bool
is_valid
()
{
return
1
;
}
bool
is_valid
()
const
{
return
1
;
}
};
};
#endif
/* HAVE_REPLICATION */
#endif
/* HAVE_REPLICATION */
...
@@ -1126,7 +1126,7 @@ public:
...
@@ -1126,7 +1126,7 @@ public:
return
(
LOG_EVENT_MINIMAL_HEADER_LEN
+
get_data_size
());
return
(
LOG_EVENT_MINIMAL_HEADER_LEN
+
get_data_size
());
}
}
int
get_data_size
()
{
return
ident_len
+
ROTATE_HEADER_LEN
;}
int
get_data_size
()
{
return
ident_len
+
ROTATE_HEADER_LEN
;}
const
bool
is_valid
()
{
return
new_log_ident
!=
0
;
}
bool
is_valid
()
const
{
return
new_log_ident
!=
0
;
}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
};
};
...
@@ -1186,7 +1186,7 @@ public:
...
@@ -1186,7 +1186,7 @@ public:
Load_log_event
::
get_data_size
()
+
Load_log_event
::
get_data_size
()
+
4
+
1
+
block_len
);
4
+
1
+
block_len
);
}
}
const
bool
is_valid
()
{
return
inited_from_old
||
block
!=
0
;
}
bool
is_valid
()
const
{
return
inited_from_old
||
block
!=
0
;
}
int
write_data_header
(
IO_CACHE
*
file
);
int
write_data_header
(
IO_CACHE
*
file
);
int
write_data_body
(
IO_CACHE
*
file
);
int
write_data_body
(
IO_CACHE
*
file
);
/*
/*
...
@@ -1236,7 +1236,7 @@ public:
...
@@ -1236,7 +1236,7 @@ public:
~
Append_block_log_event
()
{}
~
Append_block_log_event
()
{}
Log_event_type
get_type_code
()
{
return
APPEND_BLOCK_EVENT
;}
Log_event_type
get_type_code
()
{
return
APPEND_BLOCK_EVENT
;}
int
get_data_size
()
{
return
block_len
+
APPEND_BLOCK_HEADER_LEN
;}
int
get_data_size
()
{
return
block_len
+
APPEND_BLOCK_HEADER_LEN
;}
const
bool
is_valid
()
{
return
block
!=
0
;
}
bool
is_valid
()
const
{
return
block
!=
0
;
}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
char
*
get_db
()
{
return
db
;
}
const
char
*
get_db
()
{
return
db
;
}
};
};
...
@@ -1268,7 +1268,7 @@ public:
...
@@ -1268,7 +1268,7 @@ public:
~
Delete_file_log_event
()
{}
~
Delete_file_log_event
()
{}
Log_event_type
get_type_code
()
{
return
DELETE_FILE_EVENT
;}
Log_event_type
get_type_code
()
{
return
DELETE_FILE_EVENT
;}
int
get_data_size
()
{
return
DELETE_FILE_HEADER_LEN
;}
int
get_data_size
()
{
return
DELETE_FILE_HEADER_LEN
;}
const
bool
is_valid
()
{
return
file_id
!=
0
;
}
bool
is_valid
()
const
{
return
file_id
!=
0
;
}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
char
*
get_db
()
{
return
db
;
}
const
char
*
get_db
()
{
return
db
;
}
};
};
...
@@ -1299,7 +1299,7 @@ public:
...
@@ -1299,7 +1299,7 @@ public:
~
Execute_load_log_event
()
{}
~
Execute_load_log_event
()
{}
Log_event_type
get_type_code
()
{
return
EXEC_LOAD_EVENT
;}
Log_event_type
get_type_code
()
{
return
EXEC_LOAD_EVENT
;}
int
get_data_size
()
{
return
EXEC_LOAD_HEADER_LEN
;}
int
get_data_size
()
{
return
EXEC_LOAD_HEADER_LEN
;}
const
bool
is_valid
()
{
return
file_id
!=
0
;
}
bool
is_valid
()
const
{
return
file_id
!=
0
;
}
int
write_data
(
IO_CACHE
*
file
);
int
write_data
(
IO_CACHE
*
file
);
const
char
*
get_db
()
{
return
db
;
}
const
char
*
get_db
()
{
return
db
;
}
};
};
...
@@ -1319,7 +1319,7 @@ public:
...
@@ -1319,7 +1319,7 @@ public:
~
Unknown_log_event
()
{}
~
Unknown_log_event
()
{}
void
print
(
FILE
*
file
,
bool
short_form
=
0
,
LAST_EVENT_INFO
*
last_event_info
=
0
);
void
print
(
FILE
*
file
,
bool
short_form
=
0
,
LAST_EVENT_INFO
*
last_event_info
=
0
);
Log_event_type
get_type_code
()
{
return
UNKNOWN_EVENT
;}
Log_event_type
get_type_code
()
{
return
UNKNOWN_EVENT
;}
const
bool
is_valid
()
{
return
1
;
}
bool
is_valid
()
const
{
return
1
;
}
};
};
#endif
#endif
...
...
sql/opt_range.cc
View file @
f9de7149
...
@@ -2070,7 +2070,7 @@ skip_to_ror_scan:
...
@@ -2070,7 +2070,7 @@ skip_to_ror_scan:
double
roru_total_cost
;
double
roru_total_cost
;
roru_total_cost
=
roru_index_costs
+
roru_total_cost
=
roru_index_costs
+
rows2double
(
roru_total_records
)
*
log
(
n_child_scans
)
/
rows2double
(
roru_total_records
)
*
log
(
(
double
)
n_child_scans
)
/
(
TIME_FOR_COMPARE_ROWID
*
M_LN2
)
+
(
TIME_FOR_COMPARE_ROWID
*
M_LN2
)
+
get_sweep_read_cost
(
param
,
roru_total_records
);
get_sweep_read_cost
(
param
,
roru_total_records
);
...
@@ -2895,7 +2895,8 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
...
@@ -2895,7 +2895,8 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
tree
->
ror_scans
,
ror_scan_mark
););
tree
->
ror_scans
,
ror_scan_mark
););
/* Add priority queue use cost. */
/* Add priority queue use cost. */
total_cost
+=
rows2double
(
records
)
*
log
(
ror_scan_mark
-
tree
->
ror_scans
)
/
total_cost
+=
rows2double
(
records
)
*
log
((
double
)(
ror_scan_mark
-
tree
->
ror_scans
))
/
(
TIME_FOR_COMPARE_ROWID
*
M_LN2
);
(
TIME_FOR_COMPARE_ROWID
*
M_LN2
);
DBUG_PRINT
(
"info"
,
(
"Covering ROR-intersect full cost: %g"
,
total_cost
));
DBUG_PRINT
(
"info"
,
(
"Covering ROR-intersect full cost: %g"
,
total_cost
));
...
...
sql/opt_range.h
View file @
f9de7149
...
@@ -569,4 +569,6 @@ public:
...
@@ -569,4 +569,6 @@ public:
int
get_type
()
{
return
QS_TYPE_FULLTEXT
;
}
int
get_type
()
{
return
QS_TYPE_FULLTEXT
;
}
};
};
QUICK_RANGE_SELECT
*
get_quick_select_for_ref
(
THD
*
thd
,
TABLE
*
table
,
struct
st_table_ref
*
ref
);
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment