MySQL 8.0.39
Source Code Documentation
Distinct_check Class Reference

Checks for queries which have DISTINCT. More...

#include <aggregate_check.h>

Inheritance diagram for Distinct_check:
[legend]

Public Member Functions

 Distinct_check (Query_block *select_arg)
 
 Distinct_check (const Distinct_check &)=delete
 
Distinct_checkoperator= (const Distinct_check &)=delete
 
bool check_query (THD *thd)
 Rejects the query if it has a combination of DISTINCT and ORDER BY which could lead to randomly ordered results. More...
 

Private Attributes

Query_block *const select
 Query block which we are validating. More...
 
Item_identfailed_ident
 Identifier which triggered an error. More...
 

Friends

bool Item_sum::aggregate_check_distinct (uchar *arg)
 Just because we need to go through Item::walk() to reach all items to validate, some work must be delegated to "Item processors" (members of Item); this work conceptually belongs to Distinct_check, and needs privileged access to it. More...
 
bool Item_func_grouping::aggregate_check_distinct (uchar *arg)
 
bool Item_ident::aggregate_check_distinct (uchar *arg)
 
bool Item_func_any_value::aggregate_check_distinct (uchar *arg)
 

Additional Inherited Members

- Protected Member Functions inherited from Item_tree_walker
 Item_tree_walker ()
 
 ~Item_tree_walker ()
 
 Item_tree_walker (const Item_tree_walker &)=delete
 
Item_tree_walkeroperator= (const Item_tree_walker &)=delete
 
void stop_at (const Item *i)
 Stops walking children of this item. More...
 
bool is_stopped (const Item *i)
 

Detailed Description

Checks for queries which have DISTINCT.

Constructor & Destructor Documentation

◆ Distinct_check() [1/2]

Distinct_check::Distinct_check ( Query_block select_arg)
inline

◆ Distinct_check() [2/2]

Distinct_check::Distinct_check ( const Distinct_check )
delete

Member Function Documentation

◆ operator=()

Distinct_check & Distinct_check::operator= ( const Distinct_check )
delete

Friends And Related Function Documentation

◆ Item_func_any_value::aggregate_check_distinct

◆ Item_func_grouping::aggregate_check_distinct

◆ Item_ident::aggregate_check_distinct

◆ Item_sum::aggregate_check_distinct

bool Item_sum::aggregate_check_distinct ( uchar arg)
friend

Just because we need to go through Item::walk() to reach all items to validate, some work must be delegated to "Item processors" (members of Item); this work conceptually belongs to Distinct_check, and needs privileged access to it.

Member Data Documentation

◆ failed_ident

Item_ident* Distinct_check::failed_ident
private

Identifier which triggered an error.

◆ select

Query_block* const Distinct_check::select
private

Query block which we are validating.


The documentation for this class was generated from the following files: