MySQL  8.0.27
Source Code Documentation
parse_tree_items.cc File Reference
#include "sql/parse_tree_items.h"
#include <sys/types.h>
#include "m_string.h"
#include "my_dbug.h"
#include "my_sqlcommand.h"
#include "my_sys.h"
#include "my_time.h"
#include "mysql/udf_registration_types.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "sql/auth/auth_acls.h"
#include "sql/item_cmpfunc.h"
#include "sql/item_create.h"
#include "sql/item_subselect.h"
#include "sql/mysqld.h"
#include "sql/parse_tree_nodes.h"
#include "sql/protocol.h"
#include "sql/sp.h"
#include "sql/sp_head.h"
#include "sql/sp_pcontext.h"
#include "sql/sql_class.h"
#include "sql/sql_error.h"
#include "sql/sql_lex.h"
#include "sql/sql_list.h"
#include "sql/sql_udf.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/trigger_def.h"
#include "sql_string.h"
#include "template_utils.h"

Functions

static Itemchange_truth_value_of_condition (Parse_context *pc, Item *expr, Item::Bool_test truth_test)
 Apply a truth test to given expression. More...
 
static Itemhandle_sql2003_note184_exception (Parse_context *pc, Item *left, bool equal, Item *expr)
 Helper to resolve the SQL:2003 Syntax exception 1) in <in predicate>. More...
 

Function Documentation

◆ change_truth_value_of_condition()

static Item* change_truth_value_of_condition ( Parse_context pc,
Item expr,
Item::Bool_test  truth_test 
)
static

Apply a truth test to given expression.

Either the expression can implement it itself, or we create an Item node to implement it by wrapping the expression. Expression is possibly an incomplete predicate.

Parameters
pccurrent parse context
exprexpression
truth_testtest to apply
Returns
the resulting expression, or NULL if error

◆ handle_sql2003_note184_exception()

static Item* handle_sql2003_note184_exception ( Parse_context pc,
Item left,
bool  equal,
Item expr 
)
static

Helper to resolve the SQL:2003 Syntax exception 1) in <in predicate>.

See SQL:2003, Part 2, section 8.4 <in predicate>, Note 184, page 383. This function returns the proper item for the SQL expression left [NOT] IN ( expr )

Parameters
pcthe current parse context
leftthe in predicand
equaltrue for IN predicates, false for NOT IN predicates
exprfirst and only expression of the in value list
Returns
an expression representing the IN predicate.