![]() |
MySQL 9.3.0
Source Code Documentation
|
Public Member Functions | |
Query_result_max_min_subquery (Item_subselect *item_arg, bool mx, bool ignore_nulls) | |
void | cleanup () override |
Cleanup after this execution. More... | |
bool | send_data (THD *thd, const mem_root_deque< Item * > &items) override |
![]() | |
Query_result_subquery (Item_subselect *item_arg) | |
bool | send_eof (THD *) override |
![]() | |
Query_result_interceptor () | |
uint | field_count (const mem_root_deque< Item * > &) const override |
bool | send_result_set_metadata (THD *, const mem_root_deque< Item * > &, uint) override |
![]() | |
Query_result () | |
virtual | ~Query_result ()=default |
virtual bool | needs_file_privilege () const |
virtual bool | export_result_to_object_storage () const |
Returns true if the data has to be exported to object store. More... | |
virtual bool | change_query_result (THD *, Query_result *) |
Change wrapped Query_result. More... | |
virtual bool | need_explain_interceptor () const |
virtual bool | prepare (THD *, const mem_root_deque< Item * > &, Query_expression *u) |
Perform preparation specific to the query expression or DML statement. More... | |
virtual bool | start_execution (THD *) |
Prepare for execution of the query expression or DML statement. More... | |
virtual bool | create_table_for_query_block (THD *) |
Create table, only needed to support CREATE TABLE ... SELECT. More... | |
virtual bool | check_supports_cursor () const |
Check if this query result set supports cursors. More... | |
virtual void | abort_result_set (THD *) |
virtual bool | reset () |
Cleanup after one execution of the unit, to be ready for a next execution inside the same statement. More... | |
virtual bool | use_protocol_adapter () const |
virtual bool | use_protocol_wrapper () const |
virtual void | set_limit (ha_rows) |
Only overridden (and non-empty) for Query_result_union, q.v. More... | |
virtual Server_side_cursor * | cursor () const |
virtual Table_ref * | get_create_table () const |
Private Member Functions | |
bool | cmp_real () |
Compare two floating point numbers for MAX or MIN. More... | |
bool | cmp_int () |
Compare two integer numbers for MAX or MIN. More... | |
bool | cmp_decimal () |
Compare two decimal numbers for MAX or MIN. More... | |
bool | cmp_str () |
Compare two strings for MAX or MIN. More... | |
Private Attributes | |
Item_cache * | cache |
bool(Query_result_max_min_subquery::* | op )() |
bool | fmax |
bool | ignore_nulls |
If ignoring NULLs, comparisons will skip NULL values. More... | |
Additional Inherited Members | |
![]() | |
ha_rows | estimated_rowcount |
Number of records estimated in this result. More... | |
double | estimated_cost |
Cost to execute the subquery which produces this result. More... | |
![]() | |
Item_subselect * | item |
![]() | |
Query_expression * | unit |
|
inline |
|
overridevirtual |
Cleanup after this execution.
Completes the execution and resets object before next execution of a prepared statement/stored procedure.
Reimplemented from Query_result.
|
private |
Compare two decimal numbers for MAX or MIN.
|
private |
Compare two integer numbers for MAX or MIN.
|
private |
Compare two floating point numbers for MAX or MIN.
Compare two numbers and decide if the number should be cached as the maximum/minimum number seen this far. If fmax==true, this is a comparison for MAX, otherwise it is a comparison for MIN.
val1 is the new number to compare against the current maximum/minimum. val2 is the current maximum/minimum.
ignore_nulls is used to control behavior when comparing with a NULL value. If ignore_nulls==false, the behavior is to store the first NULL value discovered (i.e, return true, that it is larger than the current maximum) and never replace it. If ignore_nulls==true, NULL values are not stored. ANY subqueries use ignore_nulls==true, ALL subqueries use ignore_nulls==false.
true | if the new number should be the new maximum/minimum. |
false | if the maximum/minimum should stay unchanged. |
|
private |
Compare two strings for MAX or MIN.
|
overridevirtual |
Implements Query_result_subquery.
|
private |
|
private |
|
private |
If ignoring NULLs, comparisons will skip NULL values.
If not ignoring NULLs, the first (if any) NULL value discovered will be returned as the maximum/minimum value.
|
private |